Code:
function AllyPally_p1(pUnit, Event)
if pUnit:GetHealthPct() < 90 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Feel the bite of my blade horde scum!!")
pUnit:FullCastSpell(10308)
pUnit:CastSpell(36479)
pUnit:RegisterEvent("AllyPally_p2",1000, 0)
end
end
function AllyPally_p2(pUnit, Event)
if pUnit:GetHealthPct() < 80 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "For the Alliance!")
pUnit:FullCastSpell(10308)
pUnit:RegisterEvent("AllyPally_p3",1000, 0)
end
end
function AllyPally_p3(pUnit, Event)
if pUnit:GetHealthPct() < 72 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Fools you cannot defeat me I fight for the Alliance!")
pUnit:FullCastSpell(21152)
pUnit:RegisterEvent("AllyPally_p4",1000, 0)
end
end
function AllyPally_p4(pUnit, Event)
if pUnit:GetHealthPct() < 60 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Nothing may harm me! LIGHT GIVE ME STRENGTH")
pUnit:FullCastSpell(54322)
pUnit:CastSpell(48782)
pUnit:CastSpell(48782)
pUnit:CastSpell(48782)
pUnit:PlaySoundToSet(5833)
pUnit:RegisterEvent("AllyPally_p5",1000, 0)
end
end
function AllyPally_p5(pUnit, Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "I shall not be defeated!!")
punit:SpawnCreature(ID, x, y, z, o, 72, 120000)
pUnit:FullCastSpell(36479)
pUnit:RegisterEvent("AllyPally_p6",1000, 0)
end
end
function AllyPally_p6(pUnit, Event)
if pUnit:GetHealthPct() < 35 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "I fear no evil! For I am fear incarnate!")
pUnit:FullCastSpell(38840)
pUnit:CastSpell(48819)
pUnit:CastSpell(21152)
pUnit:CastSpell(48819)
pUnit:Castspell(21152)
pUnit:RegisterEvent("AllyPally_p7",1000, 0)
end
end
function AllyPally_p7(pUnit, Event)
if pUnit:GetHealthPct() < 20 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "To me my brothers!")
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
punit:SpawnCreature(ID, x+5, y+5, z, o, 72, 120000)
punit:SpawnCreature(ID, x+4, y+4, z, o, 72, 120000)
punit:SpawnCreature(ID, x+3, y+3, z, o, 72, 120000)
punit:SpawnCreature(ID, x+2, y+2, z, o, 72, 120000)
punit:SpawnCreature(ID, x+1, y+1, z, o, 72, 120000)
punit:CastSpell(21152)
pUnit:FullCastSpell(30852)
pUnit:RegisterEvent("AllyPally_p8",1000, 0)
end
end
function AllyPally_p8(pUnit, Event)
if pUnit:GetHealthPct() < 7 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "I will not die!")
pUnit:FullCastSpell(17683)
pUnit:RegisterEvent("AllyPally_p9",1000, 0)
end
end
function AllyPally_p9(pUnit, Event)
if pUnit:GetHealthPct() < 90 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "You fools refuse to die!")
pUnit:FullCastSpell(38921)
pUnit:RegisterEvent("AllyPally_p10",1000, 0)
end
end
function AllyPally_p10(pUnit, Event)
if pUnit:GetHealthPct() < 60 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "To me my brothers!")
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
punit:SpawnCreature(ID, x+5, y+5, z, o, 72, 120000)
punit:SpawnCreature(ID, x+4, y+4, z, o, 72, 120000)
punit:SpawnCreature(ID, x+3, y+3, z, o, 72, 120000)
punit:SpawnCreature(ID, x+2, y+2, z, o, 72, 120000)
punit:SpawnCreature(ID, x+1, y+1, z, o, 72, 120000)
pUnit:RegisterEvent("AllyPally_p11",1000, 0)
end
end
function AllyPally_p11(pUnit, Event)
if pUnit:GetHealthPct() < 30 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Get away from me fools!")
pUnit:CastSpell(21152)
pUnit:CastSpell(48819)
pUnit:CastSpell(32779)
pUnit:CastSpell(24199)
pUnit:RegisterEvent("AllyPally_p12",1000, 0)
end
end
function AllyPally_p12(pUnit, Event)
if pUnit:GetHealthPct() < 10 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Run from me!")
pUnit:FullCastSpell(5246)
end
end
function AllyPally_start(pUnit, Event)
pUnit:RegisterEvent("AllyPally_p1",1000, 0)
pUnit:SendChatMessage (12, 0, "Come! Face your doom!")
end
end
Function AllyPally_Leave(pUnit, Event)
pUnit:RemoveEvents();
pUnit:SendChatMessage (12, 0, "Hah! Not even a challenge!)
end
end
Function AllyPally_Death(pUnit, Event)
pUnit:PlaySoundToSet(11803)
pUnit:SendChatMessage (12, 0, How..? How can this be?)
pUnit:RemoveEvents();
end
RegisterUnitEvent(Insert spawn ID here, 1, "AllyPally_start")
RegisterUnitEvent(Insert spawn ID here, 2, "AllyPally_Leave")
RegisterUnitEvent(Insert spawn ID here, 4, "AllyPally_Death")
As I said, Its my first script so dont winge that its terrible or is very buggy. Feedback however positive or negative is appreciated.