-- 基础信息 local base_info = { group_id = 220036005 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 5001, gadget_id = 70900205, pos = { x = 350.072, y = -15.242, z = 256.798 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 5003, gadget_id = 70900205, pos = { x = 350.072, y = -15.242, z = 256.798 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1005002, name = "GADGET_CREATE_5002", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_5002", action = "action_EVENT_GADGET_CREATE_5002" }, { config_id = 1005004, name = "TIMER_EVENT_5004", event = EventType.EVENT_TIMER_EVENT, source = "fail_delay", condition = "", action = "action_EVENT_TIMER_EVENT_5004" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 5003 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { }, gadgets = { 5001 }, regions = { }, triggers = { "GADGET_CREATE_5002", "TIMER_EVENT_5004" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_GADGET_CREATE_5002(context, evt) if 5001 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_CREATE_5002(context, evt) -- 延迟5秒后,向groupId为:220036005的对象,请求一次调用,并将string参数:"fail_delay" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 220036005, "fail_delay", 5) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_5004(context, evt) -- 地城失败结算 if 0 ~= ScriptLib.CauseDungeonFail(context) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cause_dungeonfail") return -1 end return 0 end