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

182 lines
5.2 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 = 199001012
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 12004, gadget_id = 70210102, pos = { x = -426.809, y = 120.000, z = -646.615 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 16, chest_drop_id = 1000100, drop_count = 1, isOneoff = true, persistent = true, area_id = 400 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1012001, name = "GROUP_LOAD_12001", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_12001", action = "action_EVENT_GROUP_LOAD_12001", trigger_count = 0 },
{ config_id = 1012002, name = "GADGET_STATE_CHANGE_12002", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_12002", action = "action_EVENT_GADGET_STATE_CHANGE_12002" },
{ config_id = 1012003, name = "GADGET_STATE_CHANGE_12003", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_12003", action = "action_EVENT_GADGET_STATE_CHANGE_12003" },
{ config_id = 1012005, name = "GROUP_LOAD_12005", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "condition_EVENT_GROUP_LOAD_12005", action = "action_EVENT_GROUP_LOAD_12005", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "IsItemPickedUp", value = 0, no_refresh = true }
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 12004 },
regions = { },
triggers = { "GROUP_LOAD_12001", "GADGET_STATE_CHANGE_12002" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { 12004 },
regions = { },
triggers = { "GADGET_STATE_CHANGE_12003", "GROUP_LOAD_12005" },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GROUP_LOAD_12001(context, evt)
-- 判断变量"IsItemPickedUp"为1
if ScriptLib.GetGroupVariableValue(context, "IsItemPickedUp") ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GROUP_LOAD_12001(context, evt)
ScriptLib.AddQuestProgress(context, "7902302")
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_12002(context, evt)
if 12004 ~= evt.param2 or GadgetState.ChestOpened ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_12002(context, evt)
-- 将本组内变量名为 "IsItemPickedUp" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "IsItemPickedUp", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 调用提示id为 1111213 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 1111213) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
-- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1
if 0 ~= ScriptLib.AddQuestProgress(context, "7902302") then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_12003(context, evt)
if 12004 ~= evt.param2 or GadgetState.ChestOpened ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_12003(context, evt)
-- 将本组内变量名为 "IsItemPickedUp" 的变量设置为 1
if 0 ~= ScriptLib.SetGroupVariableValue(context, "IsItemPickedUp", 1) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
-- 调用提示id为 1111211 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 1111211) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
-- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1
if 0 ~= ScriptLib.AddQuestProgress(context, "7902302") then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
return -1
end
return 0
end
-- 触发条件
function condition_EVENT_GROUP_LOAD_12005(context, evt)
-- 判断变量"IsItemPickedUp"为1
if ScriptLib.GetGroupVariableValue(context, "IsItemPickedUp") ~= 1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GROUP_LOAD_12005(context, evt)
ScriptLib.AddQuestProgress(context, "7902302")
return 0
end