Guest
Public paste!

Inevitable

By: a guest | Jul 4th, 2009 | Syntax: Lua | Size: 20.94 KB | Hits: 76 | Expires: Never
Copy text to clipboard
  1. --/////////////////////////////////////////--
  2. --                 Xantheon                --
  3. --       High Paladin of the Sin'Dorei     --
  4. --           Scripted by Inevitable        --
  5. --                InsomniaWoW              --
  6. --/////////////////////////////////////////--
  7.  
  8. local Xan_ID = 55000
  9. local Cyt_ID = 55001
  10.  
  11. local Xan
  12. local Cyt
  13. local UNIT_FLAG_DEFAULT
  14. local UNIT_FLAG_DEFAULT_CYT
  15.  
  16.  
  17. -- Defines --
  18.  
  19. function Xantheon_OnSpawn(unit, event)
  20.         UNIT_FLAG_DEFAULT = unit:GetUInt64Value(UNIT_FIELD_FLAGS)
  21.         Xan = unit
  22.         Xan:EquipWeapons(28800, 0, 0)
  23. end
  24.  
  25. RegisterUnitEvent(Xan_ID, 18, "Xantheon_OnSpawn")
  26.  
  27. function Cytara_OnSpawn(unit, event)
  28.         Cyt = unit
  29.         UNIT_FLAG_DEFAULT_CYT = Cyt:GetUInt64Value(UNIT_FIELD_FLAGS)
  30.         Cyt:SetModel(15294)
  31.         Cyt:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  32. end
  33.  
  34. RegisterUnitEvent(Cyt_ID, 18, "Cytara_OnSpawn")
  35.  
  36. -- Trigger --
  37.  
  38. local trig
  39. local trig_ID = 55005
  40.  
  41. function Declare_Trigger(unit, event)
  42.         trig = unit
  43.         trig:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  44.         trig:Root()
  45. end
  46.  
  47. RegisterUnitEvent(trig_ID, 18, "Declare_Trigger")
  48.  
  49.  
  50. -- King Magni Bronzebeard --
  51.  
  52. local mag
  53. local mag_ID = 55008
  54. local UNIT_FLAG_DEFAULT_MAGNI
  55.  
  56. function Declare_Magni(unit, event)
  57.         mag = unit
  58.         UNIT_FLAG_DEFAULT_MAGNI = mag:GetUInt64Value(UNIT_FIELD_FLAGS)
  59.         mag:SetModel(15294)
  60.         mag:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  61. end
  62.  
  63. RegisterUnitEvent(mag_ID, 18, "Declare_Magni")
  64.  
  65.  
  66. -- Lady Sylvanas Windrunner --
  67.  
  68. local syl
  69. local syl_ID = 55003
  70. local UNIT_FLAG_DEFAULT_SYLVANAS
  71.  
  72. function Declare_Sylvanas(unit, event)
  73.         syl = unit
  74.         UNIT_FLAG_DEFAULT_SYLVANAS = syl:GetUInt64Value(UNIT_FIELD_FLAGS)
  75.         syl:SetModel(15294)
  76.         syl:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  77. end
  78.  
  79. RegisterUnitEvent(syl_ID, 18, "Declare_Sylvanas")
  80.  
  81.  
  82. -- Jaina Proudmoore --
  83.  
  84. local jaina
  85. local jaina_ID = 55004
  86. local UNIT_FLAG_DEFAULT_JAINA
  87.  
  88. function Declare_Jaina(unit, event)
  89.         jaina = unit
  90.         UNIT_FLAG_DEFAULT_JAINA = jaina:GetUInt64Value(UNIT_FIELD_FLAGS)
  91.         jaina:SetModel(15294)
  92.         jaina:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  93. end
  94.  
  95. RegisterUnitEvent(jaina_ID, 18, "Declare_Jaina")
  96.  
  97.  
  98. -- Lady Tyrande Whisperwind --
  99.  
  100. local tyr
  101. local tyr_ID = 55006
  102. local UNIT_FLAG_DEFAULT_TYRANDE
  103.  
  104. function Declare_Tyrande(unit, event)
  105.         tyr = unit
  106.         UNIT_FLAG_DEFAULT_TYRANDE = tyr:GetUInt64Value(UNIT_FIELD_FLAGS)
  107.         tyr:SetModel(15294)
  108.         tyr:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  109. end
  110.  
  111. RegisterUnitEvent(tyr_ID, 18, "Declare_Tyrande")
  112.  
  113.  
  114. -- Prophet Velen --
  115.  
  116. local vel
  117. local vel_ID = 55007
  118. local UNIT_FLAG_DEFAULT_VELEN
  119.  
  120. function Declare_Velen(unit, event)
  121.         vel = unit
  122.         UNIT_FLAG_DEFAULT_VELEN = vel:GetUInt64Value(UNIT_FIELD_FLAGS)
  123.         vel:SetModel(15294)
  124.         vel:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  125. end
  126.  
  127. RegisterUnitEvent(vel_ID, 18, "Declare_Velen")
  128.  
  129.  
  130. -- Andar'iel--
  131.  
  132. local anda
  133. local anda_ID = 55009
  134.  
  135. local UNIT_FLAG_DEFAULT_ANDARIEL
  136.  
  137. function Declare_Andariel(unit, event)
  138.         anda = unit
  139.         UNIT_FLAG_DEFAULT_ANDARIEL = anda:GetUInt64Value(UNIT_FIELD_FLAGS)
  140.         anda:SetModel(15294)
  141.         anda:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  142. end
  143.  
  144. RegisterUnitEvent(anda_ID, 18, "Declare_Andariel")
  145.  
  146. -- Gossip --
  147.  
  148. function Xantheon_OnGossip(unit, event, player)
  149.         unit:GossipCreateMenu(100, player, 0)
  150.         unit:GossipMenuAddItem(0, "My friends and I are prepared to engage you in combat.", 1, 0)
  151.         unit:GossipMenuAddItem(0, "You know, on second though I think we need more time.", 2, 0)
  152.         unit:GossipSendMenu(player)
  153. end
  154.  
  155. RegisterUnitGossipEvent(Xan_ID, 1, "Xantheon_OnGossip")
  156.  
  157. function Xantheon_Submenus(unit, event, player, id, intid, code)
  158.        
  159. if (intid == 1) then
  160.         unit:SendChatMessage(12, 0, "Are you sure you would like to proceed?")
  161.         unit:GossipCreateMenu(99, player, 0)
  162.         unit:GossipMenuAddItem(4, "Yes.", 3, 0)
  163.         unit:GossipMenuAddItem(4, "No.", 4, 0)
  164.         unit:GossipSendMenu(player)
  165. end
  166.  
  167. if (intid == 2) then
  168.         player:GossipComplete()
  169.         unit:SendChatMessage(12, 0, "I see. Come back and speak to me when you are ready.")
  170. end
  171.  
  172. if (intid == 3) then
  173.         player:GossipComplete()
  174.         unit:RegisterEvent("Xantheon_Talk", 500, 1)
  175. end
  176.  
  177. if (intid == 4) then
  178.         player:GossipComplete()
  179.         unit:SendChatMessage(12, 0, "You're wasting my time!")
  180. end
  181. end
  182.  
  183. RegisterUnitGossipEvent(Xan_ID, 2, "Xantheon_Submenus")
  184.  
  185. function Andariel_OnGossip(unit, event, player)
  186.         unit:GossipCreateMenu(85, player, 0)
  187.         unit:GossipMenuAddItem(0, "I would like a...", 23, 0)
  188.         unit:GossipMenuAddItem(0, "I would like a...", 24, 0)
  189. end
  190.  
  191. function Andariel_Submenus(unit, event, player, id, intid, code)
  192.  
  193. if (intid == 23) then
  194.         player:AddItem()
  195. end
  196.  
  197. if (intid == 24) then
  198.         player:AddItem()
  199. end
  200. end
  201.  
  202. RegisterUnitGossipEvent(anda_ID, 1, "Andariel_OnGossip")
  203. RegisterUnitGossipEvent(anda_ID, 2, "Andariel_Submenus")
  204.  
  205. -- Cinematic --
  206.  
  207. function Xantheon_Talk(unit, event)
  208.         local plyr = Xan:GetClosestPlayer(0)
  209.         local plyrname = plyr:GetName()
  210.         Xan:SetFaction(14)
  211.         Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  212.         Xan:SendChatMessage(14, 0, "Alright "..plyrname..", you and your friends mount up and follow me.")
  213.         Xan:RegisterEvent("Xan_Fly1", 5000, 1)
  214. end
  215.  
  216. function Xan_Fly1(unit, event)
  217.         Xan:SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 24725)
  218.         Xan:SendChatMessage(14, 0, "Follow me to your grave!")
  219.         Xan:RegisterEvent("Xan_Fly2", 3000, 1)
  220. end
  221.  
  222. function Xan_Fly2(unit, event)
  223.         Xan:SetFlying()
  224.         Xan:ModifyFlySpeed(40)
  225.         Xan:MoveTo(4017.786133, 7243.845703, 748.863159, 0.823802)
  226.         Xan:RegisterEvent("Xan_Fly3", 15000, 1)
  227. end
  228.  
  229. function Xan_Fly3(unit, event)
  230.         Xan:MoveTo(4144.304688, 7388.685059, 730.363342, 0.823802)
  231.         Xan:RegisterEvent("Xan_Land", 6000, 1)
  232. end
  233.  
  234. function Xan_Land(unit, event)
  235.         Xan:SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0)
  236.         Xan:RegisterEvent("Xan_Land2", 500, 1)
  237. end
  238.  
  239. function Xan_Land2(unit, event)
  240.         Xan:Land()
  241.         Xan:RegisterEvent("Xan_Land3", 1000, 1)
  242. end
  243.  
  244. function Xan_Land3(unit, event)
  245.         Xan:MoveTo(4146.695313, 7391.882324, 730.363342, 0.803855)
  246.         Xan:RegisterEvent("Xan_Land4", 1000, 1)
  247. end
  248.  
  249. function Xan_Land4(unit, event)
  250.         Xan:MoveTo(4144.505371, 7388.937500, 730.363342, 3.742418)
  251.         Xan:RegisterEvent("XanSpeech", 5000, 1)
  252. end
  253.  
  254. function XanSpeech(unit, event)
  255.         Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2)
  256.         Xan:SendChatMessage(14, 0, "Now that we have arrived, let the battle--")
  257.         Xan:RegisterEvent("Cytara_Appear", 3000, 1)
  258. end
  259.  
  260. function Cytara_Appear(unit, event)
  261.         Cyt:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2)
  262.         Cyt:SetModel(28227)
  263.         Cyt:RegisterEvent("Cytara_Moves1", 1000, 1)
  264. end
  265.  
  266. function Cytara_Moves1(unit, event)
  267.         Cyt:MoveTo(4122.05, 7375.45, 730.36, 0.5)
  268.         Cyt:RegisterEvent("Cytara_Speech", 5000, 1)
  269. end
  270.  
  271. function Cytara_Speech(unit, event)
  272.         Cyt:SendChatMessage(12, 0, "Xantheon! What are you doing?! You cannot face these enemies alone!")
  273.         Xan:RegisterEvent("Cytara_Speech1", 5000, 1)
  274. end
  275.  
  276. function Cytara_Speech1(unit, event)
  277.         Xan:SendChatMessage(12, 0, "Quiet Cytara! Get out of here, you have no right meddling in my affairs!")
  278.         Cyt:RegisterEvent("Cytara_Speech2", 5000, 1)
  279. end
  280.  
  281. function Cytara_Speech2(unit, event)
  282.         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!")
  283.         Xan:RegisterEvent("Cytara_Speech3", 5000, 1)
  284. end
  285.  
  286. function Cytara_Speech3(unit, event)
  287.         Xan:SendChatMessage(14, 0, "I SAID BE GONE YOU WRETCHED HAG!")
  288.         Xan:FullCastSpellOnTarget(38897, Cyt)
  289.         Xan:Kill(Cyt)
  290.         Xan:RegisterEvent("XanCombatTime", 10000, 1)
  291. end
  292.  
  293. function XanCombatTime(unit, event)
  294.         unit:SendChatMessage(12, 0, "My sister has never understood me. She had to die. If she hadn't, she would've destroyed my plans!")
  295.         unit:RegisterEvent("XanCombatTime2", 5000, 1)
  296. end
  297.  
  298. function XanCombatTime2(unit, event)
  299.         unit:SendChatMessage(12, 0, "No matter! She is out of the way now, prepare to die!")
  300.         unit:RegisterEvent("XanBuffPeriod", 5000, 1)
  301. end
  302.  
  303. -- Spell Events --
  304.  
  305. function XanCrusaderStrike(unit, event)
  306.         local strike = unit:GetMainTank()
  307.         if strike ~= nil then
  308.                 unit:FullCastSpellOnTarget(35395, strike)
  309.                 else
  310.         end
  311. end
  312.  
  313. function XanDivineStorm(unit, event)
  314.         unit:CastSpell(53385)
  315. end
  316.  
  317. function XanHammerofJustice(unit, event)
  318.         local hammer = unit:GetRandomPlayer(0)
  319.         if hammer ~= nil then
  320.                 unit:FullCastSpellOnTarget(10308, hammer)
  321.                 else
  322.         end
  323. end
  324.  
  325. function XanJudgmentofCommand(unit, event)
  326.         local chance = math.random(1,2)
  327.         if chance == 1 then
  328.                 local judge1 = unit:GetRandomPlayer(0)
  329.                 if judge1 ~= nil then
  330.                         unit:FullCastSpellOnTarget(41470, judge1)
  331.                         else
  332.                 end
  333.         end
  334.         if chance == 2 then
  335.                 local judge2 = unit:GetRandomPlayer(0)
  336.                 if judge2 ~= nil then
  337.                         unit:FullCastSpellOnTarget(20186, judge2)
  338.                         else
  339.                 end
  340.         end
  341. end
  342.  
  343. function XanConsecration(unit, event)
  344.         unit:CastSpell(43429)
  345. end
  346.  
  347. function XanJudgmentofCommand2(unit, event)
  348.         local chance2 = math.random(1,2)
  349.         if chance2 == 1 then
  350.                 Xan:FullCastSpellOnTarget(41470, mag)
  351.                 else
  352.         end
  353.         if chance2 == 2 then
  354.                 Xan:FullCastSpellOnTarget(20186, mag)
  355.                 else
  356.         end
  357. end
  358.  
  359. function XanCrusaderStrike2(unit, event)
  360.         Xan:FullCastSpellOnTarget(35395, mag)
  361. end
  362.  
  363. function XanHammerofJustice2(unit, event)
  364.         Xan:FullCastSpellOnTarget(10308, mag)
  365. end
  366.  
  367. function XanSealofCommand(unit, event)
  368.         unit:CastSpell(20375)
  369. end
  370.  
  371. function XanBlessingofMight(unit, event)
  372.         unit:CastSpell(48932)
  373. end
  374.  
  375. function XanRetAura(unit, event)
  376.         unit:CastSpell(54043)
  377. end
  378.  
  379. function XanDivinePlea(unit, event)
  380.         unit:CastSpell(54428)
  381. end
  382.  
  383. function Magni_Charge(unit, event)
  384.         mag:FullCastSpellOnTarget(11578, Xan)
  385. end
  386.  
  387. function Magni_Sunder(unit, event)
  388.         mag:FullCastSpellOnTarget(7386, Xan)
  389. end
  390.  
  391. function Magni_ThunderClap(unit, event)
  392.         mag:CastSpell(47502)
  393. end
  394.  
  395. function Magni_Devastate(unit, event)
  396.         mag:FullCastSpellOnTarget(47498, Xan)
  397. end
  398.  
  399. function VelenGreaterHeal(unit, event)
  400.         vel:FullCastSpellOnTarget(38580, mag)
  401. end
  402.  
  403. function Jaina_Fireball(unit, event)
  404.         jaina:FullCastSpellOnTarget(36805, Xan)
  405. end
  406.  
  407. function Jaina_Frostbolt(unit, event)
  408.         jaina:FullCastSpellOnTarget(28478, Xan)
  409. end
  410.  
  411. function Jaina_Arcane_Barrage(unit, event)
  412.         jaina:FullCastSpellOnTarget(44781, Xan)
  413. end
  414.  
  415. function Jaina_Attack_Xan2(unit, event)
  416.         local jchance = math.random(1,3)
  417.         if jchance == 1 then
  418.                 jaina:RegisterEvent("Jaina_Fireball", 1000, 1)
  419.                 else
  420.         end
  421.         if jchance == 2 then
  422.                 jaina:RegisterEvent("Jaina_Frostbolt", 1000, 1)
  423.                 else
  424.         end
  425.         if jchance == 3 then
  426.                 jaina:RegisterEvent("Jaina_Arcane_Barrage", 1000, 1)
  427.                 else
  428.         end
  429. end
  430.  
  431. function Archer_Attack_Xan(unit, event)
  432.         tyr:FullCastSpellOnTarget(75, Xan)
  433. end
  434.  
  435. function Archer_Attack_Xan2(unit, event)
  436.         syl:FullCastSpellOnTarget(75, Xan)
  437. end
  438.  
  439. function Magni_Taunt(unit, event)
  440.         Xan:GetTauntedBy(mag)
  441. end
  442.  
  443. -- Xantheon's Combat Starts --
  444.  
  445. function XanBuffPeriod(unit, event)
  446.         Xan:RegisterEvent("XanRetAura", 1000, 1)
  447.         Xan:RegisterEvent("XanSealofCommand", 3000, 1)
  448.         Xan:RegisterEvent("XanBlessingofMight", 5000,1)
  449.         Xan:RegisterEvent("XanPhase1", 6000, 1)
  450. end
  451.  
  452. function XanPhase1(unit, event)
  453.         Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT)
  454.         Xan:RegisterEvent("XanJudgmentofCommand", 8000, 0)
  455.         Xan:RegisterEvent("XanCrusaderStrike", 13000, 0)
  456.         Xan:RegisterEvent("XanConsecration", 20000, 0)
  457.         Xan:RegisterEvent("XanDivineStorm", 22000, 0)
  458.         Xan:RegisterEvent("XanPhase2", 30000, 1)
  459. end
  460.  
  461. function XanPhase2(unit, event)
  462.         Xan:RemoveEvents()
  463.         Xan:RemoveAllAuras()
  464.         Xan:CastSpell(40733)
  465.         Xan:WipeTargetList()
  466.         Xan:SetNextTarget(trig)
  467.         Xan:SetCombatCapable(1)
  468.         Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2)
  469.         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.")
  470.         Xan:RegisterEvent("Cytara_Resurrect", 5000, 1)
  471. end
  472.  
  473. function Cytara_Resurrect(unit, event)
  474.         Xan:SetNextTarget(Cyt)
  475.         Cyt:SetHealth(6815251)
  476.         Cyt:CastSpell(58854)
  477.         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?")
  478.         Xan:RegisterEvent("Xan_Reaction", 5000, 1)
  479. end
  480.  
  481. function Xan_Reaction(unit, event)
  482.         Xan:SendChatMessage(12, 0, "How... how can this be? I killed you, ended your life forever! How is it possible for you to return?")
  483.         Cyt:RegisterEvent("Cyt_Reaction", 4000, 1)
  484. end
  485.  
  486. function Cyt_Reaction(unit, event)
  487.         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!")
  488.         Xan:RegisterEvent("Xan_Reaction2", 5000, 1)
  489. end
  490.  
  491. function Xan_Reaction2(unit, event)
  492.         Xan:SendChatMessage(14, 0, "How touching Cytara... very touching indeed. And how very... pathetic.")
  493.         Cyt:RegisterEvent("XanCripple", 5000, 1)
  494. end
  495.  
  496. function XanCripple(unit, event)
  497.         Xan:RemoveAura(40733)
  498.         Xan:CastSpell(30231)
  499.         Cyt:ChannelSpell(30402, Xan)
  500.         Cyt:SendChatMessage(14, 0, "I think not, brother! Do remember who raised you, who your mentor was!")
  501.         Xan:RegisterEvent("XanCripple2", 3000, 1)
  502. end
  503.  
  504. function XanCripple2(unit, event)
  505.         Xan:SendChatMessage(14, 0, "No Cytara, I do not remember... and I do not care!")
  506.         Cyt:RegisterEvent("Cytara_Reinforcements", 3000, 1)
  507. end
  508.  
  509. function Cytara_Reinforcements(unit, event)
  510.         Cyt:RegisterEvent("Magni_Appear", 3000, 1)
  511.         Cyt:RegisterEvent("Sylvanas_Appear", 7000, 1)
  512.         Cyt:RegisterEvent("Jaina_Appear", 11000, 1)
  513.         Cyt:RegisterEvent("Tyrande_Appear", 15000, 1)
  514.         Cyt:RegisterEvent("Velen_Appear", 20000, 1)
  515.         Cyt:RegisterEvent("CytaraSpeechTime", 25000, 1)
  516. end
  517.  
  518. function Magni_Appear(unit, event)
  519.         mag:SetModel(3597)
  520.         mag:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_VELEN)
  521.         mag:SetPowerType("rage")
  522.         mag:EquipWeapons(28749, 32375, 0)
  523.         mag:SendChatMessage(14, 0, "I am here to help milady.")
  524. end
  525.  
  526. function Sylvanas_Appear(unit, event)
  527.         syl:SetModel(28213)
  528.         syl:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_SYLVANAS)
  529.         syl:SendChatMessage(14, 0, "And I too Cytara.")
  530. end
  531.  
  532. function Jaina_Appear(unit, event)
  533.         jaina:SetModel(27933)
  534.         jaina:Root()
  535.         jaina:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_VELEN)
  536.         jaina:EquipWeapons(40348, 0, 0)
  537.         jaina:SendChatMessage(14, 0, "The powers of the Arcane are with you Cytara.")
  538. end
  539.  
  540. function Tyrande_Appear(unit, event)
  541.         tyr:SetModel(17873)
  542.         tyr:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_TYRANDE)
  543.         tyr:SendChatMessage(14, 0, "The Night Elves are once again ready to fight by the side of our allies!")
  544. end
  545.  
  546. function Velen_Appear(unit, event)
  547.         vel:SetModel(23749)
  548.         vel:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_VELEN)
  549.         vel:EquipWeapons(18608, 0, 0)
  550.         vel:SendChatMessage(14, 0, "The Light of the Naaru will keep us strong!")
  551. end
  552.  
  553. function CytaraSpeechTime(unit, event)
  554.         Cyt:StopChannel()
  555.         Xan:RemoveAura(30231)
  556.         Cyt:SendChatMessage(14, 0, "Magni, you draw his attention whilst the others assist you.")
  557.         mag:RegisterEvent("Magni_Move", 1000, 1)
  558. end
  559.  
  560. function Magni_Move(unit, event)
  561.         mag:SendChatMessage(12, 0, "Can do milady.")
  562.         mag:MoveTo(4133.915527, 7382.155762, 730.363037, 0.555544)
  563.         mag:RegisterEvent("Magni_Taunt", 5000, 1)
  564.         Cyt:RegisterEvent("Five_Attack", 5500, 1)
  565. end
  566.  
  567. function Five_Attack(unit, event)
  568.         Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT)
  569.         mag:RegisterEvent("MagniAttacks_Xan", 1000, 1)
  570.         vel:RegisterEvent("Velen_Heals", 5000, 1)
  571.         jaina:RegisterEvent("Jaina_Attack_Xan", 4000, 1)
  572.         syl:RegisterEvent("Sylvanas_Attack_Xan", 4000, 1)
  573.         tyr:RegisterEvent("Tyrande_Attack_Xan", 4000, 1)
  574.         Xan:RegisterEvent("Xan_Attacks_Magni", 1000, 1)
  575.         Cyt:RegisterEvent("Xantheon_Phase3", 1000, 0)
  576. end
  577.  
  578. function MagniAttacks_Xan(unit, event)
  579.         Xan:SetCombatCapable(0)
  580.         mag:AttackReaction(Xan, 99999999, 0)
  581.         --mag:RegisterEvent("Magni_Charge", 1000, 1)
  582.         mag:RegisterEvent("Magni_Sunder", 2000, 5)
  583.         mag:RegisterEvent("Magni_Devastate", 12000, 1)
  584.         mag:RegisterEvent("Magni_ThunderClap", 14000, 1)
  585. end
  586.  
  587. function Xan_Attacks_Magni(unit, event)
  588.         Xan:RegisterEvent("XanJudgmentofCommand2", 8000, 0)
  589.         Xan:RegisterEvent("XanCrusaderStrike2", 13000, 0)
  590.         Xan:RegisterEvent("XanConsecration", 20000, 0)
  591.         Xan:RegisterEvent("XanDivineStorm", 22000, 0)
  592. end
  593.  
  594. function Velen_Heals(unit, event)
  595.         vel:RegisterEvent("VelenGreaterHeal", 2600, 0)
  596. end
  597.  
  598. function Jaina_Attack_Xan(unit, event)
  599.         jaina:RegisterEvent("Jaina_Attack_Xan2", 2500, 0)
  600. end
  601.  
  602. function Sylvanas_Attack_Xan(unit, event)
  603.         syl:RegisterEvent("Archer_Attack_Xan2", 2000, 0)
  604. end
  605.  
  606. function Tyrande_Attack_Xan(unit, event)
  607.         tyr:RegisterEvent("Archer_Attack_Xan", 2000, 0)
  608. end
  609.  
  610. function Xantheon_Phase3(unit, event)
  611.         if Xan:GetHealthPct() <= 15 then
  612.         tyr:RemoveEvents()
  613.         syl:RemoveEvents()
  614.         vel:RemoveEvents()
  615.         jaina:RemoveEvents()
  616.         mag:Despawn(1000, 0)
  617.         Xan:RegisterEvent("Xantheon_AfterwardsMoves", 2000, 1)
  618.         end
  619. end
  620.  
  621. function Xantheon_AfterwardsMoves(unit, event)
  622.         Xan:RemoveEvents()
  623.         Xan:RemoveAllAuras()
  624.         Xan:WipeTargetList()
  625.         Xan:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  626.         Xan:MoveTo(4143.838379, 7388.634277, 730.363159, 0.722553)
  627.         Xan:RegisterEvent("Xan_AfterwardsMoves", 5000, 1)
  628. end
  629.  
  630. function Xan_AfterwardsMoves(unit, event)
  631.         Xan:SetOrientation(3.672116)
  632.         Xan:SetNextTarget(trig)
  633.         Xan:RegisterEvent("XanSpeechTimeAgain", 3000, 1)
  634. end
  635.  
  636. function XanSpeechTimeAgain(unit, event)
  637.         Xan:SendChatMessage(14, 0, "You see Cytara? You cannot beat me! It is impossible!")
  638.         Cyt:RegisterEvent("CytaraChannelCommand", 4000, 1)
  639. end
  640.  
  641. function CytaraChannelCommand(unit, event)
  642.         Cyt:SendChatMessage(14, 0, "Alright Sylvanis, Jaina, Tyrande, and Velen! Time to show him what you have when you work as a team!")
  643.         Cyt:RegisterEvent("FiveChannels", 3000, 1)
  644. end
  645.  
  646. function FiveChannels(unit, event)
  647.         tyr:ChannelSpell(47855, Xan)
  648.         syl:ChannelSpell(47855, Xan)
  649.         jaina:ChannelSpell(47855, Xan)
  650.         vel:ChannelSpell(47855, Xan)
  651.         Xan:RegisterEvent("XanLaughs", 2000, 1)
  652. end
  653.  
  654. function XanLaughs(unit, event)
  655.         Xan:SendChatMessage(14, 0, "Ooo, this tickles! Is this all you've got?!")
  656.         Cyt:RegisterEvent("CytaraMoveForward", 3000, 1)
  657. end
  658.  
  659. function CytaraMoveForward(unit, event)
  660.         Cyt:MoveTo(4128.975586, 7379.458984, 730.363403, 0.533796)
  661.         Cyt:SendChatMessage(14, 0, "S'il landari'al aman sul'aral et man'dar ala al'an diel!")
  662.         Xan:RegisterEvent("XanLiftsOff", 5000, 1)
  663. end
  664.  
  665. function XanLiftsOff(unit, event)
  666.         Xan:SendChatMessage(14, 0, "Wha... what are you doing?")
  667.         Xan:SetFlying()
  668.         Xan:SetUInt64Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DROWNED)
  669.         Xan:MoveTo(4143.649414, 7388.583984, 744.727051, 3.672116)
  670.         Xan:RegisterEvent("XanPleads", 3000, 1)
  671. end
  672.  
  673. function XanPleads(unit, event)
  674.         Xan:SendChatMessage(14, 0, "Cytara, please! Don't do this. I'm sorry! Please, forgive me!")
  675.         Cyt:RegisterEvent("CytaraResponds", 3000, 1)
  676. end
  677.  
  678. function CytaraResponds(unit, event)
  679.         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.")
  680.         Cyt:RegisterEvent("CytaraKillsXantheon", 3000, 1)
  681. end
  682.  
  683. function CytaraKillsXantheon(unit, event)
  684.         Cyt:FullCastSpellOnTarget(28299, Xan)
  685.         Cyt:RegisterEvent("XantheonDies", 2200, 1)
  686. end
  687.  
  688. function XantheonDies(unit, event)
  689.         Cyt:RegisterEvent("XanLandsAgain", 5000, 1)
  690.         Cyt:Kill(Xan)
  691.         Xan:MoveTo(4143.789063, 7388.876465, 730.363098, 3.603781)
  692.         tyr:StopChannel()
  693.         syl:StopChannel()
  694.         vel:StopChannel()
  695.         jaina:StopChannel()
  696.         Xan:SetUInt64Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DEAD)
  697. end
  698.  
  699. function XanLandsAgain(unit, event)
  700.         Xan:Land()
  701.         Cyt:RegisterEvent("AndarielAppear", 1000, 1)
  702. end
  703.  
  704. function AndarielAppear(unit, event)
  705.         Xan:Despawn(1000, 0)
  706.         anda:SetModel(21420)
  707.         anda:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_DEFAULT_VELEN)
  708.         anda:RegisterEvent("AndarielSpeaks", 2000, 1)
  709. end
  710.  
  711. function AndarielSpeaks(unit, event)
  712.         anda:SendChatMessage(14, 0, "Here you go my champions!")
  713.         anda:CastSpell(48582)
  714.         anda:SpawnGameObject(500000, 4144.345215, 7388.993652, 730.363098, 3.640980, 180000)
  715.         Cyt:RegisterEvent("BossesLeave", 3000, 1)
  716. end
  717.  
  718. function BossesLeave(unit, event)
  719.         Cyt:SendChatMessage(12, 0, "Well...I should go!")
  720.         Cyt:RegisterEvent("BossesDespawn", 3000, 1)
  721. end
  722.  
  723. function BossesDespawn(unit, event)
  724.         vel:RegisterEvent("Velen_Despawn", 1000, 1)
  725.         Cyt:RegisterEvent("Cytara_Despawn", 1000, 1)
  726.         syl:RegisterEvent("Sylvanas_Despawn", 1000, 1)
  727.         tyr:RegisterEvent("Tyrande_Despawn", 1000, 1)
  728.         jaina:RegisterEvent("Jaina_Despawn", 1000, 1)
  729.         anda:RegisterEvent("Andariel_Despawn", 1000, 1)
  730.         Xan:Despawn(1000, 0)
  731. end
  732.  
  733. function Velen_Despawn(unit, event)
  734.         vel:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
  735.         vel:SetModel(15294)
  736. end
  737.  
  738. function Cytara_Despawn(unit, event)
  739.         Cyt:Despawn(1000, 0)
  740. end
  741.  
  742. function Sylvanas_Despawn(unit, event)
  743.         syl:Despawn(1000, 0)
  744. end
  745.  
  746. function Tyrande_Despawn(unit, event)
  747.         tyr:Despawn(1000, 0)
  748. end
  749.  
  750. function Jaina_Despawn(unit, event)
  751.         jaina:Despawn(1000, 0)
  752. end
  753.  
  754. function Andariel_Despawn(unit, event)
  755.         anda:Despawn(1000, 0)
  756. end
  757.  
  758.  
  759. function XantheonDies2(unit, event)
  760.         Xan:RemoveEvents()
  761. end
  762.  
  763. function XantheonKillsTarget(unit, event)
  764.         Xan:CastSpell(36300)
  765. end
  766.  
  767. RegisterUnitEvent(Xan_ID, 3, "XantheonKillsTarget")
  768. RegisterUnitEvent(Xan_ID, 4, "XantheonDies2")