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

124 lines
3.6 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 = 144002051
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1051001, name = "QUEST_FINISH_51001", event = EventType.EVENT_QUEST_FINISH, source = "7900313", condition = "condition_EVENT_QUEST_FINISH_51001", action = "action_EVENT_QUEST_FINISH_51001" },
{ config_id = 1051002, name = "TIMER_EVENT_51002", event = EventType.EVENT_TIMER_EVENT, source = "waitForCamera", condition = "", action = "action_EVENT_TIMER_EVENT_51002" }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { "QUEST_FINISH_51001", "TIMER_EVENT_51002" },
rand_weight = 100,
ban_refresh = true
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_QUEST_FINISH_51001(context, evt)
--检查ID为7900313的任务的完成状态是否为1(1=完成,0=失败)
--此事件需要配合Quest表使用,在Quest表里的完成执行中配置“通知group脚本”,则该任务完成后服务端会向对应的group发送通知,参数1填写场景ID,参数2填写group ID(如果不填则会通知所有group)
--检查任务ID
if 7900313 ~= evt.param1 then
return false
end
--检查任务成功状态
if 1 ~= evt.param2 then
return false
end
return true
end
-- 触发操作
function action_EVENT_QUEST_FINISH_51001(context, evt)
-- 延迟3秒后,向groupId为:144002051的对象,请求一次调用,并将string参数:"waitForCamera" 传递过去
if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 144002051, "waitForCamera", 3) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_TIMER_EVENT_51002(context, evt)
-- 调用提示id为 40020110 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
if 0 ~= ScriptLib.ShowReminder(context, 40020110) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
return -1
end
-- 触发镜头注目,注目位置为坐标(521,193,-103),持续时间为3秒,并且为强制注目形式,不广播其他玩家
local pos = {x=521, y=193, z=-103}
local pos_follow = {x=0, y=0, z=0}
if 0 ~= ScriptLib.BeginCameraSceneLook(context, { look_pos = pos, is_allow_input = true, duration = 3, is_force = true, is_broadcast = false, is_recover_keep_current = true, delay = 0,
is_set_follow_pos = false, follow_pos = pos_follow, is_force_walk = false, is_change_play_mode = false,
is_set_screen_XY = false, screen_x = 0, screen_y = 0 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_cameraLook_Begin")
return -1
end
return 0
end