-- 基础信息 local base_info = { group_id = 250041003 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 3001, gadget_id = 70360002, pos = { x = -3.303, y = 45.500, z = -74.367 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 3004, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -76.636 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 1 }, { config_id = 3005, gadget_id = 70950010, pos = { x = 15.425, y = 45.848, z = -74.939 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3006, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -83.337 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 3 }, { config_id = 3007, gadget_id = 70950010, pos = { x = 27.223, y = 50.143, z = -74.939 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3008, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -79.890 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 2 }, { config_id = 3009, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -83.337 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 3 }, { config_id = 3010, gadget_id = 70950010, pos = { x = 36.982, y = 53.695, z = -74.939 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3011, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -79.890 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 2 }, { config_id = 3012, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -83.337 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 3 }, { config_id = 3013, gadget_id = 70950010, pos = { x = 59.607, y = 59.203, z = -74.939 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3014, gadget_id = 70950010, pos = { x = 73.158, y = 60.945, z = -74.939 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3015, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -83.337 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 3 }, { config_id = 3016, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -76.636 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 1 }, { config_id = 3017, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -79.890 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 2 }, { config_id = 3018, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -83.337 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 3 }, { config_id = 3020, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -79.890 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 2 }, { config_id = 3021, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -83.337 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 3 }, { config_id = 3022, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -76.636 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 1 }, { config_id = 3023, gadget_id = 70950010, pos = { x = 14.546, y = 45.528, z = -84.802 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3024, gadget_id = 70950010, pos = { x = 36.004, y = 53.338, z = -84.802 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3025, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -76.636 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 1 }, { config_id = 3026, gadget_id = 70950010, pos = { x = 53.444, y = 57.252, z = -84.802 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3027, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -83.337 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 3 }, { config_id = 3028, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -76.636 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 1 }, { config_id = 3029, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -79.890 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 2 }, { config_id = 3030, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -83.337 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 3 }, { config_id = 3031, gadget_id = 70950010, pos = { x = 76.384, y = 65.310, z = -84.802 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3032, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -79.890 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 2 }, { config_id = 3033, gadget_id = 70950010, pos = { x = 79.003, y = 63.072, z = -84.802 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3034, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -76.636 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 1 }, { config_id = 3035, gadget_id = 70950010, pos = { x = 88.227, y = 65.420, z = -84.802 }, rot = { x = 0.000, y = 0.000, z = 20.000 }, level = 1 }, { config_id = 3036, gadget_id = 70350138, pos = { x = 98.383, y = 71.636, z = -83.337 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 3 }, { config_id = 3047, gadget_id = 70120004, pos = { x = 108.686, y = 71.100, z = -81.037 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1003002, name = "GADGET_CREATE_3002", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_3002", action = "action_EVENT_GADGET_CREATE_3002" }, { config_id = 1003003, name = "SELECT_OPTION_3003", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_3003", action = "action_EVENT_SELECT_OPTION_3003" }, { config_id = 1003037, name = "TIMER_EVENT_3037", event = EventType.EVENT_TIMER_EVENT, source = "AA10", condition = "", action = "action_EVENT_TIMER_EVENT_3037", trigger_count = 10 }, { config_id = 1003038, name = "TIMER_EVENT_3038", event = EventType.EVENT_TIMER_EVENT, source = "AA9", condition = "", action = "action_EVENT_TIMER_EVENT_3038", trigger_count = 10 }, { config_id = 1003039, name = "TIMER_EVENT_3039", event = EventType.EVENT_TIMER_EVENT, source = "AA8", condition = "", action = "action_EVENT_TIMER_EVENT_3039", trigger_count = 10 }, { config_id = 1003040, name = "TIMER_EVENT_3040", event = EventType.EVENT_TIMER_EVENT, source = "AA7", condition = "", action = "action_EVENT_TIMER_EVENT_3040", trigger_count = 10 }, { config_id = 1003041, name = "TIMER_EVENT_3041", event = EventType.EVENT_TIMER_EVENT, source = "AA6", condition = "", action = "action_EVENT_TIMER_EVENT_3041", trigger_count = 10 }, { config_id = 1003042, name = "TIMER_EVENT_3042", event = EventType.EVENT_TIMER_EVENT, source = "AA5", condition = "", action = "action_EVENT_TIMER_EVENT_3042", trigger_count = 10 }, { config_id = 1003043, name = "TIMER_EVENT_3043", event = EventType.EVENT_TIMER_EVENT, source = "AA4", condition = "", action = "action_EVENT_TIMER_EVENT_3043", trigger_count = 10 }, { config_id = 1003044, name = "TIMER_EVENT_3044", event = EventType.EVENT_TIMER_EVENT, source = "AA3", condition = "", action = "action_EVENT_TIMER_EVENT_3044", trigger_count = 10 }, { config_id = 1003045, name = "TIMER_EVENT_3045", event = EventType.EVENT_TIMER_EVENT, source = "AA2", condition = "", action = "action_EVENT_TIMER_EVENT_3045", trigger_count = 10 }, { config_id = 1003046, name = "TIMER_EVENT_3046", event = EventType.EVENT_TIMER_EVENT, source = "AA1", condition = "", action = "action_EVENT_TIMER_EVENT_3046", trigger_count = 10 }, { config_id = 1003048, name = "SELECT_OPTION_3048", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_3048", action = "action_EVENT_SELECT_OPTION_3048" }, { config_id = 1003049, name = "CHALLENGE_FAIL_3049", event = EventType.EVENT_CHALLENGE_FAIL, source = "666", condition = "", action = "action_EVENT_CHALLENGE_FAIL_3049" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 3001 }, regions = { }, triggers = { "GADGET_CREATE_3002", "SELECT_OPTION_3003", "TIMER_EVENT_3037", "TIMER_EVENT_3038", "TIMER_EVENT_3039", "TIMER_EVENT_3040", "TIMER_EVENT_3041", "TIMER_EVENT_3042", "TIMER_EVENT_3043", "TIMER_EVENT_3044", "TIMER_EVENT_3045", "TIMER_EVENT_3046", "SELECT_OPTION_3048", "CHALLENGE_FAIL_3049" }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { }, gadgets = { 3004, 3006 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 3, -- description = , monsters = { }, gadgets = { 3011, 3012 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 4, -- description = , monsters = { }, gadgets = { 3015 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 5, -- description = , monsters = { }, gadgets = { 3016, 3017, 3018 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 6, -- description = , monsters = { }, gadgets = { 3020, 3021 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 7, -- description = , monsters = { }, gadgets = { 3022 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 8, -- description = , monsters = { }, gadgets = { 3025, 3027 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 9, -- description = , monsters = { }, gadgets = { 3028, 3029, 3030 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 10, -- description = , monsters = { }, gadgets = { 3032 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 11, -- description = , monsters = { }, gadgets = { 3034, 3036 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 12, -- description = , monsters = { }, gadgets = { 3008, 3009 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 13, -- description = , monsters = { }, gadgets = { 3005, 3007, 3010, 3013, 3014, 3023, 3024, 3026, 3031, 3033, 3035, 3047 }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_GADGET_CREATE_3002(context, evt) if 3001 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_GADGET_CREATE_3002(context, evt) -- 设置操作台选项 if 0 ~= ScriptLib.SetWorktopOptions(context, {2}) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_work_options") return -1 end return 0 end -- 触发条件 function condition_EVENT_SELECT_OPTION_3003(context, evt) -- 判断是gadgetid 3001 option_id 2 if 3001 ~= evt.param1 then return false end if 2 ~= evt.param2 then return false end return true end -- 触发操作 function action_EVENT_SELECT_OPTION_3003(context, evt) -- 延迟1秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA1" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA1", 1) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end -- 添加suite13的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 13) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 250041002, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 250041004, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 250041005, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3037(context, evt) -- 添加suite12的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 12) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA1" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA1", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3038(context, evt) -- 添加suite11的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 11) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA10" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA10", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3039(context, evt) -- 添加suite10的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 10) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA9" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA9", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3040(context, evt) -- 添加suite9的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 9) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA8" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA8", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3041(context, evt) -- 添加suite8的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 8) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA7" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA7", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3042(context, evt) -- 添加suite7的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 7) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA6" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA6", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3043(context, evt) -- 添加suite6的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 6) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA5" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA5", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3044(context, evt) -- 添加suite5的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 5) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA4" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA4", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3045(context, evt) -- 添加suite4的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 4) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA3" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA3", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发操作 function action_EVENT_TIMER_EVENT_3046(context, evt) -- 添加suite3的新内容 ScriptLib.AddExtraGroupSuite(context, 250041003, 3) -- 延迟4秒后,向groupId为:250041003的对象,请求一次调用,并将string参数:"AA2" 传递过去 if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 250041003, "AA2", 4) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group") return -1 end return 0 end -- 触发条件 function condition_EVENT_SELECT_OPTION_3048(context, evt) -- 判断是gadgetid 3001 option_id 2 if 3001 ~= evt.param1 then return false end if 2 ~= evt.param2 then return false end return true end -- 触发操作 function action_EVENT_SELECT_OPTION_3048(context, evt) -- 创建编号为666(该挑战的识别id),挑战内容为127的区域挑战,具体参数填写方式,见DungeonChallengeData表中的注释,所有填写的值都必须是int类型 if 0 ~= ScriptLib.ActiveChallenge(context, 666, 127, 90, 4, 666, 1) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge") return -1 end return 0 end -- 触发操作 function action_EVENT_CHALLENGE_FAIL_3049(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 250041003, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end -- 取消group中对应名称的TimerEvent if 0 ~= ScriptLib.CancelGroupTimerEvent(context, 250041003, "AA1") then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cancel_timerevent_by_group") return -1 end -- 取消group中对应名称的TimerEvent if 0 ~= ScriptLib.CancelGroupTimerEvent(context, 250041003, "AA3") then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cancel_timerevent_by_group") return -1 end -- 取消group中对应名称的TimerEvent if 0 ~= ScriptLib.CancelGroupTimerEvent(context, 250041003, "AA5") then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cancel_timerevent_by_group") return -1 end -- 取消group中对应名称的TimerEvent if 0 ~= ScriptLib.CancelGroupTimerEvent(context, 250041003, "AA7") then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cancel_timerevent_by_group") return -1 end -- 取消group中对应名称的TimerEvent if 0 ~= ScriptLib.CancelGroupTimerEvent(context, 250041003, "AA9") then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cancel_timerevent_by_group") return -1 end return 0 end