Code:
local Random_Xx = math.random(1,3)
function Syth_OnEnterCombat(Unit, Event)
if Random_Xx==1 then
Unit:PlaySoundToSet(10503)
Unit:SendChatMessage(14, 0, "Hrrmm.. Time to.. hrrm.. make my move")
end
if Random_Xx==2 then
Unit:PlaySoundToSet(10504)
Unit:SendChatMessage(14, 0, "Nice pets..hrm.. Yes!")
end
if Random_Xx==3 then
Unit:PlaySoundToSet(10505)
Unit:SendChatMessage(14, 0, "Nice pets have.. weapons. No so..squawk..nice")
end
Unit:RegisterEvent("Checkhealth_zz", 1000, 0)
end
function Syth_Phase2(Unit, Event)
Unit:RemoveEvents()
Unit:RegisterEvent("Checkhealth_zyz", 1000, 0)
end
function Syth_Phase3(Unit, Event)
Unit:RemoveEvents()
Unit:RegisterEvent("Checkhealth_xyz", 1000, 0)
end
function Syth_Phase4(Unit, Event)
Unit:RemoveEvents()
end
function Checkhealth_zz(Unit, Event)
if Unit:GetHealthPct() =< 70 then
Unit:SpawnCreature(**<Creature ID Here>**, Unit:GetX(), Unit:GetY(), Unit:GetZ(), Unit:GetO(), 14, 150000)
Unit:RegisterEvent("Syth_Phase2", 1000, 1)
end
end
function Checkhealth_zyz(Unit, Event)
if Unit:GetHealthPct() =< 50 then
Unit:SpawnCreature(**<Creature ID Here>**, Unit:GetX(), Unit:GetY(), Unit:GetZ(), Unit:GetO(), 14, 150000)
Unit:RegisterEvent("Syth_Phase3", 1000, 1)
end
end
function Checkhealth_xyz(Unit, Event)
if Unit:GetHealthPct() =< 20 then
Unit:SpawnCreature(**<Creature ID Here>**, Unit:GetX(), Unit:GetY(), Unit:GetZ(), Unit:GetO(), 14, 150000)
Unit:RegisterEvent("Syth_Phase4", 1000, 1)
end
end
function Syth_OnLeaveCombat(Unit,Event)
Unit:RemoveEvents()
end
function Syth_OnDeath(Unit,Event)
Unit:RemoveEvents()
end
RegisterUnitEvent(18472, 1,"Syth_OnEnterCombat")
RegisterUnitEvent(18472, 2,"Syth_OnLeaveCombat")
RegisterUnitEvent(18472, 4,"Syth_OnDeath")
Whipped this up real quick, might not work, let me know how you get on, no spells or whatever so you can fill them in.