Files
hk4e-go/gdconf/game_data_config/lua/scene/4/scene4_group144003019.lua
T
2022-11-30 00:00:20 +08:00

681 lines
24 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 基础信息
local base_info = {
group_id = 144003019
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
-- 触发靶标出现的开关
{ config_id = 19001, gadget_id = 70360006, pos = { x = -690.940, y = 193.881, z = 41.050 }, rot = { x = 359.246, y = 0.000, z = 10.428 }, level = 1, area_id = 103 },
{ config_id = 19003, gadget_id = 70950079, pos = { x = -683.427, y = 197.647, z = 37.135 }, rot = { x = 0.000, y = 300.737, z = 0.302 }, level = 1, is_use_point_array = true, area_id = 103 },
{ config_id = 19004, gadget_id = 70350243, pos = { x = -683.432, y = 193.916, z = 37.127 }, rot = { x = 0.000, y = 339.004, z = 0.000 }, level = 1, area_id = 103 },
{ config_id = 19005, gadget_id = 70950079, pos = { x = -691.000, y = 196.800, z = 22.740 }, rot = { x = 0.000, y = 209.000, z = 1.000 }, level = 1, is_use_point_array = true, area_id = 103 },
{ config_id = 19006, gadget_id = 70350243, pos = { x = -691.000, y = 192.697, z = 22.740 }, rot = { x = 0.000, y = 200.035, z = 0.000 }, level = 1, state = GadgetState.GearStop, area_id = 103 },
{ config_id = 19007, gadget_id = 70360001, pos = { x = -691.000, y = 192.697, z = 22.740 }, rot = { x = 0.000, y = 200.035, z = 0.000 }, level = 1, area_id = 103 },
{ config_id = 19010, gadget_id = 70350085, pos = { x = -680.014, y = 197.954, z = 43.188 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, area_id = 103 },
{ config_id = 19011, gadget_id = 70950078, pos = { x = -687.813, y = 197.569, z = 29.136 }, rot = { x = 0.000, y = 26.126, z = 0.000 }, level = 1, is_use_point_array = true, area_id = 103 },
{ config_id = 19012, gadget_id = 70350242, pos = { x = -687.834, y = 193.339, z = 29.342 }, rot = { x = 0.000, y = 132.420, z = 0.000 }, level = 1, area_id = 103 },
{ config_id = 19013, gadget_id = 70211112, pos = { x = -693.117, y = 193.530, z = 32.894 }, rot = { x = 0.000, y = 41.433, z = 0.000 }, level = 16, drop_tag = "解谜中级群岛", state = GadgetState.ChestLocked, isOneoff = true, persistent = true, explore = { name = "chest", exp = 1 }, area_id = 103 },
{ config_id = 19014, gadget_id = 70950075, pos = { x = -680.014, y = 197.954, z = 43.257 }, rot = { x = 4.090, y = 205.094, z = 355.966 }, level = 1, area_id = 103 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1019002, name = "GROUP_LOAD_19002", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_19002", action = "action_EVENT_GROUP_LOAD_19002" },
{ config_id = 1019015, name = "SELECT_OPTION_19015", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_19015", action = "action_EVENT_SELECT_OPTION_19015", trigger_count = 0 },
{ config_id = 1019016, name = "SELECT_OPTION_19016", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_19016", action = "action_EVENT_SELECT_OPTION_19016", trigger_count = 0 },
{ config_id = 1019017, name = "SELECT_OPTION_19017", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_19017", action = "action_EVENT_SELECT_OPTION_19017", trigger_count = 0 },
{ config_id = 1019018, name = "VARIABLE_CHANGE_19018", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_19018", action = "action_EVENT_VARIABLE_CHANGE_19018", trigger_count = 0 },
-- 进入了场地边线后,1)激活台座
{ config_id = 1019019, name = "GADGET_STATE_CHANGE_19019", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19019", action = "action_EVENT_GADGET_STATE_CHANGE_19019", trigger_count = 0 },
-- 离开了场地边线后,1)恢复台座
{ config_id = 1019020, name = "GADGET_STATE_CHANGE_19020", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19020", action = "action_EVENT_GADGET_STATE_CHANGE_19020", trigger_count = 0 },
-- 进入了场地边线后,1)激活台座
{ config_id = 1019022, name = "GADGET_STATE_CHANGE_19022", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19022", action = "action_EVENT_GADGET_STATE_CHANGE_19022", trigger_count = 0 },
-- 销毁靶标后创建宝箱
{ config_id = 1019023, name = "ANY_GADGET_DIE_19023", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_19023", action = "action_EVENT_ANY_GADGET_DIE_19023" },
-- 开启了宝箱后刷新Group进度
{ config_id = 1019024, name = "GADGET_STATE_CHANGE_19024", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19024", action = "action_EVENT_GADGET_STATE_CHANGE_19024" },
-- 离开了场地边线后,1)恢复台座
{ config_id = 1019025, name = "GADGET_STATE_CHANGE_19025", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19025", action = "action_EVENT_GADGET_STATE_CHANGE_19025", trigger_count = 0 },
-- 进入了场地边线后,1)激活台座
{ config_id = 1019027, name = "GADGET_STATE_CHANGE_19027", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19027", action = "action_EVENT_GADGET_STATE_CHANGE_19027", trigger_count = 0 },
-- 进入了场地边线后,1)激活台座2)开始旋转
{ config_id = 1019028, name = "GADGET_STATE_CHANGE_19028", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19028", action = "action_EVENT_GADGET_STATE_CHANGE_19028", trigger_count = 0 },
-- 离开了场地边线后,1)恢复台座2)停止旋转
{ config_id = 1019029, name = "GADGET_STATE_CHANGE_19029", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19029", action = "action_EVENT_GADGET_STATE_CHANGE_19029", trigger_count = 0 },
-- 进入了场地边线后,1)激活台座2)升起台座3)移除按钮
{ config_id = 1019030, name = "GADGET_STATE_CHANGE_19030", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19030", action = "action_EVENT_GADGET_STATE_CHANGE_19030", trigger_count = 0 },
-- 离开了场地边线后,1)恢复台座2)降落台座3)添加按钮
{ config_id = 1019031, name = "GADGET_STATE_CHANGE_19031", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19031", action = "action_EVENT_GADGET_STATE_CHANGE_19031", trigger_count = 0 },
-- 隐形操作台创建时添加按钮
{ config_id = 1019032, name = "GADGET_CREATE_19032", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_19032", action = "action_EVENT_GADGET_CREATE_19032", trigger_count = 0 },
-- 销毁靶标后创建宝箱
{ config_id = 1019033, name = "ANY_GADGET_DIE_19033", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_19033", action = "action_EVENT_ANY_GADGET_DIE_19033" },
{ config_id = 1019035, name = "SELECT_OPTION_19035", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_19035", action = "action_EVENT_SELECT_OPTION_19035", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "hoop1Pos", value = 0, no_refresh = false },
{ config_id = 2, name = "hoop2Pos", value = 0, no_refresh = false },
{ config_id = 3, name = "complete", value = 0, no_refresh = false },
{ config_id = 4, name = "turncount", value = 0, no_refresh = false },
{ config_id = 5, name = "done", value = 0, no_refresh = false }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 3,
end_suite = 4,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = [默认加载的Entities],
monsters = { },
gadgets = { 19001, 19003, 19004, 19005, 19006, 19007, 19011, 19012, 19013, 19014 },
regions = { },
triggers = { "SELECT_OPTION_19015", "SELECT_OPTION_19016", "SELECT_OPTION_19017", "VARIABLE_CHANGE_19018", "GADGET_STATE_CHANGE_19019", "GADGET_STATE_CHANGE_19020", "GADGET_STATE_CHANGE_19022", "GADGET_STATE_CHANGE_19024", "GADGET_STATE_CHANGE_19025", "GADGET_STATE_CHANGE_19027", "GADGET_STATE_CHANGE_19028", "GADGET_STATE_CHANGE_19029", "GADGET_STATE_CHANGE_19030", "GADGET_STATE_CHANGE_19031", "GADGET_CREATE_19032", "ANY_GADGET_DIE_19033", "SELECT_OPTION_19035" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = 升级版,
monsters = { },
gadgets = { 19010 },
regions = { },
triggers = { },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { "GROUP_LOAD_19002" },
rand_weight = 100
},
{
-- suite_id = 4,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GROUP_LOAD_19002(context, evt)
-- 判断变量"done"为1
if ScriptLib.GetGroupVariableValue(context, "done") ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GROUP_LOAD_19002(context, evt)
-- group调整group进度,只对非randSuite有效
if 0 ~= ScriptLib.GoToGroupSuite(context, 144003019, 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : goto_groupSuite")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_19015(context, evt)
-- 判断是gadgetid 19007 option_id 211
if 19007 ~= evt.param1 then
return false
end
if 211 ~= evt.param2 then
return false
end
-- 判断变量"turncount"为1
if ScriptLib.GetGroupVariableValue(context, "turncount") ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_19015(context, evt)
-- 设置移动平台点阵,点阵id为point_array_id
-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
-- turn_mode = true/false 开启/关闭
local tempParam = {route_type = 0, turn_mode = true}
if 0 ~= ScriptLib.SetPlatformPointArray(context, 19005, 400300002, {2}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
return -1
end
-- 针对当前group内变量名为 "turncount" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "turncount", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_19016(context, evt)
-- 判断是gadgetid 19007 option_id 211
if 19007 ~= evt.param1 then
return false
end
if 211 ~= evt.param2 then
return false
end
-- 判断变量"turncount"为2
if ScriptLib.GetGroupVariableValue(context, "turncount") ~= 2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_19016(context, evt)
-- 设置移动平台点阵,点阵id为point_array_id
-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
-- turn_mode = true/false 开启/关闭
local tempParam = {route_type = 0, turn_mode = true}
if 0 ~= ScriptLib.SetPlatformPointArray(context, 19005, 400300002, {3}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
return -1
end
-- 针对当前group内变量名为 "turncount" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "turncount", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_19017(context, evt)
-- 判断是gadgetid 19007 option_id 211
if 19007 ~= evt.param1 then
return false
end
if 211 ~= evt.param2 then
return false
end
-- 判断变量"turncount"为3
if ScriptLib.GetGroupVariableValue(context, "turncount") ~= 3 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_19017(context, evt)
-- 设置移动平台点阵,点阵id为point_array_id
-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
-- turn_mode = true/false 开启/关闭
local tempParam = {route_type = 0, turn_mode = true}
if 0 ~= ScriptLib.SetPlatformPointArray(context, 19005, 400300002, {4}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
return -1
end
-- 针对当前group内变量名为 "turncount" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "turncount", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_VARIABLE_CHANGE_19018(context, evt)
if evt.param1 == evt.param2 then return false end
if evt.param1 == evt.param2 then return false end
-- 判断变量"turncount"为4
if ScriptLib.GetGroupVariableValue(context, "turncount") < 4 then
return false
end
return true
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_19018(context, evt)
-- 变量"turncount"赋值为0
ScriptLib.SetGroupVariableValue(context, "turncount", 0)
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19019(context, evt)
if 19001 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19019(context, evt)
-- 将configid为 19011 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19011, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 19012 的物件更改为状态 GadgetState.GearStop
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19012, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19020(context, evt)
if 19001 ~= evt.param2 or GadgetState.Default ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19020(context, evt)
-- 将configid为 19011 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19011, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 19012 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19012, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19022(context, evt)
if 19001 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19022(context, evt)
-- 将configid为 19011 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19011, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 19012 的物件更改为状态 GadgetState.GearStop
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19012, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_GADGET_DIE_19023(context, evt)
if 19014 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_GADGET_DIE_19023(context, evt)
-- 将configid为 19013 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19013, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, 144003019, 2)
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19024(context, evt)
if 19013 ~= evt.param2 or GadgetState.ChestOpened ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19024(context, evt)
-- group调整group进度,只对非randSuite有效
if 0 ~= ScriptLib.GoToGroupSuite(context, 144003019, 4) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : goto_groupSuite")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19025(context, evt)
if 19001 ~= evt.param2 or GadgetState.Default ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19025(context, evt)
-- 将configid为 19011 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19011, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 19012 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19012, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, 144003019, 2)
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19027(context, evt)
if 19001 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
-- 判断变量"complete"为0
if ScriptLib.GetGroupVariableValue(context, "complete") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19027(context, evt)
-- 添加suite2的新内容
ScriptLib.AddExtraGroupSuite(context, 144003019, 2)
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19028(context, evt)
if 19001 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19028(context, evt)
-- 将configid为 19003 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19003, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 设置移动平台点阵,点阵id为point_array_id
-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
-- turn_mode = true/false 开启/关闭
local tempParam = {route_type = 2, turn_mode = true}
if 0 ~= ScriptLib.SetPlatformPointArray(context, 19003, 400300001, {2}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
return -1
end
-- 将configid为 19004 的物件更改为状态 GadgetState.GearStop
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19004, GadgetState.GearStop) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19029(context, evt)
if 19001 ~= evt.param2 or GadgetState.Default ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19029(context, evt)
-- 将configid为 19003 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19003, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 设置移动平台点阵,点阵id为point_array_id
-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
-- turn_mode = true/false 开启/关闭
local tempParam = {route_type = 0, turn_mode = false}
if 0 ~= ScriptLib.SetPlatformPointArray(context, 19003, 400300001, {2}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
return -1
end
-- 将configid为 19004 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19004, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19030(context, evt)
if 19001 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19030(context, evt)
-- 将configid为 19005 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19005, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_19031(context, evt)
if 19001 ~= evt.param2 or GadgetState.Default ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_19031(context, evt)
-- 将configid为 19005 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19005, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_CREATE_19032(context, evt)
if 19007 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_CREATE_19032(context, evt)
-- 设置操作台选项
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 144003019, 19007, {211}) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_GADGET_DIE_19033(context, evt)
if 19014 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_GADGET_DIE_19033(context, evt)
-- 将configid为 19013 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 19013, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将本组内变量名为 "complete" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "complete", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, 144003019, 2)
return 0
end
-- 触发条件
function condition_EVENT_SELECT_OPTION_19035(context, evt)
-- 判断是gadgetid 19007 option_id 211
if 19007 ~= evt.param1 then
return false
end
if 211 ~= evt.param2 then
return false
end
-- 判断变量"turncount"为0
if ScriptLib.GetGroupVariableValue(context, "turncount") ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_SELECT_OPTION_19035(context, evt)
-- 设置移动平台点阵,点阵id为point_array_id
-- route_type = 0,1,2 [OneWay 单向/Reciprocate 往复/Loop 循环]
-- turn_mode = true/false 开启/关闭
local tempParam = {route_type = 0, turn_mode = true}
if 0 ~= ScriptLib.SetPlatformPointArray(context, 19005, 400300002, {1}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
return -1
end
-- 针对当前group内变量名为 "turncount" 的变量,进行修改,变化值为 1
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "turncount", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
return -1
end
return 0
end