I've been reading up on Lua boss fights recently, and came up with a very basic boss script. If anyone could check it for errors and whatnot, that would be fantastic! Thanks!
function Boss_Say(pUnit, event)
pUnit:SendChatMessage(12, 0, "Prepare for Annihilation!")
pUnit:RegisterEvent("Boss_Phase1",1000, 0)
end
function Boss_Phase1(pUnit, event)
if pUnit:GetHealthPct() < 70 then
pUnit:CastSpell(11)
pUnit:RegisterEvent("Boss_Phase2",1000, 0)
end
end
function Boss_Phase2(pUnit, event)
if pUnit:GetHealthPct() < 30 then
pUnit:RemoveEvents()
end
end
function Boss_Start(pUnit, Event)
pUnit:RegisterEvent("Boss_Say",1000, 0)
end
RegisterUnitEvent(999989, 1, "Boss_Start")