362 lines
14 KiB
Go
362 lines
14 KiB
Go
-- 基础信息
|
||
local base_info = {
|
||
group_id = 230702009
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
{ config_id = 9001, monster_id = 25010201, pos = { x = 6.493, y = 0.147, z = 9.290 }, rot = { x = 0.000, y = 195.600, z = 0.000 }, level = 1 },
|
||
{ config_id = 9002, monster_id = 25010201, pos = { x = -6.625, y = 0.147, z = 9.252 }, rot = { x = 0.000, y = 159.100, z = 0.000 }, level = 1 },
|
||
{ config_id = 9003, monster_id = 25060101, pos = { x = -6.878, y = 0.147, z = -9.379 }, rot = { x = 0.000, y = 18.562, z = 0.000 }, level = 1 },
|
||
{ config_id = 9004, monster_id = 25020201, pos = { x = 10.990, y = 0.147, z = 1.791 }, rot = { x = 0.000, y = 263.500, z = 0.000 }, level = 1 },
|
||
{ config_id = 9005, monster_id = 25060101, pos = { x = 5.904, y = 0.147, z = -9.967 }, rot = { x = 0.000, y = 343.731, z = 0.000 }, level = 1 },
|
||
{ config_id = 9006, monster_id = 25010401, pos = { x = -11.319, y = 0.147, z = -1.126 }, rot = { x = 0.000, y = 64.828, z = 0.000 }, level = 1 },
|
||
{ config_id = 9007, monster_id = 25010501, pos = { x = 11.759, y = 0.147, z = -0.828 }, rot = { x = 0.000, y = 270.084, z = 0.000 }, level = 1 },
|
||
{ config_id = 9008, monster_id = 25020201, pos = { x = 0.170, y = 0.147, z = 10.930 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 9009, monster_id = 25070101, pos = { x = 2.662, y = 0.147, z = -7.550 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 9010, monster_id = 25070101, pos = { x = -5.187, y = 0.147, z = -7.730 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 9011, monster_id = 25030301, pos = { x = 0.039, y = 0.343, z = -7.926 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 9012, monster_id = 25070101, pos = { x = 11.297, y = 0.147, z = -8.667 }, rot = { x = 0.000, y = 322.134, z = 0.000 }, level = 1 },
|
||
{ config_id = 9013, monster_id = 25030201, pos = { x = -0.551, y = 0.147, z = -10.030 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 9014, monster_id = 25060101, pos = { x = -11.417, y = 0.147, z = -8.846 }, rot = { x = 0.000, y = 50.168, z = 0.000 }, level = 1 },
|
||
{ config_id = 9015, monster_id = 25010201, pos = { x = -10.938, y = 0.147, z = -8.426 }, rot = { x = 0.000, y = 35.234, z = 0.000 }, level = 1 },
|
||
{ config_id = 9016, monster_id = 25010401, pos = { x = 7.758, y = 0.147, z = 10.399 }, rot = { x = 0.000, y = 217.700, z = 0.000 }, level = 1 },
|
||
{ config_id = 9017, monster_id = 25010701, pos = { x = 0.033, y = 0.147, z = -7.872 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 9018, monster_id = 25060101, pos = { x = -12.759, y = 0.147, z = -10.232 }, rot = { x = 0.000, y = 43.800, z = 0.000 }, level = 1 },
|
||
{ config_id = 9019, monster_id = 25070101, pos = { x = 7.562, y = 0.147, z = -10.146 }, rot = { x = 0.000, y = 320.900, z = 0.000 }, level = 1 },
|
||
{ config_id = 9020, monster_id = 25030201, pos = { x = -10.108, y = 0.147, z = 0.097 }, rot = { x = 0.000, y = 90.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 9021, monster_id = 25030201, pos = { x = 10.481, y = 0.147, z = -0.445 }, rot = { x = 0.000, y = 270.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 9022, monster_id = 25020201, pos = { x = -11.535, y = 0.147, z = 1.429 }, rot = { x = 0.000, y = 90.850, z = 0.000 }, level = 1 },
|
||
{ config_id = 9023, monster_id = 25010201, pos = { x = 8.746, y = 0.147, z = -8.762 }, rot = { x = 0.000, y = 321.343, z = 0.000 }, level = 1 },
|
||
{ config_id = 9024, monster_id = 25010501, pos = { x = -7.651, y = 0.147, z = 10.356 }, rot = { x = 0.000, y = 153.200, z = 0.000 }, level = 1 },
|
||
{ config_id = 9025, monster_id = 25030301, pos = { x = 0.000, y = 0.147, z = 9.733 }, rot = { x = 0.000, y = 180.000, z = 0.000 }, level = 1 }
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 9026, gadget_id = 70900205, pos = { x = 0.027, y = -1.888, z = 0.038 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1009027, name = "ANY_MONSTER_LIVE_9027", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_9027", action = "action_EVENT_ANY_MONSTER_LIVE_9027" },
|
||
{ config_id = 1009028, name = "ANY_MONSTER_DIE_9028", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_9028", action = "action_EVENT_ANY_MONSTER_DIE_9028" },
|
||
{ config_id = 1009029, name = "ANY_MONSTER_DIE_9029", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_9029", action = "action_EVENT_ANY_MONSTER_DIE_9029" },
|
||
{ config_id = 1009030, name = "ANY_MONSTER_DIE_9030", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_9030", action = "action_EVENT_ANY_MONSTER_DIE_9030" },
|
||
{ config_id = 1009031, name = "CHALLENGE_SUCCESS_9031", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "1", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_9031" },
|
||
{ config_id = 1009032, name = "CHALLENGE_FAIL_9032", event = EventType.EVENT_CHALLENGE_FAIL, source = "1", condition = "", action = "action_EVENT_CHALLENGE_FAIL_9032" },
|
||
{ config_id = 1009033, name = "ANY_MONSTER_DIE_9033", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_9033", action = "action_EVENT_ANY_MONSTER_DIE_9033" }
|
||
}
|
||
|
||
-- 变量
|
||
variables = {
|
||
{ config_id = 1, name = "monster_wave", value = 0, no_refresh = false }
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 初始化配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 初始化时创建
|
||
init_config = {
|
||
suite = 1,
|
||
end_suite = 0,
|
||
rand_suite = false
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 小组配置
|
||
--
|
||
--================================================================
|
||
|
||
suites = {
|
||
{
|
||
-- suite_id = 1,
|
||
-- description = ,
|
||
monsters = { },
|
||
gadgets = { 9026 },
|
||
regions = { },
|
||
triggers = { },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = suite_2,
|
||
monsters = { 9001, 9002, 9003, 9004, 9005, 9022 },
|
||
gadgets = { 9026 },
|
||
regions = { },
|
||
triggers = { "ANY_MONSTER_LIVE_9027", "ANY_MONSTER_DIE_9028", "CHALLENGE_SUCCESS_9031", "CHALLENGE_FAIL_9032" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 3,
|
||
-- description = suite_3,
|
||
monsters = { 9006, 9007, 9008, 9009, 9010 },
|
||
gadgets = { 9026 },
|
||
regions = { },
|
||
triggers = { "ANY_MONSTER_DIE_9029", "CHALLENGE_SUCCESS_9031", "CHALLENGE_FAIL_9032" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 4,
|
||
-- description = suite_4,
|
||
monsters = { 9012, 9013, 9014 },
|
||
gadgets = { 9026 },
|
||
regions = { },
|
||
triggers = { "ANY_MONSTER_DIE_9030", "CHALLENGE_SUCCESS_9031", "CHALLENGE_FAIL_9032" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 5,
|
||
-- description = suite_5,
|
||
monsters = { 9011, 9015, 9016, 9023, 9024 },
|
||
gadgets = { 9026 },
|
||
regions = { },
|
||
triggers = { "CHALLENGE_SUCCESS_9031", "CHALLENGE_FAIL_9032", "ANY_MONSTER_DIE_9033" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 6,
|
||
-- description = suite_6,
|
||
monsters = { 9017, 9018, 9019, 9020, 9021, 9025 },
|
||
gadgets = { 9026 },
|
||
regions = { },
|
||
triggers = { "CHALLENGE_SUCCESS_9031", "CHALLENGE_FAIL_9032" },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_LIVE_9027(context, evt)
|
||
if 9001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_LIVE_9027(context, evt)
|
||
-- 创建编号为1(该挑战的识别id),挑战内容为197的区域挑战,具体参数填写方式,见DungeonChallengeData表中的注释,所有填写的值都必须是int类型
|
||
if 0 ~= ScriptLib.ActiveChallenge(context, 1, 197, 600, 230702009, 25, 0) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge")
|
||
return -1
|
||
end
|
||
|
||
-- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1
|
||
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_9028(context, evt)
|
||
-- 判断指定group组剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCountByGroupId(context, 230702009) ~= 0 then
|
||
return false
|
||
end
|
||
|
||
-- 判断变量"monster_wave"为1
|
||
if ScriptLib.GetGroupVariableValue(context, "monster_wave") ~= 1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_9028(context, evt)
|
||
-- 添加suite3的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 230702009, 3)
|
||
|
||
-- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1
|
||
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_9029(context, evt)
|
||
-- 判断指定group组剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCountByGroupId(context, 230702009) ~= 0 then
|
||
return false
|
||
end
|
||
|
||
-- 判断变量"monster_wave"为2
|
||
if ScriptLib.GetGroupVariableValue(context, "monster_wave") ~= 2 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_9029(context, evt)
|
||
-- 添加suite4的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 230702009, 4)
|
||
|
||
-- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1
|
||
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_9030(context, evt)
|
||
-- 判断指定group组剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCountByGroupId(context, 230702009) ~= 0 then
|
||
return false
|
||
end
|
||
|
||
-- 判断变量"monster_wave"为3
|
||
if ScriptLib.GetGroupVariableValue(context, "monster_wave") ~= 3 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_9030(context, evt)
|
||
-- 添加suite5的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 230702009, 5)
|
||
|
||
-- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1
|
||
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_CHALLENGE_SUCCESS_9031(context, evt)
|
||
-- 将剩余时间记录在触发此challenge的group变量TPL_TIME中
|
||
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "TPL_TIME", evt.param2, 230702004) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : save_challenge_remainTime")
|
||
return -1
|
||
end
|
||
|
||
-- 将本组内变量名为 "stage" 的变量设置为 1
|
||
if 0 ~= ScriptLib.SetGroupVariableValueByGroup(context, "stage", 1, 230702004) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable_by_group")
|
||
return -1
|
||
end
|
||
|
||
-- 爬塔更换队伍2
|
||
if 0 ~= ScriptLib.TowerMirrorTeamSetUp(context, 2) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : tower_team_setup")
|
||
return -1
|
||
end
|
||
|
||
-- 改变指定group组230702005中, configid为5001的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 230702005, 5001, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
-- 设置操作台选项
|
||
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 230702005, 5001, {176}) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
|
||
return -1
|
||
end
|
||
|
||
-- 改变指定group组230702004中, configid为4001的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 230702004, 4001, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
-- 改变指定group组230702008中, configid为8001的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 230702008, 8001, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
-- 改变指定group组230702008中, configid为8002的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 230702008, 8002, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_CHALLENGE_FAIL_9032(context, evt)
|
||
-- 重新生成指定group,指定suite
|
||
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 230702009, suite = 1 }) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
|
||
return -1
|
||
end
|
||
|
||
-- 地城失败结算
|
||
if 0 ~= ScriptLib.CauseDungeonFail(context) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : cause_dungeonfail")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_9033(context, evt)
|
||
-- 判断指定group组剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCountByGroupId(context, 230702009) ~= 0 then
|
||
return false
|
||
end
|
||
|
||
-- 判断变量"monster_wave"为4
|
||
if ScriptLib.GetGroupVariableValue(context, "monster_wave") ~= 4 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_9033(context, evt)
|
||
-- 添加suite6的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 230702009, 6)
|
||
|
||
-- 针对当前group内变量名为 "monster_wave" 的变量,进行修改,变化值为 1
|
||
if 0 ~= ScriptLib.ChangeGroupVariableValue(context, "monster_wave", 1) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : change_GroupVariable")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |