Code:
local SpawnID = 31404
local NPCNAME = Fearbringer
local SPAWNNAME = Supremus
local NPCID = 22898
-- --
-- Start function --
-- --
function NPCNAME_OnEnterCombat(pUnit,Event)
pUnit:SetModel(13730)
pUnit:PlaySoundToSet(14063)
pUnit:CastSpell(48263)
pUnit:SetScale(2)
pUnit:SetCombatCapable(1)
pUnit:SetFaction(35)
pUnit:SendChatMessage(12, 0, "Once...")
pUnit:RegisterEvent("NPCNAME_TalkStart1", 5000, 0)
end
-- --
-- Cinematic --
-- --
function NPCNAME_TalkStart1(pUnit,Event)
pUnit:RemoveEvents()
pUnit:SetCombatCapable(1)
pUnit:PlaySoundToSet(14063)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnGameObject(19999, x, y, z, o, 2000)
pUnit:MoveTo(x, y+5, z, o)
pUnit:SendChatMessage(12, 0, "Once I was just a normal guy. Wife, kids, a job...")
pUnit:RegisterEvent("NPCNAME_TalkStart2", 4550, 0)
end
function NPCNAME_TalkStart2(pUnit,Event)
pUnit:RemoveEvents()
pUnit:StopMovement(2000)
pUnit:SetCombatCapable(1)
pUnit:PlaySoundToSet(14063)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnGameObject(19999, x, y, z, o, 2000)
pUnit:MoveTo(x, y-5, z, o)
pUnit:SendChatMessage(12, 0, "Then it came. bursts of wind blew through my hair while I was out caring for the crops in the field.")
pUnit:RegisterEvent("NPCNAME_TalkStart3", 6000, 0)
end
function NPCNAME_TalkStart3(pUnit,Event)
pUnit:RemoveEvents()
pUnit:StopMovement(2000)
pUnit:SetCombatCapable(1)
pUnit:PlaySoundToSet(14063)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:MoveTo(x+5, y, z, o)
pUnit:SendChatMessage(12, 0, "I felt the energies of the mystic force, it was overwhelming!")
pUnit:RegisterEvent("NPCNAME_TalkStart4", 6000, 0)
end
function NPCNAME_TalkStart4(pUnit,Event)
pUnit:RemoveEvents()
pUnit:StopMovement(2000)
pUnit:SetCombatCapable(1)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnGameObject(19999, x, y, z, o, 2000)
pUnit:MoveTo(x-5, y, z, o)
pUnit:SendChatMessage(12, 0, "Arthas - The lich king himself - has chosen me, a lowly farmer from the plains of Arathi, to become his minion for the festive season!")
pUnit:RegisterEvent("NPCNAME_TalkStart5", 6000, 0)
end
function NPCNAME_TalkStart5(pUnit,Event)
pUnit:RemoveEvents()
pUnit:StopMovement(2000)
pUnit:SetCombatCapable(1)
pUnit:PlaySoundToSet(14063)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnGameObject(19999, x, y, z, o, 2000)
pUnit:MoveTo(x+2, y+2, z, o)
pUnit:SendChatMessage(12, 0, "Now that I have the power of the frost I can ridicule scum like you that used to ruin my trade!")
pUnit:RegisterEvent("NPCNAME_TalkStart6", 8000, 0)
end
function NPCNAME_TalkStart6(pUnit,Event)
pUnit:RemoveEvents()
pUnit:SetCombatCapable(0)
pUnit:PlaySoundToSet(13783)
pUnit:SetScale(5)
pUnit:SetFaction(7)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:MoveTo(x-2, y-2, z, o)
pUnit:SpawnGameObject(186559, x, y+5, z, o, 120000)
pUnit:SpawnGameObject(186559, x, y-5, z, o, 120000)
pUnit:SpawnGameObject(186559, x+5, y, z, o, 120000)
pUnit:SpawnGameObject(186559, x-5, y, z, o, 120000)
pUnit:SendChatMessage(12, 0, "Now, you shall pay the price!")
pUnit:RegisterEvent("NPCNAME_Morph1", 1000, 0)
pUnit:RegisterEvent("NPCNAME_SpellFrostBlast", 20000, 0)
pUnit:RegisterEvent("NPCNAME_SpellFrostArrow", 18000, 0)
pUnit:RegisterEvent("NPCNAME_SpellFrostBurn", 15000, 0)
end
-- --
-- Spells --
-- --
function NPCNAME_SpellFrostBlast(pUnit,Event)
pUnit:CastSpellOnTarget(27808,pUnit:GetRandomPlayer(0))
pUnit:CastSpellOnTarget(27808,pUnit:GetRandomPlayer(0))
end
function NPCNAME_SpellFrostArrow(pUnit,Event)
pUnit:CastSpellOnTarget(56095,pUnit:GetRandomPlayer(0))
pUnit:CastSpellOnTarget(56095,pUnit:GetRandomPlayer(0))
end
function NPCNAME_SpellFrostBurn(pUnit,Event)
Choice=math.random(1, 2)
if Choice==1 then
pUnit:CastSpellOnTarget(23189,pUnit:GetRandomPlayer(7))
end
if Choice==2 then
pUnit:CastSpellOnTarget(51857,pUnit:GetMainTank())
end
end
-- --
-- Phases with spawns --
-- --
function NPCNAME_Morph1(pUnit,Event)
if pUnit:GetHealthPct() <= 90 then
pUnit:RemoveEvents()
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
print "Snowman.lua - 90% HP"
pUnit:CastSpell(48263)
pUnit:SpawnCreature(SpawnID, x-2, y, z, o, 20, 0)
pUnit:CastSpellAoF(x+5, y+2, z, 61603)
pUnit:CastSpellAoF(x+2, y+5, z, 61603)
pUnit:CastSpellAoF(x, y, z, 61603)
pUnit:RegisterEvent("NPCNAME_Morph2", 1000, 0)
end
end
function NPCNAME_Morph2(pUnit,Event)
if pUnit:GetHealthPct() <= 82 then
pUnit:RemoveEvents()
pUnit:CastSpell(48263)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnCreature(SpawnID, x-2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x+2, y, z, o, 20, 0)
pUnit:RegisterEvent("NPCNAME_Morph3", 1000, 0)
end
end
function NPCNAME_Morph3(pUnit,Event)
if pUnit:GetHealthPct() <= 71 then
pUnit:RemoveEvents()
pUnit:CastSpell(48263)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnCreature(SpawnID, x-2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x+2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x, y+2, z, o, 20, 0)
pUnit:RegisterEvent("NPCNAME_Morph4", 1000, 0)
end
end
function NPCNAME_Morph4(pUnit,Event)
if pUnit:GetHealthPct() <= 64 then
pUnit:RemoveEvents()
pUnit:CastSpell(48263)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnCreature(SpawnID, x-2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x+2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x, y+2, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x, y-2, z, o, 20, 0)
pUnit:RegisterEvent("NPCNAME_Morph5", 1000, 0)
end
end
function NPCNAME_Morph5(pUnit,Event)
if pUnit:GetHealthPct() <= 50 then
print "Snowman.lua at 50%. Inscent burners should be despawned by now."
pUnit:RemoveEvents()
pUnit:CastSpell(48263)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnCreature(SpawnID, x-2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x+2, y, z, o, 20, 0)
pUnit:RegisterEvent("NPCNAME_Morph6", 1000, 0)
end
end
function NPCNAME_Morph6(pUnit,Event)
if pUnit:GetHealthPct() <= 42 then
pUnit:RemoveEvents()
pUnit:CastSpell(48263)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnCreature(SpawnID, x-2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x+2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x, y+3, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x, y-3, z, o, 20, 0)
pUnit:RegisterEvent("NPCNAME_Morph7", 1000, 0)
end
end
function NPCNAME_Morph7(pUnit,Event)
if pUnit:GetHealthPct() <= 32 then
pUnit:RemoveEvents()
pUnit:CastSpell(48263)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnCreature(SpawnID, x-2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x+2, y, z, o, 20, 0)
pUnit:RegisterEvent("NPCNAME_Morph8", 1000, 0)
end
end
function NPCNAME_Morph8(pUnit,Event)
if pUnit:GetHealthPct() <= 24 then
pUnit:RemoveEvents()
pUnit:CastSpell(48263)
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnCreature(SpawnID, x-2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x+2, y, z, o, 20, 0)
pUnit:SpawnCreature(SpawnID, x, y+1, z, o, 20, 0)
pUnit:RegisterEvent("NPCNAME_Morph9", 1000, 0)
end
end
function NPCNAME_Morph9(pUnit,Event)
if pUnit:GetHealthPct() <= 15 then
pUnit:RemoveEvents()
pUnit:CastSpell(48263)
pUnit:SendChatMessage(14, 0, "Enrage!")
pUnit:SetScale(6)
pUnit:RegisterEvent("NPCNAME_Morph10", 1000, 0)
end
end
function NPCNAME_Morph10(pUnit,Event)
if pUnit:GetHealthPct() <= 1 then
pUnit:RemoveEvents()
end
end
-- --
-- Extra --
-- --
function NPCNAME_Death(pUnit)
pUnit:SendChatMessage(12, 0, "So much for festive spirit!")
print "Snowman boss dead, Spawned OnDeath GO's"
pUnit:SetScale(2)
pUnit:PlaySoundToSet(14070)
pUnit:RemoveEvents()
x=pUnit:GetX();
y=pUnit:GetY();
z=pUnit:GetZ();
o=pUnit:GetO();
pUnit:SpawnCreature(TeleNpcID, x+10, y, z, o+5, 35, 0)
pUnit:SpawnGameObject(19993, x, y+5, z, o, 40000)
pUnit:SpawnGameObject(19993, x, y+4, z, o, 40000)
pUnit:SpawnGameObject(19993, x, y+3, z, o, 40000)
pUnit:SpawnGameObject(19993, x, y+2, z, o, 40000)
pUnit:SpawnGameObject(19993, x, y+1, z, o, 40000)
pUnit:SpawnGameObject(19993, x, y-5, z, o, 40000)
pUnit:SpawnGameObject(19993, x, y-4, z, o, 40000)
pUnit:SpawnGameObject(19993, x, y-3, z, o, 40000)
pUnit:SpawnGameObject(19993, x, y-2, z, o, 40000)
pUnit:SpawnGameObject(19993, x, y-1, z, o, 40000)
pUnit:SpawnGameObject(19993, x+5, y, z, o, 40000)
pUnit:SpawnGameObject(19993, x+4, y, z, o, 40000)
pUnit:SpawnGameObject(19993, x+3, y, z, o, 40000)
pUnit:SpawnGameObject(19993, x+2, y, z, o, 40000)
pUnit:SpawnGameObject(19993, x+1, y, z, o, 40000)
pUnit:SpawnGameObject(19993, x-5, y, z, o, 40000)
pUnit:SpawnGameObject(19993, x-4, y, z, o, 40000)
pUnit:SpawnGameObject(19993, x-3, y, z, o, 40000)
pUnit:SpawnGameObject(19993, x-2, y, z, o, 40000)
pUnit:SpawnGameObject(19993, x-1, y, z, o, 40000)
end
function NPCNAME_OnLeaveCombat(pUnit, event)
pUnit:RemoveEvents()
pUnit:SetModel(13730)
pUnit:SetScale(5)
end
function NPCNAME_OnKilledTarget(pUnit)
pUnit:SendChatMessage(12, 0, "Die, weakling!")
pUnit:PlaySoundToSet(10282)
end
-- --
-- Minion Lua --
-- --
function SPAWNNAME_OnEnterCombat(pUnit,Event)
pUnit:SetModel(13730)
print "Spawns are... well... spawned!"
Choice=math.random(1, 3)
if Choice==1 then
pUnit:SendChatMessage(14, 0, "Yes master, we shall help dispose of these vile creatures!")
end
if Choice==2 then
pUnit:SendChatMessage(14, 0, "Merry Christmas! It be your last!")
end
if Choice==3 then
pUnit:SendChatMessage(12, 0, "Time for some fun!")
end
pUnit:CastSpellOnTarget(23189,pUnit:GetRandomPlayer(0))
end
function SPAWNNAME_Death(pUnit,Event)
pUnit:PlaySoundToSet(13745)
pUnit:RemoveEvents()
end
-- --
-- Start functions --
-- --
RegisterUnitEvent(SpawnID, 1, "SPAWNNAME_OnEnterCombat")
RegisterUnitEvent(SpawnID, 4, "SPAWNNAME_Death")
RegisterUnitEvent(NPCID, 1, "NPCNAME_OnEnterCombat")
RegisterUnitEvent(NPCID, 2, "NPCNAME_OnLeaveCombat")
RegisterUnitEvent(NPCID, 3, "NPCNAME_OnKilledTarget")
RegisterUnitEvent(NPCID, 4, "NPCNAME_Death")
-- Made by Nymphx; Member of www.MMOwned.com and www.frosteamproject.com --