function Iceguardiancorrupt_Icebolt1(unit, Event)
local plr = unit:GetRandomPlayer(0)
if (plr ~= nil) then
unit:FullCastSpellOnTarget(31249, plr)
unit:SendChatMessage(12, 0, "You die now!")
unit:PlaySoundToSet (8877)
end
end
function Iceguardiancorrupt_Blizzard1(unit, Event)
unit:CastSpell(37262)
unit:SendChatMessage(12, 0, "Now you feel pain!")
unit:PlaySoundToSet (8871)
end
function Iceguardiancorrupt_Frostbreath1(unit, Event)
local plr = unit:GetRandomPlayer(0)
if (plr ~= nil) then
unit:FullCastSpellOnTarget(31688, unit:GetRandomPlayer(0))
unit:SendChatMessage(12, 0, "KILL!")
unit:PlaySoundToSet (8867)
end
end
function Iceguardiancorrupt_Icetomb1(unit, Event)
unit:FullCastSpellOnTarget(29670, unit:GetRandomPlayer(0))
end
function Iceguardiancorrupt_OnEnterCombat(unit, Event)
unit:SendChatMessage(12, 0, "You are too late... I... must... OBEY!")
unit:PlaySoundToSet (8872)
unit:PlaySoundToSet (11700)
unit:RegisterEvent("Iceguardiancorrupt_Icebolt1",25000, 25)
unit:RegisterEvent("Iceguardiancorrupt_Icetomb1",40000, 25)
unit:RegisterEvent("Iceguardiancorrupt_Blizzard1",30000, 25)
unit:RegisterEvent("Iceguardiancorrupt_Frostbreath1",27000, 10)
end
function Iceguardiancorrupt_OnLeaveCombat(unit)
unit:RemoveEvents()
end
function Iceguardiancorrupt_Death(unit)
unit:SendChatMessage(12, 0, "Thank..you..")
unit:PlaySoundToSet (8870)
unit:RemoveEvents()
end
RegisterUnitEvent(65039, 1, "Iceguardiancorrupt_OnEnterCombat")
RegisterUnitEvent(65039, 2, "Iceguardiancorrupt_OnLeaveCombat")
RegisterUnitEvent(65039, 4, "Iceguardiancorrupt_Death")