Code:
------------------------------
--Conquerer Usathra
--GougeWow
--Made by jordddm
------------------------------
local npcid=99997
function Usathra_OnDeath(Unit, Event)
Unit:SendChatMessage(14, 0, "You have not seen the last of ME!")
Unit:RemoveEvents()
end
function Usathra_OnKillTarget(Unit, Event)
Unit:SendChatMessage(14, 0, "1 down! only few more to go!")
end
function Usathra_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
end
RegisterUnitEvent(99997,1,"Usathra_OnCombat")
RegisterUnitEvent(99997,4,"Usathra_OnDeath")
RegisterUnitEvent(99997,3,"Usathra_OnKillTarget")
RegisterUnitEvent(99997,2,"Usathra_OnLeaveCombat")
-- OnCombat --
local plr = Unit:GetClosestPlayer()
local tank = Unit:GetMainTank()
local plrMana = Unit:GetRandomPlayer(4)
function Usathra_OnCombat(Unit,Event)
if plr == nil then
Unit:SendChatMessage(14, 0, "Lets see how you like my pyro on your ass!")
else
Unit:FullCastSpellOnTarget(31263,tank)
if tank == nil then
Unit:SendChatMessage(14, 0, "Seeing as your friend is not here lets see what you can do! you worthless Mana users!")
Unit:FullCastSpellOnTarget(38538,plr)
Unit:FullCastSpellOnTarget(61591,plrMana)
if plr == nil then
if plrMana == nil then
return
Unit:RegisterEvent("Usathra_At75", 100, 0)
end
end
end
end
end
-- Phase One --
function Usathra_At75(Unit,Event)
if Unit:GetHealthPct() < 75 then
Unit:SendChatMessage(14, 0, "Hmm youre tougher than i thought no matter you will be disposed of pretty soon!")
else
Unit:FullCastSpell(29973,plr)
if plr == nil then
Unit:FullCastSpell(31250,plrMana)
Unit:FullCastSpell(61594,plrMana)
if plrMana == nil then
return
Unit:RegisterEvent("Usathra_Minions1", 100, 0)
end
end
end
end
-- Minions 1-3 --
function Usathra_Minions1(Unit,Event)
if Unit:GetHealthPct() < 35 then
Unit:SpawnCreature(11121,3708.236572,3573.539795,477.444366,6.093113,14,60000);
Unit:SpawnCreature(11122,3770.843506,3560.783936,477.441742,2.931886,14,60000);
Unit:RegisterEvent("Usathra_Minions2", 60000, 1)
end
end
function Usathra_Minions2(Unit,Event)
if Unit:GetHealthPct() < 35 then
local X = Unit:GetX()
local Y = Unit:GetY()
local Z = Unit:GetZ()
local O = Unit:GetO()
Unit:SpawnCreature(11121,3757.075430,3563.169434,477.441986,2.957025,14,60000);
Unit:SpawnCreature(11122,3721.801270,3570.813232,477.441193,6.060132,14,60000);
Unit:RegisterEvent("Usathra_Minions3", 100, 0)
end
end
local X = Unit:GetX()
local Y = Unit:GetY()
local Z = Unit:GetZ()
local O = Unit:GetO()
local npc1 = Unit:GetCreatureNearestCoords(X,Y,Z,11121)
local npc2 = Unit:GetCreatureNearestCoords(X,Y,Z,11122)
function Usathra_Minions3(Unit,Event)
if npc1:IsDead() == 1 and npc2:IsDead() == 1 then
Unit:SpawnCreature(28583,X,Y,Z,45,0)
Unit:SpawnCreature(23870,X,Y,Z,45,0)
end
end
--- Minion 1s spells --
function Ashudar_OnDeath(Unit, Event)
Unit:SendChatMessage(12, 0, "Hmm you were tougher than i thought...")
Unit:RemoveEvents()
end
function Ashudar_OnKillTarget(Unit, Event)
Unit:SendChatMessage(12, 0, "Pathetic!")
end
function Ashudar_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
end
RegisterUnitEvent(11121,1,"Ashudar_Spell1OnCombat")
RegisterUnitEvent(11121,4,"Ashudar_OnDeath")
RegisterUnitEvent(11121,3,"Ashudar_OnKillTarget")
RegisterUnitEvent(11121,2,"Ashudar_OnLeaveCombat")
function Ashudar_Spell1OnCombat(Unit,Event)
Unit:FullCastSpellOnTarget(15708,tank)
if tank == nil then
Unit:FullCastSpellOnTarget(54469,plr)
Unit:FullCastSpellOnTarget(49723,plr)
Unit:FullCastSpellOnTarget(51429,plr)
if plr == nil then
Unit:FullCastSpellOnTarget(29881,plrMana)
Unit:FullCastSpellOnTarget(25195,plrMana)
if plrMana == nil then
return
Unit:RegisterEvent("Ashudar_Spell2", 1000, 0)
end
end
end
end
function Ashudar_Spell2(Unit,Event)
Unit:FullCastSpellOnTarget(15708,tank)
if tank == nil then
Unit:FullCastSpellOnTarget(54469,plr)
Unit:FullCastSpellOnTarget(49723,plr)
Unit:FullCastSpellOnTarget(51429,plr)
if plr == nil then
Unit:FullCastSpellOnTarget(29881,plrMana)
Unit:FullCastSpellOnTarget(25195,plrMana)
if plrMana == nil then
return
end
end
end
end
--- Minion 2s Spells --
function Eunganda_OnDeath(Unit, Event)
Unit:SendChatMessage(12, 0, "Sorry master... i have... Failed.....")
Unit:RemoveEvents()
end
function Eunganda_OnKillTarget(Unit, Event)
Unit:SendChatMessage(12, 0, "what a pathetic bunch of rubble you really are!")
end
function Eunganda_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
end
RegisterUnitEvent(11122,1,"Eunganda_Spell1OnCombat")
RegisterUnitEvent(11122,4,"Eunganda_OnDeath")
RegisterUnitEvent(11122,3,"Eunganda_OnKillTarget")
RegisterUnitEvent(11122,2,"Eunganda_OnLeaveCombat")
function Eunganda_Spell1OnCombat(Unit,Event)
Unit:FullCastSpellOnTarget(15708,tank)
if tank == nil then
Unit:FullCastSpellOnTarget(36868,plr)
Unit:FullCastSpellOnTarget(31345,plr)
Unit:FullCastSpellOnTarget(58536,plr)
if plr == nil then
Unit:FullCastSpellOnTarget(47864,plrMana)
Unit:FullCastSpellOnTarget(47813,plrMana)
Unit:FullCastSpellOnTarget(31705,plrMana)
if plrMana == nil then
return
Unit:RegisterEvent("Eunganda_Spell2", 500, 0)
end
end
end
end
function Eunganda_Spell2(Unit,Event)
Unit:FullCastSpellOnTarget(15708,tank)
if tank == nil then
Unit:FullCastSpellOnTarget(36868,plr)
Unit:FullCastSpellOnTarget(31345,plr)
Unit:FullCastSpellOnTarget(58536,plr)
if plr == nil then
Unit:FullCastSpellOnTarget(47864,plrMana)
Unit:FullCastSpellOnTarget(47813,plrMana)
Unit:FullCastSpellOnTarget(31705,plrMana)
if plrMana == nil then
return
end
end
end
end