100 lines
2.4 KiB
Lua
100 lines
2.4 KiB
Lua
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 1, gadget_id = 70620004, pos = { x = 2698.4, y = 195.7, z = 158.2 }, rot = { x = 0.0, y = 118.1, z = 0.0 }, level = 1 },
|
||
{ config_id = 191, gadget_id = 70620007, pos = { x = 2364.3, y = 221.1, z = -65.6 }, rot = { x = 0.0, y = 61.1, z = 0.0 }, level = 1 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
{ config_id = 27, shape = RegionShape.SPHERE, radius = 5, pos = { x = 2341.3, y = 220.0, z = -74.0 } }
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ name = "QUEST_FINISH_27", event = EventType.EVENT_QUEST_FINISH, source = "", condition = "condition_EVENT_QUEST_FINISH_27", action = "action_EVENT_QUEST_FINISH_27", tlog_tag = "风龙_1_风墙门_关闭" }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
rand_suite = true,
|
||
npcs = { }
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 0,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 1, 191 },
|
||
regions = { 27 },
|
||
triggers = { "QUEST_FINISH_27" },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_QUEST_FINISH_27(context, evt)
|
||
--检查ID为38803的任务的完成状态是否为1(1=完成,0=失败)
|
||
--此事件需要配合Quest表使用,在Quest表里的完成执行中配置“通知group脚本”,则该任务完成后服务端会向对应的group发送通知,参数1填写场景ID,参数2填写group ID(如果不填则会通知所有group)
|
||
|
||
--检查任务ID
|
||
if 38803 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
--检查任务成功状态
|
||
if 1 ~= evt.param2 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_QUEST_FINISH_27(context, evt)
|
||
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
|
||
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 191 }) then
|
||
return -1
|
||
end
|
||
|
||
|
||
return 0
|
||
end
|