277 lines
9.2 KiB
Go
277 lines
9.2 KiB
Go
-- 基础信息
|
||
local base_info = {
|
||
group_id = 247202011
|
||
}
|
||
|
||
-- DEFS_MISCS
|
||
local defs = {
|
||
group_1 = 247202011,
|
||
challenge1 = 201,
|
||
challenge_father = 999,
|
||
group_core = 247202001,
|
||
galleryid = 31001,
|
||
gadget_1 = 11001,
|
||
MonsterCount = 6,
|
||
challenge_kill = 233,
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
{ config_id = 11006, monster_id = 26090801, pos = { x = 181.077, y = 144.022, z = 372.096 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 101 },
|
||
{ config_id = 11007, monster_id = 26090701, pos = { x = 175.606, y = 144.022, z = 366.859 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 101 },
|
||
{ config_id = 11008, monster_id = 26090701, pos = { x = 185.970, y = 144.022, z = 366.877 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 101 },
|
||
{ config_id = 11009, monster_id = 26090101, pos = { x = 181.147, y = 144.022, z = 361.515 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 101 },
|
||
{ config_id = 11010, monster_id = 26090101, pos = { x = 177.039, y = 144.022, z = 362.547 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 101 },
|
||
{ config_id = 11011, monster_id = 26090601, pos = { x = 177.158, y = 144.022, z = 370.804 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1, disableWander = true, pose_id = 101 }
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 11001, gadget_id = 70360397, pos = { x = 181.024, y = 144.022, z = 366.946 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 11015, gadget_id = 70310041, pos = { x = 181.024, y = 143.195, z = 385.835 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 11016, gadget_id = 70310041, pos = { x = 181.024, y = 143.208, z = 347.486 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1011002, name = "GADGET_CREATE_11002", event = EventType.EVENT_GADGET_CREATE, source = "", condition = "condition_EVENT_GADGET_CREATE_11002", action = "action_EVENT_GADGET_CREATE_11002" },
|
||
-- 开启挑战
|
||
{ config_id = 1011003, name = "SELECT_OPTION_11003", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_11003", action = "action_EVENT_SELECT_OPTION_11003", trigger_count = 0 },
|
||
{ config_id = 1011004, name = "VARIABLE_CHANGE_11004", event = EventType.EVENT_VARIABLE_CHANGE, source = "", condition = "condition_EVENT_VARIABLE_CHANGE_11004", action = "action_EVENT_VARIABLE_CHANGE_11004", trigger_count = 0 },
|
||
{ config_id = 1011005, name = "ANY_MONSTER_DIE_11005", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "", action = "action_EVENT_ANY_MONSTER_DIE_11005", trigger_count = 0 },
|
||
-- 激活BUFF
|
||
{ config_id = 1011014, name = "SELECT_OPTION_11014", event = EventType.EVENT_SELECT_OPTION, source = "", condition = "condition_EVENT_SELECT_OPTION_11014", action = "action_EVENT_SELECT_OPTION_11014" }
|
||
}
|
||
|
||
-- 变量
|
||
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 = { 11001 },
|
||
regions = { },
|
||
triggers = { "GADGET_CREATE_11002", "SELECT_OPTION_11003", "VARIABLE_CHANGE_11004", "ANY_MONSTER_DIE_11005", "SELECT_OPTION_11014" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 11015, 11016 },
|
||
regions = { },
|
||
triggers = { },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_GADGET_CREATE_11002(context, evt)
|
||
if 11001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_GADGET_CREATE_11002(context, evt)
|
||
-- 设置操作台选项
|
||
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 247202011, 11001, {7}) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_SELECT_OPTION_11003(context, evt)
|
||
-- 判断是gadgetid 11001 option_id 7
|
||
if 11001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
if 7 ~= evt.param2 then
|
||
return false
|
||
end
|
||
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_SELECT_OPTION_11003(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})
|
||
|
||
ScriptLib.PrintContextLog(context, "子挑战挂接完成!!!!!!!!")
|
||
|
||
--开启怪物潮
|
||
|
||
-- 创建编号为1(该怪物潮的识别id)的怪物潮,创建怪物总数为6,场上怪物最少4只,最多4只
|
||
ScriptLib.AutoMonsterTide(context, 1, defs.group_1, {11006,11007,11008,11009,11010,11011}, 6, 4, 4)
|
||
ScriptLib.PrintContextLog(context, "怪物潮开启!!!!!!!!")
|
||
|
||
-- 调用提示id为 43001009 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
|
||
if 0 ~= ScriptLib.ShowReminder(context, 43001009) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
|
||
return -1
|
||
end
|
||
|
||
-- 加载空气墙
|
||
ScriptLib.AddExtraGroupSuite(context, defs.group_1, 2)
|
||
|
||
-- 删除指定group: 247202009 ;指定config:9001;物件身上指定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
|
||
|
||
ScriptLib.PrintContextLog(context, "操作台切换到GearStart!!!!!!!!")
|
||
|
||
-- 切换机关状态
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, defs.gadget_1, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
ScriptLib.PrintContextLog(context, "操作台切换到GearStart!!!!!!!!")
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_VARIABLE_CHANGE_11004(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_11004(context, evt)
|
||
-- 将本组内变量名为 "success" 的变量设置为 99
|
||
if 0 ~= ScriptLib.SetGroupVariableValue(context, "success", 99) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
|
||
return -1
|
||
end
|
||
|
||
-- 设置操作台选项
|
||
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, defs.group_1, defs.gadget_1, {65}) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_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_11005(context, evt)
|
||
--发送怪物死亡通知
|
||
ScriptLib.ExecuteGroupLua(context, defs.group_core, "AddMistTrialChildChallengeScore", {1})
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_SELECT_OPTION_11014(context, evt)
|
||
-- 判断是gadgetid 11001 option_id 65
|
||
if 11001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
if 65 ~= evt.param2 then
|
||
return false
|
||
end
|
||
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_SELECT_OPTION_11014(context, evt)
|
||
--通知地脉异常升级
|
||
ScriptLib.ExecuteGroupLua(context, defs.group_core, "ModifyMistTrialAbility",{ 1 })
|
||
|
||
ScriptLib.ExecuteGroupLua(context, defs.group_core, "ModifyMistTrialAbility",{ 0 })
|
||
ScriptLib.PrintContextLog(context, "地脉异常升级,复活回血!!!!!")
|
||
|
||
-- 删除buff机关option;
|
||
if 0 ~= ScriptLib.DelWorktopOptionByGroupId(context, defs.group_1, defs.gadget_1, 65) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : del_work_options_by_group_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 切换机关状态
|
||
if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, defs.gadget_1, GadgetState.GearAction1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_configId")
|
||
return -1
|
||
end
|
||
|
||
-- 卸载空气墙
|
||
ScriptLib.RemoveExtraGroupSuite(context, defs.group_1, 2)
|
||
|
||
-- 调用提示id为 47201005 的提示UI,会显示在屏幕中央偏下位置,id索引自 ReminderData表格
|
||
if 0 ~= ScriptLib.ShowReminder(context, 47201005) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_reminder_ui")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |