226 lines
6.7 KiB
Go
226 lines
6.7 KiB
Go
-- 基础信息
|
||
local base_info = {
|
||
group_id = 166001096
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
{ config_id = 96001, monster_id = 26090101, pos = { x = 773.870, y = 705.044, z = 445.473 }, rot = { x = 0.000, y = 150.102, z = 0.000 }, level = 36, drop_id = 1000100, pose_id = 101, area_id = 300 },
|
||
{ config_id = 96002, monster_id = 26090101, pos = { x = 775.208, y = 705.211, z = 451.822 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, drop_id = 1000100, pose_id = 101, area_id = 300 },
|
||
{ config_id = 96003, monster_id = 26090101, pos = { x = 772.485, y = 705.008, z = 453.008 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 36, drop_id = 1000100, pose_id = 101, area_id = 300 }
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 96006, gadget_id = 70360001, pos = { x = 767.988, y = 703.986, z = 450.762 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, area_id = 300 },
|
||
{ config_id = 96009, gadget_id = 70360001, pos = { x = 759.092, y = 735.770, z = 448.533 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, area_id = 300 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1096004, name = "ANY_MONSTER_DIE_96004", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_96004", action = "action_EVENT_ANY_MONSTER_DIE_96004", trigger_count = 0 },
|
||
{ config_id = 1096005, name = "VARIABLE_CHANGE_96005", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_96005", action = "action_EVENT_VARIABLE_CHANGE_96005" },
|
||
{ config_id = 1096007, name = "GADGET_CREATE_96007", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_96007", action = "action_EVENT_GADGET_CREATE_96007" },
|
||
{ config_id = 1096008, name = "MONSTER_BATTLE_96008", event = EventType.EVENT_MONSTER_BATTLE, source = "", condition = "condition_EVENT_MONSTER_BATTLE_96008", action = "action_EVENT_MONSTER_BATTLE_96008" },
|
||
{ config_id = 1096010, name = "GADGET_CREATE_96010", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_96010", action = "action_EVENT_GADGET_CREATE_96010" },
|
||
{ config_id = 1096011, name = "ANY_MONSTER_DIE_96011", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_96011", action = "action_EVENT_ANY_MONSTER_DIE_96011" }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
{ config_id = 1, name = "num", value = 0, no_refresh = true }
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 96009 },
|
||
regions = { },
|
||
triggers = { "ANY_MONSTER_DIE_96004", "VARIABLE_CHANGE_96005", "MONSTER_BATTLE_96008", "GADGET_CREATE_96010", "ANY_MONSTER_DIE_96011" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 96006 },
|
||
regions = { },
|
||
triggers = { "GADGET_CREATE_96007" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 3,
|
||
-- description = ,
|
||
monsters = { 96001, 96002, 96003 },
|
||
gadgets = { },
|
||
regions = { },
|
||
triggers = { },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_96004(context, evt)
|
||
-- 判断剩余怪物数量是否是1
|
||
if ScriptLib.GetGroupMonsterCount(context) ~= 1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_96004(context, evt)
|
||
-- 针对当前group内变量名为 "num" 的变量,进行修改,变化值为 1
|
||
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "num", 1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
|
||
return -1
|
||
end
|
||
|
||
-- 添加suite3的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 166001096, 3)
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_VARIABLE_CHANGE_96005(context, evt)
|
||
if evt.param1 == evt.param2 then return false end
|
||
|
||
-- 判断变量"num"为4
|
||
if ScriptLib.GetGroupVariableValue(context, "num") ~= 4 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_VARIABLE_CHANGE_96005(context, evt)
|
||
-- 重新生成指定group,指定suite
|
||
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 166001096, suite = 2 }) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GADGET_CREATE_96007(context, evt)
|
||
if 96006 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GADGET_CREATE_96007(context, evt)
|
||
-- 通知任务系统完成条件类型"LUA通知",复杂参数为quest_param的进度+1
|
||
if 0 ~= ScriptLib.AddQuestProgress(context, "166001096") then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : add_quest_progress")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_MONSTER_BATTLE_96008(context, evt)
|
||
if 96001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_MONSTER_BATTLE_96008(context, evt)
|
||
-- 调用提示id为 60010238 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
|
||
if 0 ~= ScriptLib.ShowReminder(context, 60010238) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GADGET_CREATE_96010(context, evt)
|
||
if 96009 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GADGET_CREATE_96010(context, evt)
|
||
-- 添加suite3的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 166001096, 3)
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_96011(context, evt)
|
||
-- 判断剩余怪物数量是否是1
|
||
if ScriptLib.GetGroupMonsterCount(context) ~= 1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_96011(context, evt)
|
||
-- 调用提示id为 60010241 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
|
||
if 0 ~= ScriptLib.ShowReminder(context, 60010241) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |