-- 基础信息 local base_info = { group_id = 166001175 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 175001, gadget_id = 70290204, pos = { x = 477.342, y = 378.657, z = 526.771 }, rot = { x = 3.592, y = 359.918, z = 10.595 }, level = 32, area_id = 300 }, { config_id = 175002, gadget_id = 70290233, pos = { x = 479.966, y = 379.160, z = 524.984 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 32, area_id = 300 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1175003, name = "ANY_GADGET_DIE_175003", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_175003", action = "action_EVENT_ANY_GADGET_DIE_175003" }, { config_id = 1175004, name = "GROUP_LOAD_175004", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_175004", action = "action_EVENT_GROUP_LOAD_175004", trigger_count = 0 } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 175001, 175002 }, regions = { }, triggers = { "ANY_GADGET_DIE_175003", "GROUP_LOAD_175004" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_GADGET_DIE_175003(context, evt) if 175001 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_ANY_GADGET_DIE_175003(context, evt) -- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1 if 0 ~= ScriptLib.AddQuestProgress(context, "166001047") then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 166001047, suite = 2 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 175002 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end -- 调用提示id为 60010153 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格 if 0 ~= ScriptLib.ShowReminder(context, 60010153) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui") return -1 end return 0 end -- 触发条件 function condition_EVENT_GROUP_LOAD_175004(context, evt) -- 判断指定group组剩余gadget数量是否是0 if ScriptLib.CheckRemainGadgetCountByGroupId(context, {group_id = 166001175}) ~= 0 then return false end return true end -- 触发操作 function action_EVENT_GROUP_LOAD_175004(context, evt) -- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1 if 0 ~= ScriptLib.AddQuestProgress(context, "166001047") then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress") return -1 end return 0 end