-- 基础信息 local base_info = { group_id = 240029002 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 2002, monster_id = 20040302, pos = { x = 0.000, y = 0.000, z = -14.000 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, title_id = 10006, special_name_id = 10022 } } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 2001, gadget_id = 70900205, pos = { x = 0.434, y = -1.852, z = -0.906 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 2006, gadget_id = 44000006, pos = { x = 0.000, y = 0.000, z = 19.000 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1002003, name = "ANY_MONSTER_LIVE_2003", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_2003", action = "action_EVENT_ANY_MONSTER_LIVE_2003", trigger_count = 0 }, { config_id = 1002004, name = "CHALLENGE_FAIL_2004", event = EventType.EVENT_CHALLENGE_FAIL, source = "1", condition = "", action = "action_EVENT_CHALLENGE_FAIL_2004", trigger_count = 0 }, { config_id = 1002005, name = "DUNGEON_ALL_AVATAR_DIE_2005", event = EventType.EVENT_DUNGEON_ALL_AVATAR_DIE, source = "", condition = "condition_EVENT_DUNGEON_ALL_AVATAR_DIE_2005", action = "action_EVENT_DUNGEON_ALL_AVATAR_DIE_2005", trigger_count = 0 } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 2001, 2006 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { 2002 }, gadgets = { 2001 }, regions = { }, triggers = { "ANY_MONSTER_LIVE_2003", "CHALLENGE_FAIL_2004", "DUNGEON_ALL_AVATAR_DIE_2005" }, rand_weight = 100 }, { -- suite_id = 3, -- description = , monsters = { }, gadgets = { 2001 }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_MONSTER_LIVE_2003(context, evt) if 2002 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_LIVE_2003(context, evt) local challenge_time = 420 if -1 ~= ScriptLib.GetEffigyChallengeLimitTime(context) then challenge_time = 420 - ScriptLib.GetEffigyChallengeLimitTime(context) end if 0 ~= ScriptLib.ActiveChallenge(context, 1, 216, challenge_time, 240029002, 1, 0) then return -1 end return 0 end -- 触发操作 function action_EVENT_CHALLENGE_FAIL_2004(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240029001, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240029002, suite = 3 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 地城失败结算 if 0 ~= ScriptLib.CauseDungeonFail(context) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cause_dungeonfail") return -1 end return 0 end -- 触发条件 function condition_EVENT_DUNGEON_ALL_AVATAR_DIE_2005(context, evt) local uid_list = ScriptLib.GetSceneUidList(context) local ret = 0 for i,v in ipairs(uid_list) do local is_all_dead = ScriptLib.IsPlayerAllAvatarDie(context, v) if true ~= is_all_dead then ret = -1 break end end if ret ~= 0 then return false end return true end -- 触发操作 function action_EVENT_DUNGEON_ALL_AVATAR_DIE_2005(context, evt) -- 终止识别id为1的挑战,并判定失败 ScriptLib.StopChallenge(context, 1, 0) -- 地城失败结算 if 0 ~= ScriptLib.CauseDungeonFail(context) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cause_dungeonfail") return -1 end return 0 end