mirror of
https://gitlab.com/YuukiPS/GC-Resources.git
synced 2025-04-28 17:15:22 +00:00
157 lines
3.8 KiB
Lua
157 lines
3.8 KiB
Lua
-- 基础信息
|
|
local base_info = {
|
|
group_id = 155009022
|
|
}
|
|
|
|
-- Trigger变量
|
|
local defs = {
|
|
group_ID = 155009022,
|
|
managerGroup = 155009001
|
|
}
|
|
|
|
-- DEFS_MISCS
|
|
local gameplayStateFuncitons =
|
|
{
|
|
["0"] = function(context)
|
|
|
|
|
|
end,
|
|
["1"] = function(context)
|
|
|
|
|
|
ScriptLib.RefreshGroup(context, { group_id = defs.group_ID, suite = 2 })
|
|
ScriptLib.GoToGroupSuite(context, defs.group_ID, 2)
|
|
ScriptLib.PrintContextLog(context, " add suit 2")
|
|
|
|
|
|
end,
|
|
["2"] = function(context)
|
|
|
|
|
|
ScriptLib.AddExtraGroupSuite(context, defs.group_ID, 2)
|
|
|
|
|
|
end
|
|
}
|
|
|
|
|
|
function UpdateGamePlayState(context)
|
|
local state = ScriptLib.GetGroupVariableValue(context, "gameplayState")
|
|
ScriptLib.PrintContextLog(context, "update gameplay state")
|
|
gameplayStateFuncitons[tostring(state)](context)
|
|
|
|
end
|
|
|
|
--================================================================
|
|
--
|
|
-- 配置
|
|
--
|
|
--================================================================
|
|
|
|
-- 怪物
|
|
monsters = {
|
|
}
|
|
|
|
-- NPC
|
|
npcs = {
|
|
}
|
|
|
|
-- 装置
|
|
gadgets = {
|
|
{ config_id = 22001, gadget_id = 70500000, pos = { x = -775.493, y = 199.549, z = -158.000 }, rot = { x = 0.000, y = 65.618, z = 0.000 }, level = 36, point_type = 2004, area_id = 200 },
|
|
{ config_id = 22002, gadget_id = 70500000, pos = { x = -769.512, y = 202.729, z = -166.469 }, rot = { x = 0.000, y = 51.227, z = 0.000 }, level = 36, point_type = 2004, area_id = 200 },
|
|
{ config_id = 22003, gadget_id = 70500000, pos = { x = -782.575, y = 200.787, z = -170.004 }, rot = { x = 0.000, y = 123.375, z = 0.000 }, level = 36, point_type = 2004, area_id = 200 }
|
|
}
|
|
|
|
-- 区域
|
|
regions = {
|
|
}
|
|
|
|
-- 触发器
|
|
triggers = {
|
|
{ config_id = 1022004, name = "GROUP_LOAD_22004", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD_22004", trigger_count = 0 },
|
|
{ config_id = 1022005, name = "VARIABLE_CHANGE_22005", event = EventType.EVENT_VARIABLE_CHANGE, source = "gameplayState", condition = "condition_EVENT_VARIABLE_CHANGE_22005", action = "action_EVENT_VARIABLE_CHANGE_22005", trigger_count = 0 }
|
|
}
|
|
|
|
-- 变量
|
|
variables = {
|
|
{ config_id = 1, name = "gameplayState", value = 0, no_refresh = true }
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 初始化配置
|
|
--
|
|
--================================================================
|
|
|
|
-- 初始化时创建
|
|
init_config = {
|
|
suite = 1,
|
|
end_suite = 2,
|
|
rand_suite = false
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 小组配置
|
|
--
|
|
--================================================================
|
|
|
|
suites = {
|
|
{
|
|
-- suite_id = 1,
|
|
-- description = ,
|
|
monsters = { },
|
|
gadgets = { },
|
|
regions = { },
|
|
triggers = { "GROUP_LOAD_22004", "VARIABLE_CHANGE_22005" },
|
|
rand_weight = 100
|
|
},
|
|
{
|
|
-- suite_id = 2,
|
|
-- description = ,
|
|
monsters = { },
|
|
gadgets = { 22001, 22002, 22003 },
|
|
regions = { },
|
|
triggers = { },
|
|
rand_weight = 100
|
|
}
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 触发器
|
|
--
|
|
--================================================================
|
|
|
|
-- 触发操作
|
|
function action_EVENT_GROUP_LOAD_22004(context, evt)
|
|
local isactive = ScriptLib.GetGroupVariableValueByGroup(context, "IslandActive", defs.managerGroup)
|
|
|
|
if isactive == 1 then
|
|
if ScriptLib.GetGroupVariableValue(context,"gameplayState") == 0 then
|
|
ScriptLib.SetGroupVariableValue(context,"gameplayState", 1)
|
|
end
|
|
|
|
end
|
|
UpdateGamePlayState(context)
|
|
return 0
|
|
end
|
|
|
|
-- 触发条件
|
|
function condition_EVENT_VARIABLE_CHANGE_22005(context, evt)
|
|
if evt.param1 == evt.param2 then return false end
|
|
|
|
-- 判断变量"gameplayState"为0
|
|
if ScriptLib.GetGroupVariableValue(context, "gameplayState") == 0 then
|
|
return false
|
|
end
|
|
|
|
return true
|
|
end
|
|
|
|
-- 触发操作
|
|
function action_EVENT_VARIABLE_CHANGE_22005(context, evt)
|
|
UpdateGamePlayState(context)
|
|
return 0
|
|
end |