-- 基础信息 local base_info = { group_id = 133004478 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 478002, gadget_id = 70710111, pos = { x = 2263.972, y = 216.090, z = -905.865 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, interact_id = 12, area_id = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1478001, name = "GADGET_CREATE_478001", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_478001", action = "action_EVENT_GADGET_CREATE_478001" }, { config_id = 1478003, name = "GADGET_STATE_CHANGE_478003", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_478003", action = "action_EVENT_GADGET_STATE_CHANGE_478003" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 478002 }, regions = { }, triggers = { "GADGET_CREATE_478001" }, rand_weight = 100, ban_refresh = true }, { -- suite_id = 2, -- description = , monsters = { }, gadgets = { }, regions = { }, triggers = { "GADGET_STATE_CHANGE_478003" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_GADGET_CREATE_478001(context, evt) if 478002 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_CREATE_478001(context, evt) -- 将configid为 478002 的物件更改为状态 GadgetState.Default if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 478002, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId") return -1 end -- 添加suite2的新内容 ScriptLib.AddExtraGroupSuite(context, 133004478, 2) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 133004267, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end -- 触发条件 function condition_EVENT_GADGET_STATE_CHANGE_478003(context, evt) if 478002 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_STATE_CHANGE_478003(context, evt) -- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1 if 0 ~= ScriptLib.AddQuestProgress(context, "1330044781") then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 133004267, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 删除suite2的所有内容 ScriptLib.RemoveExtraGroupSuite(context, 133004478, 2) return 0 end