-- 基础信息 local base_info = { group_id = 155008099 } -- Trigger变量 local defs = { group_ID = 155008099 } -- DEFS_MISCS local gameplayStateFuncitons = { ["0"] = function(context) --ScriptLib.SetGroupVariableValue(context,"is_daynight_finish",1) end, ["1"] = function(context) --ScriptLib.SetGroupVariableValue(context,"is_daynight_finish",0) ScriptLib.AddExtraGroupSuite(context, defs.group_ID, 2) end, ["2"] = function(context) --ScriptLib.SetGroupVariableValue(context,"is_daynight_finish",1) ScriptLib.AddExtraGroupSuite(context, defs.group_ID, 3) end } function UpdateGamePlayState(context) local state = ScriptLib.GetGroupVariableValue(context, "gameplayState") gameplayStateFuncitons[tostring(state)](context) end --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 99001, gadget_id = 70211111, pos = { x = -299.516, y = 261.438, z = 355.395 }, rot = { x = 349.530, y = 265.907, z = 2.509 }, level = 16, drop_tag = "解谜中级稻妻", isOneoff = true, persistent = true, explore = { name = "chest", exp = 1 }, area_id = 200 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1099003, name = "GROUP_LOAD_99003", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD_99003", trigger_count = 0 }, { config_id = 1099004, name = "VARIABLE_CHANGE_99004", event = EventType.EVENT_VARIABLE_CHANGE, source = "gameplayState", condition = "", action = "action_EVENT_VARIABLE_CHANGE_99004", trigger_count = 0 }, { config_id = 1099005, name = "VARIABLE_CHANGE_99005", event = EventType.EVENT_VARIABLE_CHANGE, source = "activecount", condition = "condition_EVENT_VARIABLE_CHANGE_99005", action = "action_EVENT_VARIABLE_CHANGE_99005", trigger_count = 0 } } -- 变量 variables = { { config_id = 1, name = "gameplayState", value = 1, no_refresh = true }, { config_id = 2, name = "activecount", value = 0, no_refresh = true } } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { }, regions = { }, triggers = { "GROUP_LOAD_99003", "VARIABLE_CHANGE_99004" }, rand_weight = 100 }, { -- suite_id = 2, -- description = , monsters = { }, gadgets = { }, regions = { }, triggers = { "VARIABLE_CHANGE_99005" }, rand_weight = 100 }, { -- suite_id = 3, -- description = , monsters = { }, gadgets = { 99001 }, regions = { }, triggers = { }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发操作 function action_EVENT_GROUP_LOAD_99003(context, evt) UpdateGamePlayState(context) return 0 end -- 触发操作 function action_EVENT_VARIABLE_CHANGE_99004(context, evt) if evt.param1 == evt.param2 then return -1 end UpdateGamePlayState(context) return 0 end -- 触发条件 function condition_EVENT_VARIABLE_CHANGE_99005(context, evt) if evt.param1 == evt.param2 then return false end -- 判断变量"activecount"为2 if ScriptLib.GetGroupVariableValue(context, "activecount") ~= 2 then return false end return true end -- 触发操作 function action_EVENT_VARIABLE_CHANGE_99005(context, evt) -- 将本组内变量名为 "gameplayState" 的变量设置为 2 if 0 ~= ScriptLib.SetGroupVariableValue(context, "gameplayState", 2) then ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable") return -1 end return 0 end