-- 基础信息 local base_info = { group_id = 199002143 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { -- 夜鸦乘务员 { config_id = 143001, gadget_id = 70310332, pos = { x = 568.955, y = 295.726, z = -501.377 }, rot = { x = 0.000, y = 267.223, z = 0.000 }, level = 20, persistent = true, area_id = 401 }, { config_id = 143004, gadget_id = 70330296, pos = { x = 568.955, y = 295.726, z = -501.377 }, rot = { x = 0.000, y = 267.223, z = 0.000 }, level = 1, interact_id = 128, area_id = 401 }, { config_id = 143010, gadget_id = 70690011, pos = { x = 566.964, y = 275.499, z = -490.360 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143011, gadget_id = 70690001, pos = { x = 566.362, y = 294.304, z = -486.826 }, rot = { x = 32.726, y = 343.123, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143012, gadget_id = 70690001, pos = { x = 565.142, y = 292.476, z = -482.803 }, rot = { x = 40.660, y = 343.123, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143013, gadget_id = 70690001, pos = { x = 563.380, y = 287.264, z = -476.996 }, rot = { x = 40.660, y = 343.123, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143014, gadget_id = 70690001, pos = { x = 561.618, y = 282.051, z = -471.188 }, rot = { x = 40.659, y = 343.123, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143015, gadget_id = 70690001, pos = { x = 559.856, y = 276.839, z = -465.381 }, rot = { x = 40.660, y = 343.123, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143016, gadget_id = 70690001, pos = { x = 558.094, y = 271.626, z = -459.573 }, rot = { x = 42.535, y = 331.437, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143017, gadget_id = 70690001, pos = { x = 555.324, y = 266.310, z = -454.484 }, rot = { x = 43.055, y = 314.359, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143018, gadget_id = 70690001, pos = { x = 551.144, y = 260.848, z = -450.397 }, rot = { x = 43.054, y = 314.358, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143019, gadget_id = 70690001, pos = { x = 546.965, y = 255.387, z = -446.310 }, rot = { x = 43.054, y = 314.358, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143020, gadget_id = 70690001, pos = { x = 542.785, y = 249.925, z = -442.223 }, rot = { x = 43.054, y = 314.359, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143021, gadget_id = 70690001, pos = { x = 538.605, y = 244.464, z = -438.136 }, rot = { x = 43.054, y = 314.358, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143022, gadget_id = 70690001, pos = { x = 534.426, y = 239.002, z = -434.049 }, rot = { x = 43.054, y = 314.358, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143023, gadget_id = 70690001, pos = { x = 530.246, y = 233.541, z = -429.962 }, rot = { x = 42.592, y = 297.131, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143024, gadget_id = 70690001, pos = { x = 525.190, y = 228.318, z = -427.371 }, rot = { x = 37.570, y = 273.843, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143025, gadget_id = 70690001, pos = { x = 518.863, y = 223.440, z = -426.946 }, rot = { x = 37.570, y = 273.843, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143026, gadget_id = 70690001, pos = { x = 512.536, y = 218.562, z = -426.521 }, rot = { x = 37.570, y = 273.843, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143027, gadget_id = 70690001, pos = { x = 506.416, y = 213.843, z = -426.110 }, rot = { x = 37.570, y = 273.843, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143028, gadget_id = 70690011, pos = { x = 566.964, y = 275.499, z = -490.360 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143029, gadget_id = 70690001, pos = { x = 566.904, y = 297.689, z = -488.610 }, rot = { x = 27.998, y = 355.237, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143030, gadget_id = 70690001, pos = { x = 566.317, y = 293.933, z = -481.571 }, rot = { x = 27.998, y = 355.237, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143031, gadget_id = 70690001, pos = { x = 565.731, y = 290.178, z = -474.532 }, rot = { x = 37.358, y = 354.528, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143032, gadget_id = 70690001, pos = { x = 565.141, y = 285.454, z = -468.373 }, rot = { x = 56.256, y = 352.284, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143033, gadget_id = 70690001, pos = { x = 564.544, y = 278.802, z = -463.969 }, rot = { x = 56.256, y = 352.283, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143034, gadget_id = 70690001, pos = { x = 563.947, y = 272.150, z = -459.566 }, rot = { x = 56.256, y = 352.284, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143035, gadget_id = 70690001, pos = { x = 563.351, y = 265.498, z = -455.162 }, rot = { x = 56.256, y = 352.283, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143036, gadget_id = 70690001, pos = { x = 562.754, y = 258.846, z = -450.758 }, rot = { x = 58.755, y = 358.190, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143037, gadget_id = 70690001, pos = { x = 562.624, y = 252.048, z = -446.636 }, rot = { x = 63.467, y = 16.705, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143038, gadget_id = 70690001, pos = { x = 563.651, y = 244.891, z = -443.214 }, rot = { x = 63.467, y = 16.705, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143039, gadget_id = 70690001, pos = { x = 564.678, y = 237.733, z = -439.791 }, rot = { x = 63.467, y = 16.705, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143040, gadget_id = 70690001, pos = { x = 565.705, y = 230.576, z = -436.368 }, rot = { x = 63.467, y = 16.704, z = 0.000 }, level = 1, area_id = 401 }, { config_id = 143041, gadget_id = 70690001, pos = { x = 566.732, y = 223.419, z = -432.945 }, rot = { x = 61.285, y = 41.003, z = 21.601 }, level = 1, area_id = 401 }, { config_id = 143042, gadget_id = 70690001, pos = { x = 567.760, y = 216.261, z = -429.522 }, rot = { x = 71.285, y = 85.102, z = 67.312 }, level = 1, area_id = 401 } } -- 区域 regions = { } -- 触发器 triggers = { -- 初见后流转A点state { config_id = 1143002, name = "GADGETTALK_DONE_143002", event = EventType.EVENT_GADGETTALK_DONE, source = "6800316", condition = "", action = "action_EVENT_GADGETTALK_DONE_143002", trigger_count = 0 }, { config_id = 1143005, name = "GADGET_STATE_CHANGE_143005", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "", action = "action_EVENT_GADGET_STATE_CHANGE_143005", trigger_count = 0 }, { config_id = 1143006, name = "GADGETTALK_DONE_143006", event = EventType.EVENT_GADGETTALK_DONE, source = "6800317", condition = "", action = "action_EVENT_GADGETTALK_DONE_143006", trigger_count = 0 }, -- 选择前往A点 { config_id = 1143007, name = "GADGETTALK_DONE_143007", event = EventType.EVENT_GADGETTALK_DONE, source = "6800344", condition = "condition_EVENT_GADGETTALK_DONE_143007", action = "action_EVENT_GADGETTALK_DONE_143007", trigger_count = 0 }, -- 选择前往B点 { config_id = 1143008, name = "GADGETTALK_DONE_143008", event = EventType.EVENT_GADGETTALK_DONE, source = "6800346", condition = "condition_EVENT_GADGETTALK_DONE_143008", action = "action_EVENT_GADGETTALK_DONE_143008", trigger_count = 0 }, { config_id = 1143009, name = "GROUP_LOAD_143009", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD_143009", trigger_count = 0 }, { config_id = 1143043, name = "TIME_AXIS_PASS_143043", event = EventType.EVENT_TIME_AXIS_PASS, source = "flya", condition = "condition_EVENT_TIME_AXIS_PASS_143043", action = "action_EVENT_TIME_AXIS_PASS_143043", trigger_count = 0 }, { config_id = 1143044, name = "TIME_AXIS_PASS_143044", event = EventType.EVENT_TIME_AXIS_PASS, source = "flyb", condition = "condition_EVENT_TIME_AXIS_PASS_143044", action = "action_EVENT_TIME_AXIS_PASS_143044", trigger_count = 0 }, { config_id = 1143045, name = "GROUP_REFRESH_143045", event = EventType.EVENT_GROUP_REFRESH, source = "", condition = "", action = "action_EVENT_GROUP_REFRESH_143045", trigger_count = 0 }, { config_id = 1143046, name = "VARIABLE_CHANGE_143046", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_143046", action = "action_EVENT_VARIABLE_CHANGE_143046", trigger_count = 0 } } -- 变量 variables = { { config_id = 1, name = "starta", value = 0, no_refresh = false }, { config_id = 2, name = "startb", value = 0, no_refresh = false }, { config_id = 3, name = "remove", value = 0, no_refresh = false }, { config_id = 4, name = "put", value = 0, no_refresh = true }, { config_id = 5, name = "state", value = 0, no_refresh = true } } -- 废弃数据 garbages = { triggers = { { config_id = 1143003, name = "GADGETTALK_DONE_143003", event = EventType.EVENT_GADGETTALK_DONE, source = "6800316", condition = "", action = "action_EVENT_GADGETTALK_DONE_143003", trigger_count = 0 } } } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 143001 }, regions = { }, triggers = { "GADGETTALK_DONE_143002", "GADGET_STATE_CHANGE_143005", "GADGETTALK_DONE_143006", "GADGETTALK_DONE_143007", "GADGETTALK_DONE_143008", "GROUP_LOAD_143009", "TIME_AXIS_PASS_143043", "TIME_AXIS_PASS_143044", "GROUP_REFRESH_143045", "VARIABLE_CHANGE_143046" }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { }, gadgets = { 143010, 143011, 143012, 143013, 143014, 143015, 143016, 143017, 143018, 143019, 143020, 143021, 143022, 143023, 143024, 143025, 143026, 143027 }, regions = { }, triggers = { }, rand_weight = 100 }, { -- suite_id = 3, -- description = , monsters = { }, gadgets = { 143028, 143029, 143030, 143031, 143032, 143033, 143034, 143035, 143036, 143037, 143038, 143039, 143040, 143041, 143042 }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发操作 function action_EVENT_GADGETTALK_DONE_143002(context, evt) ScriptLib.SetGroupVariableValueByGroup(context, "state", 1, 199002106) ScriptLib.SetGroupVariableValueByGroup(context, "state", 1, 199002140) ScriptLib.SetGadgetTalkByConfigId(context, 199002106, 106001, 6800313) ScriptLib.SetGadgetTalkByConfigId(context, 199002140, 140001, 6800315) return 0 end -- 触发操作 function action_EVENT_GADGET_STATE_CHANGE_143005(context, evt) if evt.param2 == 143004 and ScriptLib.GetGadgetStateByConfigId(context, 0, 143004) == 201 then ScriptLib.SetGroupVariableValue(context, "put", 1) ScriptLib.SetGadgetTalkByConfigId(context, 199002143, 143001, 6800327) end return 0 end -- 触发操作 function action_EVENT_GADGETTALK_DONE_143006(context, evt) -- 创建id为143004的gadget if 0 ~= ScriptLib.CreateGadget(context, { config_id = 143004 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget") return -1 end return 0 end -- 触发条件 function condition_EVENT_GADGETTALK_DONE_143007(context, evt) -- 判断变量"starta"为0 if ScriptLib.GetGroupVariableValue(context, "starta") ~= 0 then return false end return true end -- 触发操作 function action_EVENT_GADGETTALK_DONE_143007(context, evt) -- 将本组内变量名为 "remove" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "remove", 1, 199002004) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 将本组内变量名为 "remove" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "remove", 1, 199002106) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 将本组内变量名为 "remove" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "remove", 1, 199002140) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 将本组内变量名为 "remove" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "remove", 1, 199002148) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 将本组内变量名为 "starta" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValue(context, "starta", 1) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable") return -1 end -- 将本组内变量名为 "startb" 的变量设置为 0 if 0 ~= ScriptLib.SetGroupVariableValue(context, "startb", 0) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable") return -1 end -- 创建标识为"flya",时间节点为{60}的时间轴,false用于控制该时间轴是否循环 ScriptLib.InitTimeAxis(context, "flya", {60}, false) -- 添加suite2的新内容 ScriptLib.AddExtraGroupSuite(context, 199002143, 2) -- 停止标识为"flyb"的时间轴 ScriptLib.EndTimeAxis(context, "flyb") -- 删除suite3的所有内容 ScriptLib.RemoveExtraGroupSuite(context, 199002143, 3) return 0 end -- 触发条件 function condition_EVENT_GADGETTALK_DONE_143008(context, evt) -- 判断变量"startb"为0 if ScriptLib.GetGroupVariableValue(context, "startb") ~= 0 then return false end return true end -- 触发操作 function action_EVENT_GADGETTALK_DONE_143008(context, evt) -- 将本组内变量名为 "remove" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "remove", 1, 199002004) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 将本组内变量名为 "remove" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "remove", 1, 199002106) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 将本组内变量名为 "remove" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "remove", 1, 199002140) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 将本组内变量名为 "remove" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "remove", 1, 199002148) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group") return -1 end -- 将本组内变量名为 "startb" 的变量设置为 1 if 0 ~= ScriptLib.SetGroupVariableValue(context, "startb", 1) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable") return -1 end -- 将本组内变量名为 "starta" 的变量设置为 0 if 0 ~= ScriptLib.SetGroupVariableValue(context, "starta", 0) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable") return -1 end -- 创建标识为"flyb",时间节点为{60}的时间轴,false用于控制该时间轴是否循环 ScriptLib.InitTimeAxis(context, "flyb", {60}, false) -- 添加suite3的新内容 ScriptLib.AddExtraGroupSuite(context, 199002143, 3) -- 停止标识为"flya"的时间轴 ScriptLib.EndTimeAxis(context, "flya") -- 删除suite2的所有内容 ScriptLib.RemoveExtraGroupSuite(context, 199002143, 2) return 0 end -- 触发操作 function action_EVENT_GROUP_LOAD_143009(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 199002143, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end -- 触发条件 function condition_EVENT_TIME_AXIS_PASS_143043(context, evt) if "flya" ~= evt.source_name or 1 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_TIME_AXIS_PASS_143043(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 199002143, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end -- 触发条件 function condition_EVENT_TIME_AXIS_PASS_143044(context, evt) if "flyb" ~= evt.source_name or 1 ~= evt.param1 then return false end return true end -- 触发操作 function action_EVENT_TIME_AXIS_PASS_143044(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 199002143, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end -- 触发操作 function action_EVENT_GROUP_REFRESH_143045(context, evt) if ScriptLib.GetGroupVariableValue(context, "put") == 1 then ScriptLib.SetGadgetTalkByConfigId(context, 199002143, 143001, 6800327) else if ScriptLib.GetGroupVariableValue(context, "state") == 1 then ScriptLib.SetGadgetTalkByConfigId(context, 199002143, 143001, 6800317) end end return 0 end -- 触发条件 function condition_EVENT_VARIABLE_CHANGE_143046(context, evt) if evt.param1 == evt.param2 then return false end -- 判断变量"remove"为1 if ScriptLib.GetGroupVariableValue(context, "remove") ~= 1 then return false end return true end -- 触发操作 function action_EVENT_VARIABLE_CHANGE_143046(context, evt) -- 重新生成指定group,指定suite if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 199002143, suite = 1 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite") return -1 end return 0 end