0
0
mirror of https://gitlab.com/YuukiPS/GC-Resources.git synced 2025-04-28 09:05:26 +00:00
GC-Resources/Resources/Scripts/Scene/5/scene5_group155008014.lua
Yuuki b09934e7b9 Revert "remove local in defs"
This reverts commit 7e0a645ef33da87ddd5c402c6a64180001c6b03d.
2023-11-23 23:27:47 +08:00

161 lines
3.7 KiB
Lua

-- 基础信息
local base_info = {
group_id = 155008014
}
-- Trigger变量
local defs = {
group_ID = 155008014,
altarGroupID = 155008010
}
-- 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)
ScriptLib.AddQuestProgress(context, "72239_UnlockTeleportAltar")
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 = {
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1014001, name = "GROUP_LOAD_14001", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD_14001", trigger_count = 0 },
{ config_id = 1014002, name = "QUEST_START_14002", event = EventType.EVENT_QUEST_START, source = "7223905", condition = "", action = "action_EVENT_QUEST_START_14002", trigger_count = 0 },
{ config_id = 1014004, name = "VARIABLE_CHANGE_14004", event = EventType.EVENT_VARIABLE_CHANGE, source = "gameplayState", condition = "", action = "action_EVENT_VARIABLE_CHANGE_14004", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "gameplayState", 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_14001", "VARIABLE_CHANGE_14004" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { "QUEST_START_14002" },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发操作
function action_EVENT_GROUP_LOAD_14001(context, evt)
UpdateGamePlayState(context)
return 0
end
-- 触发操作
function action_EVENT_QUEST_START_14002(context, evt)
-- 将本组内变量名为 "solution_state_3" 的变量设置为 3
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "solution_state_3", 3, 155008010) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
return -1
end
-- 将本组内变量名为 "gameplayState" 的变量设置为 2
if 0 ~= ScriptLib.SetGroupVariableValue(context, "gameplayState", 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_14004(context, evt)
if evt.param1 == evt.param2 then return -1 end
UpdateGamePlayState(context)
return 0
end