131 lines
3.4 KiB
Lua
131 lines
3.4 KiB
Lua
-- 基础信息
|
|
local base_info = {
|
|
group_id = 133102735
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 配置
|
|
--
|
|
--================================================================
|
|
|
|
-- 怪物
|
|
monsters = {
|
|
}
|
|
|
|
-- NPC
|
|
npcs = {
|
|
}
|
|
|
|
-- 装置
|
|
gadgets = {
|
|
}
|
|
|
|
-- 区域
|
|
regions = {
|
|
}
|
|
|
|
-- 触发器
|
|
triggers = {
|
|
{ config_id = 1735001, name = "QUEST_FINISH_735001", event = EventType.EVENT_QUEST_FINISH, source = "2102115", condition = "condition_EVENT_QUEST_FINISH_735001", action = "action_EVENT_QUEST_FINISH_735001", trigger_count = 0 },
|
|
{ config_id = 1735002, name = "QUEST_FINISH_735002", event = EventType.EVENT_QUEST_FINISH, source = "2102124", condition = "condition_EVENT_QUEST_FINISH_735002", action = "action_EVENT_QUEST_FINISH_735002", trigger_count = 0 }
|
|
}
|
|
|
|
-- 变量
|
|
variables = {
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 初始化配置
|
|
--
|
|
--================================================================
|
|
|
|
-- 初始化时创建
|
|
init_config = {
|
|
suite = 1,
|
|
end_suite = 0,
|
|
rand_suite = false
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 小组配置
|
|
--
|
|
--================================================================
|
|
|
|
suites = {
|
|
{
|
|
-- suite_id = 1,
|
|
-- description = ,
|
|
monsters = { },
|
|
gadgets = { },
|
|
regions = { },
|
|
triggers = { "QUEST_FINISH_735001", "QUEST_FINISH_735002" },
|
|
rand_weight = 100
|
|
}
|
|
}
|
|
|
|
--================================================================
|
|
--
|
|
-- 触发器
|
|
--
|
|
--================================================================
|
|
|
|
-- 触发条件
|
|
function condition_EVENT_QUEST_FINISH_735001(context, evt)
|
|
--检查ID为2102115的任务的完成状态是否为1(1=完成,0=失败)
|
|
--此事件需要配合Quest表使用,在Quest表里的完成执行中配置“通知group脚本”,则该任务完成后服务端会向对应的group发送通知,参数1填写场景ID,参数2填写group ID(如果不填则会通知所有group)
|
|
|
|
--检查任务ID
|
|
if 2102115 ~= evt.param1 then
|
|
return false
|
|
end
|
|
|
|
--检查任务成功状态
|
|
if 1 ~= evt.param2 then
|
|
return false
|
|
end
|
|
|
|
return true
|
|
end
|
|
|
|
-- 触发操作
|
|
function action_EVENT_QUEST_FINISH_735001(context, evt)
|
|
-- 调用提示id为 31020812 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
|
|
if 0 ~= ScriptLib.ShowReminder(context, 31020812) then
|
|
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
|
|
return -1
|
|
end
|
|
|
|
return 0
|
|
end
|
|
|
|
-- 触发条件
|
|
function condition_EVENT_QUEST_FINISH_735002(context, evt)
|
|
--检查ID为2102124的任务的完成状态是否为1(1=完成,0=失败)
|
|
--此事件需要配合Quest表使用,在Quest表里的完成执行中配置“通知group脚本”,则该任务完成后服务端会向对应的group发送通知,参数1填写场景ID,参数2填写group ID(如果不填则会通知所有group)
|
|
|
|
--检查任务ID
|
|
if 2102124 ~= evt.param1 then
|
|
return false
|
|
end
|
|
|
|
--检查任务成功状态
|
|
if 1 ~= evt.param2 then
|
|
return false
|
|
end
|
|
|
|
return true
|
|
end
|
|
|
|
-- 触发操作
|
|
function action_EVENT_QUEST_FINISH_735002(context, evt)
|
|
-- 调用提示id为 31020823 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
|
|
if 0 ~= ScriptLib.ShowReminder(context, 31020823) then
|
|
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
|
|
return -1
|
|
end
|
|
|
|
return 0
|
|
end |