Code:
function Boss_OnCombat(pUnit, Event)
pUnit:SendChatMessage(14, 0, "Your not prepared!")
pUnit:RegisterEvent("Archavon_Summon", 100, 1)
pUnit:RegisterEvent("Boss_PhaseOne", 1000, 1)
pUnit:FullCastSpellOnTarget(58695, pUnit:GetMainTank())
end
function Boss_PhaseOne(pUnit, Event)
if pUnit:GetHealthPct() < 80 then
pUnit:RegisterEvent("Boss_PhaseTwo", 100, 1)
pUnit:FullCastSpellOnTarget(58963, pUnit:GetClosestPlayer())
else
pUnit:RegisterEvent("Boss_PhaseOne", 1000, 1)
end
end
function Boss_PhaseTwo(pUnit, Event)
if pUnit:GetHealthPct() < 75 then
pUnit:RegisterEvent("Boss_PhaseThree", 100, 1)
pUnit:FullCastSpellOnTarget(58663,pUnit:GetClosestPlayer())
else
pUnit:RegisterEvent("Boss_PhaseTwo", 1000, 1)
end
end
function Boss_PhaseThree(pUnit, Event)
if pUnit:GetHealthPct() < 70 then
pUnit:RegisterEvent("Boss_PhaseFour", 100, 1)
pUnit:SendChatMessage(14,0,"You cannot kill me")
pUnit:FullCastSpellOnTarget(58666,pUnit:Getmaintank())
else
pUnit:RegisterEvent("Boss_PhaseThree", 1000, 1)
end
end
function Boss_PhaseFour(pUnit, Event)
if pUnit:GetHealthPct() < 62 then
pUnit:RegisterEvent("Boss_PhaseFive", 100, 1)
pUnit:RegisterEvent("Archavon_Summon", 100, 1)
pUnit:SendChatMessage(14,0,"Minion Get them!")
else
pUnit:RegisterEvent("Boss_PhaseFour", 1000, 1)
end
end
function Boss_PhaseFive(pUnit, Event)
if pUnit:GetHealthPct() < 58 then
pUnit:RegisterEvent("Boss_PhaseSix", 100, 1)
pUnit:FullCastSpellOnTarget(58695,pUnit:GetClosestPlayer())
else
pUnit:RegisterEvent("Boss_PhaseFive", 1000, 1)
end
end
function Boss_PhaseSix(pUnit, Event)
if pUnit:GetHealthPct() < 55 then
pUnit:RegisterEvent("Boss_PhaseSeven", 100, 1)
pUnit:SendChatMessage(14,0,"You cannot kill me")
pUnit:FullCastSpellOnTarget(58666,pUnit:Getmaintank())
else
pUnit:RegisterEvent("Boss_PhaseSix", 1000, 1)
end
end
function Boss_PhaseSeven(pUnit, Event)
pUnit:FullCastSpellOnTarget(58666, pUnit:GetMainTank())
if pUnit:GetHealthPct() < 45 then
pUnit:RegisterEvent("Boss_PhaseEight", 100, 1)
pUnit:RegisterEvent("Archavon_Summon", 100, 1)
pUnit:SendChatMessage(14, 0, "Minion Get them!")
pUnit:FullCastSpellOnTarget(58695,pUnit:GetMainTank())
else
pUnit:RegisterEvent("Boss_PhaseSeven", 1000, 1)
end
end
function Boss_PhaseEight(pUnit, Event)
pUnit:FullCastSpellOnTarget(58695, pUnit:GetClosestPlayer())
if pUnit:GetHealthPct() < 35 then
pUnit:RegisterEvent("Boss_PhaseNine", 100, 1)
pUnit:SendChatMessage(14,0,"Getting weak...")
else
pUnit:RegisterEvent("Boss_PhaseEight", 1000, 1)
end
end
function Boss_PhaseNine(pUnit, Event)
pUnit:FullCastSpellOnTarget(58965,pUnit:GetClosestPlayer())
if pUnit:GetHealthPct() < 29 then
pUnit:RegisterEvent("Boss_PhaseTen", 100, 1)
pUnit:FullCastSpellOnTarget(58666,pUnit:GetClosestPlayer())
else
pUnit:RegisterEvent("Boss_PhaseNine", 1000, 1)
end
end
function Boss_PhaseTen(pUnit, Event)
pUnit:FullCastSpellOnTarget(58695, pUnit:GetClosestPlayer())
if pUnit:GetHealthPct() < 25 then
pUnit:RegisterEvent("Boss_PhaseTen", 100, 1)
pUnit:SendChatMessage(14,0,"You cannot kill me!")
pUnit:FullCastSpellOnTarget(58963,pUnit:Getmaintank())
else
pUnit:RegisterEvent("Boss_PhaseTen", 1000, 1)
end
end
function Boss_PhaseEleven(pUnit, Event)
pUnit:FullCastSpellOnTarget(58695, pUnit:GetClosestPlayer())
if pUnit:GetHealthPct() < 20 then
pUnit:RegisterEvent("Boss_PhaseTwelve", 1000, 0)
pUnit:SendChatMessage(14,0,"Minion Get them!")
pUnit:RegisterEvent("Archavon_Summon", 100, 1)
pUnit:FullCastSpellOnTarget(58963,pUnit:Getmaintank())
else
pUnit:RegisterEvent("Boss_PhaseEleven", 1000, 1)
end
end
function Boss_PhaseTwelve(pUnit, Event)
pUnit:FullCastSpellOnTarget(58965,pUnit:GetClosestPlayer())
end
function Archavon_Summon(pUnit, Event)
x = pUnit:GetX();
y = pUnit:GetY();
z = pUnit:GetZ();
o = pUnit:GetO();
pUnit:SpawnCreature(32353, x, y, z, o,45000);
end
function Boss_OnDied(pUnit, Event)
pUnit:SendChatMessage(14,0,"Im sorry i failed you Emalon")
end
RegisterUnitEvent(31125, 4, "Boss_OnDied")
RegisterUnitEvent(31125, 1, "Boss_OnCombat")
The code above should work, If its doing something you don't want it to do post whats wrong back here and i'll try and fix it.