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

212 lines
6.7 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 基础信息
local base_info = {
group_id = 155006070
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 70001, gadget_id = 70710598, pos = { x = 572.640, y = 122.169, z = -503.941 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, isOneoff = true, persistent = true, interact_id = 78, area_id = 200 },
{ config_id = 70004, gadget_id = 70211112, pos = { x = 572.116, y = 121.240, z = -520.280 }, rot = { x = 357.232, y = 39.336, z = 357.734 }, level = 16, chest_drop_id = 1050157, drop_count = 1, state = GadgetState.ChestLocked, isOneoff = true, persistent = true, explore = { name = "chest", exp = 1 }, area_id = 200 },
{ config_id = 70005, gadget_id = 70290282, pos = { x = 572.481, y = 126.382, z = -504.614 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, persistent = true, area_id = 200 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1070002, name = "GADGET_STATE_CHANGE_70002", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_70002", action = "action_EVENT_GADGET_STATE_CHANGE_70002" },
-- 保证铁门不开
{ config_id = 1070003, name = "GROUP_LOAD_70003", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_70003", action = "action_EVENT_GROUP_LOAD_70003", trigger_count = 0 },
-- 保证铁门不开
{ config_id = 1070006, name = "GROUP_REFRESH_70006", event = EventType.EVENT_GROUP_REFRESH, source = "", condition = "condition_EVENT_GROUP_REFRESH_70006", action = "action_EVENT_GROUP_REFRESH_70006", trigger_count = 0 },
-- 重新开门开宝箱
{ config_id = 1070007, name = "GROUP_LOAD_70007", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_70007", action = "action_EVENT_GROUP_LOAD_70007", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "jiaofu", value = 0, no_refresh = true }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 2,
end_suite = 1,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 70001, 70004, 70005 },
regions = { },
triggers = { "GADGET_STATE_CHANGE_70002", "GROUP_LOAD_70003", "GROUP_REFRESH_70006" },
rand_weight = 100,
ban_refresh = true
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { 70004, 70005 },
regions = { },
triggers = { "GROUP_LOAD_70007" },
rand_weight = 100,
ban_refresh = true
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_70002(context, evt)
if 70001 ~= evt.param2 or GadgetState.GearStart ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_70002(context, evt)
-- 将本组内变量名为 "jiaofu" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "jiaofu", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1
if 0 ~= ScriptLib.AddQuestProgress(context, "Quest7224005") then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
return -1
end
-- 将configid为 70005 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 70005, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 70004 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 70004, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- group调整group进度,只对非randSuite有效
if 0 ~= ScriptLib.GoToGroupSuite(context, 155006070, 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : goto_groupSuite")
return -1
end
-- 卸载指定gadget
if 0 ~= ScriptLib.RemoveEntityByConfigId(context, 155006070, EntityType.GADGET, 70001 ) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : remove_gadget_by_configid")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GROUP_LOAD_70003(context, evt)
-- 判断变量"jiaofu"为0
if ScriptLib.GetGroupVariableValueByGroup(context, "jiaofu", 155006070) ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GROUP_LOAD_70003(context, evt)
-- 将configid为 70005 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 70005, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GROUP_REFRESH_70006(context, evt)
-- 判断变量"jiaofu"为0
if ScriptLib.GetGroupVariableValueByGroup(context, "jiaofu", 155006070) ~= 0 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GROUP_REFRESH_70006(context, evt)
-- 将configid为 70005 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 70005, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GROUP_LOAD_70007(context, evt)
-- 判断变量"jiaofu"为1
if ScriptLib.GetGroupVariableValueByGroup(context, "jiaofu", 155006070) ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GROUP_LOAD_70007(context, evt)
-- 将configid为 70005 的物件更改为状态 GadgetState.GearStart
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 70005, GadgetState.GearStart) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
-- 将configid为 70004 的物件更改为状态 GadgetState.Default
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 70004, GadgetState.Default) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
return -1
end
return 0
end