-- 基础信息 local base_info = { group_id = 199002101 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 101001, gadget_id = 70310332, pos = { x = 457.142, y = 141.213, z = -459.835 }, rot = { x = 0.000, y = 27.425, z = 0.000 }, level = 20, state = GadgetState.GearStop, area_id = 401 }, { config_id = 101002, gadget_id = 70310332, pos = { x = 454.566, y = 141.003, z = -458.456 }, rot = { x = 0.000, y = 55.969, z = 0.000 }, level = 20, area_id = 401 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1101003, name = "GROUP_LOAD_101003", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_101003", action = "action_EVENT_GROUP_LOAD_101003", trigger_count = 0 }, { config_id = 1101004, name = "VARIABLE_CHANGE_101004", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_101004", action = "action_EVENT_VARIABLE_CHANGE_101004", trigger_count = 0 } } -- 变量 variables = { { config_id = 1, name = "finish", value = 0, no_refresh = true } } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 101001, 101002 }, regions = { }, triggers = { "GROUP_LOAD_101003", "VARIABLE_CHANGE_101004" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发条件 function condition_EVENT_GROUP_LOAD_101003(context, evt) -- 判断变量"finish"为1 if ScriptLib.GetGroupVariableValue(context, "finish") ~= 1 then return false end return true end -- 触发操作 function action_EVENT_GROUP_LOAD_101003(context, evt) -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 101002 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 101001 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end return 0 end -- 触发条件 function condition_EVENT_VARIABLE_CHANGE_101004(context, evt) if evt.param1 == evt.param2 then return false end -- 判断变量"finish"为1 if ScriptLib.GetGroupVariableValue(context, "finish") ~= 1 then return false end return true end -- 触发操作 function action_EVENT_VARIABLE_CHANGE_101004(context, evt) -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 101001 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end -- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配 if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 101002 }) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId") return -1 end return 0 end