-- 基础信息 local base_info = { group_id = 234727007 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 7001, monster_id = 20050901, pos = { x = 4.100, y = -0.102, z = -15.127 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7002, monster_id = 20050901, pos = { x = -4.205, y = -0.102, z = -15.144 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7003, monster_id = 20050302, pos = { x = 7.080, y = -0.102, z = -10.173 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7004, monster_id = 20050302, pos = { x = -7.084, y = -0.102, z = -10.127 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7005, monster_id = 20050802, pos = { x = 4.100, y = -0.102, z = 11.256 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7006, monster_id = 20050802, pos = { x = -4.205, y = -0.102, z = 11.239 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7007, monster_id = 20050502, pos = { x = 7.044, y = -0.102, z = 16.210 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7008, monster_id = 20050603, pos = { x = 4.100, y = -0.102, z = 11.256 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7009, monster_id = 20050603, pos = { x = -4.205, y = -0.102, z = 11.239 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7011, monster_id = 20050403, pos = { x = 7.044, y = -0.102, z = 16.210 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7012, monster_id = 20050403, pos = { x = -7.084, y = -0.102, z = 15.981 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7016, monster_id = 20050703, pos = { x = 4.100, y = -0.102, z = -15.127 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7017, monster_id = 20050703, pos = { x = -4.205, y = -0.102, z = -15.144 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7018, monster_id = 20050203, pos = { x = 7.080, y = -0.102, z = -10.173 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7019, monster_id = 20050203, pos = { x = -7.084, y = -0.102, z = -10.127 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 7020, monster_id = 20050502, pos = { x = -7.084, y = -0.102, z = 15.981 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true } } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 7010, gadget_id = 70900205, pos = { x = 5.917, y = -0.566, z = 2.600 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1007014, name = "CHALLENGE_SUCCESS_7014", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "2", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_7014" }, { config_id = 1007015, name = "CHALLENGE_FAIL_7015", event = EventType.EVENT_CHALLENGE_FAIL, source = "2", condition = "", action = "action_EVENT_CHALLENGE_FAIL_7015" }, { config_id = 1007021, name = "ANY_MONSTER_LIVE_7021", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_7021", action = "action_EVENT_ANY_MONSTER_LIVE_7021" } } -- 变量 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 = { 7010 }, regions = { }, triggers = { "CHALLENGE_SUCCESS_7014", "CHALLENGE_FAIL_7015", "ANY_MONSTER_LIVE_7021" }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { 7001, 7002, 7003, 7004 }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 3, -- description = , monsters = { 7008, 7009, 7011, 7012 }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 4, -- description = , monsters = { 7005, 7006, 7007, 7020 }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 5, -- description = , monsters = { 7016, 7017, 7018, 7019 }, gadgets = { }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发操作 function action_EVENT_CHALLENGE_SUCCESS_7014(context, evt) -- 将本组内变量名为 "stage" 的变量设置为 2 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "stage", 2, 234727005) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 改变指定group组234727009中, configid为9001的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 234727009, 9001, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end -- 改变指定group组234727009中, configid为9002的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 234727009, 9002, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end return 0 end -- 触发操作 function action_EVENT_CHALLENGE_FAIL_7015(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 234727007, 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 -- 改变指定group组234727009中, configid为9001的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 234727009, 9001, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end -- 改变指定group组234727009中, configid为9002的gadget的state if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 234727009, 9002, GadgetState.Default) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId") return -1 end return 0 end -- 触发条件 function condition_EVENT_ANY_MONSTER_LIVE_7021(context, evt) if 7001 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_LIVE_7021(context, evt) -- 创建编号为2(该挑战的识别id),挑战内容为198的区域挑战,param1必须为时间 -- 从234727005的变量TPL_TIME中取出对应值并开启挑战 local tpl_time = ScriptLib.GetGroupVariableValueByGroup(context, "TPL_TIME", 234727005) 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, 234727007, 16, 0) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge_by_remainTime") return -1 end return 0 end