-- 基础信息 local base_info = { group_id = 250016013 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 13001, gadget_id = 70360002, pos = { x = -126.019, y = -10.095, z = -291.096 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 13002, gadget_id = 70360002, pos = { x = -131.532, y = -10.095, z = -291.056 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 13003, gadget_id = 70360002, pos = { x = -137.050, y = -10.095, z = -291.159 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 13004, gadget_id = 70360002, pos = { x = -131.534, y = -10.095, z = -290.968 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1000030, name = "GADGET_CREATE_30", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_30", action = "action_EVENT_GADGET_CREATE_30", trigger_count = 0 }, { config_id = 1000031, name = "SELECT_OPTION_31", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_31", action = "action_EVENT_SELECT_OPTION_31", trigger_count = 0 }, { config_id = 1000032, name = "GADGET_CREATE_32", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_32", action = "action_EVENT_GADGET_CREATE_32", trigger_count = 0 }, { config_id = 1000033, name = "SELECT_OPTION_33", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_33", action = "action_EVENT_SELECT_OPTION_33", trigger_count = 0 }, { config_id = 1000034, name = "GADGET_CREATE_34", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_34", action = "action_EVENT_GADGET_CREATE_34", trigger_count = 0 }, { config_id = 1000035, name = "SELECT_OPTION_35", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_35", action = "action_EVENT_SELECT_OPTION_35", trigger_count = 0 }, { config_id = 1000036, name = "GADGET_CREATE_36", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_36", action = "action_EVENT_GADGET_CREATE_36", trigger_count = 0 }, { config_id = 1000037, 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 = 3, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 13001, 13002, 13003 }, regions = { }, triggers = { "GADGET_CREATE_30", "SELECT_OPTION_31", "GADGET_CREATE_32", "SELECT_OPTION_33", "GADGET_CREATE_34", "SELECT_OPTION_35" }, rand_weight = 100 }, { -- suite_id = 2, -- description = suite_2, monsters = { }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 3, -- description = suite_3, monsters = { }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_GADGET_CREATE_30(context, evt) if 13001 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_CREATE_30(context, evt) -- 设置操作台选项 if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250016013, 13001, {7}) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid") return -1 end return 0 end -- 触发条件 function condition_EVENT_SELECT_OPTION_31(context, evt) if 13001 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_SELECT_OPTION_31(context, evt) -- 添加suite2的新内容 ScriptLib.AddExtraGroupSuite(context, 250016014, 2) -- 删除指定group: 250016013 ;指定config:9;物件身上指定option:7; if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250016013, 9, 7) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId") return -1 end -- 删除suite1的所有内容 ScriptLib.RemoveExtraGroupSuite(context, 250016013, 1) return 0 end -- 触发条件 function condition_EVENT_GADGET_CREATE_32(context, evt) if 13002 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_CREATE_32(context, evt) -- 设置操作台选项 if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250016013, 13002, {7}) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid") return -1 end return 0 end -- 触发条件 function condition_EVENT_SELECT_OPTION_33(context, evt) if 13002 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_SELECT_OPTION_33(context, evt) -- 添加suite2的新内容 ScriptLib.AddExtraGroupSuite(context, 250016015, 2) -- 删除指定group: 250016013 ;指定config:13002;物件身上指定option:7; if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250016013, 13002, 7) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId") return -1 end -- 删除suite1的所有内容 ScriptLib.RemoveExtraGroupSuite(context, 250016013, 1) return 0 end -- 触发条件 function condition_EVENT_GADGET_CREATE_34(context, evt) if 13003 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_CREATE_34(context, evt) -- 设置操作台选项 if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250016013, 13003, {7}) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid") return -1 end return 0 end -- 触发条件 function condition_EVENT_SELECT_OPTION_35(context, evt) if 13003 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_SELECT_OPTION_35(context, evt) -- 添加suite2的新内容 ScriptLib.AddExtraGroupSuite(context, 250016016, 2) -- 删除指定group: 250016013 ;指定config:13003;物件身上指定option:7; if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250016013, 13003, 7) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId") return -1 end -- 删除suite1的所有内容 ScriptLib.RemoveExtraGroupSuite(context, 250016013, 1) return 0 end -- 触发条件 function condition_EVENT_GADGET_CREATE_36(context, evt) if 4004 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_CREATE_36(context, evt) -- 设置操作台选项 if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 250016004, 4003, {7}) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid") return -1 end return 0 end -- 触发条件 function condition_EVENT_SELECT_OPTION_37(context, evt) if 4004 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_SELECT_OPTION_37(context, evt) -- 添加suite2的新内容 ScriptLib.AddExtraGroupSuite(context, 250016008, 2) -- 删除指定group: 250016004 ;指定config:4004;物件身上指定option:7; if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, 250016004, 4004, 7) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId") return -1 end -- 删除suite1的所有内容 ScriptLib.RemoveExtraGroupSuite(context, 250016004, 1) return 0 end