function Enixxus_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "How do you dare to come to my lair!!!!!")
Unit:RegisterEvent("Enixxusspell1_Doom", 1000, 12)
Unit:RegisterEvent("Enixxusspell2_Destruction", 1000, 15)
Unit:RegisterEvent("Enixxusspell3_ImpendingDeath", 1000, 20)
Unit:RegisterEvent("EnixxusSpawn_spawn",1000,10)
Unit:RegisterEvent("Enixxusspell4_WrathOfEnixxus", 1000, 6)
Unit:RegisterEvent("Enixxusspell1_Doom", 1000, 12)
Unit:RegisterEvent("Enixxusspell2_Destruction", 1000, 15)
Unit:RegisterEvent("Enixxusspell3_ImpendingDeath", 1000, 20)
Unit:RegisterEvent("Enixxusspell4_WrathOfEnixxus", 1000, 6)
Unit:RegisterEvent("EnixxusSpawn_spawn",1000000,2)
Unit:RegisterEvent("EnixxusSpawn_spawn",1000000,2)
Unit:RegisterEvent("EnixxusSpawn_spawn",1000000,2)
Unit:RegisterEvent("Enixxusspell4_WrathOfEnixxus", 1000, 6)
Unit:RegisterEvent("EnixxusSpawn_spawn",1000000,2)
Unit:RegisterEvent("EnixxusSpawn_spawn",1000000,2)
end
function Enixxusspell1_Doom(pUnit, Event)
pUnit:FullCastSpellOnTarget(30910, pUnit:GetRandomPlayer(4))
end
function Enixxusspell2_Destruction(pUnit, Event)
pUnit:FullCastSpellOnTarget(38533, pUnit:GetRandomPlayer())
end
function Enixxusspell3_ImpendingDeath(pUnit, Event)
pUnit:FullCastSpellOnTarget(19702, pUnit:GetRandomPlayer(4))
end
function Enixxusspell4_WrathOfEnixxus(pUnit, Event)
pUnit:FullCastSpellOnTarget(20566, pUnit:GetRandomPlayer(4))
end
function EnixxusSpawn_Spawn(pUnit, Event)
pUnit:SpawnCreature(99998, -20.268818, -214.022720, -88.957336, 3.194836, 14, 100000)
end
function EnixxusBoom_Boom(pUnit, Event)
pUnit:CastSpell(38197, pUnit:GetMainTank())
end
function EnixxusSpawn_spawn(pUnit, Event)
if pUnit:GetHealthPct() < 30 then
Unit:RemoveEvents()
Unit:SendChatMessage(12, 0, "Come my minions!!!!!")
pUnit:RegisterEvent("Enixxusspawn_Spawn",1000000,2)
end
end
function Enixxus_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
Unit:SendChatMessage(12, 0, "Death!")
end
function Enixxus_OnDied(Unit, Event)
Unit:RemoveEvents()
Unit:SendChatMessage(12, 0, "NOOOO!YOU CAN'T KILL THE GOD OF DEATH!!!!")
end
function Enixxus_OnKilledTarget(Unit, Event)
Unit:SendChatMessage(12, 0, "DEATH!")
end
RegisterUnitEvent(99999, 1, "Enixxus_OnCombat")
RegisterUnitEvent(99999, 2, "Enixxus_OnLeaveCombat")
RegisterUnitEvent(99999, 3, "Enixxus_OnKilledTarget")
RegisterUnitEvent(99999, 4, "Enixxus_OnDied")