Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 21st, 2010 | Syntax: Lua | Size: 20.76 KB | Hits: 89 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. --[[                                                            \\
  2.     ___                __    _      
  3.    /   |  ____  __  __/ /_  (_)_____
  4.   / /| | / __ \/ / / / __ \/ // ___/
  5.  / ___ |/ / / / /_/ / /_/ / /(__  )
  6. /_/  |_/_/ /_/\__,_/_.___/_//____/
  7.  
  8.           Scripted by: SmashnCrash
  9.                         Feathermoon
  10.  
  11. \\                                                                      ]]--
  12.  
  13. --[[ NOTES ABOUT THE ENTIRE ENCOUNTER AND CONTENT \\
  14. Phases are running on a timer, wait for the timer to finish.  The Gossip NPC will spawn when the timer checks out.
  15.  
  16. Phase 1/8:
  17.     * Players have 60sec to drop the 3 sub-bosses.
  18. Phase 2/8:
  19.     * Players have to kill 2 sub-bosses (a whole lot more deadly) in 4min.
  20. Phase 3/8:
  21.     * Players have to kill the boss in 5min.
  22.  
  23.         ::Cinematic Intervention::
  24.  
  25. Phase 4/8:
  26.     * After the cinematic, a little scarab will spawn.  Players must kill this scarab in 10sec or run out of its 30 yards AoE insta-kill range
  27. Phase 5/8:
  28.     * Players have to keep the NPC from reaching the target, or let the target die, this phase is a "gimme". 60sec event.
  29. Phase 6/8:
  30.     * Players have to kill waves and waves of ghosts, ghouls, and undead (36).
  31. Phase 7/8:
  32.     * Players have to kill waves and waves of elite ghosts, elite ghouls, and elite undead (60).
  33.  
  34.         ::Cinematic Intervention::
  35.  
  36. Phase 8a/8:
  37.     * Players have to accept the fight via gossip menu. This will start a short cinematic and the fight will begin.
  38. Phase 8b/8:
  39.     * Players have to kill Anubis in under 10min. After 10 minutes, Anubis becomes untouchable and the fight is over, player will lose.
  40.  
  41.         ::Final Encounter Phases::
  42.  
  43. Phase 1/3:
  44.     * Anubis will obliterate melee classes by using persistent auras.
  45. Phase 2/3:
  46.     * Anubis will weaken the tank. Get a taunt rotation going.
  47. Phase 3/3:
  48.     * Anubis will cast spells to protect himself. These are reflective shields, and they bite back hard.
  49. ]]--
  50. --COORDS AND FLAGS
  51.   --LOCATION
  52.         local Map = 0
  53.         local Zone = 0
  54.   --FACTION
  55.         local Hostile = 0
  56.         local Friendly = 0
  57. --ENTRY IDs
  58. local Gossip_ID = 0
  59. local Anubis_ID = 0
  60. local P1B1_ID = 0
  61. local P1B2_ID = 0
  62. local P1B3_ID = 0
  63. local P2B1_ID = 0
  64. local P2B2_ID = 0
  65. local P3B1_ID = 0
  66. local P4U1_ID = 0
  67. local P5B1_ID = 0
  68. local P6U1_ID = 0
  69. local P6U2_ID = 0
  70. local P6U3_ID = 0
  71. local P7E1_ID = 0
  72. local P7E2_ID = 0
  73. local P7E3_ID = 0
  74.  
  75. --DYNAMIC VARIABLES
  76. local PHASE = 1
  77. local P6_KILLCOUNT = 0
  78. local P7_KILLCOUNT = 0
  79.  
  80. --GLOBAL VARIABLES
  81. local Gossip
  82. local Anubis
  83. local P1B1
  84. local P1B2
  85. local P1B3
  86. local P2B1
  87. local P2B2
  88. local P3B1
  89. local P4U1
  90. local P5B1
  91. local P6U1
  92. local P6U1
  93. local P6U2
  94. local P7E1
  95. local P7E2
  96. local P7E3
  97.  
  98. --WAVE-OBJECT TABLE
  99. local P6_UNITS = {}
  100. local P7_ELITES = {}
  101.  
  102. --SPELLS
  103. local FAILURE = 71189 -- 10mil nature damage.
  104. local Reflect = 22067 -- 5sec
  105. local Warstomp = 34716 -- 2750 dmg
  106. local Sunder = 33661 -- 10% per stack; 10 stack; 30sec
  107. local Aura = 55606 -- Causes the caster to automatically inflict 350 Shadow damage every 2 sec. to nearby enemies.
  108. local Shell = 41371 -- Causes 2500 Shadow damage when attacked and reflects spells back to their casters.
  109. local Grave = 59079 -- Deals 2828 to 3172 Shadow damage to nearby friends after 5 sec.
  110.  
  111. --REGISTER UNIT EVENTS
  112. function Gossip_Spawn(Unit, event)
  113. Gossip = Unit
  114. end
  115. RegisterUnitEvent(Gossip_ID, 18, "Gossip_Spawn")
  116.  
  117. function Anubis_Spawn(Unit, event)
  118. Anubis = Unit
  119. end
  120. RegisterUnitEvent(Anubis_ID, 18, "Anubis_Spawn")
  121.  
  122. function P1_B1_Spawn(Unit, event)
  123. P1B1 = Unit
  124. end
  125. RegisterUnitEvent(P1B1_ID, 18, "P1_B1_Spawn")
  126.  
  127. function P1_B2_Spawn(Unit, event)
  128. P1B2 = Unit
  129. end
  130. RegisterUnitEvent(P1B2_ID, 18, "P1_B2_Spawn")
  131.  
  132. function P1_B3_Spawn(Unit, event)
  133. P1B3 = Unit
  134. end
  135. RegisterUnitEvent(P1B3_ID, 18, "P1_B3_Spawn")
  136.  
  137. function P2_B1_Spawn(Unit, event)
  138. P2B1 = Unit
  139. end
  140. RegisterUnitEvent(P2B1_ID, 18, "P2_B1_Spawn")
  141.  
  142. function P2_B2_Spawn(Unit, event)
  143. P2B2 = Unit
  144. end
  145. RegisterUnitEvent(P2B1_ID, 18, "P2_B2_Spawn")
  146.  
  147. function P3_B1_Spawn(Unit, event)
  148. P3B1 = Unit
  149. end
  150. RegisterUnitEvent(P2B1_ID, 18, "P3_B1_Spawn")
  151.  
  152. function P4_U1_Spawn(Unit, event)
  153. P4U1 = Unit
  154. end
  155. RegisterUnitEvent(P4U1_ID, 18, "P4_U1_Spawn")
  156.  
  157. function P5_B1_Spawn(Unit, event)
  158. P5B1 = Unit
  159. end
  160. RegisterUnitEvent(P5B1_ID, 18, "P5_B1_Spawn")
  161. --[[                                                    \\
  162.    ______                 _      
  163.   / ____/____  __________(_)____
  164.  / / __ / __ \/ ___/ ___/ // __ \
  165. / /_/ // /_/ (__  |__  ) // /_/ /
  166. \____/ \____/____/____/_// .___/
  167.                         /_/
  168. \\                                                              ]]--
  169. function Gossip_Main(Unit, event, player)
  170.         if (player:IsInCombat() == true) or not (player:GetGroupLeader() == player) then
  171.                 player:SendAreaTriggerMessage("You're in combat, or you're not the group leader.")
  172.         else
  173.         if PHASE == 1 then
  174.                 Gossip:CreateMenu(1, player, 0)
  175.                 Gossip:GossipMenuAddItem(9, "Trial of Endless Shadow", 1, 0)
  176.                 Gossip:GossipSendMenu(player)
  177.         end
  178.         if PHASE == 2 then
  179.                 Gossip:CreateMenu(1, player, 0)
  180.                 Gossip:GossipMenuAddItem(9, "The Elite Guard", 2, 0)
  181.                 Gossip:GossipSendMenu(player)
  182.         end
  183.         if PHASE == 3 then
  184.                 Gossip:CreateMenu(1, player, 0)
  185.                 Gossip:GossipMenuAddItem(9, "Avatar of Anubis", 3, 0)
  186.                 Gossip:GossipSendMenu(player)
  187.         end
  188.         if PHASE == 5 then
  189.                 Gossip:CreateMenu(1, player, 0)
  190.                 Gossip:GossipMenuAddItem(10, "The Stranger", 5, 0)
  191.                 Gossip:GossipSendMenu(player)
  192.         end
  193.         if PHASE == 6 then
  194.                 Gossip:CreateMenu(1, player, 0)
  195.                 Gossip:GossipMenuAddItem(9, "Test of Strength", 6, 0)
  196.                 Gossip:GossipSendMenu(player)
  197.         end
  198.         if PHASE == 7 then
  199.                 Gossip:CreateMenu(1, player, 0)
  200.                 Gossip:GossipMenuAddItem(9, "Test of Strength (Elite)", 7,0)
  201.                 Gossip:GossipSendMenu(player)
  202.         end
  203.         if PHASE == 8 then
  204.                 Gossip:CreateMenu(1, player, 0)
  205.                 Gossip:GossipMenuAddItem(9, "Anubis, Guardian of the Underworld", 8,0)
  206.                 Gossip:GossipSendMenu(player)
  207.         end
  208.         end
  209. end
  210.  
  211. function Gossip_Phases(Unit, event, player, id, intid, code)
  212.         if intid == 1 then
  213.                 Gossip:SendChatMessage(12, 0, "Be swift, unleash hell.")
  214.                 RegisterTimedEvent("PHASE_1_START", 5000, 1)
  215.                 Gossip:Despawn(3000,0)
  216.         end
  217.         if intid == 2 then
  218.                 Gossip:SendChatMessage(12, 0, "Show no mercy.")
  219.                 RegisterTimedEvent("PHASE_2_START", 5000, 1)
  220.                 Gossip:Despawn(3000,0)
  221.         end
  222.         if intid == 3 then
  223.                 Gossip:SendChatMessage(12, 0, "Anubis will test your strength...")
  224.                 RegisterTimedEvent("PHASE_3_START", 5000, 1)
  225.                 Gossip:Despawn(3000,0)
  226.         end
  227.         if intid == 5 then
  228.                 Gossip:SendChatMessage(12, 0, "Do not let that ghoul reach the gong!")
  229.                 RegisterTimedEvent("PHASE_5_START", 2000, 1)
  230.                 Gossip:Despawn(3000,0)
  231.         end
  232.         if intid == 6 then
  233.                 P6_KILLCOUNT = 0
  234.                 Gossip:SendChatMessage(12, 0, "Prepare yourselves.  The dead shall walk again...")
  235.                 RegisterTimedEvent("PHASE_6_START", 5000, 1)
  236.                 Gossip:Despawn(3000,0)
  237.         end
  238.         if intid == 7 then
  239.                 P6_KILLCOUNT = 0
  240.                 P7_KILLCOUNT = 0
  241.                 Gossip:SendChatMessage(12, 0, "The final test awaits...")
  242.                 RegisterTimedEvent("PHASE_7_START", 5000, 1)
  243.                 Gossip:Despawn(3000,0)
  244.         end
  245.         if intid == 8 then
  246.                 P7_KILLCOUNT = 0
  247.                 Gossip:SendChatMessage(12, 0, "The Guardian of the Dead waits...")
  248.                 RegisterTimedEvent("PHASE_8A_START", 5000, 1)
  249.                 Gossip:Despawn(3000,0)
  250.         end
  251. end
  252.  
  253. RegisterGossipEvent(Gossip_ID, 1, "Gossip_Main")
  254. RegisterGossipEvent(Gossip_ID, 2, "Gossip_Phases")
  255.  
  256. function P6U1_OnDeath(Unit, event)
  257.         P6_KILLCOUNT = P6_KILLCOUNT + 1
  258. end
  259. RegisterEvent(P6U1, 4, "P6U1_OnDeath")
  260.  
  261. function P6U2_OnDeath(Unit, event)
  262.         P6_KILLCOUNT = P6_KILLCOUNT + 1
  263. end
  264. RegisterEvent(P6U2, 4, "P6U2_OnDeath")
  265.  
  266. function P6U3_OnDeath(Unit, event)
  267.         P6_KILLCOUNT = P6_KILLCOUNT + 1
  268. end
  269. RegisterEvent(P6U3, 4, "P6U3_OnDeath")
  270.  
  271. function P7E1_OnDeath(Unit, event)
  272.         P7_KILLCOUNT = P7_KILLCOUNT + 1
  273. end
  274. RegisterEvent(P7E1, 4, "P7E1_OnDeath")
  275.  
  276. function P7E2_OnDeath(Unit, event)
  277.         P7_KILLCOUNT = P7_KILLCOUNT + 1
  278. end
  279. RegisterEvent(P7E2, 4, "P7E2_OnDeath")
  280.  
  281. function P7E3_OnDeath(Unit, event)
  282.         P7_KILLCOUNT = P7_KILLCOUNT + 1
  283. end
  284. RegisterEvent(P7E3, 4, "P6U3_OnDeath")
  285.  
  286. --[[                                                                    \\
  287.     ____  __                       ___
  288.    / __ \/ /_  ____ _________     <  /
  289.   / /_/ / __ \/ __ `/ ___/ _ \    / /
  290.  / ____/ / / / /_/ (__  )  __/   / /  
  291. /_/   /_/ /_/\__,_/____/\___/   /_/  
  292.  
  293. P1B1    -        P1B2   -       P1B3
  294.                                                                         ]]--
  295. function PHASE_1_START(Unit, event)
  296.         PerformIngameSpawn(1, P1B1_ID, Map, X, Y, Z, O, Hostile, 0)
  297.         PerformIngameSpawn(1, P1B2_ID, Map, X, Y, Z, O, Hostile, 0)
  298.         PerformIngameSpawn(1, P1B3_ID, Map, X, Y, Z, O, Hostile, 0)
  299.         RegisterTimedEvent("PHASE_1_END", 60000, 1)
  300. end
  301.  
  302. function PHASE_1_END(Unit, event)
  303.         if (P1B1:IsDead() == true) and (P1B2:IsDead() == true) and (P1B3:IsDead() == true) then
  304.                 PHASE = 2
  305.                 PerformIngameSpawn(1, Gossip_ID, Map, X, Y, Z, O, Friendly, 0)
  306.                 P1B1:Despawn(2000,0)
  307.                 P1B2:Despawn(2000,0)
  308.                 P1B3:Despawn(2000,0)
  309.         end
  310.         if (P1B1:IsDead() == false) then
  311.                 P1B1:FullCastSpell(FAILURE)
  312.         end
  313.         if (P1B2:IsDead() == false) then
  314.                 P1B2:FullCastSpell(FAILURE)
  315.         end
  316.         if (P1B3:IsDead() == false) then
  317.                 P1B3:FullCastSpell(FAILURE)
  318.         end
  319. end    
  320.  
  321. --[[                                                                    \\
  322.     ____  __                       ___
  323.    / __ \/ /_  ____ _________     |__ \
  324.   / /_/ / __ \/ __ `/ ___/ _ \    __/ /
  325.  / ____/ / / / /_/ (__  )  __/   / __/
  326. /_/   /_/ /_/\__,_/____/\___/   /____/
  327.  
  328.   \\                                                                    ]]--
  329.  
  330. function PHASE_2_START(Unit, event)
  331.         PerformIngameSpawn(1, P2B1_ID, Map, X, Y, Z, O, Hostile, 0)
  332.         PerformIngameSpawn(1, P2B2_ID, Map, X, Y, Z, O, Hostile, 0)
  333.         RegisterTimedEvent("PHASE_2_END", 240000, 1)
  334. end
  335.  
  336. function PHASE_2_END(Unit, event)
  337.         if (P2B1:IsDead() == true) and (P2B2:IsDead() == true) then
  338.                 PHASE = 3
  339.                 PerformIngameSpawn(1, Gossip_ID, Map, X, Y, Z, O, Friendly, 0)
  340.                 P2B1:Despawn(2000,0)
  341.                 P2B2:Despawn(2000,0)
  342.         end
  343.         if (P1B1:IsDead() == false) then
  344.                 P1B1:FullCastSpell(FAILURE)
  345.         end
  346.         if (P2B2:IsDead() == false) then
  347.                 P2B2:FullCastSpell(FAILURE)
  348.         end
  349. end
  350.  
  351. --[[                                                                            \\
  352.     ____  __                       _____
  353.    / __ \/ /_  ____ _________     |__  /
  354.   / /_/ / __ \/ __ `/ ___/ _ \     /_ <
  355.  / ____/ / / / /_/ (__  )  __/   ___/ /
  356. /_/   /_/ /_/\__,_/____/\___/   /____/  
  357.  
  358.   \\                                                                            ]]--
  359. function PHASE_3_START(Unit, event)
  360.         PerformIngameSpawn(1, P3B1_ID, Map, X, Y, Z, O, Hostile, 0)
  361.         RegisterTimedEvent("PHASE_3_END", 300000, 1)
  362. end
  363.  
  364. function PHASE_3_END(Unit, event)
  365.         if (P3B1:IsDead() == true) then
  366.                 PHASE = 4
  367.                 PerformIngameSpawn(1, Anubis_ID, Map, X, Y, Z, O, Friendly, 0)
  368.                 P3B1:Despawn(2000,0)
  369.                 RegisterTimedEvent("INTERVENTION_3_to_4", 2000, 1)
  370.         end
  371.         if (P3B1:IsDead() == false) then
  372.                 P3B1:FullCastSpell(FAILURE)
  373.         end
  374. end
  375.  
  376. --[[                                                                                                                                                                                    \\
  377.     ____       __                             __  _                 _____             __ __
  378.    /  _/____  / /____  ______   _____  ____  / /_(_)____  ____     |__  /            / // /
  379.    / / / __ \/ __/ _ \/ ___/ | / / _ \/ __ \/ __/ // __ \/ __ \     /_ <   ______   / // /_
  380.  _/ / / / / / /_/  __/ /   | |/ /  __/ / / / /_/ // /_/ / / / /   ___/ /  /_____/  /__  __/
  381. /___//_/ /_/\__/\___/_/    |___/\___/_/ /_/\__/_/ \____/_/ /_/   /____/              /_/  
  382.  
  383.   \\                                                                                                                                                                                    ]]--
  384.  
  385. function INTERVENTION_3_to_4(Unit, event)
  386.         Anubis:SendChatMessage(14, 0, "Your efforts will fail.  No one can stop me, it simply won't happen.")
  387.         Anubis:EventChat(14, 0, "Mortals are so foolish.  You will not be able to defeat me.  Give up now and live to see another day.", 2000)
  388.         Anubis:EventChat(14, 0, "Leave this place at once.  This is your only warning", 6000)
  389.         Anubis:EventChat(14, 0, "I look forward to crushing each and every one of you.", 10000)
  390.         Anubis:Despawn(12000, 0)
  391.         RegisterTimedEvent("PHASE_4_START", 14000, 1)
  392. end
  393.  
  394. --[[                                                                            \\
  395.     ____  __                       __ __
  396.    / __ \/ /_  ____ _________     / // /
  397.   / /_/ / __ \/ __ `/ ___/ _ \   / // /_
  398.  / ____/ / / / /_/ (__  )  __/  /__  __/
  399. /_/   /_/ /_/\__,_/____/\___/     /_/  
  400.  
  401.   \\                                                                            ]]--
  402.  
  403. function PHASE_4_START(Unit, event)
  404.         P4U1:SendChatMessage(41, 0, "KILL THE SCARAB QUICKLY!")
  405.         P4U1:RegisterEvent("PHASE_4_END", 11000, 1)
  406. end
  407.  
  408. function PHASE_4_END(Unit, event)
  409.         if (P4U1:IsDead() == true) then
  410.                 PHASE = 5
  411.                 PerformIngameSpawn(1, Gossip_ID, Map, X, Y, Z, O, Friendly, 0)
  412.                 P4U1:Despawn(2000,0)
  413.         end
  414.         if (P4U1:IsDead() == false) then
  415.                 PHASE = 3
  416.         end
  417. end
  418.  
  419. --[[                                                                            \\
  420.     ____  __                       ______
  421.    / __ \/ /_  ____ _________     / ____/
  422.   / /_/ / __ \/ __ `/ ___/ _ \   /___ \  
  423.  / ____/ / / / /_/ (__  )  __/  ____/ /  
  424. /_/   /_/ /_/\__,_/____/\___/  /_____/  
  425.  
  426.   \\                                                                            ]]-
  427.  
  428. function PHASE_5_START(Unit, event)
  429.         PerformIngameSpawn(1, P5B1_ID, Map, X, Y, Z, O, Hostile, 0)
  430.         PerformIngameSpawn(1, P5O1_ID, Map, X, Y, Z, O, Friendly, 0)
  431.         RegisterTimedEvent("PHASE_5_INITIATE", 100, 1)
  432.         RegisterTimedEvent("PHASE_5_END", 60000, 1)
  433. end
  434.  
  435. function PHASE_5_INTIATE(Unit, event)
  436.         P5B1:AttackReaction(P5O1, 10000000, 0)
  437.         P5O1:SendChatMessage(14, 0, "Keep him away from me!")
  438. end
  439.  
  440. function PHASE_5_END(Unit, event)
  441.         if (P5O1:IsDead() == false) then
  442.                 PHASE = 6
  443.                 PerformIngameSpawn(1, Gossip_ID, Map, X, Y, Z, O, Friendly, 0)
  444.                 P5B1:Despawn(0,0)
  445.                 P5B1:SendChatMessage(12, 0, "Damn it all...")
  446.                 P5O1:Despawn(4000,0)
  447.                 P5O1:SendChatMessage(12, 0, ":D")
  448.                 Gossip:EventChat(12, 0, "Umm..what are you doing here?", 500)
  449.                 P501:EventChat(12, 0, "Uhh, I don't know, but these nice people saved me, good bye!", 1500)
  450.         end
  451.         if (P5O1:IsDead() == true) then
  452.                 P5B1:SendChatMessage("Hahaha! That'll teach you to steal from me, you pest!")
  453.                 PHASE = 6
  454.         end
  455. end
  456.  
  457. --[[                                                                            \\
  458.     ____  __                       _____
  459.    / __ \/ /_  ____ _________     / ___/
  460.   / /_/ / __ \/ __ `/ ___/ _ \   / __ \
  461.  / ____/ / / / /_/ (__  )  __/  / /_/ /
  462. /_/   /_/ /_/\__,_/____/\___/   \____/  
  463.  
  464.   \\                                                                            ]]-
  465.  
  466. function PHASE_6_START(Unit, event)
  467.         P6_UNITS[1] = PerformIngameSpawn(1, P6U1, Map, X, Y, Z, O, Hostile, 60000)
  468.         P6_UNITS[2] = PerformIngameSpawn(1, P6U3, Map, X, Y, Z, O, Hostile, 60000)
  469.         P6_UNITS[3] = PerformIngameSpawn(1, P6U2, Map, X, Y, Z, O, Hostile, 60000)
  470.         P6_UNITS[4] = PerformIngameSpawn(1, P6U2, Map, X, Y, Z, O, Hostile, 60000)
  471.         P6_UNITS[5] = PerformIngameSpawn(1, P6U1, Map, X, Y, Z, O, Hostile, 60000)
  472.         P6_UNITS[6] = PerformIngameSpawn(1, P6U3, Map, X, Y, Z, O, Hostile, 60000)
  473.         RegisterTimedEvent("PHASE_6_SUMMON", 10000, 6)
  474. end
  475.  
  476. function PHASE_6_SUMMON(Unit, event)
  477.         P6_UNITS[] = PerformIngameSpawn(1, P6U1, Map, X, Y, Z, O, Hostile, 60000)
  478.         P6_UNITS[] = PerformIngameSpawn(1, P6U3, Map, X, Y, Z, O, Hostile, 60000)
  479.         P6_UNITS[] = PerformIngameSpawn(1, P6U2, Map, X, Y, Z, O, Hostile, 60000)
  480.         P6_UNITS[] = PerformIngameSpawn(1, P6U2, Map, X, Y, Z, O, Hostile, 60000)
  481.         P6_UNITS[] = PerformIngameSpawn(1, P6U1, Map, X, Y, Z, O, Hostile, 60000)
  482.         P6_UNITS[] = PerformIngameSpawn(1, P6U3, Map, X, Y, Z, O, Hostile, 60000)
  483.         if (P6_KILLCOUNT >= 36) then
  484.                 PHASE = 7
  485.                 PerformIngameSpawn(1, Gossip_ID, Map, X, Y, Z, O, Friendly, 0)
  486.                 for k,v in pairs(P6_UNITS) do
  487.                         v:Despawn(0,0)
  488.                 end
  489.         end
  490. end
  491.  
  492. --[[                                                                            \\
  493.     ____  __                       _____
  494.    / __ \/ /_  ____ _________     /__  /
  495.   / /_/ / __ \/ __ `/ ___/ _ \      / /
  496.  / ____/ / / / /_/ (__  )  __/     / /  
  497. /_/   /_/ /_/\__,_/____/\___/     /_/  
  498.  
  499.   \\                                                                            ]]-
  500.  
  501. function PHASE_7_START(Unit, event)
  502.         P7_ELITES[1] = PerformIngameSpawn(1, P7E1, Map, X, Y, Z, O, Hostile, 60000)
  503.         P7_ELITES[2] = PerformIngameSpawn(1, P7E3, Map, X, Y, Z, O, Hostile, 60000)
  504.         P7_ELITES[3] = PerformIngameSpawn(1, P7E2, Map, X, Y, Z, O, Hostile, 60000)
  505.         P7_ELITES[4] = PerformIngameSpawn(1, P7E2, Map, X, Y, Z, O, Hostile, 60000)
  506.         P7_ELITES[5] = PerformIngameSpawn(1, P7E1, Map, X, Y, Z, O, Hostile, 60000)
  507.         P7_ELITES[6] = PerformIngameSpawn(1, P7E3, Map, X, Y, Z, O, Hostile, 60000)
  508.         RegisterTimedEvent("PHASE_7_SUMMON", 15000, 10)
  509. end
  510.  
  511. function PHASE_7_SUMMON(Unit, event)
  512.         P7_ELITES[] = PerformIngameSpawn(1, P7E1, Map, X, Y, Z, O, Hostile, 60000)
  513.         P7_ELITES[] = PerformIngameSpawn(1, P7E3, Map, X, Y, Z, O, Hostile, 60000)
  514.         P7_ELITES[] = PerformIngameSpawn(1, P7E2, Map, X, Y, Z, O, Hostile, 60000)
  515.         P7_ELITES[] = PerformIngameSpawn(1, P7E2, Map, X, Y, Z, O, Hostile, 60000)
  516.         P7_ELITES[] = PerformIngameSpawn(1, P7E1, Map, X, Y, Z, O, Hostile, 60000)
  517.         P7_ELITES[] = PerformIngameSpawn(1, P7E3, Map, X, Y, Z, O, Hostile, 60000)
  518.         if (P7_KILLCOUNT >= 60) then
  519.                 PHASE = 7
  520.                 PerformIngameSpawn(1, Gossip_ID, Map, X, Y, Z, O, Friendly, 0)
  521.                 for k,v in pairs(P7_ELITES) do
  522.                         v:Despawn(0,0)
  523.                 end
  524.         end
  525. end
  526.  
  527. --[[                                                                                    \\
  528.     ____  __                       ____  ___
  529.    / __ \/ /_  ____ _________     ( __ )/   |
  530.   / /_/ / __ \/ __ `/ ___/ _ \   / __  / /| |
  531.  / ____/ / / / /_/ (__  )  __/  / /_/ / ___ |
  532. /_/   /_/ /_/\__,_/____/\___/   \____/_/  |_|
  533.  
  534.   \\                                                                                    ]]-
  535.  
  536. function PHASE_8A_START(Unit event)
  537.         PerformIngameSpawn(1, Anubis_ID, Map, X, Y, Z, O, Friendly, 0)
  538.         Anubis:SendChatMessage(12, 0, "Enough of these games.")
  539.         Anubis:EventChat(12, 0, "You shouldn't expect to defeat me.", 2000)
  540.         Anubis:EventChat(12, 0, "No mortal scum can kill a true god.", 5000)
  541.         Anubis:EventChat(12, 0, "It's time for you to join me in the Underworld...", 8000)
  542.         RegisterTimedEvent("PHASE_8A_FLAG_CHANGE", 11500, 0)
  543. end
  544.  
  545. function PHASE_8A_FLAG_CHANGE(Unit, event)
  546.         Anubis:SetFaction(Hostile)
  547. end
  548.  
  549. --[[                                                                                    \\
  550.     ____  __                       ____  __  
  551.    / __ \/ /_  ____ _________     ( __ )/ /_
  552.   / /_/ / __ \/ __ `/ ___/ _ \   / __  / __ \
  553.  / ____/ / / / /_/ (__  )  __/  / /_/ / /_/ /
  554. /_/   /_/ /_/\__,_/____/\___/   \____/_.___/
  555.  
  556.   \\                                                                                    ]]-
  557.  
  558. function PHASE_8B_START(Unit, event)
  559.         Anubis:CastSpell(Aura)
  560.         Anubis:RegisterEvent("PHASE_8_SPELLS", 18000, 0)
  561. end
  562.  
  563. function PHASE_8_SPELLS(Unit, event)
  564.         local tank = Anubis:GetPrimaryCombatTarget()
  565.         if Anubis:GetHealthPct() >= 70 then
  566.                 Anubis:CastSpellOnTarget(Grave, tank)
  567.         end
  568.         if Anubis:GetHealthPct() <= 69 and Anubis:GetHealthPct() >= 40 then
  569.                 Anubis:CastSpellOnTarget(Sunder, tank)
  570.                 Anubis:CastSpellOnTarget(Sunder, tank)
  571.         end
  572.         if Anubis:GetHealthPct() <= 39 then
  573.                 Anubis:CastSpell(Shell)
  574.         end
  575. end
  576. RegisterUnitEvent(Anubis_ID, 1, "PHASE_8B_START")
  577.  
  578. function PHASE_8B_END(Unit, event)
  579.         Anubis:RemoveEvents()
  580.         PHASE = 0
  581.         RegisterTimedEvent("EVENT_RESET", 3600000, 1)
  582. end
  583. RegisterUnitEvent(Anubis_ID, 4, "PHASE_8B_END")
  584.  
  585. --[[                                                                                                            \\
  586.     ____                 __     ______                  __
  587.    / __ \___  ________  / /_   / ____/_   _____  ____  / /_
  588.   / /_/ / _ \/ ___/ _ \/ __/  / __/  | | / / _ \/ __ \/ __/
  589.  / _, _/  __(__  )  __/ /_   / /___  | |/ /  __/ / / / /_  
  590. /_/ |_|\___/____/\___/\__/  /_____/  |___/\___/_/ /_/\__/  
  591.  
  592.   \\                                                                                                            ]]--
  593. function EVENT_RESET(Unit, event)
  594.         PerformIngameSpawn(1, Gossip_ID, Map, X, Y, Z, O, Friendly, 0)
  595.         PHASE = 1
  596. end
  597. --[[                                                                                                                                                                      \\
  598.            ________          __     ______                                           __    
  599.           / ____/ /_  ____ _/ /_   / ____/____  ____ ___  ____ ___  ____ _____  ____/ /_____
  600.          / /   / __ \/ __ `/ __/  / /    / __ \/ __ `__ \/ __ `__ \/ __ `/ __ \/ __  // ___/
  601.         / /___/ / / / /_/ / /_   / /___ / /_/ / / / / / / / / / / / /_/ / / / / /_/ /(__  )
  602. \\      \____/_/ /_/\__,_/\__/   \____/ \____/_/ /_/ /_/_/ /_/ /_/\__,_/_/ /_/\__,_//____/    ]]--
  603.  
  604. function EVENT_SCRIPT_DEBUGGER(event, player, message, type, language)
  605.         if player:IsGm() == true then
  606.                 if message == "@Anubis phase 1" then
  607.                         PHASE = 1
  608.                 end
  609.                 if message == "@Anubis phase 2" then
  610.                         PHASE = 2
  611.                 end
  612.                 if message == "@Anubis phase 3" then
  613.                         PHASE = 3
  614.                 end
  615.                 if message == "@Anubis phase 4" then
  616.                         PHASE = 4
  617.                 end
  618.                 if message == "@Anubis phase 5" then
  619.                         PHASE = 5
  620.                 end
  621.                 if message == "@Anubis phase 6" then
  622.                         PHASE = 6
  623.                 end
  624.                 if message == "@Anubis phase 7" then
  625.                         PHASE = 7
  626.                 end
  627.                 if message == "@Anubis phase 8" then
  628.                         PHASE = 8
  629.                 end
  630.                 if message == "@Anubis phase get" then
  631.                         player:SendBroadcastMessage("Anubis script is currently on Phase "..PHASE..".")
  632.                 end
  633.                 if message == "@Anubis test 1" then
  634.                         RegisterTimedEvent("PHASE_1_START", 5000, 1)
  635.                         player:SendBroadcastMessage("Initiating Event: Phase 1...")
  636.                 end
  637.                 if message == "@Anubis test 2" then
  638.                         RegisterTimedEvent("PHASE_2_START", 5000, 1)
  639.                         player:SendBroadcastMessage("Initiating Event: Phase 2...")
  640.                 end
  641.                 if message == "@Anubis test 3" then
  642.                         RegisterTimedEvent("PHASE_3_START", 5000, 1)
  643.                         player:SendBroadcastMessage("Initiating Event: Phase 3...")
  644.                 end
  645.                 if message == "@Anubis test 4" then
  646.                         RegisterTimedEvent("PHASE_4_START", 5000, 1)
  647.                         player:SendBroadcastMessage("Initiating Event: Phase 4...")
  648.                 end
  649.                 if message == "@Anubis test 5" then
  650.                         RegisterTimedEvent("PHASE_5_START", 5000, 1)
  651.                         player:SendBroadcastMessage("Initiating Event: Phase 5...")
  652.                 end
  653.                 if message == "@Anubis test 6" then
  654.                         RegisterTimedEvent("PHASE_6_START", 5000, 1)
  655.                         player:SendBroadcastMessage("Initiating Event: Phase 6...")
  656.                 end
  657.                 if message == "@Anubis test 7" then
  658.                         RegisterTimedEvent("PHASE_7_START", 5000, 1)
  659.                         player:SendBroadcastMessage("Initiating Event: Phase 7...")
  660.                 end
  661.                 if message == "@Anubis test 8" then
  662.                         RegisterTimedEvent("PHASE_8A_START", 5000, 1)
  663.                         player:SendBroadcastMessage("Initiating Event: Phase 8...")
  664.                 end
  665.         end
  666. end
  667. RegisterServerHook(16, "EVENT_SCRIPT_DEBUGGER")