-- 基础信息 local base_info = { group_id = 133002061 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 61001, gadget_id = 70710530, pos = { x = 987.805, y = 349.013, z = -653.629 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 30, drop_id = 1050144, drop_count = 1, isOneoff = true, area_id = 10 }, { config_id = 61002, gadget_id = 70710530, pos = { x = 991.043, y = 344.876, z = -638.265 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 30, drop_id = 1050143, drop_count = 1, isOneoff = true, area_id = 10 }, { config_id = 61003, gadget_id = 70300118, pos = { x = 987.753, y = 349.047, z = -653.578 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, area_id = 10 }, { config_id = 61005, gadget_id = 70300118, pos = { x = 991.043, y = 344.876, z = -638.265 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, area_id = 10 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1061004, name = "ANY_GADGET_DIE_61004", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_61004", action = "action_EVENT_ANY_GADGET_DIE_61004" }, { config_id = 1061006, name = "QUEST_FINISH_61006", event = EventType.EVENT_QUEST_FINISH, source = "", condition = "condition_EVENT_QUEST_FINISH_61006", action = "action_EVENT_QUEST_FINISH_61006" }, { config_id = 1061007, name = "QUEST_FINISH_61007", event = EventType.EVENT_QUEST_FINISH, source = "", condition = "condition_EVENT_QUEST_FINISH_61007", action = "action_EVENT_QUEST_FINISH_61007" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 61001, 61002, 61003, 61005 }, regions = { }, triggers = { "ANY_GADGET_DIE_61004", "QUEST_FINISH_61006", "QUEST_FINISH_61007" }, rand_weight = 100, ban_refresh = true } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_GADGET_DIE_61004(context, evt) -- 判断指定group组剩余gadget数量是否是0 if ScriptLib.CheckRemainGadgetCountByGroupId(context, {group_id = 133002061}) ~= 0 then return false end return true end -- 触发操作 function action_EVENT_ANY_GADGET_DIE_61004(context, evt) -- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1 if 0 ~= ScriptLib.AddQuestProgress(context, "4002606") then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress") return -1 end return 0 end -- 触发条件 function condition_EVENT_QUEST_FINISH_61006(context, evt) --检查ID为4002625的任务的完成状态是否为1(1=完成,0=失败) --此事件需要配合Quest表使用,在Quest表里的完成执行中配置“通知group脚本”,则该任务完成后服务端会向对应的group发送通知,参数1填写场景ID,参数2填写group ID(如果不填则会通知所有group) --检查任务ID if 4002625 ~= evt.param1 then return false end --检查任务成功状态 if 1 ~= evt.param2 then return false end return true end -- 触发操作 function action_EVENT_QUEST_FINISH_61006(context, evt) -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 61005 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end return 0 end -- 触发条件 function condition_EVENT_QUEST_FINISH_61007(context, evt) --检查ID为4002624的任务的完成状态是否为1(1=完成,0=失败) --此事件需要配合Quest表使用,在Quest表里的完成执行中配置“通知group脚本”,则该任务完成后服务端会向对应的group发送通知,参数1填写场景ID,参数2填写group ID(如果不填则会通知所有group) --检查任务ID if 4002624 ~= evt.param1 then return false end --检查任务成功状态 if 1 ~= evt.param2 then return false end return true end -- 触发操作 function action_EVENT_QUEST_FINISH_61007(context, evt) -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 61003 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end return 0 end