-- 基础信息 local base_info = { group_id = 240021013 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { { config_id = 13002, monster_id = 21010201, pos = { x = -8.350, y = 0.002, z = 0.308 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 13003, monster_id = 21010201, pos = { x = 0.124, y = 0.002, z = -7.381 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true }, { config_id = 13004, monster_id = 21030101, pos = { x = 7.223, y = 0.002, z = 0.185 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, affix = { 6106 } }, { config_id = 13005, monster_id = 21010201, pos = { x = -0.023, y = 0.002, z = 7.897 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true } } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 13001, gadget_id = 70900205, pos = { x = -0.106, y = -1.170, z = 5.226 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1013006, name = "ANY_MONSTER_LIVE_13006", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_13006", action = "action_EVENT_ANY_MONSTER_LIVE_13006" }, { config_id = 1013007, name = "CHALLENGE_FAIL_13007", event = EventType.EVENT_CHALLENGE_FAIL, source = "", condition = "", action = "action_EVENT_CHALLENGE_FAIL_13007" }, { config_id = 1013008, name = "CHALLENGE_SUCCESS_13008", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "5", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_13008" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 13001 }, regions = { }, triggers = { "ANY_MONSTER_LIVE_13006", "CHALLENGE_FAIL_13007", "CHALLENGE_SUCCESS_13008" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_ANY_MONSTER_LIVE_13006(context, evt) if 13002 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_ANY_MONSTER_LIVE_13006(context, evt) -- 创建编号为5(该挑战的识别id),挑战内容为2的区域挑战,具体参数填写方式,见DungeonChallengeData表中的注释,所有填写的值都必须是int类型 if 0 ~= ScriptLib.ActiveChallenge(context, 5, 2, 180, 240021013, 6, 0) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge") return -1 end return 0 end -- 触发操作 function action_EVENT_CHALLENGE_FAIL_13007(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240021012, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240021013, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240021014, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end -- 触发操作 function action_EVENT_CHALLENGE_SUCCESS_13008(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240021012, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240021013, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240021014, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end