Code:
-------Entering Combat------------
function Future_Start(pUnit, Event)
pUnit:SendChatMessage (12, 0, "Fear the horrors of the future!")
pUnit:RegisterEvent("Future_p1",1000, 0)
end
end
-------Phase one------------------
function Future_p1(pUnit, Event)
if pUnit:GetHealthPCT() < 99 then
pUnit:RemoveEvents();
pUnit:CastSpell(34725)
pUnit:Rest(10000)
pUnit:CastSpell(14887)
pUnit:RegisterEvent(Future_p2,1000, 0)
end
end
------Phase two------------------
function Future_p2(pUnit, Event)
if pUnit:GetHealthPct() < 90 then
pUnit:RemoveEvents();
pUnit:CastSpell(14887)
pUnit:Rest(7000)
pUnit:SendChatMessage(12, 0, "Why, Should one such as I dirty my hands on you?"
pUnit:Rest(3000)
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
pUnit:SpawnCreature(CreatureID, x+5, y+10, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+9, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+7, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+5, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+3, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+11, z, o, 72, 60000) - Yes this is ALOT of npcs they need to be trash
pUnit:SpawnCreature(CreatureID, x+5, y+8, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+6, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+4, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+2, z, o, 72, 60000)
pUnit:RegisterEvent(Future_p3,1000, 0)
end
end
-----Phase Three----------------
function Future_p3(pUnit, Event)
if pUnit:GetHealthPct() < 80 then
pUnit:RemoveEvents();
pUnit:CastSpell(34725)
pUnit:FullCastSpell(14887)
pUnit:Rest(8000)
pUnit:SendChatMessage(12, 0, "Spectre's of the Future haunt your thoughts!")
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
pUnit:SpawnCreature(CreatureID, x+5, y+10, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+9, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+7, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+5, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+3, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+11, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+8, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+6, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+4, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+2, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+3, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+11, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+8, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+6, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+4, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+2, z, o, 72, 60000)
pUnit:Rest(8000)
pUnit:CastSpell(5246)
pUnit:RegisterEvent(Future_p4,1000, 0)
end
end
-----------Phase Four------------
Function Future_p4(pUnit, Event)
if pUnit:GetHealthPct() <70 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "I will succeed where my minions have failed")
pUnit:CastSpell(5246)
pUnit:CastSpell(14887)
pUnit:Rest(6000)
pUnit:FullCastSpell(14887)
pUnit:Rest(3000)
pUnit:SendChatMessage(12, 0, "DIE FOOLS!")
pUnit:CastSpell(14887)
pUnit:RegisterEvent(Future_p5,1000, 0)
end
end
----------Phase Five-------------
function Future_p5(pUnit, Event)
if pUnit:GetHealthPct() < 60 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "This is the end for you")
pUnit:CastSpell(14887)
pUnit:CastSpell(14887)
pUnit:CastSpell(5246)
pUnit:Rest(4000)
pUnit:CastSpell(14887)
pUnit:RegisterEvent(Future_p6,1000, 0)
end
end
---------Phase Six----------------
function Future_p6(pUnit, Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RemoveEvents();
Choice=math.random(1, 3)
if Choice==1 then
pUnit:SendChatMessage(12, 0, "This is an attack, That you will not soon forget!"
pUnit:CastSpellOnTarget(14887, pUnit:GetRandomPlayer(4))
pUnit:Rest(3000)
pUnit:CastSpellOnTarget(14887, pUnit:GetRandomPlayer(4))
pUnit:Rest(3000)
pUnit:CastSpellOnTarget(14887, pUnit:GetRandomPlayer(4))
pUnit:Rest(3000)
pUnit:CastSpellOnTarget(14887, pUnit:GetRandomPlayer(4))
pUnit:Rest(3000)
pUnit:SendChatMessage(12, 0, "Despite my warnings you still choose to live? FOOLS!"
pUnit:CastSpell(14887)
pUnit:CastSpell(40737)
pUnit:Rest(2000)
pUnit:CastSpell(14887)
pUnit:CastSpell(40737)
pUnit:Rest(2000)
pUnit:CastSpell(14887)
pUnit:CastSpell(40737)
pUnit:Rest(2000)
pUnit:CastSpell(14887)
pUnit:CastSpell(40737)
pUnit:Rest(2000)
pUnit:RegisterEvent(Future_7,1000, 0)
end
if Choice==2 then
pUnit:SendChatMessage(12, 0, "This place. Was not meant for mortal eyes.")
pUnit:CastSpellOnTarget(47867, pUnit:GetRamdomPlayer(4))
pUnit:Rest(4000)
pUnit:CastSpellOnTarget(47864, pUnit:GetRamdomPlayer(4))
pUnit:CastSpellOnTarget(47864, pUnit:GetRamdomPlayer(4))
pUnit:CastSpellOnTarget(47864, pUnit:GetRamdomPlayer(4))
pUnit:CastSpellOnTarget(47864, pUnit:GetRamdomPlayer(4))
pUnit:CastSpellOnTarget(47864, pUnit:GetRamdomPlayer(4))
pUnit:Rest(4000)
pUnit:SendChatMessage(12, 0, "Your will and soul show unbelievable strength! Allow me to fix that!"
pUnit:CastSpell(17928)
pUnit:CastSpellOnTarget(47825, pUnit:GetRamdomPlayer(4))
pUnit:CastSpellOnTarget(47825, pUnit:GetRamdomPlayer(4))
pUnit:CastSpellOnTarget(47825, pUnit:GetRamdomPlayer(4))
pUnit:CastSpellOnTarget(47825, pUnit:GetRamdomPlayer(4))
pUnit:CastSpellOnTarget(47825, pUnit:GetRamdomPlayer(4))
pUnit:RegisterEvent(Future_7,1000, 0)
end
if choice==3 then
pUnit:SendChatMessage(12, 0, "My powers are weakening but I'm not yet bested - My minions will assist me with this task.")
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
pUnit:SpawnCreature(CreatureID, x+5, y+10, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+9, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+7, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+5, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+3, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+11, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+8, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+6, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+4, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+2, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+3, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+11, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+8, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+6, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+4, z, o, 72, 60000)
pUnit:SpawnCreature(CreatureID, x+5, y+2, z, o, 72, 60000)
pUnit:Rest(9000)
pUnit:SendChatMessage(12, 0, "Do you not love them?")
pUnit:Rest(4000)
pUnit:SendChatMessage(12, 0 "So small, So cute")
pUnit:Rest(4000)
pUnit:SendChatMessage(12, 0, "And yet so...")
pUnit:Rest(4000)
pUnit:SendChatMessage(12, 0, "SO DEADLY! FINISH THEM FOR ME MINIONS!")
pUnit:CastSpell(61290)
pUnit:CastSpell(61290)
pUnit:CastSpell(61290)
pUnit:FullCastSpell(14887)
pUnit:RegisterEvent(Future_p7,1000, 0)
end
--------Phase seven-------------------
function Future_p7(pUnit, Event)
if pUnit:GetHealthPct() < 35 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "Your constant mumbling annoys me - SILENCE!")
pUnit:CastSpellOnTarget(19715, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(11719, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(19715, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(11719, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(19715, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(11719, pUnit:GetRandomPlayer(4))
pUnit:Rest(4000)
pUnit:SendChatMessage(12, 0, "Now that you are silent, the show can begin. DIE!")
pUnit:CastSpell(14887)
pUnit:Rest(2000)
pUnit:CastSpell(14887)
pUnit:Rest(2000)
pUnit:CastSpell(14887)
pUnit:Rest(15000)
pUnit:SendChatMessage(12, 0, "Let the presence of the future engufl you!"
pUnit:CastSpell(31294)
pUnit:CastSpell(40243)
pUnit:Rest(5000)
pUnit:SendChatMessage(12, 0, "Come to me - See what you will become")
pUnit:CastSpell(40243)
pUnit:Rest(3000)
pUnit:SendChatMessage(12, 0, "Your attendance pleases me so, let the games begin.")
pUnit:CastSpell(40243)
pUnit:CastSpell(40737)
pUnit:Rest(4000)
pUnit:CastSpell(40737)
pUnit:Rest(4000)
pUnit;CastSpell(40737)
pUnit:CastSpell(31294)
pUnit:RegisterEvent(Future_p8, 1000, 0)
end
end
-------Phase eight (All out PWNAGE)-----
function Future_p8(pUnit, Event)
pUnit:GetHealthPct() < 8 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "The shadows come to engulf me - But I shall take you with me!")
pUnit:CastSpell(33563)
pUnit:CastSpell(40737)
pUnit:Rest(2000)
pUnit:CastSpell(40737)
pUnit:Rest(2000)
pUnit:CastSpell(40737)
pUnit:Rest(7000)
pUnit:SendChatMessage(12, 0, "One... Last... Attempt... At your lifes")
pUnit:Rest(1000)
pUnit:CastSpellOnTarget(38092, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(38092, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(38092, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(38092, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(38092, pUnit:GetRandomPlayer(4))
pUnit:CastSpellOnTarget(38092, pUnit:GetRandomPlayer(4))
pUnit:Rest(3000)
pUnit:SendChatMessage(12, 0, "I EMBRACE THE SHADOWS!")
pUnit:CastSpell(15473)
pUnit:CastSpell(14887)
pUnit:Rest(1000)
pUnit:CastSpell(14887)
pUnit:Rest(1000)
pUnit:CastSpell(14887)
pUnit:Rest(1000)
pUnit:FullCastSpellOnTarget(47825)
end
end
-------Some Events-----------------
fuction Future_Leave(pUnit, Event)
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "You were no challenge for one of my power!")
end
end
function Future_KillTarget(pUnit, Event)
pUnit:RemoveEvents();
Choice=math.random(1, 3)
if Choice==1 then
pUnit:SendChatMessage(12, 0, "Feel the pains of the future")
pUnit:CastSpell(34725)
end
if Choice==2 then
pUnit:SendChatMessage(12, 0, "Decided to back down have we? HAH!")
pUnit:CastSpell(34725)
end
if Choice==3 then
pUnit:SendChatMessage(12,0, "Nothing of the past can face the sins of the future!")
pUnit:CastSpell(34725)
end
end
function Future_Death(pUnit, Event)
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "I must congratulate you.. you have defeated me")
end
end
-------Registering the Events------
RegisterUnitEvent(Insert spawn ID here, 1, "Future_Start")
RegisterUnitEvent(Insert spawn ID here, 2, "Future_Leave")
RegisterUnitEvent(Insert spawn ID here, 3, "Future_KillTarget")
RegisterUnitEvent(Insert spawn ID here, 4, "Future_Death")