142 lines
3.3 KiB
Go
142 lines
3.3 KiB
Go
-- 基础信息
|
||
local base_info = {
|
||
group_id = 250008006
|
||
}
|
||
|
||
-- Trigger变量
|
||
local defs = {
|
||
gadget_id_1 = 17
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 17, gadget_id = 70900242, pos = { x = 114.000, y = -21.000, z = -457.000 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, route_id = 50008014 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1000019, name = "GADGET_STATE_CHANGE_19", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_19", action = "action_EVENT_GADGET_STATE_CHANGE_19", trigger_count = 0 },
|
||
{ config_id = 1000157, name = "PLATFORM_REACH_POINT_157", event = EventType.EVENT_PLATFORM_REACH_POINT, source = "", condition = "condition_EVENT_PLATFORM_REACH_POINT_157", action = "action_EVENT_PLATFORM_REACH_POINT_157", trigger_count = 0 }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = true
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 17 },
|
||
regions = { },
|
||
triggers = { "GADGET_STATE_CHANGE_19", "PLATFORM_REACH_POINT_157" },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GADGET_STATE_CHANGE_19(context, evt)
|
||
if 17 ~= evt.param2 or GadgetState.GearAction2 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GADGET_STATE_CHANGE_19(context, evt)
|
||
-- 设置移动平台路径
|
||
if 0 ~= ScriptLib.SetPlatformRouteId(context, 17, 50008014) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_routeId")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_PLATFORM_REACH_POINT_157(context, evt)
|
||
-- 判断是gadgetid 为 17的移动平台,是否到达了50008014 的路线中的 1 点
|
||
|
||
if 17 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
if 50008014 ~= evt.param2 then
|
||
return false
|
||
end
|
||
|
||
if 1 ~= evt.param3 then
|
||
return false
|
||
end
|
||
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_PLATFORM_REACH_POINT_157(context, evt)
|
||
-- 将configid为 17 的物件更改为状态 GadgetState.Default
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 17, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 设置移动平台路径
|
||
if 0 ~= ScriptLib.SetPlatformRouteId(context, 17, 50008015) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_platform_routeId")
|
||
return -1
|
||
end
|
||
|
||
-- 停止移动平台
|
||
if 0 ~= ScriptLib.StopPlatform(context, 17) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : stop_platform")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |