138 lines
3.4 KiB
Lua
138 lines
3.4 KiB
Lua
--================================================================
|
|
--
|
|
-- 配置
|
|
--
|
|
--================================================================
|
|
|
|
-- 怪物
|
|
monsters = {
|
|
}
|
|
|
|
-- NPC
|
|
npcs = {
|
|
}
|
|
|
|
-- 装置
|
|
gadgets = {
|
|
{ config_id = 441, gadget_id = 70710002, pos = { x = 2911.6, y = 211.9, z = 30.3 }, rot = { x = 0.0, y = 29.8, z = 0.0 }, level = 1, route_id = 3007089, save_route = true },
|
|
{ config_id = 602, gadget_id = 70900042, pos = { x = 3007.1, y = 208.6, z = 171.4 }, rot = { x = 0.0, y = 346.4, z = 0.0 }, level = 1 }
|
|
}
|
|
|
|
-- 区域
|
|
regions = {
|
|
{ config_id = 66, shape = RegionShape.SPHERE, radius = 5, pos = { x = 2912.2, y = 208.5, z = 30.2 } },
|
|
{ config_id = 67, shape = RegionShape.SPHERE, radius = 5, pos = { x = 2979.8, y = 210.5, z = 65.0 } }
|
|
}
|
|
|
|
-- 触发器
|
|
triggers = {
|
|
{ name = "ENTER_REGION_66", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_66", action = "action_EVENT_ENTER_REGION_66" },
|
|
{ name = "ENTER_REGION_67", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_67", action = "action_EVENT_ENTER_REGION_67" }
|
|
}
|
|
|
|
-- 变量
|
|
variables = {
|
|
{ name = "spirit", value = 0, persistent = false }
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 初始化配置
|
|
--
|
|
--================================================================
|
|
|
|
-- 初始化时创建
|
|
init_config = {
|
|
suite = 1,
|
|
rand_suite = true,
|
|
npcs = { }
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 小组配置
|
|
--
|
|
--================================================================
|
|
|
|
suites = {
|
|
{
|
|
-- suite_id = 0,
|
|
-- description = ,
|
|
monsters = { },
|
|
gadgets = { },
|
|
regions = { },
|
|
triggers = { },
|
|
rand_weight = 100
|
|
}
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 触发器
|
|
--
|
|
--================================================================
|
|
|
|
-- 触发条件
|
|
function condition_EVENT_ENTER_REGION_66(context, evt)
|
|
if evt.param1 ~= 66 then return false end
|
|
|
|
-- 判断变量"spirit"为0
|
|
if ScriptLib.GetGroupVariableValue(context, "spirit") ~= 0 then
|
|
return false
|
|
end
|
|
|
|
-- 判断角色数量不少于1
|
|
if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 1 then
|
|
return false
|
|
end
|
|
|
|
return true
|
|
end
|
|
|
|
-- 触发操作
|
|
function action_EVENT_ENTER_REGION_66(context, evt)
|
|
-- 设置移动平台路径
|
|
if 0 ~= ScriptLib.SetPlatformRouteId(context, 441, 3007080) then
|
|
return -1
|
|
end
|
|
|
|
-- 将本组内变量名为 "spirit" 的变量设置为 1
|
|
if 0 ~= ScriptLib.SetGroupVariableValue(context, "spirit", 1) then
|
|
return -1
|
|
end
|
|
|
|
return 0
|
|
end
|
|
|
|
-- 触发条件
|
|
function condition_EVENT_ENTER_REGION_67(context, evt)
|
|
if evt.param1 ~= 67 then return false end
|
|
|
|
-- 判断变量"spirit"为1
|
|
if ScriptLib.GetGroupVariableValue(context, "spirit") ~= 1 then
|
|
return false
|
|
end
|
|
|
|
-- 判断角色数量不少于1
|
|
if ScriptLib.GetRegionEntityCount(context, { region_eid = evt.source_eid, entity_type = EntityType.AVATAR }) < 1 then
|
|
return false
|
|
end
|
|
|
|
return true
|
|
end
|
|
|
|
-- 触发操作
|
|
function action_EVENT_ENTER_REGION_67(context, evt)
|
|
-- 设置移动平台路径
|
|
if 0 ~= ScriptLib.SetPlatformRouteId(context, 441, 3007081) then
|
|
return -1
|
|
end
|
|
|
|
-- 将本组内变量名为 "spirit" 的变量设置为 2
|
|
if 0 ~= ScriptLib.SetGroupVariableValue(context, "spirit", 2) then
|
|
return -1
|
|
end
|
|
|
|
return 0
|
|
end
|