Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --////////////////////////////////////////////////////--
- -- The Violet Hold Protection --
- -- Instance Script --
- -- HalestormXV --
- -- Serenade of Sorrow Server --
- -- Version 5.0 --
- --////////////////////////////////////////////////////--
- local VH_Wave_Handler_Table = {}
- local VH_Wave_Handler_Despawn = {}
- local bossDeath = 0
- local leaveCheck = 1
- local leaveCheck2 = 1
- local leaveCheck3 = 1
- local VH_WavesCounter = 1
- local DK = 48041
- local DKC = 48042
- local PG = 48040
- local SS = 48047
- local SC = 48044
- local DS = 48043
- --Bosses--
- local LDB = 48048
- local PSB = 48115
- local FDB = 48117
- ----------
- --Friendlies
- local Krasus
- local KrasusEnd
- local Alexstraz
- function VH_DeclareAlex(pUnit, event)
- Alexstraz = pUnit
- end
- function VH_DeclareKrasEnd(pUnit, event)
- KrasusEnd = pUnit
- pUnit:SendChatMessage(14, 0, "Champions! I have returned as I promised! My queen has come to our aid.")
- end
- RegisterUnitEvent(48118, 18, "VH_DeclareAlex")
- RegisterUnitEvent(48119, 18, "VH_DeclareKrasEnd")
- -----------
- --Final Encounter
- local Cypx
- -----------------
- local KX
- local KY
- local KZ
- local KO
- local VH_Spawn1
- local VH_Spawn1X
- local VH_Spawn1Y
- local VH_Spawn1Z
- local VH_Spawn1O
- local VH_Spawn2
- local VH_Spawn2X
- local VH_Spawn2Y
- local VH_Spawn2Z
- local VH_Spawn2O
- local VH_Spawn3
- local VH_Spawn3X
- local VH_Spawn3Y
- local VH_Spawn3Z
- local VH_Spawn3O
- local VH_Spawn4
- local VH_Spawn4X
- local VH_Spawn4Y
- local VH_Spawn4Z
- local VH_Spawn4O
- local VH_Spawn5
- local VH_Spawn5X
- local VH_Spawn5Y
- local VH_Spawn5Z
- local VH_Spawn5O
- function VH_DeclareMaster(pUnit, event)
- VH_Master = pUnit
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- end
- RegisterUnitEvent(48046, 18, "VH_DeclareMaster")
- --////////////////////////////////////////////////////--
- function VH_Collection_One(pUnit, event)
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- VH_Spawn1 = pUnit
- VH_Spawn1X = pUnit:GetX()
- VH_Spawn1Y = pUnit:GetY()
- VH_Spawn1Z = pUnit:GetZ()
- VH_Spawn1O = pUnit:GetO()
- end
- function VH_Collection_Two(pUnit, event)
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- VH_Spawn2 = pUnit
- VH_Spawn2X = pUnit:GetX()
- VH_Spawn2Y = pUnit:GetY()
- VH_Spawn2Z = pUnit:GetZ()
- VH_Spawn2O = pUnit:GetO()
- end
- function VH_Collection_Three(pUnit, event)
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- VH_Spawn3 = pUnit
- VH_Spawn3X = pUnit:GetX()
- VH_Spawn3Y = pUnit:GetY()
- VH_Spawn3Z = pUnit:GetZ()
- VH_Spawn3O = pUnit:GetO()
- end
- function VH_Collection_Four(pUnit, event)
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- VH_Spawn4 = pUnit
- VH_Spawn4X = pUnit:GetX()
- VH_Spawn4Y = pUnit:GetY()
- VH_Spawn4Z = pUnit:GetZ()
- VH_Spawn4O = pUnit:GetO()
- end
- function VH_Collection_Five(pUnit, event)
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- VH_Spawn5 = pUnit
- VH_Spawn5X = pUnit:GetX()
- VH_Spawn5Y = pUnit:GetY()
- VH_Spawn5Z = pUnit:GetZ()
- VH_Spawn5O = pUnit:GetO()
- end
- RegisterUnitEvent(48035, 18, "VH_Collection_One")
- RegisterUnitEvent(48036, 18, "VH_Collection_Two")
- RegisterUnitEvent(48037, 18, "VH_Collection_Three")
- RegisterUnitEvent(48038, 18, "VH_Collection_Four")
- RegisterUnitEvent(48039, 18, "VH_Collection_Five")
- function VH_Enemy_Movement(pUnit, event)
- for i,k in pairs(VH_Wave_Handler_Table) do
- k:SetMoveRunFlag(1)
- k:CastSpell(7077)
- k:MoveTo(VH_Master:GetX(), VH_Master:GetY(), VH_Master:GetZ(), VH_Master:GetO())
- end
- end
- function VH_Wave_Handler_Table_Clean(pUnit, event)
- VH_Wave_Handler_Table = {}
- end
- --////////////////////////////////////////////////////--
- -- Enemy Encounters --
- --////////////////////////////////////////////////////--
- local SkeletalCaptain
- local SkeletalSoldier
- local DeathKnightI
- local DeathKnightC
- local DarkShade
- local PlaguedGhoul
- function VH_Declare_Enemy_Table(pUnit, event)
- table.insert(VH_Wave_Handler_Table, pUnit)
- table.insert(VH_Wave_Handler_Despawn, pUnit)
- end
- function PlaguedGhouldDeclaration(pUnit, event)
- PlaguedGhoul = pUnit
- end
- function DeathKnightIDeclaration(pUnit, event)
- DeathKnightI = pUnit
- end
- function DeathKnightCDeclaration(pUnit, event)
- DeathKnightC = pUnit
- end
- function DarkShadeDeclaration(pUnit, event)
- DarkShade = pUnit
- end
- function SkeletalCaptainDeclaration(pUnit, event)
- SkeletalCaptain = pUnit
- end
- function SkeletalSoldierDeclaration(pUnit, event)
- SkeletalSoldier = pUnit
- end
- RegisterUnitEvent(48040, 18, "PlaguedGhouldDeclaration")
- RegisterUnitEvent(48041, 18, "DeathKnightIDeclaration")
- RegisterUnitEvent(48042, 18, "DeathKnightCDeclaration")
- RegisterUnitEvent(48043, 18, "DarkShadeDeclaration")
- RegisterUnitEvent(48044, 18, "SkeletalCaptainDeclaration")
- RegisterUnitEvent(48047, 18, "SkeletalSoldierDeclaration")
- ----
- RegisterUnitEvent(48040, 18, "VH_Declare_Enemy_Table")
- RegisterUnitEvent(48041, 18, "VH_Declare_Enemy_Table")
- RegisterUnitEvent(48042, 18, "VH_Declare_Enemy_Table")
- RegisterUnitEvent(48043, 18, "VH_Declare_Enemy_Table")
- RegisterUnitEvent(48044, 18, "VH_Declare_Enemy_Table")
- RegisterUnitEvent(48047, 18, "VH_Declare_Enemy_Table")
- --Bosses
- RegisterUnitEvent(48048, 18, "VH_Declare_Enemy_Table")
- RegisterUnitEvent(48115, 18, "VH_Declare_Enemy_Table")
- RegisterUnitEvent(48117, 18, "VH_Declare_Enemy_Table")
- --////////////////////////////////////////////////////--
- function VH_KrasusVisualCandy(pUnit, event)
- Krasus = pUnit
- Krasus:RegisterEvent("VH_KrasusBeams", 1000, 1)
- KX = pUnit:GetX()
- KY = pUnit:GetY()
- KZ = pUnit:GetZ()
- KO = pUnit:GetO()
- end
- function VH_KrasusBeams(pUnit, event)
- VH_Spawn1:ChannelSpell(47855, Krasus)
- VH_Spawn2:ChannelSpell(47855, Krasus)
- VH_Spawn3:ChannelSpell(47855, Krasus)
- VH_Spawn5:ChannelSpell(47855, Krasus)
- Krasus:ChannelSpell(47855, VH_Spawn4)
- end
- function VH_KrasusSpeak(pUnit, event, player)
- pUnit:GossipCreateMenu(70015, player, 0)
- pUnit:GossipMenuAddItem(0, "I am ready to aid the Red Dragonflight Krasus.", 10, 0)
- pUnit:GossipMenuAddItem(0, "I need some more time to prepare Krasus.", 20, 0)
- pUnit:GossipSendMenu(player)
- end
- function VH_KrasusSelect(pUnit, event, player, id, intid, code)
- if (intid == 10) then
- pUnit:GossipCreateMenu(70016, player, 0)
- pUnit:GossipMenuAddItem(4, "I Accept", 11, 0)
- pUnit:GossipMenuAddItem(4, "I Decline", 21, 0)
- pUnit:GossipSendMenu(player)
- end
- if (intid == 11) then
- pUnit:RegisterEvent("VH_StartInstance", 2000, 1)
- pUnit:StopChannel()
- VH_Spawn1:StopChannel()
- VH_Spawn2:StopChannel()
- VH_Spawn3:StopChannel()
- VH_Spawn4:StopChannel()
- VH_Spawn5:StopChannel()
- pUnit:SendChatMessage(12, 0, "Very well, I shall return champions you have my word!")
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- bossDeath = 0
- VH_Wave_Handler_Despawn = {}
- player:GossipComplete()
- end
- if (intid == 21) then
- local name = player:GetName()
- pUnit:SendChatMessage(12, 0, "Very well "..name..", I will hold off what I can until you are ready.")
- player:GossipComplete()
- end
- if (intid == 20) then
- local name = player:GetName()
- pUnit:SendChatMessage(12, 0, "Very well "..name..", I will hold off what I can until you are ready.")
- player:GossipComplete()
- end
- end
- RegisterUnitGossipEvent(48045, 1, "VH_KrasusSpeak")
- RegisterUnitGossipEvent(48045, 2, "VH_KrasusSelect")
- RegisterUnitEvent(48045, 18, "VH_KrasusVisualCandy")
- --////////////////////////////////////////////////////--
- function VH_LichKingDeclare(pUnit, event)
- LichKing = pUnit
- pUnit:Emote(11, 1)
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- end
- RegisterUnitEvent(48034, 18, "VH_LichKingDeclare")
- function VH_StartInstance(pUnit, event)
- pUnit:SendChatMessage(16, 0, "You can feel a dark energy fill the room.")
- pUnit:SpawnCreature(48034, 1876.880005, 805.305725, 38.609207, 3.165159, 7, 0)
- pUnit:PlaySoundToSet(14820)
- pUnit:RegisterEvent("VH_StartInstance2", 4000, 1)
- end
- function VH_StartInstance2(pUnit, event)
- LichKing:PlaySoundToSet(14804)
- LichKing:SendChatMessage(14, 0, "Pathetic...")
- LichKing:RegisterEvent("VH_StartInstance3", 6000, 1)
- end
- function VH_StartInstance3(pUnit, event)
- LichKing:PlaySoundToSet(14738)
- LichKing:SendChatMessage(14, 0, "You have crossed into the world of the dead in search of answers. You wish to save your ally, and have risked life and limb to be here? Allow me..to help.")
- LichKing:RegisterEvent("VH_StartInstance4", 20000, 1)
- end
- function VH_StartInstance4(pUnit, event)
- Krasus:SendChatMessage(14, 0, "Quiet Arthas! Your corruption has spread for to long! You will be stopped!")
- Krasus:RegisterEvent("VH_StartInstance5", 4000, 1)
- end
- function VH_StartInstance5(pUnit, event)
- LichKing:PlaySoundToSet(14803)
- LichKing:SendChatMessage(14, 0, "Touching...")
- LichKing:RegisterEvent("VH_StartInstance6", 5000, 1)
- end
- function VH_StartInstance6(pUnit, event)
- LichKing:PlaySoundToSet(14741)
- LichKing:SendChatMessage(14, 0, "Remember this mortal...for now..I give you the choice...I allow you to pick your allegeance..but in the end..you will be mine....One way...or another..")
- LichKing:RegisterEvent("VH_StartInstance7", 20000, 1)
- end
- function VH_StartInstance7(pUnit, event)
- Krasus:SendChatMessage(14, 0, "They will never side with you Arthas! You hold yourself high in glory but your reign will come to an end! By the honor of my queen I will NOT allow you to take control of Dalaran!")
- Krasus:RegisterEvent("VH_StartInstance8", 10000, 1)
- end
- function VH_StartInstance8(pUnit, event)
- LichKing:PlaySoundToSet(14770)
- LichKing:CastSpell(45775)
- LichKing:SendChatMessage(14, 0, "Very well, warriors of the frozen wastes, rise up, I command you to fight, kill and die for your master! Let none survive!")
- LichKing:RegisterEvent("VH_StartInstance9", 12000, 1)
- end
- function VH_StartInstance9(pUnit, event)
- LichKing:SendChatMessage(42, 0, "The Lich King begins to open portals in the hold.")
- Krasus:SendChatMessage(15, 0, "I am too weak champions, I must get back to Queen Alexstraza. Do NOT let Arthas take control of Dalaran, should he succeed the effects will be devastating.")
- Krasus:SpawnCreature(48046, LichKing:GetX(), LichKing:GetY(), LichKing:GetZ(), LichKing:GetO(), 35, 0)
- Krasus:RegisterEvent("VH_StartInstance10", 1000, 1)
- end
- function VH_StartInstance10(pUnit, event)
- Krasus:SetMoveRunFlag(1)
- LichKing:Despawn(1000, 0)
- Krasus:SendChatMessage(12, 0, "I will return champions, do not fear, you have the word of her Consort.")
- Krasus:MoveTo(1804.175049, 804.329712, 44.365353, 3.115675)
- Krasus:Despawn(7000, 0)
- VH_Master:RegisterEvent("VH_Wave1", 5000, 1)
- end
- --////////////////////////////////////////////////////--
- -- Waves of the Instance --
- --////////////////////////////////////////////////////--
- function VH_Instance_Reset_Check(pUnit, event)
- if VH_Master:GetInRangePlayersCount() == 0 then
- VH_Master:RemoveEvents()
- VH_Master:SpawnCreature(48045, KX, KY, KZ, KO, 35, 0)
- VH_Master:RegisterEvent("VH_Enemy_Reset_Despawn", 2000, 1)
- bossDeath = 0
- else
- end
- end
- function VH_Instance_Increase_Check(pUnit, event)
- VH_WavesCounter = VH_WavesCounter + 1
- end
- function VH_Enemy_Reset_Despawn(pUnit, event)
- for i,k in pairs(VH_Wave_Handler_Despawn) do
- k:Despawn(1000, 0)
- end
- VH_Master:Despawn(2000, 0)
- end
- function VH_WaveCounterConversion(pUnit, event)
- if VH_WavesCounter == 1 then
- print "Wave number 1 has spawned.."
- else
- print ("Wave number "..tostring(VH_WavesCounter).." has spawned..")
- end
- end
- function VH_Wave1(pUnit, event)
- VH_Master:SpawnGameObject(8000028, VH_Spawn1X, VH_Spawn1Y, VH_Spawn1Z, VH_Spawn1O, 5000)
- local mobPick = math.random(1, 3)
- if mobPick == 1 then
- pUnit:SpawnCreature(SS, VH_Spawn1X + 2, VH_Spawn1Y + 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:SpawnCreature(SS, VH_Spawn1X - 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:SpawnCreature(SC, VH_Spawn1X + 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0, 40345)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobPick == 2 then
- pUnit:SpawnCreature(DK, VH_Spawn1X + 2, VH_Spawn1Y + 2, VH_Spawn1Z, VH_Spawn1O, 14, 0, 38237)
- pUnit:SpawnCreature(DK, VH_Spawn1X - 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0, 38237)
- pUnit:SpawnCreature(DKC, VH_Spawn1X + 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0, 40343)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobPick == 3 then
- pUnit:SpawnCreature(PG, VH_Spawn1X + 2, VH_Spawn1Y + 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:SpawnCreature(DS, VH_Spawn1X - 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:SpawnCreature(PG, VH_Spawn1X + 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- --if bossDeath == 0 then
- VH_Master:RegisterEvent("VH_Waves", 150000, 4)
- --VH_Master:RegisterEvent("VH_BossWave1", 660000, 1) --Possible Fix?
- if bossDeath == 0 then
- print "The waves have started.."
- end
- --else
- --end
- --if bossDeath == 0 then --OLD METHOD--
- --VH_Master:RegisterEvent("VH_BossWave1", 780000, 1)
- --else
- --end
- --if bossDeath == 1 then
- --VH_Master:RegisterEvent("VH_Waves", 150000, 4)
- --VH_Master:RegisterEvent("VH_BossWave2", 660000, 1) --Possible Fix?
- --else
- --end
- --if bossDeath == 1 then --OLD METHOD--
- --VH_Master:RegisterEvent("VH_BossWave2", 780000, 1)
- --else
- --end
- --if bossDeath == 2 then
- --VH_Master:RegisterEvent("VH_Waves", 150000, 4)
- --VH_Master:RegisterEvent("VH_BossWave3", 660000, 1) --Possible Fix?
- --else
- --end
- VH_Master:SendChatMessage(42, 0, "The portal has opened and wave "..tostring(VH_WavesCounter).." has arrived!")
- print ("Wave number "..tostring(VH_WavesCounter).." has spawned..")
- VH_Master:RegisterEvent("VH_Instance_Increase_Check", 2000, 1)
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- end
- function VH_Waves(pUnit, event)
- VH_WaveSelection = math.random(1, 5)
- VH_Master:SendChatMessage(42, 0, "The portal has opened and wave "..tostring(VH_WavesCounter).." has arrived!")
- if VH_WaveSelection == 1 then
- VH_Master:SpawnGameObject(8000028, VH_Spawn1X, VH_Spawn1Y, VH_Spawn1Z + 4, VH_Spawn1O, 5000)
- local mobSelection = math.random(1, 3)
- if mobSelection == 1 then
- pUnit:SpawnCreature(SS, VH_Spawn1X + 2, VH_Spawn1Y + 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:SpawnCreature(SS, VH_Spawn1X - 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:SpawnCreature(SC, VH_Spawn1X + 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0, 40345)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 2 then
- pUnit:SpawnCreature(DK, VH_Spawn1X + 2, VH_Spawn1Y + 2, VH_Spawn1Z, VH_Spawn1O, 14, 0, 38237)
- pUnit:SpawnCreature(DK, VH_Spawn1X - 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0, 38237)
- pUnit:SpawnCreature(DKC, VH_Spawn1X + 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0, 40343)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 3 then
- pUnit:SpawnCreature(PG, VH_Spawn1X + 2, VH_Spawn1Y + 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:SpawnCreature(DS, VH_Spawn1X - 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:SpawnCreature(PG, VH_Spawn1X + 2, VH_Spawn1Y - 2, VH_Spawn1Z, VH_Spawn1O, 14, 0)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- end
- if VH_WaveSelection == 2 then
- VH_Master:SpawnGameObject(8000028, VH_Spawn2X, VH_Spawn2Y, VH_Spawn2Z + 4, VH_Spawn2O, 5000)
- local mobSelection = math.random(1, 3)
- if mobSelection == 1 then
- pUnit:SpawnCreature(SS, VH_Spawn2X + 2, VH_Spawn2Y + 2, VH_Spawn2Z, VH_Spawn2O, 14, 0)
- pUnit:SpawnCreature(SS, VH_Spawn2X - 2, VH_Spawn2Y - 2, VH_Spawn2Z, VH_Spawn2O, 14, 0)
- pUnit:SpawnCreature(SC, VH_Spawn2X + 2, VH_Spawn2Y - 2, VH_Spawn2Z, VH_Spawn2O, 14, 0, 40345)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 2 then
- pUnit:SpawnCreature(DK, VH_Spawn2X + 2, VH_Spawn2Y + 2, VH_Spawn2Z, VH_Spawn2O, 14, 0, 38237)
- pUnit:SpawnCreature(DK, VH_Spawn2X - 2, VH_Spawn2Y - 2, VH_Spawn2Z, VH_Spawn2O, 14, 0, 38237)
- pUnit:SpawnCreature(DKC, VH_Spawn2X + 2, VH_Spawn2Y - 2, VH_Spawn2Z, VH_Spawn2O, 14, 0, 40343)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 3 then
- pUnit:SpawnCreature(PG, VH_Spawn2X + 2, VH_Spawn2Y + 2, VH_Spawn2Z, VH_Spawn2O, 14, 0)
- pUnit:SpawnCreature(DS, VH_Spawn2X - 2, VH_Spawn2Y - 2, VH_Spawn2Z, VH_Spawn2O, 14, 0)
- pUnit:SpawnCreature(PG, VH_Spawn2X + 2, VH_Spawn2Y - 2, VH_Spawn2Z, VH_Spawn2O, 14, 0)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- end
- if VH_WaveSelection == 3 then
- VH_Master:SpawnGameObject(8000028, VH_Spawn3X, VH_Spawn3Y, VH_Spawn3Z + 4, VH_Spawn3O, 1, 5000)
- local mobSelection = math.random(1, 3)
- if mobSelection == 1 then
- pUnit:SpawnCreature(SS, VH_Spawn3X + 2, VH_Spawn3Y + 2, VH_Spawn3Z, VH_Spawn3O, 14, 0)
- pUnit:SpawnCreature(SS, VH_Spawn3X - 2, VH_Spawn3Y - 2, VH_Spawn3Z, VH_Spawn3O, 14, 0)
- pUnit:SpawnCreature(SC, VH_Spawn3X + 2, VH_Spawn3Y - 2, VH_Spawn3Z, VH_Spawn3O, 14, 0, 40345)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 2 then
- pUnit:SpawnCreature(DK, VH_Spawn3X + 2, VH_Spawn3Y + 2, VH_Spawn3Z, VH_Spawn3O, 14, 0, 38237)
- pUnit:SpawnCreature(DK, VH_Spawn3X - 2, VH_Spawn3Y - 2, VH_Spawn3Z, VH_Spawn3O, 14, 0, 38237)
- pUnit:SpawnCreature(DKC, VH_Spawn3X + 2, VH_Spawn3Y - 2, VH_Spawn3Z, VH_Spawn3O, 14, 0, 40343)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 3 then
- pUnit:SpawnCreature(PG, VH_Spawn3X + 2, VH_Spawn3Y + 2, VH_Spawn3Z, VH_Spawn3O, 14, 0)
- pUnit:SpawnCreature(DS, VH_Spawn3X - 2, VH_Spawn3Y - 2, VH_Spawn3Z, VH_Spawn3O, 14, 0)
- pUnit:SpawnCreature(PG, VH_Spawn3X + 2, VH_Spawn3Y - 2, VH_Spawn3Z, VH_Spawn3O, 14, 0)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- end
- if VH_WaveSelection == 4 then
- VH_Master:SpawnGameObject(8000028, VH_Spawn4X, VH_Spawn4Y, VH_Spawn4Z + 4, VH_Spawn4O, 5000)
- local mobSelection = math.random(1, 3)
- if mobSelection == 1 then
- pUnit:SpawnCreature(SS, VH_Spawn4X + 2, VH_Spawn4Y + 2, VH_Spawn4Z, VH_Spawn4O, 14, 0)
- pUnit:SpawnCreature(SS, VH_Spawn4X - 2, VH_Spawn4Y - 2, VH_Spawn4Z, VH_Spawn4O, 14, 0)
- pUnit:SpawnCreature(SC, VH_Spawn4X + 2, VH_Spawn4Y - 2, VH_Spawn4Z, VH_Spawn4O, 14, 0, 40345)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 2 then
- pUnit:SpawnCreature(DK, VH_Spawn4X + 2, VH_Spawn4Y + 2, VH_Spawn4Z, VH_Spawn4O, 14, 0, 38237)
- pUnit:SpawnCreature(DK, VH_Spawn4X - 2, VH_Spawn4Y - 2, VH_Spawn4Z, VH_Spawn4O, 14, 0, 38237)
- pUnit:SpawnCreature(DKC, VH_Spawn4X + 2, VH_Spawn4Y - 2, VH_Spawn4Z, VH_Spawn4O, 14, 0, 40343)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 3 then
- pUnit:SpawnCreature(PG, VH_Spawn4X + 2, VH_Spawn4Y + 2, VH_Spawn4Z, VH_Spawn4O, 14, 0)
- pUnit:SpawnCreature(DS, VH_Spawn4X - 2, VH_Spawn4Y - 2, VH_Spawn4Z, VH_Spawn4O, 14, 0)
- pUnit:SpawnCreature(PG, VH_Spawn4X + 2, VH_Spawn4Y - 2, VH_Spawn4Z, VH_Spawn4O, 14, 0)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- end
- if VH_WaveSelection == 5 then
- VH_Master:SpawnGameObject(8000028, VH_Spawn5X, VH_Spawn5Y, VH_Spawn5Z + 4, VH_Spawn5O, 5000)
- local mobSelection = math.random(1, 3)
- if mobSelection == 1 then
- pUnit:SpawnCreature(SS, VH_Spawn5X + 2, VH_Spawn5Y + 2, VH_Spawn5Z, VH_Spawn5O, 14, 0)
- pUnit:SpawnCreature(SS, VH_Spawn5X - 2, VH_Spawn5Y - 2, VH_Spawn5Z, VH_Spawn5O, 14, 0)
- pUnit:SpawnCreature(SC, VH_Spawn5X + 2, VH_Spawn5Y - 2, VH_Spawn5Z, VH_Spawn5O, 14, 0, 40345)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 2 then
- pUnit:SpawnCreature(DK, VH_Spawn5X + 2, VH_Spawn5Y + 2, VH_Spawn5Z, VH_Spawn5O, 14, 0, 38237)
- pUnit:SpawnCreature(DK, VH_Spawn5X - 2, VH_Spawn5Y - 2, VH_Spawn5Z, VH_Spawn5O, 14, 0, 38237)
- pUnit:SpawnCreature(DKC, VH_Spawn5X + 2, VH_Spawn5Y - 2, VH_Spawn5Z, VH_Spawn5O, 14, 0, 40343)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- if mobSelection == 3 then
- pUnit:SpawnCreature(PG, VH_Spawn5X + 2, VH_Spawn5Y + 2, VH_Spawn5Z, VH_Spawn5O, 14, 0)
- pUnit:SpawnCreature(DS, VH_Spawn5X - 2, VH_Spawn5Y - 2, VH_Spawn5Z, VH_Spawn5O, 14, 0)
- pUnit:SpawnCreature(PG, VH_Spawn5X + 2, VH_Spawn5Y - 2, VH_Spawn5Z, VH_Spawn5O, 14, 0)
- pUnit:RegisterEvent("VH_Enemy_Movement", 1000, 1)
- pUnit:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- end
- end
- if VH_WavesCounter == 5 then
- VH_Master:RemoveEvents()
- VH_Master:RegisterEvent("VH_BossWave1", 150000, 1)
- end
- if VH_WavesCounter == 11 then
- VH_Master:RemoveEvents()
- VH_Master:RegisterEvent("VH_BossWave2", 150000, 1)
- end
- if VH_WavesCounter == 17 then
- VH_Master:RemoveEvents()
- VH_Master:RegisterEvent("VH_BossWave3", 150000, 1)
- end
- if (VH_WavesCounter ~= 5) or (VH_WavesCounter ~= 11) or (VH_WavesCounter ~= 17) then
- VH_Master:RegisterEvent("VH_Instance_Increase_Check", 2000, 1)
- VH_Master:RegisterEvent("VH_WaveCounterConversion", 1000, 1)
- end
- end
- function VH_BossWave1(pUnit, event)
- VH_Master:RemoveEvents()
- VH_Master:SendChatMessage(42, 0, "A leader of the invasion force has spawned!")
- VH_Master:SpawnGameObject(8000028, VH_Master:GetX(), VH_Master:GetY(), VH_Master:GetZ(), VH_Master:GetO(), 5000)
- VH_Master:SpawnCreature(LDB, VH_Master:GetX() - 3, VH_Master:GetY() - 3, VH_Master:GetZ(), VH_Master:GetO(), 14, 0, 31308)
- VH_Master:RegisterEvent("VH_Instance_Increase_Check", 2000, 1)
- VH_Master:RegisterEvent("VH_WaveCounterConversion", 1000, 1)
- end
- function VH_BossWave2(pUnit, event)
- VH_Master:RemoveEvents()
- VH_Master:SendChatMessage(42, 0, "A leader of the invasion force has spawned!")
- VH_Master:SpawnGameObject(8000028, VH_Master:GetX(), VH_Master:GetY(), VH_Master:GetZ(), VH_Master:GetO(), 5000)
- VH_Master:SpawnCreature(PSB, VH_Master:GetX() - 3, VH_Master:GetY() - 3, VH_Master:GetZ(), VH_Master:GetO(), 14, 0, 39245)
- VH_Master:RegisterEvent("VH_Instance_Increase_Check", 2000, 1)
- VH_Master:RegisterEvent("VH_WaveCounterConversion", 1000, 1)
- end
- function VH_BossWave3(pUnit, event)
- VH_Master:RemoveEvents()
- VH_Master:SendChatMessage(42, 0, "The final leader has arrived.")
- VH_Master:SpawnGameObject(8000028, VH_Master:GetX(), VH_Master:GetY(), VH_Master:GetZ(), VH_Master:GetO(), 5000)
- VH_Master:SpawnCreature(FDB, VH_Master:GetX() - 3, VH_Master:GetY() - 3, VH_Master:GetZ(), VH_Master:GetO(), 7, 0, 39422)
- VH_Master:RegisterEvent("VH_WaveCounterConversion", 1000, 1)
- end
- --Violet Hold NPC Boss Scripts--
- function VH_InstanceLDB_PrimeAbility(pUnit, event)
- local target = pUnit:GetRandomPlayer(0)
- if target ~= nil then
- local selection = math.random(1 , 4)
- if selection == 1 then
- pUnit:FullCastSpellOnTarget(38836, target)
- end
- if selection == 2 then
- pUnit:FullCastSpellOnTarget(38534, target)
- end
- if selection == 3 then
- pUnit:FullCastSpellOnTarget(59016, target)
- end
- if selection == 4 then
- pUnit:FullCastSpellOnTarget(62249, target)
- end
- else
- end
- end
- function VH_InstanceLDB_BlastNova(pUnit, event)
- pUnit:FullCastSpell(30600)
- end
- function VH_InstanceLDB_Start(pUnit, event)
- pUnit:PlaySoundToSet(13175)
- pUnit:SendChatMessage(14, 0, "Such is the fate of all who oppose the Lich King.")
- pUnit:RegisterEvent("VH_InstanceLDB_PrimeAbility", math.random(6000, 9000), 0)
- pUnit:RegisterEvent("VH_InstanceLDB_BlastNova", 24000, 0)
- pUnit:RegisterEvent("VH_InstanceLDB_Phase2", 1000, 0)
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- end
- ---
- ---
- function VH_InstanceLDB_Explosion(pUnit, event)
- pUnit:SendChatMessage(14, 0, "I will be your demise!")
- pUnit:FullCastSpell(37106)
- end
- function VH_InstanceLDB_Phase2(pUnit, event)
- if pUnit:GetHealthPct() <= 70 then
- pUnit:RemoveEvents()
- pUnit:PlaySoundToSet(13177)
- pUnit:SendChatMessage(14, 0, "Surely you can see the futility of it all?")
- pUnit:RegisterEvent("VH_InstanceLDB_PrimeAbility", math.random(6000, 9000), 0)
- pUnit:RegisterEvent("VH_InstanceLDB_Explosion", 27000, 0)
- pUnit:RegisterEvent("VH_InstanceLDB_Phase3", 1000, 0)
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- end
- end
- function VH_InstanceLDB_Lightning(pUnit, event)
- local light = pUnit:GetMainTank()
- if light ~= nil then
- pUnit:FullCastSpellOnTarget(46479, light)
- else
- end
- end
- function VH_InstanceLDB_SpecialChill(pUnit, event)
- local chillTarg = pUnit:GetRandomPlayer(0)
- if chillTarg ~= nil then
- pUnit:PlaySoundToSet(13173)
- pUnit:SendChatMessage(14, 0, "The chill you feel is the herald of your doom.")
- pUnit:CastSpellAoF(chillTarg:GetX(), chillTarg:GetY(), chillTarg:GetZ(), 28547)
- else
- end
- end
- function VH_InstanceLDB_Phase3(pUnit, event)
- if pUnit:GetHealthPct() <= 40 then
- pUnit:RemoveEvents()
- pUnit:PlaySoundToSet(13178)
- pUnit:SendChatMessage(14, 0, "Just give up and die already!")
- pUnit:RegisterEvent("VH_InstanceLDB_PrimeAbility", math.random(6000, 9000), 0)
- pUnit:RegisterEvent("VH_InstanceLDB_Lightning", math.random(12000, 15000), 0)
- pUnit:RegisterEvent("VH_InstanceLDB_SpecialChill", 32000, 0)
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- end
- end
- function VH_InstanceLDB_Dies(pUnit, event)
- pUnit:RemoveEvents()
- bossDeath = 1
- leaveCheck = 0
- pUnit:PlaySoundToSet(13174)
- pUnit:SendChatMessage(14, 0, "Haha...your efforts...are in....vain...")
- VH_Master:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- VH_Master:RegisterEvent("VH_Wave1", 30000, 1)
- end
- function VH_InstanceLDB_Leaves(pUnit, event)
- pUnit:RemoveEvents()
- if leaveCheck == 1 then
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- end
- end
- RegisterUnitEvent(LDB, 1, "VH_InstanceLDB_Start")
- RegisterUnitEvent(LDB, 2, "VH_InstanceLDB_Leaves")
- RegisterUnitEvent(LDB, 4, "VH_InstanceLDB_Dies")
- -------------------------------------------------------------------
- -------------------------------------------------------------------
- function VH_InstancePSB_Frostshock(pUnit, event)
- local target = pUnit:GetRandomPlayer(0)
- if target ~= nil then
- pUnit:FullCastSpellOnTarget(29666, target)
- else
- end
- end
- function VH_InstancePSB_FrostVolley(pUnit, event)
- pUnit:FullCastSpell(61594)
- end
- function VH_InstancePSB_Aggro(pUnit, event)
- pUnit:PlaySoundToSet(13947)
- pUnit:SendChatMessage(14, 0, "We finish this now champions of the Kirin'Tor!")
- pUnit:RegisterEvent("VH_InstancePSB_Frostshock", 6000, 0)
- pUnit:RegisterEvent("VH_InstancePSB_FrostVolley", 15000, 0)
- pUnit:RegisterEvent("VH_InstancePSB_Phase2", 1000, 0)
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- end
- ----
- ----
- function VH_InstancePSB_FrostBreath(pUnit, event)
- local target = pUnit:GetMainTank()
- if target ~= nil then
- pUnit:FullCastSpellOnTarget(44799, target)
- else
- end
- end
- function VH_InstancePSB_FrostCleave(pUnit, event)
- local target = pUnit:GetMainTank()
- if target ~= nil then
- pUnit:FullCastSpellOnTarget(51857, target)
- else
- end
- end
- function VH_InstancePSB_Phase2(pUnit, event)
- if pUnit:GetHealthPct() <= 75 then
- pUnit:RemoveEvents()
- pUnit:PlaySoundToSet(13953)
- pUnit:SendChatMessage(14, 0, "Dalaran will fall!")
- pUnit:RegisterEvent("VH_InstancePSB_FrostCleave", 6000, 0)
- pUnit:RegisterEvent("VH_InstancePSB_FrostBreath", 15000, 0)
- pUnit:RegisterEvent("VH_InstancePSB_Phase3", 1000, 0)
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- end
- end
- ----
- ----
- function VH_InstancePSB_Blizzard(pUnit, event)
- pUnit:PlaySoundToSet(13950)
- pUnit:SendChatMessage(14, 0, "Who among you can withstand my power!")
- pUnit:RegisterEvent("VH_InstancePSB_BlizzardGo", 2000, 4)
- end
- function VH_InstancePSB_BlizzardGo(pUnit, event)
- pUnit:CastSpell(36751)
- end
- function VH_InstancePSB_Phase3(pUnit, event)
- if pUnit:GetHealthPct() <= 50 then
- pUnit:RemoveEvents()
- pUnit:PlaySoundToSet(13948)
- pUnit:SendChatMessage(14, 0, "Shiver and die!")
- pUnit:RegisterEvent("VH_InstancePSB_FrostCleave", 6000, 0)
- pUnit:RegisterEvent("VH_InstancePSB_FrostVolley", 15000, 0)
- pUnit:RegisterEvent("VH_InstancePSB_Blizzard", 27000, 0)
- pUnit:RegisterEvent("VH_InstancePSB_Phase4", 1000, 0)
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- end
- end
- ----
- ----
- local selectTrue
- function VH_InstancePSB_SpecialFinal4(pUnit, event)
- pUnit:RemoveEvents()
- pUnit:CastSpell(42049)
- pUnit:SetFlying()
- pUnit:MoveFly(pUnit:GetX(), pUnit:GetY(), pUnit:GetZ() + 10, pUnit:GetO())
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- pUnit:PlaySoundToSet(13949)
- pUnit:SendChatMessage(14, 0, "The world has forgotten what true magic is! Let this be a reminder!")
- pUnit:RegisterEvent("VH_InstancePSB_SpecialAbility4Cast", 2000, 4)
- pUnit:RegisterEvent("VH_InstancePSB_Phase4Return", 9000, 1)
- pUnit:RegisterEvent("VH_InstancePSB_Phase4Moves", 10000, 1)
- end
- function VH_InstancePSB_SpecialAbility4Cast(pUnit, event)
- pUnit:FullCastSpell(38837)
- end
- function VH_InstancePSB_Phase4Return(pUnit, event)
- pUnit:MoveTo(pUnit:GetX(), pUnit:GetY(), pUnit:GetZ() - 10, pUnit:GetO())
- end
- function VH_InstancePSB_Phase4(pUnit, event)
- if pUnit:GetHealthPct() <= 30 then
- pUnit:RemoveEvents()
- pUnit:PlaySoundToSet(13952)
- selectTrue = pUnit:GetUInt64Value(UNIT_FIELD_FLAGS)
- pUnit:SendChatMessage(14, 0, "I will end the Kirin'Tor!")
- pUnit:RegisterEvent("VH_InstancePSB_Phase4Moves", 1000, 1)
- end
- end
- function VH_InstancePSB_Phase4Moves(pUnit, event)
- pUnit:Land()
- pUnit:SetUInt64Value(UNIT_FIELD_FLAGS, selectTrue)
- pUnit:RegisterEvent("VH_InstancePSB_FrostCleave", math.random(6000, 8000) , 0)
- pUnit:RegisterEvent("VH_InstancePSB_Frostshock", math.random(7000, 9000) , 0)
- pUnit:RegisterEvent("VH_InstancePSB_FrostVolley", math.random(14000, 17000), 0)
- pUnit:RegisterEvent("VH_InstancePSB_FrostBreath", math.random(18000, 22000), 0)
- pUnit:RegisterEvent("VH_InstancePSB_SpecialFinal4", 26000, 0)
- end
- function VH_InstancePSB_Dies(pUnit, event)
- pUnit:RemoveEvents()
- bossDeath = 2
- leaveCheck2 = 0
- pUnit:PlaySoundToSet(13955)
- pUnit:SendChatMessage(14, 0, "Perhaps we have...underestimated...you..")
- VH_Master:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- VH_Master:RegisterEvent("VH_Wave1", 30000, 1)
- end
- function VH_InstancePSB_Leaves(pUnit, event)
- pUnit:RemoveEvents()
- if leaveCheck2 == 1 then
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- end
- end
- function VH_InstancePSB_Slay(pUnit, event)
- pUnit:PlaySoundToSet(13951)
- pUnit:SendChatMessage(14, 0, "Am I interrupting?")
- pUnit:CastSpell(38580)
- end
- RegisterUnitEvent(PSB, 1, "VH_InstancePSB_Aggro")
- RegisterUnitEvent(PSB, 2, "VH_InstancePSB_Leaves")
- RegisterUnitEvent(PSB, 3, "VH_InstancePSB_Slay")
- RegisterUnitEvent(PSB, 4, "VH_InstancePSB_Dies")
- -------------------------------------------------------------------
- -- Final Encounter
- -------------------------------------------------------------------
- local CypxSelect
- function VH_InstanceFDB_ShadowVolley(pUnit, event)
- pUnit:FullCastSpell(38840)
- end
- ----------------------CINEMATIC FOR THE FINAL BATTLE-------------------------------
- function VH_InstanceEnterAlexKrasus(pUnit, event)
- VH_Master:SpawnCreature(48118, 1804.175049, 804.329712, 44.365353, 3.115675, 1719, 0)
- VH_Master:SpawnCreature(48119, 1804.175049, 804.329712 + 6, 44.365353, 3.115675, 1719, 0, 39291)
- Cypx:SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
- Cypx:CastSpell(30206)
- Cypx:RemoveEvents()
- --Cypx:SetFaction(7)
- Cypx:SetCombatCapable(1)
- Cypx:Root()
- VH_Master:RegisterEvent("VH_KrasusAlexMove", 2000, 1)
- end
- function VH_KrasusAlexMove(pUnit, event)
- KrasusEnd:SetMoveRunFlag(1)
- KrasusEnd:MoveTo(KX - 4, KY, KZ, KO)
- Alexstraz:SetMoveRunFlag(1)
- Alexstraz:MoveTo(KX + 4, KY - 3, KZ, KO)
- VH_Master:RegisterEvent("VH_AlexstrazSpeak", 5000, 1)
- end
- function VH_AlexstrazSpeak(pUnit, event)
- Alexstraz:SendChatMessage(12, 0, "Do not fear champions, I have contained this creature within my bindings. Krasus has told me what you have endured to protect Dalaran. Be at rest now. This is almost over.")
- Alexstraz:RegisterEvent("VH_AlexstrazSpeak2", 5000, 1)
- Cypx:SendChatMessage(16, 0, "Chrysophylax has become weakend by the Alexstraza's prison.")
- end
- function VH_AlexstrazSpeak2(pUnit, event)
- Cypx:PlaySoundToSet(11209)
- Cypx:SendChatMessage(12, 0, "I revel in your pain.")
- Cypx:RegisterEvent("VH_AlexstrazSpeak3", 6000, 1)
- end
- function VH_AlexstrazSpeak3(pUnit, event)
- KrasusEnd:SendChatMessage(14, 0, "Quiet you sniviling wretch..You think you can insult us that easily..I should slit your -")
- KrasusEnd:RegisterEvent("VH_AlexstrazSpeak4", 5000, 1)
- end
- function VH_AlexstrazSpeak4(pUnit, event)
- Alexstraz:SendChatMessage(12, 0, "Enough Krasus, you know there is no prize in action out of anger. This creature is helpless in my bindings.")
- Cypx:SendChatMessage(16, 0, "Chrysophylax shows a sly grin.")
- Alexstraz:RegisterEvent("VH_AlexstrazSpeak5", 8000, 1)
- end
- function VH_AlexstrazSpeak5(pUnit, event)
- Cypx:PlaySoundToSet(11206)
- Cypx:SendChatMessage(12, 0, "You seek a prize aye? How about death?")
- Cypx:RegisterEvent("VH_AlexstrazSpeak6", 8000, 1)
- end
- function VH_AlexstrazSpeak6(pUnit, event)
- Alexstraz:SendChatMessage(12, 0, "Be silent creature. Do not think your manipulative chat can turn my consort, myself, or these Champions of the Kirin'Tor!")
- Alexstraz:RegisterEvent("VH_AlexstrazSpeak7", 10000, 1)
- end
- function VH_AlexstrazSpeak7(pUnit, event)
- Cypx:SendChatMessage(12, 0, "You know I can break these chains Alexstraza, and you know these bindings cannot hold me..and when I do break free it will not be pleasing..")
- Cypx:RegisterEvent("VH_AlexstrazSpeak8", 8000, 1)
- end
- function VH_AlexstrazSpeak8(pUnit, event)
- KrasusEnd:SendChatMessage(12, 0, "You are foolish. My queen I think we should remove this creature and bring him back to the temple for justice. These champions must be weary.")
- Alexstraz:SetMoveRunFlag(0)
- Alexstraz:MoveTo(VH_Master:GetX() - 4, VH_Master:GetY(), VH_Master:GetZ(), VH_Master:GetO())
- KrasusEnd:SetMoveRunFlag(0)
- KrasusEnd:MoveTo(VH_Master:GetX() + 4, VH_Master:GetY() , VH_Master:GetZ(), VH_Master:GetO())
- KrasusEnd:RegisterEvent("VH_AlexstrazSpeak9", 4000, 1)
- end
- function VH_AlexstrazSpeak9(pUnit, event)
- Alexstraz:SendChatMessage(12, 0, "Yes Krasus, it is time to return. Champions I am forever in your debt. Thank You for the aid you have -")
- Alexstraz:RegisterEvent("VH_AlexstrazSpeak10", 3000, 1)
- end
- function VH_AlexstrazSpeak10(pUnit, event)
- Cypx:PlaySoundToSet(11207)
- Cypx:SendChatMessage(12, 0, "I hate to say I told you so...")
- Cypx:RegisterEvent("VH_CypxVisualEscape", 2000, 4)
- Cypx:RegisterEvent("VH_CypxBeginTransform", 9000, 1)
- end
- function VH_CypxVisualEscape(pUnit, event)
- Cypx:CastSpell(46242)
- end
- function VH_CypxBeginTransform(pUnit, event)
- Cypx:RemoveAura(30206)
- KrasusEnd:SendChatMessage(12, 0, "What is this?!")
- Cypx:CastSpell(30852)
- Cypx:RegisterEvent("VH_CypxDragonForm", 4000, 1)
- end
- function VH_CypxDragonForm(pUnit, event)
- Cypx:SetModel(11380)
- Cypx:SetScale(.5)
- Cypx:SetFaction(1720)
- Cypx:SetUInt64Value(UNIT_FIELD_FLAGS, CypxSelect)
- Cypx:SetCombatCapable(0)
- Cypx:Unroot()
- Cypx:PlaySoundToSet(13414)
- Cypx:SendChatMessage(14, 0, "This is the hour of our greatest triumph!")
- Cypx:RegisterEvent("VH_InstanceFDB_Phase1", 1000, 1)
- end
- ----------------------CINEMATIC END-----------------------------------------
- function VH_CypxShadowBreath(pUnit, event)
- local target = pUnit:GetMainTank()
- if target ~= nil then
- Cypx:FullCastSpellOnTarget(59126, target)
- else
- end
- end
- function VH_AlexFireball(pUnit, event)
- Alexstraz:FullCastSpellOnTarget(29953, Cypx)
- end
- function VH_KrasusDebuff(pUnit, event)
- KrasusEnd:FullCastSpellOnTarget(46279, Cypx)
- end
- function VH_InstanceFDB_Phase1(pUnit, event)
- Alexstraz:SendChatMessage(14, 0, "Do not lose faith champions! I will aid you in this fight!")
- Cypx:RegisterEvent("VH_CypxShadowBreath", 10000, 0)
- Alexstraz:RegisterEvent("VH_AlexFireball", 7000, 0)
- KrasusEnd:RegisterEvent("VH_KrasusDebuff", 12000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_ShadowVolley", 7000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_Phase2", 1000, 0)
- end
- --
- --
- function VH_KrasusFlamestrike(pUnit, event)
- KrasusEnd:CastSpellAoF(Cypx:GetX(), Cypx:GetY(), Cypx:GetZ(), 41481)
- end
- function VH_InstanceFDB_TimeStop(pUnit, event)
- Cypx:PlaySoundToSet(13410)
- Cypx:SendChatMessage(14, 0, "Tick Tock, Tick Tock.")
- Cypx:CastSpell(60074)
- end
- function VH_AlexChainHeal(pUnit, event)
- Alexstraz:FullCastSpellOnTarget(42027, KrasusEnd)
- end
- function VH_InstanceFDB_Darkness(pUnit, event)
- local target = Cypx:GetRandomPlayer(0)
- if target ~= pUnit:GetMainTank() then
- Cypx:PlaySoundToSet(13413)
- Cypx:SendChatMessage(14, 0, "There is no future...for you.")
- Cypx:CastSpellAoF(target:GetX(), target:GetY(), target:GetZ(), 45996)'
- else
- Cypx:RegisterEvent("VH_InstanceFDB_Darkness", 500, 1)
- end
- end
- function VH_InstanceFDB_Phase2(pUnit, event)
- if Cypx:GetHealthPct() <= 80 then
- pUnit:RemoveEvents()
- Cypx:PlaySoundToSet(13412)
- Cypx:SendChatMessage(14, 0, "Lets get this over with..")
- Cypx:RegisterEvent("VH_CypxShadowBreath", 10000, 0)
- Alexstraz:RegisterEvent("VH_AlexFireball", 7000, 0)
- KrasusEnd:RegisterEvent("VH_KrasusFlamestrike", 17000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_ShadowVolley", 7000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_TimeStop", 23000, 0)
- Alexstraz:RegisterEvent("VH_AlexChainHeal", 32000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_Darkness", 30000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_Phase3", 1000, 0)
- end
- end
- ----
- ----
- function VH_InstanceFDB_Phase3(pUnit, event)
- if Cypx:GetHealthPct() <= 65 then
- pUnit:RemoveEvents()
- Cypx:SetFlying()
- Cypx:MoveTo(VH_Master:GetX(), VH_Master:GetY(), VH_Master:GetZ() + 20, VH_Master:GetO())
- Cypx:PlaySoundToSet(10414)
- Cypx:SendChatMessage(14, 0, "If you do not cese this foolish quest then you will die!")
- Cypx:RegisterEvent("VH_InstanceAlexMorph", 3000, 1)
- end
- end
- function VH_InstanceAlexMorph(pUnit, event)
- Alexstraz:SendChatMessage(14, 0, "Very well Chrysophylax! If it is a battle in the air you wish then it is one you will get!")
- Alexstraz:MoveTo(VH_Master:GetX(), VH_Master:GetY(), VH_Master:GetZ(), VH_Master:GetO())
- Alexstraz:SetCombatMeleeCapable(1)
- Alexstraz:RegisterEvent("VH_InstanceKrasusSpeak", 3000, 1)
- end
- function VH_InstanceKrasusSpeak(pUnit, event)
- KrasusEnd:SendChatMessage(14, 0, "My queen we should stay grounded to aid the champions!")
- KrasusEnd:MoveTo(VH_Master:GetX(), VH_Master:GetY(), VH_Master:GetZ(), VH_Master:GetO())
- KrasusEnd:SetCombatMeleeCapable(1)
- KrasusEnd:RegisterEvent("VH_InstanceFDB_Phase3Go", 2000, 1)
- end
- --
- --
- function VH_InstanceAlexFlameBreath(pUnit, event)
- Alexstraz:FullCastSpellOnTarget(29953, Cypx)
- end
- function VH_InstanceFDB_Shadowflame(pUnit, event)
- Cypx:FullCastSpellOnTarget(22539, Alexstraz)
- end
- function VH_InstanceFDB_Flameshock(pUnit, event)
- local flameShock = pUnit:GetRandomPlayer(0)
- if flameShock ~= nil then
- Cypx:FullCastSpellOnTarget(41115, flameShock)
- else
- end
- end
- function VH_InstanceFDB_FireVolley(pUnit, event)
- pUnit:FullCastSpell(37109)
- end
- function VH_InstanceKrasusCleave(pUnit, event)
- pUnit:FullCastSpellOnTarget(40932, Cypx)
- end
- function VH_InstanceFDB_Special1(pUnit, event)
- Cypx:PlaySoundToSet(10446)
- Cypx:SendChatMessage(14, 0, "Your days are done!")
- Cypx:FullCastSpell(57557)
- end
- function VH_InstanceFDB_Phase3Go(pUnit, event)
- Alexstraz:RegisterEvent("VH_InstancePlayerFlightStart", 1000, 1)
- Alexstraz:RegisterEvent("VH_InstanceAlexFlameBreath", 7000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_Shadowflame", 7000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_Flameshock", 10000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_FireVolley", 13000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_Special1", 57000, 0)
- KrasusEnd:RegisterEvent("VH_InstanceKrasusCleave", 8000, 0)
- Cypx:RegisterEvent("VH_InstanceFDBPhase4", 1000, 0)
- end
- --
- --
- function VH_InstanceFDB_LegionLight(pUnit, event)
- local target = pUnit:GetRandomPlayer(0)
- if target ~= nil then
- Cypx:FullCastSpellOnTarget(45664, target)
- else
- end
- end
- function VH_InstanceFDB_FlameBreath(pUnit, event)
- local target = pUnit:GetMainTank()
- if target ~= nil then
- Cypx:FullCastSpellOnTarget(56908, target)
- else
- end
- end
- function VH_InstanceAlexstrazCleave(pUnit, event)
- Alexstraz:FullCastSpellOnTarget(31345, Cypx)
- end
- function VH_InstanceKrasusFlame(pUnit, event)
- KrasusEnd:FullCastSpellOnTarget(56908, Cypx)
- end
- ----
- ----
- function VH_InstanceFDBPhase4(pUnit, event)
- if Cypx:GetHealthPct() <= 50 then
- Cypx:RemoveEvents()
- Cypx:PlaySoundToSet(10442)
- Cypx:SendChatMessage(14, 0, "Why do you persist? Surely you ca nsee the futility of it all..It's not to late. You may still leave with your lives!")
- Cypx:MoveTo(VH_Master:GetSpawnX(), VH_Master:GetSpawnY(), VH_Master:GetSpawnZ(), VH_Master:GetSpawnO())
- Cypx:Land()
- Alexstraz:MoveTo(VH_Master:GetX() + 6, VH_Master:GetY(), VH_Master:GetZ(), VH_Master:GetO())
- KrasusEnd:MoveTo(VH_Master:GetX() - 6, VH_Master:GetY(), VH_Master:GetZ(), VH_Master:GetO())
- KrasusEnd:Land()
- Alexstraz:Land()
- Alexstraz:RegisterEvent("VH_DisableFlightMorph", 1000, 1)
- Cypx:RegisterEvent("VH_InstanceFDB_LegionLight", 6000, 0)
- Cypx:RegisterEvent("VH_InstanceFDB_FlameBreath", 15000, 0)
- Alexstraz:RegisterEvent("VH_InstanceAlexstrazCleave", 8000, 0)
- KrasusEnd:RegisterEvent("VH_InstanceKrasusFlame", 12000, 0)
- Cypx:RegisterEvent("VH_InstanceFDBPhase5", 1000, 0)
- end
- end
- ----
- ----
- function VH_InstanceFDBSingleFire(pUnit, event)
- local target = pUnit:GetRandomPlayer(0)
- if target ~= nil then
- Cypx:FullCastSpellOnTarget(29953, target)
- else
- end
- end
- function VH_InstanceFDBSpecialFire(pUnit, event)
- Cypx:PlaySoundToSet(10446)
- Cypx:SendChatMessage(14, 0, "Your days are done....")
- local FireRain = pUnit:GetRandomPlayer(0)
- if FireRain ~= nil then
- Cypx:CastSpellAoF(FireRain:GetX(), FireRain:GetY(), FireRain:GetZ(), 58936)
- else
- end
- Cypx:FullCastSpell(38836)
- end
- function VH_InstanceFDBPyroDeath(pUnit, event)
- local target = pUnit:GetRandomPlayer(0)
- if target ~= nil then
- Cypx:PlaySoundToSet(13415)
- Cypx:SendChatMessage(14, 0, "Lets get this over with.")
- Cypx:FullCastSpellOnTarget(64698, target)
- else
- end
- end
- function VH_InstanceFDBPhase5(pUnit, event)
- if Cypx:GetHealthPct() <= 40 then
- Cypx:RemoveEvents()
- Cypx:PlaySoundToSet(10402)
- Cypx:SendChatMessage(14, 0, "Let us see what fate has in store..")
- Alexstraz:RegisterEvent("VH_InstanceAlexstrazCleave", 8000, 0)
- KrasusEnd:RegisterEvent("VH_KrasusFlamestrike", 23000, 0)
- Cypx:RegisterEvent("VH_InstanceFDBSingleFire", 6000, 0)
- Cypx:RegisterEvent("VH_InstanceFDBSpecialFire", 24000, 0)
- Cypx:RegisterEvent("VH_InstanceFDBPyroDeath", 33000, 0)
- Cypx:RegisterEvent("VH_InstanceFDBPhase6", 1000, 0)
- end
- end
- ----
- ----
- function VH_InstanceFDBFireBarrageFinal(pUnit, event)
- Cypx:FullCastSpell(38836)
- end
- --Final Special--
- function VH_InstanceFDBFinalSpecial6_1(pUnit, event)
- Cypx:RemoveEvents()
- Cypx:CastSpell(40647)
- Cypx:PlaySoundToSet(10404)
- Cypx:SendChatMessage(14, 0, "No one can stop us! No one!")
- Cypx:SetFlying()
- Cypx:MoveTo(VH_Master:GetX(), VH_Master:GetY(), VH_Master:GetZ() + 20, VH_Master:GetO())
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_2", 5000, 1)
- end
- function VH_InstanceFDBFinalSpecial6_2(pUnit, event)
- Cypx:SendChatMessage(42, 0, "Chrysophylax begins to power a massive spell")
- Cypx:PlaySoundToSet(10424)
- Cypx:SendChatMessage(14, 0, "Struggle as much as you like!")
- Cypx:ChannelSpell(60309, VH_Master)
- VH_Master:CastSpell(54141)
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_3", 2000, 1)
- end
- function VH_InstanceFDBFinalSpecial6_3(pUnit, event)
- VH_Spawn1:ChannelSpell(46906, VH_Master)
- Cypx:CastSpell(40647)
- Alexstraz:SendChatMessage(14, 0, "Do not worry champions I will give my life for you if the need come!")
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_4", 3000, 1)
- end
- function VH_InstanceFDBFinalSpecial6_4(pUnit, event)
- VH_Spawn2:ChannelSpell(46906, VH_Master)
- KrasusEnd:SendChatMessage(14, 0, "Nor will I allow you to perish my friends, we have come to far!")
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_5", 3000, 1)
- end
- function VH_InstanceFDBFinalSpecial6_5(pUnit, event)
- VH_Spawn3:ChannelSpell(46906, VH_Master)
- Cypx:PlaySoundToSet(13415)
- Cypx:CastSpell(40647)
- Cypx:SendChatMessage(14, 0, "You were destined to fail!")
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_6", 2000, 1)
- end
- function VH_InstanceFDBFinalSpecial6_6(pUnit, event)
- VH_Spawn4:ChannelSpell(46906, VH_Master)
- Alexstraz:SendChatMessage(14, 0, "I WILL NOT allow you to take...control...OF.....THIS PLACE!")
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_7", 2000, 1)
- end
- function VH_InstanceFDBFinalSpecial6_7(pUnit, event)
- Alexstraz:SendChatMessage(42, 0, "Alexstraza breaks the bindings of the Twilight Master")
- Alexstraz:RemoveAura(40647)
- Alexstraz:SetCombatMeleeCapable(1)
- Alexstraz:Root()
- Alexstraz:RegisterEvent("VH_InstancePlayerPrisonBreakStart", 1000, 1)
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_8", 2000, 1)
- end
- function VH_InstanceFDBFinalSpecial6_8(pUnit, event)
- VH_Spawn5:ChannelSpell(46906, VH_Master)
- Cypx:PlaySoundToSet(10421)
- Cypx:SendChatMessage(14, 0, "Enough! I will erase your very existence!")
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_9", 3000, 1)
- end
- function VH_InstanceFDBFinalSpecial6_9(pUnit, event)
- Cypx:SendChatMessage(42, 0, "Chrysophylax gets ready to unleashes an ultimate ability.")
- Alexstraz:RegisterEvent("VH_InstancePlayerProtectionStart", 1000, 1)
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_10", 2000, 1)
- end
- function VH_InstanceFDBFinalSpecial6_9(pUnit, event)
- Cypx:CastSpell(56397)
- Cypx:CastSpell(57432)
- Cypx:CastSpell(58538)
- VH_Spawn1:StopChannel()
- VH_Spawn2:StopChannel()
- VH_Spawn3:StopChannel()
- VH_Spawn4:StopChannel()
- VH_Spawn5:StopChannel()
- Cypx:StopChannel()
- VH_Master:RemoveAura(54141)
- Cypx:RegisterEvent("VH_InstanceReturnFinalSpecial6", 2000, 1)
- end
- function VH_InstanceReturnFinalSpecial6(pUnit, event)
- Cypx:MoveTo(Cypx:GetSpawnX(), Cypx:GetSpawnY(), Cypx:GetSpawnZ(), Cypx:GetSpawnO())
- Cypx:RegisterEvent("VH_InstanceFDBPhase6Start", 3000, 1)
- end
- --Final Special End--
- function VH_InstanceFDBPhase6(pUnit, event)
- if Cypx:GetHealthPct() <= 20 then
- Cypx:RemoveEvents()
- Cypx:PlaySoundToSet(10444)
- Cypx:SendChatMessage(14, 0, "So be it..You were warned..")
- Cypx:RegisterEvent("VH_InstanceFDBPhase6Start", 1000, 1)
- end
- end
- function VH_InstanceFDBPhase6Start(pUnit, event)
- Cypx:Land()
- Alexstraz:RegisterEvent("VH_InstanceAlexstrazCleave", 8000, 0)
- KrasusEnd:RegisterEvent("VH_InstanceKrasusFlame", 12000, 0)
- Cypx:RegisterEvent("VH_InstanceFDBFireBarrageFinal", 7000, 0)
- Cypx:RegisterEvent("VH_InstanceFDBFinalSpecial6_1", 40000, 0)
- end
- function VH_InstanceFDB_Start(pUnit, event)
- Cypx = pUnit
- pUnit:PlaySoundToSet(11205)
- pUnit:SendChatMessage(12, 0, "What aggrivation is this? You will die!")
- CypxSelect = pUnit:GetUInt64Value(UNIT_FIELD_FLAGS)
- end
- function VH_InstanceFDB_Aggro(pUnit, event)
- pUnit:SetFaction(14)
- pUnit:PlaySoundToSet(11208)
- pUnit:SendChatMessage(14, 0, "Your life will be mine!")
- pUnit:RegisterEvent("VH_InstanceFDB_ShadowVolley", math.random(7000, 11000), 0)
- pUnit:RegisterEvent("VH_InstanceEnterAlexKrasus", 45000, 1)
- end
- function VH_InstanceFDB_Dies(pUnit, event)
- pUnit:RemoveEvents()
- Alexstraz:RemoveEvents()
- KrasusEnd:RemoveEvents()
- bossDeath = 3
- leaveCheck3 = 0
- pUnit:PlaySoundToSet(10405)
- pUnit:SendChatMessage(14, 0, "We will triumph.....it is only...a matter...of time....")
- VH_Master:RegisterEvent("VH_Wave_Handler_Table_Clean", 5000, 1)
- Alexstraz:RegisterEvent("VH_InstanceGrandCinematic_1", 3000, 1)
- end
- function VH_InstanceFDB_Slay(pUnit, event)
- local slayerSpeak = math.random(1, 4)
- if slayerSpeak == 1 then
- Cypx:PlaySoundToSet(10403)
- Cypx:SendChatMessage(14, 0, "One less obstacle in our way.")
- end
- if slayerSpeak == 2 then
- Cypx:PlaySoundToSet(10416)
- Cypx:SendChatMessage(14, 0, "Leaving so soon?")
- end
- if slayerSpeak == 3 then
- Cypx:PlaySoundToSet(13413)
- Cypx:SendChatMessage(14, 0, "There is no future for you!")
- end
- if slayerSpeak == 4 then
- Cypx:PlaySoundToSet(10425)
- Cypx:SendChatMessage(14, 0, "You are irrelevant!")
- end
- end
- function VH_InstanceFDB_Leaves(pUnit, event)
- pUnit:RemoveEvents()
- if leaveCheck3 == 1 then
- VH_Master:RegisterEvent("VH_Instance_Reset_Check", 5000, 0)
- Cypx:Despawn(2000, 0)
- Alexstraz:Despawn(2000, 0)
- KrasusEnd:Despawn(2000, 0)
- end
- end
- function VH_InstanceFDB_KillKrasus(pUnit, event)
- Cypx:RemoveEvents()
- Cypx:Root()
- Alexstraz:RemoveEvents()
- Alexstraz:Root()
- Cypx:PlaySoundToSet(10400)
- Cypx:SendChatMessage(14, 0, "The time has come to shatter this clockwork universe forever, let us no longer be slaves of the hourglass. I warn you, those who do not embrace this greater path shall be victims of its passing.")
- Cypx:RegisterEvent("VH_InstanceFDB_KillKrasusScene", 1000, 1)
- end
- function VH_InstanceFDB_KillKrasusScene(pUnit, event)
- Alexstraz:SendChatMessage(14, 0, "NO! Krasus!!! My love!!!!")
- Alexstraz:SendChatMessage(16, 0, "The Queen of the Dragons cries out in agony")
- Cypx:Despawn(2000, 0)
- Alexstraz:Despawn(3000, 0)
- VH_Master:SendChatMessage(42, 0, "The consort of the queen has fallen. The will to fight has been diminished.")
- end
- function VH_InstanceFDB_KillAlexstraz(pUnit, event)
- KrasusEnd:RemoveEvents()
- KrasusEnd:Root()
- Cypx:RemoveEvents()
- Cypx:Root()
- Cypx:PlaySoundToSet(10443)
- Cypx:SendChatMessage(14, 0, "Time-keeper, the sands of time have run out for you.")
- Cypx:RegisterEvent("VH_InstanceFDB_KillAlexstrazScene", 1000, 1)
- end
- function VH_InstanceFDB_KillAlexstrazScene(pUnit, event)
- KrasusEnd:SendChatMessage(14, 0, "My queen....my love...my wife...I have...failed you....")
- KrasusEnd:SendChatMessage(16, 0, "Krasus cries out in agony")
- Cypx:Despawn(2000, 0)
- KrasusEnd:Despawn(3000, 0)
- VH_Master:SendChatMessage(42, 0, "The Queen has fallen in battle. The will to fight has been diminished.")
- end
- RegisterUnitEvent(48118, 4, "VH_InstanceFDB_KillAlexstraz")
- RegisterUnitEvent(48119, 4, "VH_InstanceFDB_KillKrasus")
- ----
- ----
- RegisterUnitEvent(FDB, 1, "VH_InstanceFDB_Aggro")
- RegisterUnitEvent(FDB, 2, "VH_InstanceFDB_Leaves")
- RegisterUnitEvent(FDB, 3, "VH_InstanceFDB_Slay")
- RegisterUnitEvent(FDB, 4, "VH_InstanceFDB_Dies")
- RegisterUnitEvent(FDB, 18, "VH_InstanceFDB_Start")
- ------HANDLE PLAYER FLYING-------------
- local FlightList = 0
- local FlightTable = {}
- function VH_InstancePlayerFlightStart(pUnit, event)
- Alexstraz:SendChatMessage(14, 0, "Champions! I have imbued you with a portion of power that will allow you to take flight! Come and help put an end to this fiend!")
- FlightList = VH_Master:GetInRangePlayersCount()
- Alexstraz:RegisterEvent("VH_InstancePlayerFlightEnable", 2000, 1)
- end
- function VH_InstancePlayerFlightEnable(pUnit, event)
- local players
- while #FlightTable < FlightList do
- players = pUnit:GetRandomPlayer(0)
- if table.find(FlightTable, players) == false then table.insert(FlightTable, players) end
- players:SetFlying()
- players:SetMovementType(768)
- players:SetModel(6371)
- players:CastSpell(51802)
- players:SetScale(.6)
- players:EnableFlight(1)
- end
- FlightList = 0
- FlightTable = {}
- end
- ------HANDLE PRISON BREAK-------------
- local PrisonList = 0
- local PrisonTable = {}
- function VH_InstancePlayerPrisonBreakStart(pUnit, event)
- PrisonList = VH_Master:GetInRangePlayersCount()
- Alexstraz:RegisterEvent("VH_InstancePlayerPrisonBreak", 1000, 1)
- end
- function VH_InstancePlayerPrisonBreak(pUnit, event)
- local playersP
- while #PrisonTable < PrisonList do
- playersP = pUnit:GetRandomPlayer(0)
- if table.find(PrisonTable, playersP) == false then table.insert(PrisonTable, playersP) end
- playersP:RemoveAura(40647)
- end
- PrisonList = 0
- PrisonTable = {}
- KrasusEnd:RemoveAura(40647)
- end
- ------HANDLE ULTIMATE PROTECT-------------
- local ProtectList = 0
- local ProtectTable = {}
- function VH_InstancePlayerProtectionStart(pUnit, event)
- PrisonList = VH_Master:GetInRangePlayersCount()
- Alexstraz:RegisterEvent("VH_InstancePlayerProtection", 1000, 1)
- end
- function VH_InstancePlayerProtection(pUnit, event)
- local playersPr
- while #ProtectTable < ProtectList do
- playersPr = pUnit:GetRandomPlayer(0)
- if table.find(ProtectTable, playersPr) == false then table.insert(ProtectTable, playersPr) end
- playersPr:CastSpell(31901)
- end
- ProtectList = 0
- ProtectTable = {}
- end
- ------HANDLE DISABLE FLIGHT AND MORPH-------------
- local DeFlightList = 0
- local DeFlightTable = {}
- function VH_DisableFlightMorph(pUnit, event)
- DeFlightList = VH_Master:GetInRangePlayersCount()
- Alexstraz:RegisterEvent("VH_DisableFlightMorphExecute", 1000, 1)
- end
- function VH_DisableFlightMorphExecute(pUnit, event)
- local playersFlight
- while #DeFlightTable < DeFlightList do
- playersFlight = pUnit:GetRandomPlayer(0)
- if table.find(DeFlightTable, playersFlight) == false then table.insert(DeFlightTable, playersFlight) end
- playersFlight:SetMovementType(256)
- playersFlight:Land()
- playersFlight:SetModel(0)
- playersFlight:DeMorph()
- playersFlight:SetScale(1)
- playersFlight:EnableFlight(0)
- Alexstraz:FullCastSpellOnTarget(130, playersFlight)
- end
- DeFlightList = 0
- DeFlightTable = {}
- end
- ---GRAND CINEMATIC ENDING---
- function VH_InstanceGrandCinematic_1(pUnit, event)
- Alexstraz:CastSpell(63660)
- KrasusEnd:CastSpell(63660)
- Alexstraz:SetModel(28227)
- KrasusEnd:SetModel(24976)
- Alexstraz:SetScale(1)
- KrasusEnd:SetScale(1)
- Alexstraz:RegisterEvent("VH_InstanceGrandCinematic_2", 2000, 1)
- end
- function VH_InstanceGrandCinematic_2(pUnit, event)
- Alexstraz:SendChatMessage(12, 0, "Young heroes, I cannot express how grateful I am to have your aid. I do not wish to fathom what may have occured had you not aided my consort.")
- Alexstraz:RegisterEvent("VH_InstanceGrandCinematic_3", 4000, 1)
- end
- function VH_InstanceGrandCinematic_3(pUnit, event)
- KrasusEnd:SendChatMessage(12, 0, "Chrysophylax was a powerful opponent. He managed to fool all of us..I can only imagine what other minions The Lich King has.")
- KrasusEnd:RegisterEvent("VH_InstanceGrandCinematic_4", 5000, 1)
- end
- function VH_InstanceGrandCinematic_4(pUnit, event)
- KrasusEnd:SendChatMessage(16, 0, "Krasus has a troubled look on his face.")
- Alexstraz:SendChatMessage(12, 0, "Krasus my love, do not worry what the future holds. We have heroes like these all across the lands to protect Azeroth from destruction.")
- Alexstraz:RegisterEvent("VH_InstanceGrandCinematic_5", 6000, 1)
- end
- function VH_InstanceGrandCinematic_5(pUnit, event)
- Alexstraz:SendChatMessage(12, 0, "My friends, I hearby declare you Chapions of the Red Dragonflight. Your actions on this day have showed burning courage in the face of destruction.")
- Alexstraz:RegisterEvent("VH_InstanceGrandCinematic_6", 4000, 1)
- end
- function VH_InstanceGrandCinematic_6(pUnit, event)
- Alexstraz:SendChatMessage(12, 0, "Because of you the Kirin'Tor, Dalaran, and Northrend have been protected from the forces of Arthas, and for this we are eternally grateful!")
- Alexstraz:RegisterEvent("VH_InstanceGrandCinematic_7", 6000, 1)
- end
- function VH_InstanceGrandCinematic_7(pUnit, event)
- KrasusEnd:SendChatMessage(12, 0, "I must also extend my personal thanks to you champions, without you I fear I may have not been able to keep the seal on the Violet Hold strong to hold back the forces.")
- KrasusEnd:RegisterEvent("VH_InstanceGrandCinematic_8", 7000, 1)
- end
- function VH_InstanceGrandCinematic_8(pUnit, event)
- KrasusEnd:SendChatMessage(12, 0, "And now that Chrysophylax has been defeated the Violet Hold is safe from any further invasions, so for that the Kirin'Tor thank you as well.")
- KrasusEnd:RegisterEvent("VH_InstanceGrandCinematic_9", 5000, 1)
- end
- function VH_InstanceGrandCinematic_9(pUnit, event)
- Alexstraz:SendChatMessage(12, 0, "Come Krasus, let us go back to the Wyrmrest temple and rest, we have had a long fight today and it is well deserved.")
- Alexstraz:RegisterEvent("VH_InstanceGrandCinematic_10", 4000, 1)
- end
- function VH_InstanceGrandCinematic_10(pUnit, event)
- KrasusEnd:SendChatMessage(12, 0, "Yes my queen.")
- KrasusEnd:RegisterEvent("VH_InstanceGrandCinematic_11", 2000, 1)
- end
- function VH_InstanceGrandCinematic_11(pUnit, event)
- KrasusEnd:SendChatMessage(15, 0, "Haha I think I shall enjoy a nice 'rest' with my queen.")
- KrasusEnd:RegisterEvent("VH_InstanceGrandCinematic_12" , 3000, 1)
- end
- function VH_InstanceGrandCinematic_12(pUnit, event)
- Alexstraz:SendChatMessage(12, 0, "You know...I can hear your thoughts my love.")
- Alexstraz:RegisterEvent("VH_InstanceGrandCinematic_13", 2000, 1)
- end
- function VH_InstanceGrandCinematic_13(pUnit, event)
- Alexstraz:SendChatMessage(16, 0, "Alexstrasza smiles.")
- Alexstraz:RegisterEvent("VH_InstanceGrandCinematic_14", 3000, 1)
- end
- function VH_InstanceGrandCinematic_14(pUnit, event)
- Alexstraz:CastSpell(7077)
- Alexstraz:Despawn(2000 , 0)
- KrasusEnd:RegisterEvent("VH_InstanceGrandCinematic_15", 3000, 1)
- end
- function VH_InstanceGrandCinematic_15(pUnit, event)
- KrasusEnd:SendChatMessage(12, 0, "Oh my, oh my, this should be fun...Erhem...uhh..Farewell Champions!")
- KrasusEnd:RegisterEvent("VH_InstanceGrandCinematic_16", 2000, 1)
- end
- function VH_InstanceGrandCinematic_16(pUnit, event)
- KrasusEnd:CastSpell(7077)
- KrasusEnd:Despawn(2000, 0)
- end
- -------------------------------------------------------------------------
- --- VIOLET HOLD TRASH ---
- -------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement