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

142 lines
4.2 KiB
Go

-- 基础信息
local base_info = {
group_id = 155006201
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 201001, gadget_id = 70310157, pos = { x = 319.941, y = 118.861, z = -250.631 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, state = GadgetState.GearStart, persistent = true, area_id = 200 },
{ config_id = 201003, gadget_id = 70310157, pos = { x = 329.496, y = 118.719, z = -247.200 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, state = GadgetState.GearStart, persistent = true, area_id = 200 },
{ config_id = 201004, gadget_id = 70310157, pos = { x = 341.040, y = 119.901, z = -240.685 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, state = GadgetState.GearStart, persistent = true, area_id = 200 },
{ config_id = 201005, gadget_id = 70211101, pos = { x = 325.772, y = 115.941, z = -251.471 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 16, drop_tag = "解谜低级稻妻", isOneoff = true, persistent = true, explore = { name = "chest", exp = 1 }, area_id = 200 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1201002, name = "GADGET_STATE_CHANGE_201002", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_201002", action = "action_EVENT_GADGET_STATE_CHANGE_201002", trigger_count = 0 },
{ config_id = 1201006, name = "GROUP_LOAD_201006", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_201006", action = "action_EVENT_GROUP_LOAD_201006", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "isfinished", value = 0, no_refresh = true }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 2,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 201001, 201003, 201004 },
regions = { },
triggers = { "GADGET_STATE_CHANGE_201002", "GROUP_LOAD_201006" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { 201001, 201003, 201004, 201005 },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_201002(context, evt)
if GadgetState.GearStop ~= ScriptLib.GetGadgetStateByConfigId(context, 155006201, 201001) then
return false
end
if GadgetState.GearStop ~= ScriptLib.GetGadgetStateByConfigId(context, 155006201, 201003) then
return false
end
if GadgetState.GearStop ~= ScriptLib.GetGadgetStateByConfigId(context, 155006201, 201004) then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_201002(context, evt)
-- 将本组内变量名为 "isfinished" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "isfinished", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- group调整group进度,只对非randSuite有效
if 0 ~= ScriptLib.GoToGroupSuite(context, 155006201, 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : goto_groupSuite")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GROUP_LOAD_201006(context, evt)
-- 判断变量"isfinished"为1
if ScriptLib.GetGroupVariableValue(context, "isfinished") ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GROUP_LOAD_201006(context, evt)
-- group调整group进度,只对非randSuite有效
if 0 ~= ScriptLib.GoToGroupSuite(context, 155006201, 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : goto_groupSuite")
return -1
end
return 0
end