mirror of
https://gitlab.com/YuukiPS/GSServer-CBT.git
synced 2024-12-25 15:29:22 +03:00
127 lines
2.8 KiB
Lua
127 lines
2.8 KiB
Lua
|
--================================================================
|
|||
|
--
|
|||
|
-- 配置
|
|||
|
--
|
|||
|
--================================================================
|
|||
|
|
|||
|
-- 怪物
|
|||
|
monsters = {
|
|||
|
}
|
|||
|
|
|||
|
-- NPC
|
|||
|
npcs = {
|
|||
|
}
|
|||
|
|
|||
|
-- 装置
|
|||
|
gadgets = {
|
|||
|
{ config_id = 11, gadget_id = 70360002, pos = { x = 343.2, y = -29.0, z = 436.9 }, rot = { x = 0.0, y = 359.0, z = 0.0 }, level = 1 }
|
|||
|
}
|
|||
|
|
|||
|
-- 区域
|
|||
|
regions = {
|
|||
|
{ config_id = 7, shape = RegionShape.SPHERE, radius = 5, pos = { x = 342.7, y = -29.0, z = 437.5 } },
|
|||
|
{ config_id = 37, shape = RegionShape.SPHERE, radius = 5, pos = { x = 337.2, y = -29.0, z = 435.3 } }
|
|||
|
}
|
|||
|
|
|||
|
-- 触发器
|
|||
|
triggers = {
|
|||
|
{ name = "GADGET_CREATE_7", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_7", action = "action_EVENT_GADGET_CREATE_7" },
|
|||
|
{ name = "SELECT_OPTION_37", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_37", action = "action_EVENT_SELECT_OPTION_37", trigger_count = 0 }
|
|||
|
}
|
|||
|
|
|||
|
-- 变量
|
|||
|
variables = {
|
|||
|
}
|
|||
|
|
|||
|
--================================================================
|
|||
|
--
|
|||
|
-- 初始化配置
|
|||
|
--
|
|||
|
--================================================================
|
|||
|
|
|||
|
-- 初始化时创建
|
|||
|
init_config = {
|
|||
|
suite = 1,
|
|||
|
rand_suite = true,
|
|||
|
npcs = { }
|
|||
|
}
|
|||
|
|
|||
|
--================================================================
|
|||
|
--
|
|||
|
-- 小组配置
|
|||
|
--
|
|||
|
--================================================================
|
|||
|
|
|||
|
suites = {
|
|||
|
{
|
|||
|
-- suite_id = 0,
|
|||
|
-- description = ,
|
|||
|
monsters = { },
|
|||
|
gadgets = { 11 },
|
|||
|
regions = { 7, 37 },
|
|||
|
triggers = { "GADGET_CREATE_7", "SELECT_OPTION_37" },
|
|||
|
rand_weight = 100
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
--================================================================
|
|||
|
--
|
|||
|
-- 触发器
|
|||
|
--
|
|||
|
--================================================================
|
|||
|
|
|||
|
-- 触发条件
|
|||
|
function condition_EVENT_GADGET_CREATE_7(context, evt)
|
|||
|
if 11 ~= evt.param1 then
|
|||
|
return false
|
|||
|
end
|
|||
|
|
|||
|
return true
|
|||
|
end
|
|||
|
|
|||
|
-- 触发操作
|
|||
|
function action_EVENT_GADGET_CREATE_7(context, evt)
|
|||
|
-- 设置操作台选项
|
|||
|
if 0 ~= ScriptLib.SetWorktopOptions(context, {10}) then
|
|||
|
return -1
|
|||
|
end
|
|||
|
|
|||
|
return 0
|
|||
|
end
|
|||
|
|
|||
|
-- 触发条件
|
|||
|
function condition_EVENT_SELECT_OPTION_37(context, evt)
|
|||
|
if 11 ~= evt.param1 then
|
|||
|
return false
|
|||
|
end
|
|||
|
|
|||
|
return true
|
|||
|
end
|
|||
|
|
|||
|
-- 触发操作
|
|||
|
function action_EVENT_SELECT_OPTION_37(context, evt)
|
|||
|
-- 根据不同的选项做不同的操作
|
|||
|
if 10 == evt.param2 then
|
|||
|
|
|||
|
-- 重新生成指定group,指定suite
|
|||
|
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240004005, suite = 1 }) then
|
|||
|
return -1
|
|||
|
end
|
|||
|
|
|||
|
-- 删除指定group: 240004003 ;指定config:11;物件身上指定option:10;
|
|||
|
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 240004003, 11, 10) then
|
|||
|
return -1
|
|||
|
end
|
|||
|
|
|||
|
-- 将configid为 11 的物件更改为状态 GadgetState.GearStart
|
|||
|
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 11, GadgetState.GearStart) then
|
|||
|
return -1
|
|||
|
end
|
|||
|
|
|||
|
return 0
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
return 0
|
|||
|
end
|