129 lines
3.4 KiB
Go
129 lines
3.4 KiB
Go
-- 基础信息
|
||
local base_info = {
|
||
group_id = 250008094
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
{ config_id = 64, monster_id = 20010901, pos = { x = -40.324, y = 4.000, z = -647.047 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 391, gadget_id = 70900288, pos = { x = -40.324, y = 4.000, z = -647.047 }, rot = { x = 0.000, y = 319.800, z = 0.000 }, level = 1, chest_drop_id = 1000100, drop_count = 1 },
|
||
{ config_id = 392, gadget_id = 70211101, pos = { x = -40.124, y = 4.000, z = -644.347 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, drop_tag = "解谜低级蒙德", isOneoff = true, persistent = true }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1000286, name = "GADGET_STATE_CHANGE_286", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_286", action = "action_EVENT_GADGET_STATE_CHANGE_286" },
|
||
{ config_id = 1000287, name = "ANY_MONSTER_DIE_287", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_287", action = "action_EVENT_ANY_MONSTER_DIE_287" }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = suite_1,
|
||
monsters = { },
|
||
gadgets = { 391 },
|
||
regions = { },
|
||
triggers = { "GADGET_STATE_CHANGE_286", "ANY_MONSTER_DIE_287" },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GADGET_STATE_CHANGE_286(context, evt)
|
||
if 391 ~= evt.param2 or GadgetState.ChestOpened ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GADGET_STATE_CHANGE_286(context, evt)
|
||
-- 延迟0秒刷怪
|
||
if 0 ~= ScriptLib.CreateMonster(context, { config_id = 64, delay_time = 0 }) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_monster")
|
||
return -1
|
||
end
|
||
|
||
-- 运营数据埋点,匹配LD定义的规则使用
|
||
if 0 ~= ScriptLib.MarkPlayerAction(context, 2002, 1, 1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : mark_playerAction")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_287(context, evt)
|
||
-- 判断剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_287(context, evt)
|
||
-- 创建id为392的gadget
|
||
if 0 ~= ScriptLib.CreateGadget(context, { config_id = 392 }) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : create_gadget")
|
||
return -1
|
||
end
|
||
|
||
-- 运营数据埋点,匹配LD定义的规则使用
|
||
if 0 ~= ScriptLib.MarkPlayerAction(context, 2002, 3, 1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : mark_playerAction")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |