-- 基础信息 local base_info = { group_id = 144001163 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 163001, gadget_id = 70220038, pos = { x = 432.066, y = 201.520, z = -489.724 }, rot = { x = 10.297, y = 150.623, z = 351.592 }, level = 1, persistent = true, area_id = 101 }, { config_id = 163002, gadget_id = 70211001, pos = { x = 432.477, y = 202.305, z = -490.076 }, rot = { x = 2.096, y = 358.623, z = 341.649 }, level = 16, drop_tag = "战斗低级群岛", state = GadgetState.ChestLocked, isOneoff = true, persistent = true, explore = { name = "chest", exp = 1 }, area_id = 101 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1163003, name = "ANY_GADGET_DIE_163003", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_163003", action = "action_EVENT_ANY_GADGET_DIE_163003", trigger_count = 0 }, { config_id = 1163004, name = "GADGET_STATE_CHANGE_163004", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_163004", action = "action_EVENT_GADGET_STATE_CHANGE_163004", trigger_count = 0 } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 2, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 163001, 163002 }, regions = { }, triggers = { "ANY_GADGET_DIE_163003", "GADGET_STATE_CHANGE_163004" }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_GADGET_DIE_163003(context, evt) if 163001 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_ANY_GADGET_DIE_163003(context, evt) -- 将configid为 163002 的物件更改为状态 GadgetState.Default if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 163002, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId") return -1 end return 0 end -- 触发条件 function condition_EVENT_GADGET_STATE_CHANGE_163004(context, evt) if 163002 ~= evt.param2 or GadgetState.ChestOpened ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_STATE_CHANGE_163004(context, evt) -- group调整group进度,只对非randSuite有效 if 0 ~= ScriptLib.GoToGroupSuite(context, 144001163, 2) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : goto_groupSuite") return -1 end return 0 end