mirror of
https://gitlab.com/YuukiPS/GC-Resources.git
synced 2025-04-28 09:05:26 +00:00
115 lines
2.7 KiB
Lua
115 lines
2.7 KiB
Lua
-- 基础信息
|
||
local base_info = {
|
||
group_id = 220035005
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 5001, gadget_id = 70900205, pos = { x = 346.957, y = -15.210, z = 260.571 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 5002, gadget_id = 70900205, pos = { x = 346.957, y = -15.210, z = 260.571 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1005003, name = "GADGET_CREATE_5003", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_5003", action = "action_EVENT_GADGET_CREATE_5003" },
|
||
{ config_id = 1005004, name = "TIMER_EVENT_5004", event = EventType.EVENT_TIMER_EVENT, source = "fail_delay", condition = "", action = "action_EVENT_TIMER_EVENT_5004" }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 5002 },
|
||
regions = { },
|
||
triggers = { },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 5001 },
|
||
regions = { },
|
||
triggers = { "GADGET_CREATE_5003", "TIMER_EVENT_5004" },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GADGET_CREATE_5003(context, evt)
|
||
if 5001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GADGET_CREATE_5003(context, evt)
|
||
-- 延迟5秒后,向groupId为:220035005的对象,请求一次调用,并将string参数:"fail_delay" 传递过去
|
||
if 0 ~= ScriptLib.CreateGroupTimerEvent(context, 220035005, "fail_delay", 5) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_timerevent_by_group")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_TIMER_EVENT_5004(context, evt)
|
||
-- 地城失败结算
|
||
if 0 ~= ScriptLib.CauseDungeonFail(context) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cause_dungeonfail")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |