-- 基础信息 local base_info = { group_id = 234702003 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 3001, monster_id = 22010103, pos = { x = 0.003, y = -0.110, z = -10.057 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, affix = { 1028 }, isElite = true }, { config_id = 3002, monster_id = 22010104, pos = { x = -0.004, y = -0.110, z = 15.999 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1 }, { config_id = 3003, monster_id = 21010902, pos = { x = 15.021, y = -0.110, z = 0.008 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 }, { config_id = 3004, monster_id = 21010902, pos = { x = -18.031, y = -0.110, z = 0.005 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 }, { config_id = 3005, monster_id = 21010902, pos = { x = -16.089, y = -0.110, z = 0.005 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 }, { config_id = 3007, monster_id = 20011304, pos = { x = 3.673, y = -0.176, z = -10.343 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 3013, monster_id = 20011304, pos = { x = -3.111, y = -0.176, z = -10.217 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 3014, monster_id = 20011304, pos = { x = -3.076, y = -0.176, z = 10.015 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1 }, { config_id = 3015, monster_id = 20011304, pos = { x = 3.031, y = -0.176, z = 10.015 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1 }, { config_id = 3016, monster_id = 22010104, pos = { x = 0.053, y = -0.176, z = -10.057 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, affix = { 6105 }, isElite = true }, { config_id = 3017, monster_id = 21020101, pos = { x = 13.048, y = -0.110, z = 0.008 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 }, { config_id = 3018, monster_id = 21020101, pos = { x = -13.958, y = -0.110, z = 0.005 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 } } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 3008, gadget_id = 70900205, pos = { x = 6.224, y = -1.386, z = 3.132 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1003009, name = "ANY_MONSTER_LIVE_3009", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_3009", action = "action_EVENT_ANY_MONSTER_LIVE_3009" }, { config_id = 1003010, name = "ANY_MONSTER_DIE_3010", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_3010", action = "action_EVENT_ANY_MONSTER_DIE_3010" }, { config_id = 1003011, name = "CHALLENGE_SUCCESS_3011", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "2", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_3011" }, { config_id = 1003012, name = "CHALLENGE_FAIL_3012", event = EventType.EVENT_CHALLENGE_FAIL, source = "2", condition = "", action = "action_EVENT_CHALLENGE_FAIL_3012" }, { config_id = 1003019, name = "ANY_MONSTER_DIE_3019", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_3019", action = "action_EVENT_ANY_MONSTER_DIE_3019" } } -- 变量 variables = { { config_id = 1, name = "monster_wave", value = 0, no_refresh = false } } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 3008 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 2, -- description = suite_2, monsters = { 3003, 3005, 3007, 3013, 3014, 3015 }, gadgets = { 3008 }, regions = { }, triggers = { "ANY_MONSTER_LIVE_3009", "ANY_MONSTER_DIE_3010", "CHALLENGE_SUCCESS_3011", "CHALLENGE_FAIL_3012" }, rand_weight = 100 }, { -- suite_id = 3, -- description = suite_3, monsters = { 3001, 3002, 3004 }, gadgets = { 3008 }, regions = { }, triggers = { "CHALLENGE_SUCCESS_3011", "CHALLENGE_FAIL_3012", "ANY_MONSTER_DIE_3019" }, rand_weight = 100 }, { -- suite_id = 4, -- description = , monsters = { 3016, 3017, 3018 }, gadgets = { 3008 }, regions = { }, triggers = { "CHALLENGE_SUCCESS_3011", "CHALLENGE_FAIL_3012" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_MONSTER_LIVE_3009(context, evt) if 3007 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_LIVE_3009(context, evt) -- 创建编号为2(该挑战的识别id),挑战内容为198的区域挑战,param1必须为时间 -- 从234702001的变量TPL_TIME中取出对应值并开启挑战 local tpl_time = ScriptLib.GetGroupVariableValueByGroup(context, "TPL_TIME", 234702001) if tpl_time == nil or tpl_time < 0 then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge_by_remainTime") return -1 elseif tpl_time < 1 then tpl_time = 0 end if 0 ~= ScriptLib.ActiveChallenge(context, 2, 198, tpl_time, 231803004, 12, 0) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge_by_remainTime") return -1 end -- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1 if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable") return -1 end return 0 end -- 触发条件 function condition_EVENT_ANY_MONSTER_DIE_3010(context, evt) -- 判断指定group组剩余怪物数量是否是0 if ScriptLib.GetGroupMonsterCountByGroupId(context, 234702003) ~= 0 then return false end -- 判断变量"monster_wave"为1 if ScriptLib.GetGroupVariableValue(context, "monster_wave") ~= 1 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_DIE_3010(context, evt) -- 添加suite3的新内容 ScriptLib.AddExtraGroupSuite(context, 234702003, 3) -- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1 if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable") return -1 end return 0 end -- 触发操作 function action_EVENT_CHALLENGE_SUCCESS_3011(context, evt) -- 将本组内变量名为 "stage" 的变量设置为 2 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "stage", 2, 234702001) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_CHALLENGE_FAIL_3012(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 234702003, suite = 1 }) 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_ANY_MONSTER_DIE_3019(context, evt) -- 判断指定group组剩余怪物数量是否是0 if ScriptLib.GetGroupMonsterCountByGroupId(context, 234702003) ~= 0 then return false end -- 判断变量"monster_wave"为1 if ScriptLib.GetGroupVariableValue(context, "monster_wave") ~= 1 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_DIE_3019(context, evt) -- 添加suite4的新内容 ScriptLib.AddExtraGroupSuite(context, 234702003, 4) -- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1 if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable") return -1 end return 0 end