124 lines
3.3 KiB
Go
124 lines
3.3 KiB
Go
-- 基础信息
|
||
local base_info = {
|
||
group_id = 166001521
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 521001, gadget_id = 70290204, pos = { x = 263.784, y = 74.667, z = 1271.718 }, rot = { x = 352.377, y = 311.481, z = 331.127 }, level = 36, area_id = 300 },
|
||
{ config_id = 521002, gadget_id = 70290233, pos = { x = 265.485, y = 73.673, z = 1273.758 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, area_id = 300 },
|
||
{ config_id = 521003, gadget_id = 70360342, pos = { x = 266.463, y = 72.976, z = 1277.773 }, rot = { x = 0.001, y = 321.089, z = 346.909 }, level = 36, area_id = 300 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1521004, name = "ANY_GADGET_DIE_521004", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_521004", action = "action_EVENT_ANY_GADGET_DIE_521004" },
|
||
{ config_id = 1521005, name = "ANY_GADGET_DIE_521005", event = EventType.EVENT_ANY_GADGET_DIE, source = "", condition = "condition_EVENT_ANY_GADGET_DIE_521005", action = "action_EVENT_ANY_GADGET_DIE_521005" }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 521001, 521002, 521003 },
|
||
regions = { },
|
||
triggers = { "ANY_GADGET_DIE_521004", "ANY_GADGET_DIE_521005" },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_GADGET_DIE_521004(context, evt)
|
||
if 521001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_GADGET_DIE_521004(context, evt)
|
||
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
|
||
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 521002 }) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
|
||
return -1
|
||
end
|
||
|
||
|
||
-- 永久关闭CongfigId的Gadget,需要和Groups的RefreshWithBlock标签搭配
|
||
if 0 ~= ScriptLib.KillEntityByConfigId(context, { config_id = 521003 }) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : kill_entity_by_configId")
|
||
return -1
|
||
end
|
||
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_GADGET_DIE_521005(context, evt)
|
||
if 521003 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_GADGET_DIE_521005(context, evt)
|
||
-- 针对当前group内变量名为 "start" 的变量,进行修改,变化值为 1
|
||
if 0 ~= ScriptLib.ChangeGroupVariableValueByGroup(context, "start", 1, 166001066) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable_by_group")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |