Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Made by Hydroxis @AC-Web & ToxicWoW (http://wowtoxic.com)
- and
- Stoneharry @MMOwned
- Do not re-release without our permission.
- TODO: Defile (Doesn't work by default on ArcEmu)
- TODO: Frostmourne Chamber (If you give me a description of the fight, and the DisplayID of the Frozen Throne I will do it.
- TODO: Spawn Bolvar on the Frozen Throne (Give me his DisplayID and I will do it)
- ENJOY! ]]--
- local Lich = nil
- local Tirion = nil
- local package = nil
- local Terenas = nil
- local Count = 0
- local Phase = 0
- local Players_Wiped = 0
- local tleh
- local tleh1
- --npc = {}--
- ---- Lich King ---------------------------------------------------
- function LichKing_OnSpawn(pUnit, Event)
- pUnit:RegisterEvent("LichKing_OnSpawn_Go", 1000, 1)
- end
- function LichKing_OnSpawn_Go(pUnit, Event)
- if Lich ~= nil then -- Do a check
- Lich:RemoveFromWorld()
- end
- Lich = pUnit
- Lich:SetFaction(35)
- end
- RegisterUnitEvent(3072111, 18, "LichKing_OnSpawn")
- ---- Tleh ------------------------------------------------------
- function tleh_OnSpawn(pUnit, Event)
- tleh = pUnit
- tleh:SetFlying()
- tleh:SetMovementFlags(2)
- tleh:MoveTo(505.135254, -2121.514160, 1583.135132)
- tleh:SetUInt32Value(58, 26)
- end
- RegisterUnitEvent(100001, 18, "tleh_OnSpawn")
- function tleh1_OnSpawn(pUnit, Event)
- tleh1 = pUnit
- tleh1:SetUInt32Value(58, 26)
- end
- RegisterUnitEvent(100002, 18, "tleh1_OnSpawn")
- ---- Tirion ------------------------------------------------------
- function TirionFordring_OnSpawn(pUnit, Event)
- pUnit:RegisterEvent("TirionFordring_OnSpawn_Go", 5000, 0)
- end
- function TirionFordring_OnSpawn_Go(pUnit, Event)
- if Lich ~= nil then
- local plr = pUnit:GetClosestPlayer()
- if plr ~= nil then
- if pUnit:GetDistanceYards(plr) < 7 then
- local PlayersAllAround = pUnit:GetInRangePlayers()
- for a, players in pairs(PlayersAllAround) do
- players:CastSpell(69127)
- end
- pUnit:PlaySoundToSet(17458)
- pUnit:RemoveEvents()
- Lich:MoveTo(461.47, -2123.73, 1572.1, 0)
- pUnit:Emote(375, 60000)
- pUnit:PlaySoundToSet(17349)
- Lich:SendChatMessage(14, 0, "So...the Light's vaunted justice has finally arrived. Shall I lay down Frostmourne and throw myself at your mercy, Fordring?")
- pUnit:RegisterEvent("TirionFordring_OnSpawn_Goz", 13500, 1)
- end
- end
- end
- end
- RegisterUnitEvent(26529762, 18, "TirionFordring_OnSpawn")
- function TirionFordring_OnSpawn_Goz(pUnit, Event)
- pUnit:SendChatMessage(14,0,"We will grant you a swift death, Arthas. More than can be said for the thousands you've tortured and slain.")
- pUnit:PlaySoundToSet(17390)
- local PlayersAllAround = pUnit:GetInRangePlayers()
- for k, v in pairs(PlayersAllAround) do
- v:CastSpell(69127)
- end
- pUnit:RegisterEvent("TirionFordring_OnSpawn_Gozz", 7500, 1)
- end
- function TirionFordring_OnSpawn_Gozz(pUnit, Event)
- Lich:SendChatMessage(14,0,"You will learn of that first hand. When my work is complete, you will beg for mercy -- and I will deny you. Your anguished cries will be testament to my unbridled power.")
- pUnit:PlaySoundToSet(17350)
- Lich:Emote(397, 4000)
- pUnit:RegisterEvent("zTirionFordring_OnSpawn_Gozzz", 4000, 1)
- pUnit:RegisterEvent("zzTirionFordring_OnSpawn_Gozzz", 12000, 1)
- pUnit:RegisterEvent("TirionFordring_OnSpawn_Gozzz", 23000, 1)
- end
- function zTirionFordring_OnSpawn_Gozzz(pUnit, Event)
- Lich:Emote(1, 6000)
- end
- function zzTirionFordring_OnSpawn_Gozzz(pUnit, Event)
- Lich:Emote(392, 3500)
- end
- function TirionFordring_OnSpawn_Gozzz(pUnit, Event)
- Lich:SendChatMessage(14,0,"So be it. Champions, attack!")
- pUnit:PlaySoundToSet(17391)
- pUnit:Emote(397, 2000)
- pUnit:RegisterEvent("PATHETIC_RUN_TIRION", 2000, 1)
- pUnit:RegisterEvent("TirionFordring_OnSpawn_Gozzzz", 3000, 1)
- pUnit:RegisterEvent("TirionFordring_zzz_Gozzzz", 4800, 1)
- end
- function PATHETIC_RUN_TIRION(pUnit, Event)
- pUnit:SetMovementFlags(1)
- pUnit:MoveTo(485.92, -2123.2, 1572.1, 3.17)
- end
- function TirionFordring_OnSpawn_Gozzzz(pUnit, Event)
- Lich:SendChatMessage(14,0,"I'll keep you alive to witness the end, Fordring. I would not want the Light's greatest champion to miss seeing this wretched world remade in my image.")
- pUnit:PlaySoundToSet(17351)
- local PlayersAllAround = pUnit:GetInRangePlayers()
- for a, players in pairs(PlayersAllAround) do
- players:CastSpell(69127)
- end
- Tirion = pUnit
- end
- function TirionFordring_zzz_Gozzzz(pUnit, Event)
- Tirion:CastSpell(71614)
- Lich:SetFaction(22)
- local o = Lich:GetO()
- Lich:SpawnCreature(3769511, 468, -2130, 1572, o, 14, 0)
- Lich:SpawnCreature(3769511, 465, -2140, 1572, o, 14, 0)
- Lich:SpawnCreature(3769511, 468, -2115, 1572, o, 14, 0)
- Lich:SpawnCreature(3769511, 465, -2105, 1572, o, 14, 0)
- local ghoulmove = Lich:GetCreatureNearestCoords(468, -2130, 1572, 3769511)
- ghoulmove:MoveTo(474, -2130, 1572)
- local ghoulmove1 = Lich:GetCreatureNearestCoords(465, -2140, 1572, 3769511)
- ghoulmove1:MoveTo(469, -2138, 1572)
- local ghoulmove2 = Lich:GetCreatureNearestCoords(468, -2115, 1572, 3769511)
- ghoulmove2:MoveTo(474, -2115, 1572)
- local ghoulmove3 = Lich:GetCreatureNearestCoords(465, -2105, 1572, 3769511)
- ghoulmove3:MoveTo(469, -2105, 1572)
- Lich:MoveTo(474, -2123, 1571.900146)
- end
- -------- Rage Counter ---------------------------------------------
- function Rage_Counter_Lich_King(pUnit, Event)
- if Lich == nil then
- pUnit:RemoveEvents()
- else
- if Count == 300 then
- if Phase == 2 then
- Count = 0
- Phase = 0
- Lich:RemoveEvents()
- Lich:SendChatMessage(14,0,"Face now your tragic end!")
- Lich:PlaySoundToSet(17365)
- else
- Lich:FullCastSpell(72143) -- Enrage --
- Phase = Phase + 1
- end
- else
- Count = Count + 5
- end
- end
- end
- -------- Fight ----------------------------------------------------
- function LichKingHasEnteredCombatLawl_Phase_One(pUnit, Event)
- if Tirion == nil then
- pUnit:Despawn(1, 10000)
- Lich = nil
- else
- if Players_Wiped == 1 then
- Players_Wiped = 0
- Lich:SetHealthPct(10)
- else
- Lich:SetCombatCapable(0)
- Lich:RegisterEvent("Rage_Counter_Lich_King", 5000, 0)
- Lich:RegisterEvent("Adds_Spawning_Incoming_Dredge_Ghouls", 19000, 0)
- Lich:RegisterEvent("Adds_Spawning_Incoming_Shambling_Horror", math.random(60000,70000), 0)
- Lich:RegisterEvent("Necrotic_Plague_Incoming", 20000, 0)
- Lich:RegisterEvent("Infest_Big_AOE_Incoming", 30000, 0)
- Lich:RegisterEvent("Phase_Two_Checker", 2500, 0)
- end
- end
- end
- function Adds_Spawning_Incoming_Dredge_Ghouls(pUnit, Event)
- Lich:RegisterEvent("Adds_Spawning_Incoming_Dredge_Ghoulsz", 1000, 3)
- end
- function Adds_Spawning_Incoming_Dredge_Ghoulsz(pUnit, Event)
- local x = Lich:GetX()
- local y = Lich:GetY()
- local z = Lich:GetZ()
- local o = Lich:GetO()
- if math.random(1,2) == 1 then
- Lich:SpawnCreature(3769511, x+math.random(1,6), y+math.random(1,6), z, o, 15, 360000)
- else
- Lich:SpawnCreature(3769511, x-math.random(1,6), y-math.random(1,6), z, o, 15, 360000)
- end
- end
- function Adds_Spawning_Incoming_Shambling_Horror(pUnit, Event)
- local x = Lich:GetX()
- local y = Lich:GetY()
- local z = Lich:GetZ()
- local o = Lich:GetO()
- if math.random(1,2) == 1 then
- Lich:SpawnCreature(3769811, x+math.random(1,6), y+math.random(1,6), z, o, 15, 360000)
- else
- Lich:SpawnCreature(3769811, x-math.random(1,6), y-math.random(1,6), z, o, 15, 360000)
- end
- end
- function Necrotic_Plague_Incoming(pUnit, Event)
- local plr = Lich:GetRandomPlayer(0)
- if plr ~= nil then
- Lich:FullCastSpellOnTarget(70337, plr)
- end
- end
- function Infest_Big_AOE_Incoming(pUnit, Event)
- Lich:FullCastSpell(70541)
- end
- RegisterUnitEvent(3072111, 1, "LichKingHasEnteredCombatLawl_Phase_One")
- function Phase_Two_Checker(pUnit, Event)
- if Lich:GetHealthPct() < 71 then
- Lich:RemoveEvents()
- Lich:MoveTo(506.7, -2122.5, 1572.1, 0)
- Lich:SetMovementFlags(1)
- Lich:SetCombatCapable(1)
- Lich:RegisterEvent("Test_Debug_MoveToCentreOfRoom", 100, 0)
- Lich:RegisterEvent("Test_Debug_MoveToCentreOfRoom_z", 9005, 1)
- end
- end
- function Test_Debug_MoveToCentreOfRoom(pUnit, Event)
- Lich:MoveTo(506.7, -2122.5, 1572.1, 0)
- Lich:SetMovementFlags(1)
- end
- function Test_Debug_MoveToCentreOfRoom_z(pUnit, Event)
- Lich:RemoveEvents()
- Lich:Root()
- Lich:FullCastSpell(68981)
- Lich:SendChatMessage(14,0,"I will freeze you from within until all that remains is an icy husk!")
- Lich:PlaySoundToSet(17369)
- Lich:RegisterEvent("weaiyhoahg_delay", 9500, 1)
- end
- function weaiyhoahg_delay(pUnit, Event)
- local x = Lich:GetX()
- local y = Lich:GetY()
- Lich:SpawnCreature(3769812, x+math.random(3,6), y+math.random(3,6), Lich:GetZ(), Lich:GetZ(), 21, 10000)
- Lich:RegisterEvent("Spam_Of_Lightning_That_Looks_Crap_But_Is_Blizzlike", 2000, 0)
- Lich:RegisterEvent("NeedToWaitBecauseAddsBreakAndShizzleOrSomething", 3005, 1)
- Lich:RegisterEvent("RandomRagingSpiritAddsThatAreNotRandom", 19990, 3)
- Lich:RegisterEvent("Test_Despawn_Outer_Shell", 59000, 0)
- end
- function NeedToWaitBecauseAddsBreakAndShizzleOrSomething(pUnit,Event)
- local x = Lich:GetX()
- local y = Lich:GetY()
- Lich:SpawnCreature(3769812, x-math.random(3,6), y-math.random(3,6), Lich:GetZ(), Lich:GetZ(), 21, 10000)
- end
- function RandomRagingSpiritAddsThatAreNotRandom(pUnit, Event)
- local plr = Lich:GetRandomPlayer(0)
- if plr ~= nil then
- local x,y,z,o = plr:GetX(),plr:GetY(),plr:GetZ(),plr:GetO()
- Lich:SpawnCreature(3769813, x,y,z,o , 21, 360000)
- end
- end
- function Spam_Of_Lightning_That_Looks_Crap_But_Is_Blizzlike(pUnit, Event)
- local plr = Lich:GetRandomPlayer(0)
- if plr ~= nil then
- Lich:FullCastSpellOnTarget(72133, plr)
- end
- end
- function Test_Despawn_Outer_Shell(pUnit, Event)
- Lich:RemoveEvents()
- Lich:SendChatMessage(14,0,"Watch as the world around you collapses!")
- Lich:PlaySoundToSet(17370)
- Lich:CastSpell(59084) -- Frozen Throne goes boom --
- Lich:SpawnCreature(2626262, 476.2, -2083.56, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 505.1, -2074.47, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 523.35, -2077.77, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 541, -2086.36, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 552.7, -2111.2, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 554, -2137, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 545.9, -2153.1, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 528, -2164, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 508.25, -2169.5, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 488.2, -2168, 1573.1, 0, 814, 20000)
- Lich:RegisterEvent("DelayForDespawnSinceVisualTakesSomeTimeTehe_Zieghoszho", 1000, 1)
- Lich:RegisterEvent("DelayForDespawnSinceVisualTakesSomeTimeTehe", 2500, 1)
- end
- function DelayForDespawnSinceVisualTakesSomeTimeTehe_Zieghoszho(pUnit, Event)
- Lich:FullCastSpell(72262) -- Epic shit I got working :D
- end
- function DelayForDespawnSinceVisualTakesSomeTimeTehe(pUnit, Event)
- local Object = Lich:GetGameObjectNearestCoords(pUnit:GetX(),pUnit:GetY(),pUnit:GetZ(), 2957197)
- if Object ~= nil then
- Object:Despawn(1,0)
- Lich:CastSpell(46853) --Shake--
- end
- Lich:SetCombatCapable(0)
- Lich:Unroot()
- -- Phase 2
- Lich:RegisterEvent("Infest_Big_AOE_Incoming", 22000, 0)
- Lich:RegisterEvent("Summon_Valkyr_Shadowguard", 19500, 0)
- Lich:RegisterEvent("Soul_Reaper_On_Main_Tank", 30000, 0)
- Lich:RegisterEvent("Phase_TwoPointFive_Checker", 2500, 0)
- -- Defile --
- end
- function Soul_Reaper_On_Main_Tank(pUnit, Event)
- local tank = Lich:GetMainTank()
- if tank ~= nil then
- Lich:FullCastSpellOnTarget(69409, tank)
- end
- end
- function Summon_Valkyr_Shadowguard(pUnit, Event)
- local x, y, z, o = Lich:GetX()+7, Lich:GetY(), Lich:GetZ(), Lich:GetO()
- Lich:SpawnCreature(25452151, x, y, z, o, 22, 0)
- Lich:SendChatMessage(14,0,"Val'kyr, your master calls!")
- Lich:PlaySoundToSet(17373)
- end
- function Phase_TwoPointFive_Checker(pUnit, Event)
- if Lich:GetHealthPct() < 41 then
- Lich:RemoveEvents()
- Lich:MoveTo(506.7, -2122.5, 1572.1, 0)
- Lich:SetMovementFlags(1)
- Lich:SetCombatCapable(1)
- Lich:RegisterEvent("hhTest_Debug_MoveToCentreOfRoom", 100, 0)
- Lich:RegisterEvent("hhTest_Debug_MoveToCentreOfRoom_z", 9005, 1)
- end
- end
- function hhTest_Debug_MoveToCentreOfRoom(pUnit, Event)
- Lich:MoveTo(506.7, -2122.5, 1572.1, 0)
- Lich:SetMovementFlags(1)
- end
- function hhTest_Debug_MoveToCentreOfRoom_z(pUnit, Event)
- Lich:RemoveEvents()
- Lich:Root()
- Lich:FullCastSpell(68981)
- Lich:SendChatMessage(14,0,"I will freeze you from within until all that remains is an icy husk!")
- Lich:PlaySoundToSet(17369)
- Lich:RegisterEvent("jjweaiyhoahg_delay", 8500, 1)
- end
- function jjweaiyhoahg_delay(pUnit, Event)
- local x = Lich:GetX()
- local y = Lich:GetY()
- Lich:SpawnCreature(3769812, x+math.random(3,6), y+math.random(3,6), Lich:GetZ(), Lich:GetZ(), 21, 10000)
- Lich:RegisterEvent("Spam_Of_Lightning_That_Looks_Crap_But_Is_Blizzlike", 1500, 0)
- Lich:RegisterEvent("NeedToWaitBecauseAddsBreakAndShizzleOrSomething", 3005, 1)
- Lich:RegisterEvent("RandomRagingSpiritAddsThatAreNotRandom", 14000, 3)
- Lich:RegisterEvent("zzzTest_Despawn_Outer_Shell", 59000, 0)
- end
- function zzzTest_Despawn_Outer_Shell(pUnit, Event)
- Lich:RemoveEvents()
- Lich:SendChatMessage(14,0,"Watch as the world around you collapses!")
- Lich:PlaySoundToSet(17370)
- Lich:CastSpell(59084) -- Frozen Throne goes boom --
- Lich:SpawnCreature(2626262, 476.2, -2083.56, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 505.1, -2074.47, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 523.35, -2077.77, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 541, -2086.36, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 552.7, -2111.2, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 554, -2137, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 545.9, -2153.1, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 528, -2164, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 508.25, -2169.5, 1573.1, 0, 814, 20000)
- Lich:SpawnCreature(2626262, 488.2, -2168, 1573.1, 0, 814, 20000)
- Lich:RegisterEvent("DelayForDespawnSinceVisualTakesSomeTimeTehe_Zieghoszho", 1000, 1)
- Lich:RegisterEvent("zzzDelayForDespawnSinceVisualTakesSomeTimeTehe", 2500, 1)
- end
- function zzzDelayForDespawnSinceVisualTakesSomeTimeTehe(pUnit, Event)
- Lich:SetCombatCapable(0)
- Lich:Unroot()
- Lich:RemoveEvents()
- Lich:RegisterEvent("Soul_Reaper_On_Main_Tank", 30000, 0)
- Lich:RegisterEvent("Harvest_Soul_Random_Raid_Member", 66000, 0)
- Lich:RegisterEvent("Vile_Spirits_Spawning_Inc", 28000, 0)
- Lich:RegisterEvent("Phase_Four_The_Ending_tehe", 1500, 0)
- end
- function Harvest_Soul_Random_Raid_Member(pUnit, Event)
- local plr = Lich:GetRandomPlayer(0)
- if plr ~= nil then
- Lich:SendChatMessage(14,0,"Frostmourne hungers...")
- Lich:PlaySoundToSet(17366)
- Lich:FullCastSpellOnTarget(68980, plr)
- end
- end
- function Vile_Spirits_Spawning_Inc(pUnit, Event)
- Lich:RegisterEvent("Spawning_The_Vile_spirits_NoW", 1000, 10)
- end
- function Spawning_The_Vile_spirits_NoW(pUnit, Event)
- local pla = Lich:GetRandomPlayer(0)
- if pla ~= nil then
- local x, y, z, o = pla:GetX(), pla:GetY(), pla:GetZ(), pla:GetO()
- Lich:SpawnCreature(5078151, x, y, z, o, 22, 60000)
- end
- end
- function Phase_Four_The_Ending_tehe(pUnit, Event)
- if Lich:GetHealthPct() < 11 then
- Count = 0
- Phase = 0
- Lich:RemoveEvents()
- Lich:SetFacing(0.050405)
- Lich:SendChatMessage(14,0,"You gnats actually hurt me! Perhaps I've toyed with you long enough, now taste the vengeance of the grave!")
- Lich:PlaySoundToSet(17359)
- Lich:MoveTo(506.7, -2122.5, 1572.1, 0)
- Lich:SetMovementFlags(1)
- Lich:SetCombatCapable(1)
- Lich:RegisterEvent("hhTest_Debug_MoveToCentreOfRoom", 100, 0)
- Lich:RegisterEvent("hggzhTest_Debug_MoveToCentreOfRoom_z", 5005, 1)
- end
- end
- function hggzhTest_Debug_MoveToCentreOfRoom_z(pUnit, Event)
- Lich:RemoveEvents()
- Lich:CastSpell(70063)
- Players_Wiped = 1
- Lich:RemoveEvents()
- Lich:RegisterEvent("Debug_Send_Next_Message_LichKing", 10000, 1)
- end
- function Debug_Send_Next_Message_LichKing(pUnit, Event)
- Lich:SendChatMessage(14,0,"No question remains unanswered. No doubts linger. You are Azeroth's greatest champions! You overcame every challenge I laid before you. My mightiest servants have fallen before your relentless onslaught, your unbridled fury...")
- Lich:PlaySoundToSet(17353)
- Lich:RegisterEvent("zzDebug_Send_Next_Message_LichKing", 25000, 1)
- end
- function zzDebug_Send_Next_Message_LichKing(pUnit, Event)
- Lich:SendChatMessage(14,0,"You trained them well, Fordring. You delivered the greatest fighting force this world has ever known... right into my hands -- exactly as I intended. You shall be rewarded for your unwitting sacrifice.")
- Lich:PlaySoundToSet(17355)
- Lich:RegisterEvent("zzzzDebug_Send_Next_Message_LichKing", 24000, 1)
- end
- function zzzzDebug_Send_Next_Message_LichKing(pUnit, Event)
- Lich:SendChatMessage(14,0,"Watch now as I raise them from the dead to become masters of the Scourge. They will shroud this world in chaos and destruction. Azeroth's fall will come at their hands -- and you will be the first to die.")
- Lich:PlaySoundToSet(17356)
- local plr = Lich:GetRandomPlayer(0)
- if plr ~= nil then
- Lich:ChannelSpell(71769, plr)
- Lich:RegisterEvent("zzzzDebug_Send_Next_Message_LichKingzz", 26000, 1)
- Lich:RegisterEvent("lich_channel_players_raise_dead", 500, 1)
- --[[Lich:RegisterEvent("imakeyoumineservants", 1000, 1)
- Lich:RegisterEvent("lichchannelplayers", 3000, 1)]]--
- end
- end
- function lich_channel_players_raise_dead(pUnit, Event)
- local dumbass = Lich:GetInRangePlayers()
- for k, v in pairs(dumbass) do
- v:ChannelSpell(47855, tleh)
- end
- end
- --[[function imakeyoumineservants(pUnit, Event) -- Doesn't work like this no idea why--
- for k, v in pairs(pUnit:GetInRangePlayers()) do
- if v:IsDead() then
- if npc[v:GetName()] == nil then
- npc[v:GetName()] = {};
- npc[v:GetName()].position = {v:GetX(), v:GetY(), v:GetZ(), v:GetO()}
- npc[v:GetName()].npcSpawned = true; local x, y, z, o = pos;
- Lich:SpawnCreature(100001, npc[v:GetName()].position.x, npc[v:GetName()].position.y, npc[v:GetName()].position.z, npc[v:GetName()].position.o, 35, 0)
- break;
- end
- break;
- end
- end
- end
- function lichchannelplayers(pUnit, Event)
- Lich:ChannelSpell(49576, tleh)
- end
- --]]
- function zzzzDebug_Send_Next_Message_LichKingzz(pUnit, Event)
- Lich:PlaySoundToSet(17357)
- Lich:SendChatMessage(14,0,"I delight in the irony.")
- Lich:RegisterEvent("zzzzDebug_Send_Next_Message_LichKingzzzz", 6000, 1)
- end
- function zzzzDebug_Send_Next_Message_LichKingzzzz(pUnit, Event)
- if Tirion == nil then
- Lich:Despawn(1,0)
- else
- Tirion:SendChatMessage(14,0,"LIGHT, GRANT ME ONE FINAL BLESSING. GIVE ME THE STRENGTH... TO SHATTER THESE BONDS!")
- Tirion:PlaySoundToSet(17392)
- Lich:RegisterEvent("Breakoutofice", 9000, 1)
- end
- end
- function Breakoutofice(pUnit, Event)
- Tirion:RemoveAura(71614)
- Tirion:CastSpell(71797)
- Tirion:CastSpell(71614)
- Lich:RegisterEvent("zzzzDebug_Send_Next_Message_LichKingzzzzgg", 5000, 1)
- end
- function zzzzDebug_Send_Next_Message_LichKingzzzzgg(pUnit, Event)
- Tirion:RemoveAura(71614) -- Ice Block
- Tirion:CastSpell(71773)
- Tirion:MoveTo(495, -2123, 1572)
- Lich:RegisterEvent("zzzzDebug_Send_Next_Message_LichKingzzzzgzg", 1700, 1)
- end
- function zzzzDebug_Send_Next_Message_LichKingzzzzgzg(pUnit, Event) --Teh holy jump--
- Tirion:SetMovementFlags(2)
- Tirion:SetFlying()
- Tirion:Emote(375, 60000)
- Tirion:MoveTo(511, -2121, 1575)
- Tirion:Emote(375, 60000)
- Tirion:RegisterEvent("lichisdead", 1900, 1)
- Lich:RegisterEvent("BrokeFrostmourne", 1900, 1)
- end
- function lichisdead(pUnit, Event)
- Tirion:MoveTo(514.135254, -2122.514160, 1572)
- end
- function BrokeFrostmourne(pUnit, Event)
- local dumbasss = Lich:GetInRangePlayers()
- for k, v in pairs(dumbasss) do
- v:StopChannel()
- Lich:StopChannel()
- Lich:CastSpell(37592) -- Knockdown
- Lich:CastSpell(72726) -- Boom visual
- Lich:FullCastSpell(72398) -- Broken Frostmourne (On the floor)
- Lich:EquipWeapons(0,0,0)
- Lich:CastSpell(73017) --Frostmourne Drops (Off the hands)
- Lich:RegisterEvent("zagazzzDebug_Send_Next_Message_LichKingzzzzgzg", 700, 1)
- end
- end
- function zagazzzDebug_Send_Next_Message_LichKingzzzzgzg(pUnit, Event)
- Tirion:SetMovementFlags(1)
- Tirion:MoveTo(533.5, -2121, 1572.1, 3.15)
- Lich:RegisterEvent("zagazzzDebug_Send_Next_Message_LichKingzgeazzzzgzg", 1000, 1)
- end
- function zagazzzDebug_Send_Next_Message_LichKingzgeazzzzgzg(pUnit, Event)
- Lich:SendChatMessage(14,0,"Impossible...")
- Lich:PlaySoundToSet(17358)
- Lich:Emote(473, 120000)
- tleh1:CastSpell(72405)
- Lich:RegisterEvent("zagazzzDebug_Send_Next_Message_LichKingzgeazzzzedhezgzg", 3500, 1)
- end
- function zagazzzDebug_Send_Next_Message_LichKingzgeazzzzedhezgzg(pUnit, Event)
- Tirion:SendChatMessage(14,0,"No more, Arthas! No more lives will be consumed by your hatred!")
- Tirion:PlaySoundToSet(17393)
- Tirion:SetMovementFlags(0)
- Lich:Emote(473, 120000)
- Lich:SpawnCreature(31021151, 518.8, -2115.8, 1572.1, 3.780169, 35, 0)
- Terenas:EquipWeapons(23456, 18825, 0)
- Tirion:MoveTo(525.654663, -2121.921143, 1571.900513, 3)
- Tirion:RemoveEvents()
- Lich:RegisterEvent("zagazzzDebug_Send_Next_Message_LichKingzgeazzzzedhezgzzzzsay", 5500, 1)
- end
- function zagazzzDebug_Send_Next_Message_LichKingzgeazzzzedhezgzzzzsay(pUnit, Event)
- if Terenas == nil then
- Lich:Despawn(1,0)
- Lich = nil
- Tirion:Despawn(1,0)
- Tirion = nil
- else
- Tirion:RemoveEvents()
- Lich:Emote(473, 120000)
- Terenas:SendChatMessage(14,0,"Free at last! It is over, my son. This is the moment of reckoning.")
- Terenas:PlaySoundToSet(17397)
- Lich:RegisterEvent("epiashgyophopapea_Lich_King_Is_Not_A_Happy_Bunny", 10000, 1)
- end
- end
- function epiashgyophopapea_Lich_King_Is_Not_A_Happy_Bunny(pUnit, Event)
- Terenas:SendChatMessage(14,0,"Rise up, champions of the Light!")
- Terenas:PlaySoundToSet(17398)
- Terenas:CastSpell(37755)
- Terenas:RemoveEvents()
- Lich:Emote(473, 120000)
- local PlayersAllAround = Terenas:GetInRangePlayers()
- for a, players in pairs(PlayersAllAround) do
- players:ResurrectPlayer(players)
- players:CastSpell(24171)
- end
- Lich:SetHealthPct(10)
- Lich:RegisterEvent("zLich_King_Is_Not_A_Happy_Bunny", 5000, 1)
- end
- function zLich_King_Is_Not_A_Happy_Bunny(pUnit, Event)
- Tirion:MoveTo(509, -2125, 1572)
- Terenas:MoveTo(509, -2121, 1572)
- Tirion:FullCastSpellOnTarget(6603, Lich)
- Terenas:FullCastSpellOnTarget(6603, Lich)
- Lich:Emote(473, 120000)
- Lich:SendChatMessage(14,0,"Now I stand, the lion before the lambs... and they do not fear.")
- Lich:PlaySoundToSet(17361)
- Lich:RegisterEvent("zLich_King_Is_Not_A_Happy_Bunnyz", 8000, 1)
- end
- function zLich_King_Is_Not_A_Happy_Bunnyz(pUnit, Event)
- Lich:SendChatMessage(14,0,"They cannot fear.")
- Lich:PlaySoundToSet(17362)
- Lich:Emote(473, 120000)
- end
- ---- Terenas -----------------------------------------------------
- function Terenas_Spawned_root_Hes_the_realm_of_My_RETAIL_Char(pUnit, Event)
- if Tirion == nil or Lich == nil then
- pUnit:Despawn(1,0)
- else
- Terenas = pUnit
- end
- end
- RegisterUnitEvent(31021151, 18, "Terenas_Spawned_root_Hes_the_realm_of_My_RETAIL_Char")
- -------------------------------------------------------------------
- function LichKingHasDiedSoWePlayMovie(pUnit, Event)
- tleh1:Despawn(1, 0)
- Terenas:Despawn(1, 0)
- Tirion:RemoveEvents()
- Tirion:RegisterEvent("Idespawn", 11000, 1)
- Lich = nil
- pUnit:RemoveEvents()
- pUnit:PlaySoundToSet(17374) -- Freak makes dying sound --
- pUnit:SpawnCreature(3072110, pUnit:GetX(), pUnit:GetY(), pUnit:GetZ(), pUnit:GetO(), 35, 10000)
- end
- RegisterUnitEvent(3072111, 4, "LichKingHasDiedSoWePlayMovie")
- function Idespawn(pUnit, Event)
- Tirion = pUnit
- Tirion:Despawn(1, 0)
- Tirion = nil
- end
- function TriggerHasSpawnedSoPlayMovie(pUnit, Event)
- pUnit:RegisterEvent("PlayMovieOnceDeathAnimationHasPlayed", 9000, 1)
- end
- function PlayMovieOnceDeathAnimationHasPlayed(pUnit, Event)
- -- Reset Fight --
- Tirion = nil
- Lich = nil
- Terenas = nil
- package = nil
- Phase = 0
- Count = 0
- -- Movie --
- Players_Wiped = 0
- local PlayersAllAround = pUnit:GetInRangePlayers()
- for a, players in pairs(PlayersAllAround) do
- --SMSG_TRIGGER_MOVIE = 0x464
- local packet = LuaPacket:CreatePacket(0x464, 4)
- packet:WriteULong(16)
- players:SendPacketToPlayer(packet)
- end
- -- Bolvar --
- local Bolvar = pUnit:GetGameObjectNearestCoords(428.758, -2124.4, 1594.69, 2508221) -- Bolvar in chains
- if Bolvar ~= nil then
- Bolvar:Despawn(1,0)
- pUnit:SpawnGameObject(2508220, 428.758, -2124.4, 1594.69, 0, 360000) -- Chains
- pUnit:SpawnGameObject(2508219, 430.103, -2124, 1595.93, 3.3, 360000) -- Bolvar
- end
- end
- RegisterUnitEvent(3072110, 18, "TriggerHasSpawnedSoPlayMovie")
- ------- Adds ------------------------------------------------------
- function Dredge_Ghouls_OnSpawn(pUnit, Event)
- pUnit:RegisterEvent("TestRootFunctionNextSecond", 1, 1)
- end
- function TestRootFunctionNextSecond(pUnit, Event)
- if Lich == nil then
- pUnit:RemoveFromWorld()
- else
- pUnit:Emote(449, 4000)
- pUnit:Root()
- pUnit:RegisterEvent("Delay_A_Second_And_See_WhatHappens_Tehe", math.random(1,1000), 1)
- pUnit:RegisterEvent("SetFactionToHostileForTheEmote", 4500, 1)
- end
- end
- function Delay_A_Second_And_See_WhatHappens_Tehe(pUnit, Event)
- pUnit:CastSpell(55719)
- end
- function SetFactionToHostileForTheEmote(pUnit, Event)
- pUnit:Unroot()
- pUnit:SetFaction(21)
- end
- RegisterUnitEvent(3769511, 18, "Dredge_Ghouls_OnSpawn")
- ---------------------------------------------------------------------
- function Shambling_Horrors_OnSpawn(pUnit, Event)
- pUnit:RegisterEvent("zzTestRootFunctionNextSecond", 1, 1)
- end
- function zzTestRootFunctionNextSecond(pUnit, Event)
- if Lich == nil then
- pUnit:RemoveFromWorld()
- else
- pUnit:Emote(449, 4000)
- pUnit:Root()
- pUnit:CastSpell(55719)
- pUnit:RegisterEvent("zzSetFactionToHostileForTheEmote", 4500, 1)
- end
- end
- function zzSetFactionToHostileForTheEmote(pUnit, Event)
- pUnit:Unroot()
- pUnit:SetFaction(21)
- end
- RegisterUnitEvent(3769811, 18, "Shambling_Horrors_OnSpawn")
- function Shambling_Horrors_OnCombat(pUnit, Event)
- if Lich == nil then
- pUnit:RemoveFromWorld()
- else
- pUnit:RegisterEvent("Enrage_Spam_Incoming_Varied_Time", math.random(20000,25000), 0)
- pUnit:RegisterEvent("Shockwave_thingy_time_notsure_on_timer", 15000, 0)
- end
- end
- function Enrage_Spam_Incoming_Varied_Time(pUnit, Event)
- pUnit:FullCastSpell(72143)
- end
- function Shockwave_thingy_time_notsure_on_timer(pUnit, Event)
- pUnit:FullCastSpell(72149)
- end
- function Shambling_Horrors_OnLeave(pUnit, Event)
- pUnit:RemoveEvents()
- end
- function Shambling_Horrors_OnDead(pUnit, Event)
- pUnit:RemoveEvents()
- end
- RegisterUnitEvent(3769811, 1, "Shambling_Horrors_OnCombat")
- RegisterUnitEvent(3769811, 2, "Shambling_Horrors_OnLeave")
- RegisterUnitEvent(3769811, 4, "Shambling_Horrors_OnDead")
- ----- Ice Sphere --------------------------------------------------
- function IceShard_OnSpawn(pUnit, Event)
- pUnit:RegisterEvent("rage_rage_rage_rage_Rage_rage", 1, 1)
- end
- function rage_rage_rage_rage_Rage_rage(pUnit, Event)
- if Lich == nil then
- pUnit:RemoveFromWorld()
- else
- pUnit:FullCastSpell(69090) -- Visual
- local pla = pUnit:GetRandomPlayer(0)
- if pla ~= nil then
- pUnit:MoveTo(pla:GetX(), pla:GetY(), pla:GetZ(), pla:GetO())
- pUnit:SetMovementFlags(1)
- pUnit:RegisterEvent("rage_rage_rage_rage_Rage_rage_r", 1000, 8)
- else
- pUnit:RemoveFromWorld()
- end
- end
- end
- function rage_rage_rage_rage_Rage_rage_r(pUnit, Event)
- local plm = pUnit:GetClosestPlayer()
- if plm ~= nil then
- pUnit:FullCastSpell(69090)
- if pUnit:GetDistanceYards(plm) < 4 then
- pUnit:CastSpell(56135)
- pUnit:RemoveEvents()
- end
- end
- end
- RegisterUnitEvent(3769812, 18, "IceShard_OnSpawn")
- ---- Raging Spirit ------------------------------------------------
- function RagingSpirit_OnCombat(pUnit, Event)
- if Lich == nil then
- pUnit:RemoveFromWorld()
- else
- pUnit:RegisterEvent("Soul_Shriek_Random_Time_Depending_On_Mob", math.random(7500, 15000), 0)
- pUnit:RegisterEvent("Soul_Shriek_Random_Visual", 1000, 1)
- end
- end
- function Soul_Shriek_Random_Visual(pUnit, Event)
- pUnit:FullCastSpell(69198) -- Visual
- end
- function Soul_Shriek_Random_Time_Depending_On_Mob(pUnit, Event)
- pUnit:FullCastSpell(69242) -- Shriek
- end
- function RagingSpirit_OnLeave(pUnit, Event)
- pUnit:RemoveEvents()
- end
- function RagingSpirit_OnDead(pUnit, Event)
- pUnit:RemoveEvents()
- end
- RegisterUnitEvent(3769813, 1, "RagingSpirit_OnCombat")
- RegisterUnitEvent(3769813, 2, "RagingSpirit_OnLeave")
- RegisterUnitEvent(3769813, 4, "RagingSpirit_OnDead")
- ---- Flying Dudes ------------------------------------------------------
- function zhgzFlying_Dude_OnCombat(pUnit, Event)
- if Lich == nil then
- pUnit:RemoveFromWorld()
- else
- pUnit:RegisterEvent("zhgzFlying_Dude_Find_Player", 1, 1)
- end
- end
- function zhgzFlying_Dude_Find_Player(pUnit, Event)
- package = pUnit:GetClosestPlayer()
- if package ~= nil then
- pUnit:SetCombatCapable(1)
- package:SetPlayerLock(1)
- pUnit:SetMovementFlags(2)
- pUnit:ChannelSpell(55520, package)
- pUnit:MoveTo(pUnit:GetX(), pUnit:GetY(), pUnit:GetZ()+6, pUnit:GetO(), 12288)
- package:MovePlayerTo(package:GetX(), package:GetY(), package:GetZ()+6, package:GetO(), 12288)
- pUnit:RegisterEvent("now_we_have_loaded_preset_We_can_move_on", 2000, 1)
- else
- pUnit:RemoveFromWorld()
- end
- end
- function now_we_have_loaded_preset_We_can_move_on(pUnit, Event)
- if package ~= nil then
- package:CastSpell(52241) -- Choke visual
- package:CastSpell(53658) -- Bubble to stop stupid animations
- pUnit:ChannelSpell(29172, package) -- visual
- pUnit:RegisterEvent("now_we_have_loaded_preset_We_can_move_on_two", 1500, 0)
- else
- pUnit:RemoveEvents()
- pUnit:RemoveFromWorld()
- end
- end
- function now_we_have_loaded_preset_We_can_move_on_two(pUnit, Event)
- if package ~= nil then
- if pUnit:GetX() == 572 and pUnit:GetY() == -2121.5 then
- pUnit:RemoveEvents()
- pUnit:StopChannel()
- package:RemoveAura(52241) -- choke
- package:RemoveAura(53658) -- buble
- package:SetPlayerLock(0)
- package = nil
- --pUnit:RemoveFromWorld() -- Causes crash :(
- else
- pUnit:SetMovementFlags(2)
- package:ModifyFlySpeed(2.5)
- pUnit:MoveTo(572, -2121.5, 1577.2, 0, 12288, 2.5)
- package:MovePlayerTo(pUnit:GetX(), pUnit:GetY(), pUnit:GetZ() ,pUnit:GetO(), 12288)
- end
- else
- pUnit:RemoveEvents()
- pUnit:RemoveFromWorld()
- end
- end
- function zhgzFlying_Dude_OnDead(pUnit, Event)
- pUnit:RemoveEvents()
- pUnit:StopChannel()
- package:RemoveAura(52241) -- choke
- package:RemoveAura(53658) -- buble
- package:SetPlayerLock(0)
- package = nil
- --pUnit:RemoveFromWorld() -- Causes crash :(
- end
- RegisterUnitEvent(25452151, 1, "zhgzFlying_Dude_OnCombat")
- RegisterUnitEvent(25452151, 4, "zhgzFlying_Dude_OnDead")
- ---- Vile Spirits ------------------------------------------------------
- function VileSpiirt_OnCombat(pUnit, Event)
- if Lich == nil then
- pUnit:RemoveFromWorld()
- else
- pUnit:RegisterEvent("deoaopighophgeoaugozh_delay", 500, 1)
- end
- end
- function deoaopighophgeoaugozh_delay(pUnit, Event)
- pUnit:Root()
- pUnit:SetCombatCapable(1)
- pUnit:RegisterEvent("Tick_Tick_Tick_dot_dot_dot_BOOM", 29000, 1)
- end
- function Tick_Tick_Tick_dot_dot_dot_BOOM(pUnit, Event)
- pUnit:RemoveEvents()
- pUnit:CastSpell(37106)
- pUnit:RegisterEvent("Kill_Self_Suicide_Or_Whathaveyou_vile", 1000, 1)
- end
- function Kill_Self_Suicide_Or_Whathaveyou_vile(pUnit, Event)
- pUnit:Despawn(1,0)
- end
- function VileSpiirt_OnLeave(pUnit, Event)
- pUnit:RemoveEvents()
- end
- function VileSpiirt_OnDead(pUnit, Event)
- pUnit:RemoveEvents()
- end
- RegisterUnitEvent(5078151, 1, "VileSpiirt_OnCombat")
- RegisterUnitEvent(5078151, 2, "VileSpiirt_OnLeave")
- RegisterUnitEvent(5078151, 4, "VileSpiirt_OnDead")
- ------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement