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

175 lines
5.7 KiB
Go

-- 基础信息
local base_info = {
group_id = 247004028
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 28001, gadget_id = 70360283, pos = { x = 52.742, y = 9.840, z = 80.089 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 28002, gadget_id = 70360283, pos = { x = 117.077, y = 4.381, z = 161.639 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 28004, gadget_id = 70360283, pos = { x = 0.021, y = 9.182, z = 201.488 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 28005, gadget_id = 70360283, pos = { x = -40.000, y = 9.739, z = 319.826 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 28006, shape = RegionShape.CUBIC, size = { x = 5.000, y = 10.000, z = 5.000 }, pos = { x = 52.742, y = 5.178, z = 80.089 } },
{ config_id = 28007, shape = RegionShape.CUBIC, size = { x = 5.000, y = 10.000, z = 5.000 }, pos = { x = 117.077, y = 0.696, z = 161.639 } },
{ config_id = 28009, shape = RegionShape.CUBIC, size = { x = 5.000, y = 10.000, z = 5.000 }, pos = { x = 0.021, y = 4.027, z = 201.488 } },
{ config_id = 28010, shape = RegionShape.CUBIC, size = { x = 5.000, y = 20.000, z = 5.000 }, pos = { x = -40.000, y = 0.059, z = 319.826 } }
}
-- 触发器
triggers = {
{ config_id = 1028006, name = "ENTER_REGION_28006", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_28006", action = "action_EVENT_ENTER_REGION_28006" },
{ config_id = 1028007, name = "ENTER_REGION_28007", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_28007", action = "action_EVENT_ENTER_REGION_28007" },
{ config_id = 1028009, name = "ENTER_REGION_28009", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_28009", action = "action_EVENT_ENTER_REGION_28009" },
{ config_id = 1028010, name = "ENTER_REGION_28010", event = EventType.EVENT_ENTER_REGION, source = "", condition = "condition_EVENT_ENTER_REGION_28010", action = "action_EVENT_ENTER_REGION_28010" }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 28001, 28002, 28004, 28005 },
regions = { 28006, 28007, 28009, 28010 },
triggers = { "ENTER_REGION_28006", "ENTER_REGION_28007", "ENTER_REGION_28009", "ENTER_REGION_28010" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_ENTER_REGION_28006(context, evt)
if evt.param1 ~= 28006 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_28006(context, evt)
-- 将configid为 28001 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 28001, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ENTER_REGION_28007(context, evt)
if evt.param1 ~= 28007 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_28007(context, evt)
-- 将configid为 28002 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 28002, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ENTER_REGION_28009(context, evt)
if evt.param1 ~= 28009 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_28009(context, evt)
-- 将configid为 28004 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 28004, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_ENTER_REGION_28010(context, evt)
if evt.param1 ~= 28010 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_28010(context, evt)
-- 将configid为 28005 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 28005, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end