256 lines
9.2 KiB
Go
256 lines
9.2 KiB
Go
-- 基础信息
|
||
local base_info = {
|
||
group_id = 240608006
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 配置
|
||
--
|
||
--================================================================
|
||
|
||
-- 怪物
|
||
monsters = {
|
||
{ config_id = 6001, monster_id = 20011301, pos = { x = 5.199, y = 0.431, z = -12.786 }, rot = { x = 0.000, y = 317.326, z = 0.000 }, level = 1, affix = { 1006 } },
|
||
{ config_id = 6002, monster_id = 20011301, pos = { x = 3.416, y = 0.431, z = -11.983 }, rot = { x = 0.000, y = 320.454, z = 0.000 }, level = 1, affix = { 1006 } },
|
||
{ config_id = 6004, monster_id = 20011301, pos = { x = -3.135, y = 0.431, z = -12.343 }, rot = { x = 0.000, y = 17.942, z = 0.000 }, level = 1, affix = { 1006 } },
|
||
{ config_id = 6006, monster_id = 21020201, pos = { x = -9.166, y = 0.339, z = -12.897 }, rot = { x = 0.000, y = 43.528, z = 0.000 }, level = 1, affix = { 1006 } },
|
||
{ config_id = 6009, monster_id = 21020201, pos = { x = 10.556, y = 0.431, z = -12.383 }, rot = { x = 0.000, y = 336.003, z = 0.000 }, level = 1, affix = { 1006 } },
|
||
{ config_id = 6012, monster_id = 22010102, pos = { x = -10.632, y = 0.423, z = -7.249 }, rot = { x = 0.000, y = 53.023, z = 0.000 }, level = 1, affix = { 1006 }, isElite = true },
|
||
{ config_id = 6013, monster_id = 22010102, pos = { x = 10.822, y = 0.431, z = -8.192 }, rot = { x = 0.000, y = 307.886, z = 0.000 }, level = 1, affix = { 1006 }, isElite = true },
|
||
{ config_id = 6029, monster_id = 20011301, pos = { x = -5.648, y = 0.431, z = -14.373 }, rot = { x = 0.000, y = 31.735, z = 0.000 }, level = 1, affix = { 1006 } }
|
||
}
|
||
|
||
-- NPC
|
||
npcs = {
|
||
}
|
||
|
||
-- 装置
|
||
gadgets = {
|
||
{ config_id = 6005, gadget_id = 70350033, pos = { x = 0.000, y = 0.000, z = 0.000 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
|
||
{ config_id = 6022, gadget_id = 70900205, pos = { x = 6.198, y = -1.028, z = 3.675 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
|
||
}
|
||
|
||
-- 区域
|
||
regions = {
|
||
}
|
||
|
||
-- 触发器
|
||
triggers = {
|
||
{ config_id = 1006014, name = "ANY_MONSTER_DIE_6014", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_6014", action = "action_EVENT_ANY_MONSTER_DIE_6014" },
|
||
{ config_id = 1006023, name = "ANY_MONSTER_LIVE_6023", event = EventType.EVENT_ANY_MONSTER_LIVE, source = "", condition = "condition_EVENT_ANY_MONSTER_LIVE_6023", action = "action_EVENT_ANY_MONSTER_LIVE_6023" },
|
||
{ config_id = 1006024, name = "ANY_MONSTER_DIE_6024", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_6024", action = "action_EVENT_ANY_MONSTER_DIE_6024" },
|
||
{ config_id = 1006027, name = "CHALLENGE_SUCCESS_6027", event = EventType.EVENT_CHALLENGE_SUCCESS, source = "1", condition = "", action = "action_EVENT_CHALLENGE_SUCCESS_6027" },
|
||
{ config_id = 1006028, name = "CHALLENGE_FAIL_6028", event = EventType.EVENT_CHALLENGE_FAIL, source = "1", condition = "", action = "action_EVENT_CHALLENGE_FAIL_6028" }
|
||
}
|
||
|
||
-- 变量
|
||
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 = { 6005, 6022 },
|
||
regions = { },
|
||
triggers = { "CHALLENGE_FAIL_6028" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 2,
|
||
-- description = suite_2,
|
||
monsters = { 6001, 6002, 6004, 6029 },
|
||
gadgets = { 6005, 6022 },
|
||
regions = { },
|
||
triggers = { "ANY_MONSTER_LIVE_6023", "ANY_MONSTER_DIE_6024", "CHALLENGE_SUCCESS_6027", "CHALLENGE_FAIL_6028" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 3,
|
||
-- description = suite_3,
|
||
monsters = { 6006, 6009 },
|
||
gadgets = { 6005, 6022 },
|
||
regions = { },
|
||
triggers = { "ANY_MONSTER_DIE_6014", "CHALLENGE_SUCCESS_6027", "CHALLENGE_FAIL_6028" },
|
||
rand_weight = 100
|
||
},
|
||
{
|
||
-- suite_id = 4,
|
||
-- description = suite_4,
|
||
monsters = { 6012, 6013 },
|
||
gadgets = { 6005, 6022 },
|
||
regions = { },
|
||
triggers = { "CHALLENGE_SUCCESS_6027", "CHALLENGE_FAIL_6028" },
|
||
rand_weight = 100
|
||
}
|
||
}
|
||
|
||
--================================================================
|
||
--
|
||
-- 触发器
|
||
--
|
||
--================================================================
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_6014(context, evt)
|
||
-- 判断指定group组剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCountByGroupId(context, 240608006) ~= 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_6014(context, evt)
|
||
-- 添加suite4的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 240608006, 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_LIVE_6023(context, evt)
|
||
if 6001 ~= evt.param1 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_LIVE_6023(context, evt)
|
||
-- 创建编号为1(该挑战的识别id),挑战内容为191的区域挑战,具体参数填写方式,见DungeonChallengeData表中的注释,所有填写的值都必须是int类型
|
||
if 0 ~= ScriptLib.ActiveChallenge(context, 1, 191, 360, 240608006, 8, 0) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : active_challenge")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发条件
|
||
function condition_EVENT_ANY_MONSTER_DIE_6024(context, evt)
|
||
-- 判断指定group组剩余怪物数量是否是0
|
||
if ScriptLib.GetGroupMonsterCountByGroupId(context, 240608006) ~= 0 then
|
||
return false
|
||
end
|
||
|
||
-- 判断变量"monster_wave"为0
|
||
if ScriptLib.GetGroupVariableValue(context, "monster_wave") ~= 0 then
|
||
return false
|
||
end
|
||
|
||
return true
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_ANY_MONSTER_DIE_6024(context, evt)
|
||
-- 添加suite3的新内容
|
||
ScriptLib.AddExtraGroupSuite(context, 240608006, 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 action_EVENT_CHALLENGE_SUCCESS_6027(context, evt)
|
||
-- 改变指定group组240608004中, configid为4002的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 240608004, 4002, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
-- 改变指定group组240608006中, configid为6005的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 240608006, 6005, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
-- 改变指定group组240608004中, configid为4001的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 240608004, 4001, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end
|
||
|
||
-- 触发操作
|
||
function action_EVENT_CHALLENGE_FAIL_6028(context, evt)
|
||
-- 改变指定group组240608005中, configid为5001的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 240608005, 5001, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
-- 设置操作台选项
|
||
if 0 ~= ScriptLib.SetWorktopOptionsByGroupId(context, 240608005, 5001, {7}) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_wok_options_by_configid")
|
||
return -1
|
||
end
|
||
|
||
-- 改变指定group组240608004中, configid为4001的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 240608004, 4001, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
-- 改变指定group组240608004中, configid为4002的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 240608004, 4002, GadgetState.GearStart) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
-- 重新生成指定group,指定suite
|
||
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 240608006, suite = 1 }) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
|
||
return -1
|
||
end
|
||
|
||
-- 改变指定group组240608006中, configid为6005的gadget的state
|
||
if 0 ~= ScriptLib.SetGroupGadgetStateByConfigId(context, 240608006, 6005, GadgetState.Default) then
|
||
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_gadget_state_by_GroupId_ConfigId")
|
||
return -1
|
||
end
|
||
|
||
return 0
|
||
end |