--/////////////////////////////////////////--
-- Xantheon --
-- High Paladin of the Sin'Dorei --
-- Scripted by Inevitable --
-- InsomniaWoW --
--/////////////////////////////////////////--
local Xan_ID = 55000
local Cyt_ID = 55001
local Xan
local Cyt
local UNIT_FLAG_DEFAULT
local UNIT_FLAG_DEFAULT_CYT
-- Defines --
function Xantheon_OnSpawn(unit, event)
UNIT_FLAG_DEFAULT = unit:GetUInt64Value(UNIT_FIELD_FLAGS)
Xan = unit
Xan:EquipWeapons(28800, 0, 0)
end
RegisterUnitEvent(Xan_ID, 18, "Xantheon_OnSpawn")
function Cytara_OnSpawn(unit, event)
Cyt = unit
UNIT_FLAG_DEFAULT_CYT = Cyt:GetUInt64Value(UNIT_FIELD_FLAGS)
Cyt:SetModel(15294)
Cyt:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
end
RegisterUnitEvent(Cyt_ID, 18, "Cytara_OnSpawn")
-- Trigger --
local trig
local trig_ID = 55005
function Declare_Trigger(unit, event)
trig = unit
trig:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
trig:Root()
end
RegisterUnitEvent(trig_ID, 18, "Declare_Trigger")
-- King Magni Bronzebeard --
local mag
local mag_ID = 55008
local UNIT_FLAG_DEFAULT_MAGNI
function Declare_Magni(unit, event)
mag = unit
UNIT_FLAG_DEFAULT_MAGNI = mag:GetUInt64Value(UNIT_FIELD_FLAGS)
mag:SetModel(15294)
mag:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
end
RegisterUnitEvent(mag_ID, 18, "Declare_Magni")
-- Lady Sylvanas Windrunner --
local syl
local syl_ID = 55003
local UNIT_FLAG_DEFAULT_SYLVANAS
function Declare_Sylvanas(unit, event)
syl = unit
UNIT_FLAG_DEFAULT_SYLVANAS = syl:GetUInt64Value(UNIT_FIELD_FLAGS)
syl:SetModel(15294)
syl:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
end
RegisterUnitEvent(syl_ID, 18, "Declare_Sylvanas")
-- Jaina Proudmoore --
local jaina
local jaina_ID = 55004
local UNIT_FLAG_DEFAULT_JAINA
function Declare_Jaina(unit, event)
jaina = unit
UNIT_FLAG_DEFAULT_JAINA = jaina:GetUInt64Value(UNIT_FIELD_FLAGS)
jaina:SetModel(15294)
jaina:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
end
RegisterUnitEvent(jaina_ID, 18, "Declare_Jaina")
-- Lady Tyrande Whisperwind --
local tyr
local tyr_ID = 55006
local UNIT_FLAG_DEFAULT_TYRANDE
function Declare_Tyrande(unit, event)
tyr = unit
UNIT_FLAG_DEFAULT_TYRANDE = tyr:GetUInt64Value(UNIT_FIELD_FLAGS)
tyr:SetModel(15294)
tyr:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
end
RegisterUnitEvent(tyr_ID, 18, "Declare_Tyrande")
-- Prophet Velen --
local vel
local vel_ID = 55007
local UNIT_FLAG_DEFAULT_VELEN
function Declare_Velen(unit, event)
vel = unit
UNIT_FLAG_DEFAULT_VELEN = vel:GetUInt64Value(UNIT_FIELD_FLAGS)
vel:SetModel(15294)
vel:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
end
RegisterUnitEvent(vel_ID, 18, "Declare_Velen")
-- Andar'iel--
local anda
local anda_ID = 55009
local UNIT_FLAG_DEFAULT_ANDARIEL
function Declare_Andariel(unit, event)
anda = unit
UNIT_FLAG_DEFAULT_ANDARIEL = anda:GetUInt64Value(UNIT_FIELD_FLAGS)
anda:SetModel(15294)
anda:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
end
RegisterUnitEvent(anda_ID, 18, "Declare_Andariel")
-- Gossip --
function Xantheon_OnGossip(unit, event, player)
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(0, "My friends and I are prepared to engage you in combat.", 1, 0)
unit:GossipMenuAddItem(0, "You know, on second though I think we need more time.", 2, 0)
unit:GossipSendMenu(player)
end
RegisterUnitGossipEvent(Xan_ID, 1, "Xantheon_OnGossip")
function Xantheon_Submenus(unit, event, player, id, intid, code)
if (intid == 1) then
unit:SendChatMessage(12, 0, "Are you sure you would like to proceed?")
unit:GossipCreateMenu(99, player, 0)
unit:GossipMenuAddItem(4, "Yes.", 3, 0)
unit:GossipMenuAddItem(4, "No.", 4, 0)
unit:GossipSendMenu(player)
end
if (intid == 2) then
player:GossipComplete()
unit:SendChatMessage(12, 0, "I see. Come back and speak to me when you are ready.")
end
if (intid == 3) then
player:GossipComplete()
unit:RegisterEvent("Xantheon_Talk", 500, 1)
end
if (intid == 4) then
player:GossipComplete()
unit:SendChatMessage(12, 0, "You're wasting my time!")
end
end
RegisterUnitGossipEvent(Xan_ID, 2, "Xantheon_Submenus")
function Andariel_OnGossip(unit, event, player)
unit:GossipCreateMenu(85, player, 0)
unit:GossipMenuAddItem(0, "I would like a...", 23, 0)
unit:GossipMenuAddItem(0, "I would like a...", 24, 0)
end
function Andariel_Submenus(unit, event, player, id, intid, code)
if (intid == 23) then
player:AddItem()
end
if (intid == 24) then
player:AddItem()
end
end
RegisterUnitGossipEvent(anda_ID, 1, "Andariel_OnGossip")
RegisterUnitGossipEvent(anda_ID, 2, "Andariel_Submenus")
-- Cinematic --
function Xantheon_Talk(unit, event)
local plyr = Xan:GetClosestPlayer(0)
local plyrname = plyr:GetName()
Xan:SetFaction(14)
Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
Xan:SendChatMessage(14, 0, "Alright "..plyrname..", you and your friends mount up and follow me.")
Xan:RegisterEvent("Xan_Fly1", 5000, 1)
end
function Xan_Fly1(unit, event)
Xan:SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 24725)
Xan:SendChatMessage(14, 0, "Follow me to your grave!")
Xan:RegisterEvent("Xan_Fly2", 3000, 1)
end
function Xan_Fly2(unit, event)
Xan:SetFlying()
Xan:ModifyFlySpeed(40)
Xan:MoveTo(4017.786133, 7243.845703, 748.863159, 0.823802)
Xan:RegisterEvent("Xan_Fly3", 15000, 1)
end
function Xan_Fly3(unit, event)
Xan:MoveTo(4144.304688, 7388.685059, 730.363342, 0.823802)
Xan:RegisterEvent("Xan_Land", 6000, 1)
end
function Xan_Land(unit, event)
Xan:SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0)
Xan:RegisterEvent("Xan_Land2", 500, 1)
end
function Xan_Land2(unit, event)
Xan:Land()
Xan:RegisterEvent("Xan_Land3", 1000, 1)
end
function Xan_Land3(unit, event)
Xan:MoveTo(4146.695313, 7391.882324, 730.363342, 0.803855)
Xan:RegisterEvent("Xan_Land4", 1000, 1)
end
function Xan_Land4(unit, event)
Xan:MoveTo(4144.505371, 7388.937500, 730.363342, 3.742418)
Xan:RegisterEvent("XanSpeech", 5000, 1)
end
function XanSpeech(unit, event)
Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2)
Xan:SendChatMessage(14, 0, "Now that we have arrived, let the battle--")
Xan:RegisterEvent("Cytara_Appear", 3000, 1)
end
function Cytara_Appear(unit, event)
Cyt:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2)
Cyt:SetModel(28227)
Cyt:RegisterEvent("Cytara_Moves1", 1000, 1)
end
function Cytara_Moves1(unit, event)
Cyt:MoveTo(4122.05, 7375.45, 730.36, 0.5)
Cyt:RegisterEvent("Cytara_Speech", 5000, 1)
end
function Cytara_Speech(unit, event)
Cyt:SendChatMessage(12, 0, "Xantheon! What are you doing?! You cannot face these enemies alone!")
Xan:RegisterEvent("Cytara_Speech1", 5000, 1)
end
function Cytara_Speech1(unit, event)
Xan:SendChatMessage(12, 0, "Quiet Cytara! Get out of here, you have no right meddling in my affairs!")
Cyt:RegisterEvent("Cytara_Speech2", 5000, 1)
end
function Cytara_Speech2(unit, event)
Cyt:SendChatMessage(12, 0, "How dare you command me to be silent! If you weren't my brother, I would slay you on the spot!")
Xan:RegisterEvent("Cytara_Speech3", 5000, 1)
end
function Cytara_Speech3(unit, event)
Xan:SendChatMessage(14, 0, "I SAID BE GONE YOU WRETCHED HAG!")
Xan:FullCastSpellOnTarget(38897, Cyt)
Xan:Kill(Cyt)
Xan:RegisterEvent("XanCombatTime", 10000, 1)
end
function XanCombatTime(unit, event)
unit:SendChatMessage(12, 0, "My sister has never understood me. She had to die. If she hadn't, she would've destroyed my plans!")
unit:RegisterEvent("XanCombatTime2", 5000, 1)
end
function XanCombatTime2(unit, event)
unit:SendChatMessage(12, 0, "No matter! She is out of the way now, prepare to die!")
unit:RegisterEvent("XanBuffPeriod", 5000, 1)
end
-- Spell Events --
function XanCrusaderStrike(unit, event)
local strike = unit:GetMainTank()
if strike ~= nil then
unit:FullCastSpellOnTarget(35395, strike)
else
end
end
function XanDivineStorm(unit, event)
unit:CastSpell(53385)
end
function XanHammerofJustice(unit, event)
local hammer = unit:GetRandomPlayer(0)
if hammer ~= nil then
unit:FullCastSpellOnTarget(10308, hammer)
else
end
end
function XanJudgmentofCommand(unit, event)
local chance = math.random(1,2)
if chance == 1 then
local judge1 = unit:GetRandomPlayer(0)
if judge1 ~= nil then
unit:FullCastSpellOnTarget(41470, judge1)
else
end
end
if chance == 2 then
local judge2 = unit:GetRandomPlayer(0)
if judge2 ~= nil then
unit:FullCastSpellOnTarget(20186, judge2)
else
end
end
end
function XanConsecration(unit, event)
unit:CastSpell(43429)
end
function XanJudgmentofCommand2(unit, event)
local chance2 = math.random(1,2)
if chance2 == 1 then
Xan:FullCastSpellOnTarget(41470, mag)
else
end
if chance2 == 2 then
Xan:FullCastSpellOnTarget(20186, mag)
else
end
end
function XanCrusaderStrike2(unit, event)
Xan:FullCastSpellOnTarget(35395, mag)
end
function XanHammerofJustice2(unit, event)
Xan:FullCastSpellOnTarget(10308, mag)
end
function XanSealofCommand(unit, event)
unit:CastSpell(20375)
end
function XanBlessingofMight(unit, event)
unit:CastSpell(48932)
end
function XanRetAura(unit, event)
unit:CastSpell(54043)
end
function XanDivinePlea(unit, event)
unit:CastSpell(54428)
end
function Magni_Charge(unit, event)
mag:FullCastSpellOnTarget(11578, Xan)
end
function Magni_Sunder(unit, event)
mag:FullCastSpellOnTarget(7386, Xan)
end
function Magni_ThunderClap(unit, event)
mag:CastSpell(47502)
end
function Magni_Devastate(unit, event)
mag:FullCastSpellOnTarget(47498, Xan)
end
function VelenGreaterHeal(unit, event)
vel:FullCastSpellOnTarget(38580, mag)
end
function Jaina_Fireball(unit, event)
jaina:FullCastSpellOnTarget(36805, Xan)
end
function Jaina_Frostbolt(unit, event)
jaina:FullCastSpellOnTarget(28478, Xan)
end
function Jaina_Arcane_Barrage(unit, event)
jaina:FullCastSpellOnTarget(44781, Xan)
end
function Jaina_Attack_Xan2(unit, event)
local jchance = math.random(1,3)
if jchance == 1 then
jaina:RegisterEvent("Jaina_Fireball", 1000, 1)
else
end
if jchance == 2 then
jaina:RegisterEvent("Jaina_Frostbolt", 1000, 1)
else
end
if jchance == 3 then
jaina:RegisterEvent("Jaina_Arcane_Barrage", 1000, 1)
else
end
end
function Archer_Attack_Xan(unit, event)
tyr:FullCastSpellOnTarget(75, Xan)
end
function Archer_Attack_Xan2(unit, event)
syl:FullCastSpellOnTarget(75, Xan)
end
function Magni_Taunt(unit, event)
Xan:GetTauntedBy(mag)
end
-- Xantheon's Combat Starts --
function XanBuffPeriod(unit, event)
Xan:RegisterEvent("XanRetAura", 1000, 1)
Xan:RegisterEvent("XanSealofCommand", 3000, 1)
Xan:RegisterEvent("XanBlessingofMight", 5000,1)
Xan:RegisterEvent("XanPhase1", 6000, 1)
end
function XanPhase1(unit, event)
Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT)
Xan:RegisterEvent("XanJudgmentofCommand", 8000, 0)
Xan:RegisterEvent("XanCrusaderStrike", 13000, 0)
Xan:RegisterEvent("XanConsecration", 20000, 0)
Xan:RegisterEvent("XanDivineStorm", 22000, 0)
Xan:RegisterEvent("XanPhase2", 30000, 1)
end
function XanPhase2(unit, event)
Xan:RemoveEvents()
Xan:RemoveAllAuras()
Xan:CastSpell(40733)
Xan:WipeTargetList()
Xan:SetNextTarget(trig)
Xan:SetCombatCapable(1)
Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2)
Xan:SendChatMessage(14, 0, "You know, I feel bad for ending my sister's life. But hey, sometimes you gotta do what you gotta do.")
Xan:RegisterEvent("Cytara_Resurrect", 5000, 1)
end
function Cytara_Resurrect(unit, event)
Xan:SetNextTarget(Cyt)
Cyt:SetHealth(6815251)
Cyt:CastSpell(58854)
Cyt:SendChatMessage(14, 0, "Xantheon!!!! How could you do that to me? I am your sister, we are family! Doesn't that mean anything to you?")
Xan:RegisterEvent("Xan_Reaction", 5000, 1)
end
function Xan_Reaction(unit, event)
Xan:SendChatMessage(12, 0, "How... how can this be? I killed you, ended your life forever! How is it possible for you to return?")
Cyt:RegisterEvent("Cyt_Reaction", 4000, 1)
end
function Cyt_Reaction(unit, event)
Cyt:SendChatMessage(14, 0, "That does not matter Xantheon! I see I have no place in your heart, therefore you have no place in mine!")
Xan:RegisterEvent("Xan_Reaction2", 5000, 1)
end
function Xan_Reaction2(unit, event)
Xan:SendChatMessage(14, 0, "How touching Cytara... very touching indeed. And how very... pathetic.")
Cyt:RegisterEvent("XanCripple", 5000, 1)
end
function XanCripple(unit, event)
Xan:RemoveAura(40733)
Xan:CastSpell(30231)
Cyt:ChannelSpell(30402, Xan)
Cyt:SendChatMessage(14, 0, "I think not, brother! Do remember who raised you, who your mentor was!")
Xan:RegisterEvent("XanCripple2", 3000, 1)
end
function XanCripple2(unit, event)
Xan:SendChatMessage(14, 0, "No Cytara, I do not remember... and I do not care!")
Cyt:RegisterEvent("Cytara_Reinforcements", 3000, 1)
end
function Cytara_Reinforcements(unit, event)
Cyt:RegisterEvent("Magni_Appear", 3000, 1)
Cyt:RegisterEvent("Sylvanas_Appear", 7000, 1)
Cyt:RegisterEvent("Jaina_Appear", 11000, 1)
Cyt:RegisterEvent("Tyrande_Appear", 15000, 1)
Cyt:RegisterEvent("Velen_Appear", 20000, 1)
Cyt:RegisterEvent("CytaraSpeechTime", 25000, 1)
end
function Magni_Appear(unit, event)
mag:SetModel(3597)
mag:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_VELEN)
mag:SetPowerType("rage")
mag:EquipWeapons(28749, 32375, 0)
mag:SendChatMessage(14, 0, "I am here to help milady.")
end
function Sylvanas_Appear(unit, event)
syl:SetModel(28213)
syl:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_SYLVANAS)
syl:SendChatMessage(14, 0, "And I too Cytara.")
end
function Jaina_Appear(unit, event)
jaina:SetModel(27933)
jaina:Root()
jaina:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_VELEN)
jaina:EquipWeapons(40348, 0, 0)
jaina:SendChatMessage(14, 0, "The powers of the Arcane are with you Cytara.")
end
function Tyrande_Appear(unit, event)
tyr:SetModel(17873)
tyr:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_TYRANDE)
tyr:SendChatMessage(14, 0, "The Night Elves are once again ready to fight by the side of our allies!")
end
function Velen_Appear(unit, event)
vel:SetModel(23749)
vel:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_VELEN)
vel:EquipWeapons(18608, 0, 0)
vel:SendChatMessage(14, 0, "The Light of the Naaru will keep us strong!")
end
function CytaraSpeechTime(unit, event)
Cyt:StopChannel()
Xan:RemoveAura(30231)
Cyt:SendChatMessage(14, 0, "Magni, you draw his attention whilst the others assist you.")
mag:RegisterEvent("Magni_Move", 1000, 1)
end
function Magni_Move(unit, event)
mag:SendChatMessage(12, 0, "Can do milady.")
mag:MoveTo(4133.915527, 7382.155762, 730.363037, 0.555544)
mag:RegisterEvent("Magni_Taunt", 5000, 1)
Cyt:RegisterEvent("Five_Attack", 5500, 1)
end
function Five_Attack(unit, event)
Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT)
mag:RegisterEvent("MagniAttacks_Xan", 1000, 1)
vel:RegisterEvent("Velen_Heals", 5000, 1)
jaina:RegisterEvent("Jaina_Attack_Xan", 4000, 1)
syl:RegisterEvent("Sylvanas_Attack_Xan", 4000, 1)
tyr:RegisterEvent("Tyrande_Attack_Xan", 4000, 1)
Xan:RegisterEvent("Xan_Attacks_Magni", 1000, 1)
Cyt:RegisterEvent("Xantheon_Phase3", 1000, 0)
end
function MagniAttacks_Xan(unit, event)
Xan:SetCombatCapable(0)
mag:AttackReaction(Xan, 99999999, 0)
--mag:RegisterEvent("Magni_Charge", 1000, 1)
mag:RegisterEvent("Magni_Sunder", 2000, 5)
mag:RegisterEvent("Magni_Devastate", 12000, 1)
mag:RegisterEvent("Magni_ThunderClap", 14000, 1)
end
function Xan_Attacks_Magni(unit, event)
Xan:RegisterEvent("XanJudgmentofCommand2", 8000, 0)
Xan:RegisterEvent("XanCrusaderStrike2", 13000, 0)
Xan:RegisterEvent("XanConsecration", 20000, 0)
Xan:RegisterEvent("XanDivineStorm", 22000, 0)
end
function Velen_Heals(unit, event)
vel:RegisterEvent("VelenGreaterHeal", 2600, 0)
end
function Jaina_Attack_Xan(unit, event)
jaina:RegisterEvent("Jaina_Attack_Xan2", 2500, 0)
end
function Sylvanas_Attack_Xan(unit, event)
syl:RegisterEvent("Archer_Attack_Xan2", 2000, 0)
end
function Tyrande_Attack_Xan(unit, event)
tyr:RegisterEvent("Archer_Attack_Xan", 2000, 0)
end
function Xantheon_Phase3(unit, event)
if Xan:GetHealthPct() <= 15 then
tyr:RemoveEvents()
syl:RemoveEvents()
vel:RemoveEvents()
jaina:RemoveEvents()
mag:Despawn(1000, 0)
Xan:RegisterEvent("Xantheon_AfterwardsMoves", 2000, 1)
end
end
function Xantheon_AfterwardsMoves(unit, event)
Xan:RemoveEvents()
Xan:RemoveAllAuras()
Xan:WipeTargetList()
Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
Xan:MoveTo(4143.838379, 7388.634277, 730.363159, 0.722553)
Xan:RegisterEvent("Xan_AfterwardsMoves", 5000, 1)
end
function Xan_AfterwardsMoves(unit, event)
Xan:SetOrientation(3.672116)
Xan:SetNextTarget(trig)
Xan:RegisterEvent("XanSpeechTimeAgain", 3000, 1)
end
function XanSpeechTimeAgain(unit, event)
Xan:SendChatMessage(14, 0, "You see Cytara? You cannot beat me! It is impossible!")
Cyt:RegisterEvent("CytaraChannelCommand", 4000, 1)
end
function CytaraChannelCommand(unit, event)
Cyt:SendChatMessage(14, 0, "Alright Sylvanis, Jaina, Tyrande, and Velen! Time to show him what you have when you work as a team!")
Cyt:RegisterEvent("FiveChannels", 3000, 1)
end
function FiveChannels(unit, event)
tyr:ChannelSpell(47855, Xan)
syl:ChannelSpell(47855, Xan)
jaina:ChannelSpell(47855, Xan)
vel:ChannelSpell(47855, Xan)
Xan:RegisterEvent("XanLaughs", 2000, 1)
end
function XanLaughs(unit, event)
Xan:SendChatMessage(14, 0, "Ooo, this tickles! Is this all you've got?!")
Cyt:RegisterEvent("CytaraMoveForward", 3000, 1)
end
function CytaraMoveForward(unit, event)
Cyt:MoveTo(4128.975586, 7379.458984, 730.363403, 0.533796)
Cyt:SendChatMessage(14, 0, "S'il landari'al aman sul'aral et man'dar ala al'an diel!")
Xan:RegisterEvent("XanLiftsOff", 5000, 1)
end
function XanLiftsOff(unit, event)
Xan:SendChatMessage(14, 0, "Wha... what are you doing?")
Xan:SetFlying()
Xan:SetUInt64Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DROWNED)
Xan:MoveTo(4143.649414, 7388.583984, 744.727051, 3.672116)
Xan:RegisterEvent("XanPleads", 3000, 1)
end
function XanPleads(unit, event)
Xan:SendChatMessage(14, 0, "Cytara, please! Don't do this. I'm sorry! Please, forgive me!")
Cyt:RegisterEvent("CytaraResponds", 3000, 1)
end
function CytaraResponds(unit, event)
Cyt:SendChatMessage(14, 0, "Xantheon, you know the vow we pledged when we became Paladins. I'm sorry... but I am a servant of the Light before I am your sister.")
Cyt:RegisterEvent("CytaraKillsXantheon", 3000, 1)
end
function CytaraKillsXantheon(unit, event)
Cyt:FullCastSpellOnTarget(28299, Xan)
Cyt:RegisterEvent("XantheonDies", 2200, 1)
end
function XantheonDies(unit, event)
Cyt:RegisterEvent("XanLandsAgain", 5000, 1)
Cyt:Kill(Xan)
Xan:MoveTo(4143.789063, 7388.876465, 730.363098, 3.603781)
tyr:StopChannel()
syl:StopChannel()
vel:StopChannel()
jaina:StopChannel()
Xan:SetUInt64Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DEAD)
end
function XanLandsAgain(unit, event)
Xan:Land()
Cyt:RegisterEvent("AndarielAppear", 1000, 1)
end
function AndarielAppear(unit, event)
Xan:Despawn(1000, 0)
anda:SetModel(21420)
anda:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_VELEN)
anda:RegisterEvent("AndarielSpeaks", 2000, 1)
end
function AndarielSpeaks(unit, event)
anda:SendChatMessage(14, 0, "Here you go my champions!")
anda:CastSpell(48582)
anda:SpawnGameObject(500000, 4144.345215, 7388.993652, 730.363098, 3.640980, 180000)
Cyt:RegisterEvent("BossesLeave", 3000, 1)
end
function BossesLeave(unit, event)
Cyt:SendChatMessage(12, 0, "Well...I should go!")
Cyt:RegisterEvent("BossesDespawn", 3000, 1)
end
function BossesDespawn(unit, event)
vel:RegisterEvent("Velen_Despawn", 1000, 1)
Cyt:RegisterEvent("Cytara_Despawn", 1000, 1)
syl:RegisterEvent("Sylvanas_Despawn", 1000, 1)
tyr:RegisterEvent("Tyrande_Despawn", 1000, 1)
jaina:RegisterEvent("Jaina_Despawn", 1000, 1)
anda:RegisterEvent("Andariel_Despawn", 1000, 1)
Xan:Despawn(1000, 0)
end
function Velen_Despawn(unit, event)
vel:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
vel:SetModel(15294)
end
function Cytara_Despawn(unit, event)
Cyt:Despawn(1000, 0)
end
function Sylvanas_Despawn(unit, event)
syl:Despawn(1000, 0)
end
function Tyrande_Despawn(unit, event)
tyr:Despawn(1000, 0)
end
function Jaina_Despawn(unit, event)
jaina:Despawn(1000, 0)
end
function Andariel_Despawn(unit, event)
anda:Despawn(1000, 0)
end
function XantheonDies2(unit, event)
Xan:RemoveEvents()
end
function XantheonKillsTarget(unit, event)
Xan:CastSpell(36300)
end
RegisterUnitEvent(Xan_ID, 3, "XantheonKillsTarget")
RegisterUnitEvent(Xan_ID, 4, "XantheonDies2")