mirror of
https://gitlab.com/YuukiPS/GC-Resources.git
synced 2025-04-28 09:05:26 +00:00
255 lines
7.7 KiB
Lua
255 lines
7.7 KiB
Lua
-- 基础信息
|
||
local base_info = {
|
||
group_id = 247206004
|
||
}
|
||
|
||
-- Trigger变量
|
||
local defs = {
|
||
gadget_1 = 4001,
|
||
group_1 = 247206004,
|
||
challenge1 = 3,
|
||
challenge_father = 999,
|
||
group_core = 247206001,
|
||
gadget_rune = 1020,
|
||
MonsterCount = 4,
|
||
challenge_kill = 233
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
{ config_id = 4006, monster_id = 25410101, pos = { x = 243.244, y = 161.991, z = 448.030 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true },
|
||
{ config_id = 4007, monster_id = 23020101, pos = { x = 243.309, y = 162.406, z = 446.640 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true },
|
||
{ config_id = 4008, monster_id = 25210502, pos = { x = 245.947, y = 162.105, z = 448.029 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true },
|
||
{ config_id = 4009, monster_id = 25210402, pos = { x = 240.751, y = 162.189, z = 448.030 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true }
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 4001, gadget_id = 70360001, pos = { x = 243.289, y = 163.324, z = 441.907 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 4013, gadget_id = 70310043, pos = { x = 243.262, y = 162.282, z = 441.888 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1004002, name = "GADGET_CREATE_4002", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_4002", action = "action_EVENT_GADGET_CREATE_4002", trigger_count = 0 },
|
||
-- 开启挑战
|
||
{ config_id = 1004003, name = "SELECT_OPTION_4003", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_4003", action = "action_EVENT_SELECT_OPTION_4003", trigger_count = 0 },
|
||
{ config_id = 1004004, name = "ANY_MONSTER_DIE_4004", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "", action = "action_EVENT_ANY_MONSTER_DIE_4004", trigger_count = 0 },
|
||
-- 挑战成功
|
||
{ config_id = 1004005, name = "VARIABLE_CHANGE_4005", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_4005", action = "action_EVENT_VARIABLE_CHANGE_4005" },
|
||
{ config_id = 1004012, name = "ANY_MONSTER_DIE_4012", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_4012", action = "action_EVENT_ANY_MONSTER_DIE_4012" }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
{ config_id = 1, name = "success", value = 0, no_refresh = false }
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 4001 },
|
||
regions = { },
|
||
triggers = { "GADGET_CREATE_4002", "SELECT_OPTION_4003", "ANY_MONSTER_DIE_4004", "VARIABLE_CHANGE_4005" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = ,
|
||
monsters = { 4007 },
|
||
gadgets = { 4013 },
|
||
regions = { },
|
||
triggers = { "ANY_MONSTER_DIE_4012" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 3,
|
||
-- description = ,
|
||
monsters = { 4006, 4008, 4009 },
|
||
gadgets = { },
|
||
regions = { },
|
||
triggers = { },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GADGET_CREATE_4002(context, evt)
|
||
if 4001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GADGET_CREATE_4002(context, evt)
|
||
-- 设置操作台选项
|
||
if 0 ~= ScriptLib.SetWorktopOptions(context, {7}) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_work_options")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_SELECT_OPTION_4003(context, evt)
|
||
-- 判断是gadgetid 4001 option_id 7
|
||
if 4001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
if 7 ~= evt.param2 then
|
||
return false
|
||
end
|
||
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_SELECT_OPTION_4003(context, evt)
|
||
--向编号999的父挑战挂接子挑战
|
||
|
||
ScriptLib.ExecuteGroupLua(context,defs.group_core,"SetKillMonsterTarget" ,{defs.group_1, defs.MonsterCount})
|
||
ScriptLib.ExecuteGroupLua(context,defs.group_core,"StartSubChallengeKillMonster" ,{defs.challenge1, defs.challenge_kill})
|
||
|
||
-- 添加suite2的新内容,刷怪
|
||
ScriptLib.AddExtraGroupSuite(context, defs.group_1, 2)
|
||
|
||
-- 切换符文状态
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
|
||
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
|
||
return -1
|
||
end
|
||
|
||
-- 删除指定group: 247206004 ;指定config:4001;物件身上指定option:7;
|
||
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, defs.group_1, defs.gadget_1, 7) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 切换隐形操作台状态
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, defs.gadget_1, GadgetState.GearStop) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_4004(context, evt)
|
||
--发送怪物死亡通知
|
||
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddMistTrialChildChallengeScore", {1})
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_VARIABLE_CHANGE_4005(context, evt)
|
||
if evt.param1 == evt.param2 then return false end
|
||
|
||
-- 判断变量"success"为1
|
||
if ScriptLib.GetGroupVariableValue(context, "success") ~= 1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_VARIABLE_CHANGE_4005(context, evt)
|
||
-- 将本组内变量名为 "success" 的变量设置为 99
|
||
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 99) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
|
||
return -1
|
||
end
|
||
|
||
-- 卸载空气墙
|
||
|
||
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
|
||
|
||
ScriptLib.ChangeGroupVariableValueByGroup(context, "runes", 1, defs.group_core)
|
||
|
||
ScriptLib.PrintContextLog(context, "符文计数+1")
|
||
|
||
-- 改变指定group组247206001中, configid为1020的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, defs.group_core, defs.gadget_rune, GadgetState.GearStop) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
ScriptLib.PrintContextLog(context, "1号机关启动")
|
||
|
||
--调用符文计数接口
|
||
ScriptLib.ExecuteGroupLua(context,defs.group_core,"AddMistTrialKeyProgress",{1,defs.challenge1})
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_4012(context, evt)
|
||
-- 判断剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_4012(context, evt)
|
||
-- 添加suite3的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 247206004, 3)
|
||
|
||
return 0
|
||
end |