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

290 lines
9.9 KiB
Go

-- 基础信息
local base_info = {
group_id = 144002069
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
-- 触发靶标出现的开关
{ config_id = 69001, gadget_id = 70360006, pos = { x = 369.700, y = 120.599, z = -623.767 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, area_id = 101 },
{ config_id = 69002, gadget_id = 70211102, pos = { x = 373.688, y = 120.799, z = -621.320 }, rot = { x = 0.000, y = 96.868, z = 0.000 }, level = 26, drop_tag = "解谜低级群岛", state = GadgetState.ChestLocked, isOneoff = true, persistent = true, explore = { name = "chest", exp = 1 }, area_id = 101 },
{ config_id = 69004, gadget_id = 70350085, pos = { x = 371.937, y = 124.228, z = -612.471 }, rot = { x = 11.937, y = 124.156, z = 107.529 }, level = 1, is_use_point_array = true, area_id = 101 },
{ config_id = 69005, gadget_id = 70950078, pos = { x = 370.795, y = 124.391, z = -617.917 }, rot = { x = 0.000, y = 11.504, z = 0.000 }, level = 1, is_use_point_array = true, area_id = 101 },
{ config_id = 69006, gadget_id = 70350242, pos = { x = 370.689, y = 120.531, z = -618.203 }, rot = { x = 0.000, y = 284.893, z = 0.000 }, level = 1, area_id = 101 },
{ config_id = 69026, gadget_id = 70950075, pos = { x = 371.937, y = 125.033, z = -612.470 }, rot = { x = 355.444, y = 193.917, z = 0.753 }, level = 1, is_use_point_array = true, area_id = 101 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1069032, name = "GADGET_STATE_CHANGE_69032", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_69032", action = "action_EVENT_GADGET_STATE_CHANGE_69032", trigger_count = 0 },
{ config_id = 1069033, name = "GADGET_STATE_CHANGE_69033", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_69033", action = "action_EVENT_GADGET_STATE_CHANGE_69033", trigger_count = 0 },
-- 销毁靶标后创建宝箱
{ config_id = 1069062, name = "ANY_GADGET_DIE_69062", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_69062", action = "action_EVENT_ANY_GADGET_DIE_69062" },
-- 开启了宝箱后刷新Group进度
{ config_id = 1069063, name = "GADGET_STATE_CHANGE_69063", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_69063", action = "action_EVENT_GADGET_STATE_CHANGE_69063" },
{ config_id = 1069064, name = "GADGET_STATE_CHANGE_69064", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_69064", action = "action_EVENT_GADGET_STATE_CHANGE_69064", trigger_count = 0 },
{ config_id = 1069065, name = "GADGET_STATE_CHANGE_69065", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_69065", action = "action_EVENT_GADGET_STATE_CHANGE_69065", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "complete", value = 0, no_refresh = false }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 3,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = [默认加载的Entities],
monsters = { },
gadgets = { 69001, 69002, 69005, 69006, 69026 },
regions = { },
triggers = { "GADGET_STATE_CHANGE_69032", "GADGET_STATE_CHANGE_69033", "ANY_GADGET_DIE_69062", "GADGET_STATE_CHANGE_69063", "GADGET_STATE_CHANGE_69064", "GADGET_STATE_CHANGE_69065" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = [加载羽球元素靶标&判定玩法成功],
monsters = { },
gadgets = { 69004 },
regions = { },
triggers = { },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = [加载羽球元素靶标&判定玩法成功的方法2],
monsters = { },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
},
{
-- suite_id = 4,
-- description = [玩法完成后的空Suite],
monsters = { },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_69032(context, evt)
if 69001 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_69032(context, evt)
-- 将configid为 69005 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 69005, 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 = 1, turn_mode = false}
if 0 ~= ScriptLib.SetPlatformPointArray(context, 69005, 400200001, {3,4}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
return -1
end
-- 将configid为 69006 的物件更改为状态 GadgetState.GearStop
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 69006, GadgetState.GearStop) 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 = 1, turn_mode = false}
if 0 ~= ScriptLib.SetPlatformPointArray(context, 69004, 400200001, {}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_69033(context, evt)
if 69001 ~= evt.param2 or GadgetState.Default ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_69033(context, evt)
-- 将configid为 69005 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 69005, 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, 69005, 400200001, {1}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
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, 69004, 400200001, {}, tempParam) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_pointArray")
return -1
end
-- 将configid为 69006 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 69006, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ANY_GADGET_DIE_69062(context, evt)
if 69026 ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_GADGET_DIE_69062(context, evt)
-- 将configid为 69002 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 69002, 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, 144002069, 2)
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_69063(context, evt)
if 69002 ~= evt.param2 or GadgetState.ChestOpened ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_69063(context, evt)
-- group调整group进度,只对非randSuite有效
if 0 ~= ScriptLib.GoToGroupSuite(context, 144002069, 3) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : goto_groupSuite")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_69064(context, evt)
if 69001 ~= 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_69064(context, evt)
-- 添加suite2的新内容
ScriptLib.AddExtraGroupSuite(context, 144002069, 2)
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_69065(context, evt)
if 69001 ~= evt.param2 or GadgetState.Default ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_69065(context, evt)
-- 删除suite2的所有内容
ScriptLib.RemoveExtraGroupSuite(context, 144002069, 2)
return 0
end