Code:
----Scripted Entirerly by Stridharn----
----There are a few spells of which I chose not to include in the script----
----This Script is mainly to give the trash-mobs a more legit feeling----
function SpectralCharger(Unit, Event)
Unit:FullCastSpellOnTarget(29320, Unit:GetRandomPlayer(0))
end
RegisterUnitEvent(15547, 1, "SpectralCharger")
function SpectralStallion(Unit, Event)
Unit:FullCastSpellOnTarget(29320, Unit:GetRandomPlayer(0))
end
RegisterUnitEvent(15548, 1, "SpectralStallion")
function SpectralHand(Unit, Event)
local Choice=math.random(1, 3)
if Choice==1 then
Unit:SendChatMessage(14, 0, "Who brought theese foul creatures inside?")
elseif Choice==2 then
Unit:SendChatMessage(14, 0, "Who let you inside of Karazhan?")
elseif Choice==3 then
Unit:SendChatMessage(14, 0, "Where did You come from?")
Unit:FullCastSpellOnTarget(18812, Unit:GetRandomPlayer(0))
end
end
function SpectralHand_Die(Unit, Event)
Unit:SendChatMessage(14, 0, "Please, Don't - Ahhhh!")
end
RegisterUnitEvent(15551, 4, "SpectralHand_Die")
RegisterUnitEvent(15551, 1, "SpectralHand")
function SpectralApp(Unit, Event)
if Choice==1 then
Unit:SendChatMessage(14, 0, "I will defeat you!")
elseif Choice==2 then
Unit:SendChatMessage(14, 0, "I didn't know we had visitors!")
elseif Choice==3 then
Unit:SendChatMessage(14, 0, "You will not last long!")
Unit:FullCastSpellOnTarget(29618, Unit:GetRandomPlayer(4))
end
end
RegisterUnitEvent(16389, 1, "SpectralApp")
function SpectralChef(Unit, Event)
if Choice==1 then
Unit:SendChatMessage(14, 0, "On today's menu, Foul Mortals!")
elseif Choice==2 then
Unit:SendChatMessage(14, 0, "Who are you?! ")
elseif Choice==3 then
Unit:SendChatMessage(14, 0, "Ah, Visitors!")
Unit:FullCastSpellOnTarget(29665, Unit:GetMainTank())
end
end
RegisterUnitEvent(16411, 1, "SpectralChef")
function SpectralPatron(Unit, Event)
Unit:FullCastSpellOnTarget(29555, Unit:GetMainTank())
end
RegisterUnitEvent(16468, 1, "SpectralPatron")
function SpectralPerformer(Unit, Event)
Unit:FullCastSpellOnTarget(29679, Unit:GetRandomPlayer(4))
if Unit:GetHealthPct() < 99 then
Unit:RegisterEvent(Curtain, 1000, 1)
end
end
function Curtain(Unit, Event)
Unit:FullCastSpellOnTarget(29680, Unit:GetRandomPlayer(4))
end
RegisterUnitEvent(16473, 1, "SpectralPerformer")
RegisterUnitEvent(16473, 1, "Curatin")
function SpectralRetainer(Unit, Event)
Unit:SendChatMessage(14, 0, "Bleed!")
Unit:FullCastSpellOnTarget(29578, Unit:GetRandomPlayer(0))
end
RegisterUnitEvent(16410, 1, "SpectralRetainer")
function SpectralSentry(Unit, Event)
Unit:FullCastSpellOnTarget(29576, Unit:GetRandomPlayer(0))
end
RegisterUnitEvent(16424, 1, "SpectralSentry")
function SpectralServant(Unit, Event)
Unit:FullCastSpellOnTarget(29540, Unit:GetMainTank())
end
RegisterUnitEvent(16407, 1, "SpectralServant")
function PhantomGuest(Unit, Event)
Unit:FullCastSpellOnTarget(29930, Unit:GetRandomPlayer(0))
Unit:RegisterEvent(Immolate, 1000, 1)
end
function Immolate(Unit, Event)
Unit:FullCastSpellOnTarget(29928, Unit:GetRandomPlayer(0))
end
RegisterUnitEvent(16409, 1, "PhantomGuest")
RegisterUnitEvent(16409, 1, "Immolate")