Code:
Boss - Ghost of Past.
Description
-----------------[Phase 1]-------------------------------------------------------------------------------
function GhostofPast_p1(pUnit, Event)
if pUnit:GetHealthPct() < 90 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Daring to attack me is not a mistake you will make again!")
pUnit:FullCastSpell(42931)
pUnit:RegisterEvent("GhostofPast_p2",1000, 0)
end
end
-----------------[Phase 2]-------------------------------------------------------------------------------
function GhostofPast_p2(pUnit, Event)
if pUnit:GetHealthPct() < 88 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Embrace the cold")
pUnit:GetRandomPlayer(7)
pUnit:CastSpell(38089)
pUnit:CastSpell(42842)
pUnit:GetRamdomPlayer(7)
pUnit:CastSpell(38089)
pUnit:CastSpell(42842)
pUnit:GetRamdomPlayer(7)
pUnit:CastSpell(38089)
pUnit:CastSpell(42842)
pUnit:GetRamdomPlayer(7)
pUnit:GetMainTank()
pUnit:CastSpell(38089)
pUnit:Castspell(42842)
pUnit:RegisterEvent("GhostofPast_p3",1000, 0)
end
end
-----------------[Phase 3]-------------------------------------------------------------------------------
function GhostofPast_p3(pUnit, Event)
if pUnit:GetHealthPct() < 85 then
pUnit:RemoveEvents();
pUnit:GetRandomPlayer(7)
pUnit:CastSpell(38089)
pUnit:CastSpell(42842)
pUnit:GetRamdomPlayer(7)
pUnit:CastSpell(38089)
pUnit:CastSpell(42842)
pUnit:GetMainTank()
pUnit:CastSpell(42931)
pUnit:CastSpell(42914)
pUnit:RegisterEvent("GhostofPast_p4",1000, 0)
end
end
-----------------[Phase 4]-------------------------------------------------------------------------------
function GhostofPast_p4(pUnit, Event)
if pUnit:GetHealthPct() < 81 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Feel the cold - Feel it burn!")
pUnit:GetRandomPlayer(7)
pUnit:CastSpell(47610)
pUnit:GetRandomPlayer(7)
pUnit:CastSpell(47610)
pUnit:GetRandomPlayer(7)
pUnit:CastSpell(47610)
pUnit:GetRandomPlayer(7)
pUnit:CastSpell(47610)
pUnit:GetRandomPlayer(7)
pUnit:CastSpell(47610)
pUnit:GetMainTank()
pUnit:CastSpell(47610)
pUnit:RegisterEvent("GhostofPast_p5",1000, 0)
end
end
-----------------[Phase 5]-------------------------------------------------------------------------------
function GhostofPast_p5(pUnit, Event)
if pUnit:GetHealthPct() < 79 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "DIE FOOLS!")
pUnit:FullCastSpell(8398)
pUnit:RegisterEvent("GhostofPast_p6",1000, 0)
end
end
-----------------[Phase 6]-------------------------------------------------------------------------------
function GhostofPast_p6(pUnit, Event)
if pUnit:GetHealthPct() < 77 then
pUnit:RemoveEvents();
pUnit:FullCastSpell(8398)
pUnit:RegisterEvent("GhostofPast_p7",1000, 0)
end
end
-----------------[Phase 7]-------------------------------------------------------------------------------
function GhostofPast_p7(pUnit, Event)
if pUnit:GetHealthPct() < 75 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "You shall be defeated! I will be triumphant!")
pUnit:FullCastSpell(8398)
pUnit:RegisterEvent("GhostofPast_p8",1000, 0)
end
end
-----------------[Phase 8]-------------------------------------------------------------------------------
function GhostofPast_p8(pUnit, Event)
if pUnit:GetHealthPct() < 73 then
pUnit:RemoveEvents();
pUnit:CastSpell(42931)
pUnit:RegisterEvent("GhostofPast_p9",1000, 0)
end
end
-----------------[Phase 9]-------------------------------------------------------------------------------
function GhostofPast_p9(pUnit, Event)
if pUnit:GetHealthPct() < 72 then
pUnit:RemoveEvents();
pUnit:CastSpell(42917)
pUnit:CastSpell(42931)
pUnit:FullCastSpell(42842)
pUnit:RegisterEvent("GhostofPast_p10",1000, 0)
end
end
-----------------[Phase 10]-------------------------------------------------------------------------------
function GhostofPast_p10(pUnit, Event)
if pUnit:GetHealthPct() < 70 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "I see. Your spells keep you alive - Not for long!")
pUnit:FullCastSpell(32375)
pUnit:RegisterEvent("GhostofPast_p11",1000, 0)
end
end
-----------------[Phase 11]-------------------------------------------------------------------------------
function GhostofPast_p11(pUnit, Event)
if pUnit:GetHealthPct() < 60 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "Be quiet! BE QUIET!")
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:RegisterEvent("GhostofPast_p12",1000, 0)
end
end
-----------------[Phase 12]-------------------------------------------------------------------------------
function GhostofPast_p12(pUnit, Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RemoveEvents();
pUnit:FullCastSpell(8398)
pUnit:RegisterEvent("GhostofPast_p13",1000, 0)
end
end
-----------------[Phase 13]-------------------------------------------------------------------------------
function GhostofPast_p13(pUnit, Event)
if pUnit:GetHealthPct() < 45 then
pUnit:RemoveEvents();
pUnit:FullCastSpell(8398)
pUnit:RegisterEvent("GhostoffPast_p14",1000, 0)
end
end
-----------------[Phase 14]-------------------------------------------------------------------------------
function GhostofPast_p14(pUnit, Event)
if pUnit:GetHealthPct() < 40 then
pUnit:RemoveEvents();
pUnit:FullCastSpell(8398)
pUnit:RegisterEvent("GhostoffPast_p15",1000, 0)
end
end
-----------------[Phase 15]-------------------------------------------------------------------------------
function GhostofPast_p15(pUnit, Event)
if pUnit:GetHealthPct() < 38 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "Be quiet! BE QUIET!")
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetRamdomPlayer(4)
pUnit:FullCastSpell(2139)
pUnit:GetMainTank()
pUnit:CastSpell(49236)
pUnit:FullCastSpell(32375)
pUnit:RegisterEvent("GhostofPast_p16",1000, 0)
end
end
-----------------[Phase 16]-------------------------------------------------------------------------------
function GhostofPast_p16(pUnit, Event)
if pUnit:GetHealthPct() < 32 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "Be gone you fool!")
pUnit:GetMainTank()
pUnit:FullCastSpell(24199)
pUnit:RegisterEvent(GhostofPast_p17,1000, 0)
end
end
-----------------[Phase 17]-------------------------------------------------------------------------------
function GhostofPast_p17(pUnit, Event)
if pUnit:GetHealthPct() < 25 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "To me my brethren, I'm in need of Aid!"
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
pUnit:SpawnCreature(CreatureID, x+5, y+10, z, o, 72, 120000)
pUnit:SpawnCreature(CreatureID, x+5, y+8, z, o, 72, 120000)
pUnit:SpawnCreature(CreatureID, x+5, y+6, z, o, 72, 120000)
pUnit:SpawnCreature(CreatureID, x+5, y+4, z, o, 72, 120000)
pUnit:SpawnCreature(CreatureID, x+5, y+2, z, o, 72, 120000) - Need to be murlocs or you have to remove the play sound to set
pUnit:PlaySoundToSet(11802)
pUnit:RegisterEvent(GhostofPast_p18,1000, 0)
end
end
-----------------[Phase 18]-------------------------------------------------------------------------------
function GhostofPast_p18(pUnit, Event)
if pUnit:GetHealthPct() < 18 then
pUnit:RemoveEvents();
pUnit:CastSpell(42931)
pUnit:CastSpell(42917)
pUnit:FullCastSpell(8398)
pUnit:RegisterEvent(GhostofPast_p19,1000, 0)
end
end
-----------------[Phase 19]-------------------------------------------------------------------------------
function GhostofPast_p19(pUnit, Event)
if pUnit:GetHealthPct() < 10 then
Punit:Removeevents();
pUnit:SendChatMessage(12, 0, "My end is near... But so is yours!")
pUnit:CastSpell(8398)
pUnit:RegisterEvent(GhostofPast_p20,1000, 0)
end
end
-----------------[Phase 2]-------------------------------------------------------------------------------
function Ghostofpast_p20(pUnit, Event)
if pUnit:GetHealthPct() < 17 then
pUnit:Castspell(8398)
pUnit:RegisterEvent(GhostofPast_p21,1000, 0)
end
end
-----------------[Phase 21]-------------------------------------------------------------------------------
function GhostofPast_p21(pUnit, Event)
if pUnit:GetHealthPct() < 16 then
pUnit:RemoveEvents();
pUnit:CastSpell(8398)
pUnit:CastSpell(8398)
pUnit:RegisterEvent(GhostofPast_p22,1000, 0)
end
end
-----------------[Phase 22]-------------------------------------------------------------------------------
function GhostofPast_p22(pUnit, Event)
if pUnit:GetHealthPct() < 8 then
pUnit:RemoveEvents();
pUnit:SendChatMessage(12, 0, "You shall fall before I do - I will see to that"
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
pUnit:SpawnCreature(CreatureID, x+5, y+10, z, o, 72, 120000)
pUnit:SpawnCreature(CreatureID, x+5, y+8, z, o, 72, 120000)
pUnit:SpawnCreature(CreatureID, x+5, y+6, z, o, 72, 120000)
pUnit:SpawnCreature(CreatureID, x+5, y+4, z, o, 72, 120000)
pUnit:SpawnCreature(CreatureID, x+5, y+2, z, o, 72, 120000) - Need to be murlocs or you have to remove the play sound to set
pUnit:PlaySoundToSet(11802)
pUnit:CastSpell(8398)
pUnit:Castspell(8398)
end
end
function GhostofPast_start(pUnit, Event)
pUnit:RegisterEvent("GhostofPast_p1",1000, 0)
pUnit:SendChatMessage (12, 0, "Your life ends now!")
end
end
Function GhostofPast_Leave(pUnit, Event)
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Fools! You thought to challenge me?")
end
end
Function GhostofPast_Death(pUnit, Event)
pUnit:PlaySoundToSet(11803)
pUnit:SendChatMessage (12, 0, "You have far from won mortals")
pUnit:RemoveEvents();
end
RegisterUnitEvent(Spawn ID, 1, "GhostofPast_start")
RegisterUnitEvent(Spawn ID, 2, "GhostofPast_Leave")
RegisterUnitEvent(Spawn ID, 4, "GhostofPast_Death")
As before all feedback appreciated - And please point out any bugs.