Code:
print("------Made by P1raten-----")
print("--Report bugs to mmowned--")
local BoneSpin = 0
local LordMarrowgar
local Fire
local Heroic = {}
function LordMarrowgar_OnSpawn (pUnit, Event)
LordMarrowgar = pUnit
end
function Fire_OnSpawn (pUnit, Event)
Fire = pUnit
Fire:RegisterEvent("Fire_Tick", 1000, 0)
end
function Fire_Tick (pUnit, Event)
if (Heroic[id].RaidType == 1 ) then
Fire:CastSpell(69146)
elseif ( Heroic[id].RaidType == 2) then
Fire:CastSpell(70823)
elseif (Heroic[id].RaidType == 3) then
Fire:CastSpell(70824)
elseif (Heroic[id].RaidType == 4) then
Fire:CastSpell(70825)
end
end
function LordMarrowgar_RaidType (pUnit, Event)
local id = LordMarrowgar:GetInstanceId()
if (LordMarrowgar:GetDungeonDifficulty() == 0) then -- 10man
Heroic[id].RaidType = 1
elseif (LordMarrowgar:GetDungeonDifficulty() == 1) then -- 25 man
Heroic[id].RaidType = 2
elseif (LordMarrowgar:GetDungeonDifficulty() == 2) then -- 10man h
Heroic[id].RaidType = 3
elseif (LordMarrowgar:GetDungeonDifficulty() == 3) then -- 25man h
Heroic[id].RaidType = 4
end
end
function LordMarrowgar_OnCombat (pUnit, Event)
LordMarrowgar:SendChatMessage(14, 0, "The Scourge will wash over this world as a swarm of death and destruction!")
LordMarrowgar:PlaySoundToSet(16941)
LordMarrowgar:RegisterEvent("LordMarrowgar_RaidType", 1, 1)
LordMarrowgar:RegisterEvent("LordMarrowgar_BoneStorm", 30000, 0)
LordMarrowgar:RegisterEvent("LordMarrowgar_SabLash", 7000, 0)
LordMarrowgar:RegisterEvent("LordMarrowgar_BonSpike", 14000, 0)
LordMarrowgar:RegisterEvent("LordMarrowgar_ColdFlame", 6000, 0)
end
function LordMarrowgar_ColdFlame (pUnit, Event)
local ranx = math.random(6, 16)
local rany = math.random(6, 16)
local flametick = flametick + 1
if (flametick == 1) then
LordMarrowgar:SpawnCreature(flame, ranx, rany, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
end
if (flametick == 2) then
local x = ranx + 4
local y = rany + 4
LordMarrowgar:SpawnCreature(flame, x, y, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
end
if (flametick == 3) then
local x = ranx + 8
local y = rany + 8
LordMarrowgar:SpawnCreature(flame, x, y, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
end
if (flametick == 4) then
local x = ranx + 12
local y = rany + 12
LordMarrowgar:SpawnCreature(flame, x, y, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
end
if (flametick == 5) then
flametick = 0
end
end
function LordMarrowgar_SabLash (pUnit, Event)
local plr = LordMarrowgar:GetMainTank()
if (plr ~= nil) then
if (Heroic[id].RaidType == 1 ) then
LordMarrowgar:FullCastSpellOnTarget(71021, plr)
elseif (Heroic[id].RaidType == 2) then
LordMarrowgar:FullCastSpellOnTarget(70814, plr)
elseif (Heroic[id].RaidType == 3) then
LordMarrowgar:FullCastSpellOnTarget(71021, plr)
elseif (Heroic[id].RaidType == 4) then
LordMarrowgar:FullCastSpellOnTarget(70814, plr)
end
end
end
function LordMarrowgar_BoneSpike (pUnit, Event)
local plr = LordMarrowgar:GetRandomPlayer(0)
if (plr ~= nil) then
if (Heroic[id].RaidType == 1 ) then
LordMarrowgar:FullCastSpellOnTarget(69057, plr)
elseif ( Heroic[id].RaidType == 2) then
LordMarrowgar:FullCastSpellOnTarget(69057, plr)
elseif (Heroic[id].RaidType == 3) then
LordMarrowgar:FullCastSpellOnTarget(69057, plr)
elseif (Heroic[id].RaidType == 4) then
LordMarrowgar:FullCastSpellOnTarget(69057, plr)
end
end
local chancesay = math.random (1, 3)
if (chancesay == 1) then
LordMarrowgar:SendChatMessage(14, 0, "Bound by bone!")
LordMarrowgar:PlaySoundToSet(16947)
elseif (chancesay == 2) then
LordMarrowgar:SendChatMessage(14, 0, "Stick Around!")
LordMarrowgar:PlaySoundToSet(16948)
elseif (chancesay == 3) then
LordMarrowgar:SendChatMessage(14, 0, "The only escape is death!")
LordMarrowgar:PlaySoundToSet(16949)
end
end
function LordMarrowgar_BoneStorm (pUnit, Event)
LordMarrowgar:RemoveEvents()
LordMarrowgar:Root()
LordMarrowgar:FullCastSpell(69076)
LordMarrowgar:SendChatMessage(14, 0, "BONE STORM!")
LordMarrowgar:SendChatMessage(42, 0, "BONE STORM!")
LordMarrowgar:PlaySoundToSet(16946)
LordMarrowgar:RegisterEvent("BoneStorm_ColdFlame", 4000, 0)
LordMarrowgar:RegisterEvent("BoneStorm_Move", 15000, 0)
LordMarrowgar:RegisterEvent("BoneStorm_Stop", 60000, 1)
end
function BoneStorm_ColdFlame (pUnit, Event)
local ranx = math.random(6, 16)
local rany = math.random(6, 16)
local flametickB = flametickB + 1
if (flametickB == 1) then
local x1 = ranx + 5
local y1 = rany - 5
--
local x2 = ranx - 5
local y2 = rany + 5
--
local x3 = ranx + 5
local y3 = rany + 5
--
local x4 = ranx - 5
local y4 = rany - 5
LordMarrowgar:SpawnCreature(flame, x1, y1, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x2, y2, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x3, y3, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x4, y4, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
end
if (flametickB == 2) then
local x1 = ranx + 10
local y1 = rany - 10
local x2 = ranx - 10
local y2 = rany + 10
local x3 = ranx + 10
local y3 = rany + 10
local x4 = ranx - 10
local y4 = rany - 10
LordMarrowgar:SpawnCreature(flame, x1, y1, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x2, y2, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x3, y3, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x4, y4, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
end
if (flametickB == 3) then
local x1 = ranx + 15
local y1 = rany - 15
local x2 = ranx - 15
local y2 = rany + 15
local x3 = ranx + 15
local y3 = rany + 15
local x4 = ranx - 15
local y4 = rany - 15
LordMarrowgar:SpawnCreature(flame, x1, y1, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x2, y2, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x3, y3, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x4, y4, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
end
if (flametickB == 4) then
local x1 = ranx + 25
local y1 = rany - 25
local x2 = ranx - 25
local y2 = rany + 25
local x3 = ranx + 25
local y3 = rany + 25
local x4 = ranx - 25
local y4 = rany - 25
LordMarrowgar:SpawnCreature(flame, x1, y1, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x2, y2, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x3, y3, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
LordMarrowgar:SpawnCreature(flame, x4, y4, LordMarrowgar:GetZ(), LordMarrowgar:GetO(), 14, 0)
end
if (flametickB == 5) then
flametickB = 0
end
end
function BoneStorm_Move (pUnit, Event)
local plr = LordMarrowgar:GetRandomPlayer(0)
LordMarrowgar:Unroot()
if (plr ~= nil) then
local x = plr:GetX()
local y = plr:GetY()
local z = plr:GetZ()
LordMarrowgar:ModifyRunSpeed(18)
LordMarrowgar:MoveTo(x, y, z)
LordMarrowgar:RegisterEvent("BoneStorm_Root", 4000, 0)
end
end
function BoneStorm_Root (pUnit, Event)
LordMarrowgar:Root()
end
function BoneStorm_Stop (pUnit, Event)
LordMarrowgar:RemoveEvents()
LordMarrowgar:Unroot()
LordMarrowgar:RemoveAura(69076)
LordMarrowgar:ClearThreatList()
LordMarrowgar:RegisterEvent("LordMarrowgar_OnCombat", 1, 1)
end
function LordMarrowgar_OnKillPlr (pUnit, Event)
local chance = math.random(1, 2)
if (chance == 1) then
LordMarrowgar:SendChatMessage(14, 0, "More bones for the offering!")
LordMarrowgar:PlaySoundToSet(16942)
else
LordMarrowgar:PlaySoundToSet(16943)
LordMarrowgar:SendChatMessage(14, 0, "Languish in damnation!")
end
end
function LordMarrowgar_OnDeath (pUnit, Event)
LordMarrowgar:RemoveEvents()
Fire:RemoveEvents()
LordMarrowgar:PlaySoundToSet(16944)
LordMarrowgar:SendChatMessage(12, 0, "I see... only darkness...")
end
function LordMarrowgar_OnLeaveCombat (pUnit, Event)
LordMarrowgar:RemoveEvents()
Fire:RemoveEvents()
end
RegisterUnitEvent(36612, 1, "LordMarrowgar_OnCombat")
RegisterUnitEvent(36612, 2, "LordMarrowgar_OnLeaveCombat")
RegisterUnitEvent(36612, 3, "LordMarrowgar_OnKillPlr")
RegisterUnitEvent(36612, 4, "LordMarrowgar_OnDeath")
Bookmarks