Advertisement
Guest User

Lord Marrowgar - Holystone Productions

a guest
May 2nd, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --//////////////////////////////////
  2. --////   Holystone Productions  ////
  3. --////       Copy Right         ////
  4. --////  Blizzlike Repack v 3.0  ////
  5. --//////////////////////////////////
  6.  
  7. print("Loading LordMarrowgar")
  8.  
  9. --[ Npc's ID's ]--
  10.  
  11.   local LordMarrowgar                        = 36612
  12.   local ColdFlame                            = 36672
  13.   local Spike                                = 38711
  14.  
  15. --[ Spells ]--
  16.  
  17.     -- Lord Marrowgar
  18.  
  19.   local Spell_Bone_Slice                     = 69055
  20.   local Spell_Bone_Storm_10N                 = 69075
  21.   local Spell_Bone_Storm_25N                 = 70835
  22.   local Spell_Bone_Storm_10HC                = 70835
  23.   local Spell_Bone_Storm_25HC                = 70836
  24.   local Spell_Spike_Graveyard                = 69057
  25.   local Spell_ColdFlame_Normal               = 69140
  26.   local Spell_ColdFlame_Storm                = 72705
  27.  
  28.     -- Bone Spike
  29.  
  30.   local Spell_Impale                         = 69065
  31.  
  32.     -- ColdFlame
  33.    
  34.   local Spell_ColdFlame_10N                  = 69146
  35.   local Spell_ColdFlame_25N                  = 70823
  36.   local Spell_ColdFlame_10HC                 = 70824
  37.   local Spell_ColdFlame_25HC                 = 70825
  38.  
  39. --[ Speaks ]--
  40.  
  41.   local Say_Marrowgar_Enter_Zone             = 16950
  42.   local Say_Marrowgar_Aggro                  = 16941
  43.   local Say_Marrowgar_Bone_Storm             = 16946
  44.   local Say_Marrowgar_BoneSpike_One          = 16947
  45.   local Say_Marrowgar_BoneSpike_Two          = 16948
  46.   local Say_Marrowgar_BoneSpike_Tree         = 16949
  47.   local Say_Marrowgar_Kill_One               = 16942
  48.   local Say_Marrowgar_Kill_Two               = 16943
  49.   local Say_Marrowgar_Death                  = 16944
  50.   local Say_Marrowgar_Berserk                = 16945
  51.  
  52.  
  53.   local Say_Marrowgar_Enter_Zone_Speak       = "This is the beginning AND the end, mortals. None may enter the master's sanctum!"
  54.   local Say_Marrowgar_Aggro_Speak            = "The Scourge will wash over this world as a swarm of death and destruction!"
  55.   local Say_Marrowgar_Bone_Storm_Speak       = "BONE STORM!"
  56.   local Say_Marrowgar_BoneSpike_Speak_One    = "Bound by bone!"
  57.   local Say_Marrowgar_BoneSpike_Speak_Two    = "Stick Around!"
  58.   local Say_Marrowgar_BoneSpike_Speak_Tree   = "The only escape is death!"
  59.   local Say_Marrowgar_Kill_Speak_One         = "More bones for the offering!"
  60.   local Say_Marrowgar_Kill_Speak_Two         = "Languish in damnation!"
  61.   local Say_Marrowgar_Death_Speak            = "I see... only darkness..."
  62.   local Say_Marrowgar_Berserk_Speak          = "THE MASTER'S RAGE COURSES THROUGH ME!"
  63.  
  64. --[ Lord Marrowgar Spawn ]--
  65.  
  66. function LordMarrowgar_OnSpawn(punit, event)
  67.   local Marrowgar = punit
  68.     Marrowgar:GetInstanceID()
  69.   local Dungeon = punit:GetDungeonDifficulty()
  70.     if Dungeon == 0 then
  71.       Marrowgar:SetCombatCapable(0)
  72.       Marrowgar:SetMaxHealth(6972500)
  73.    end
  74.     if Dungeon == 1 then
  75.       Marrowgar:SetCombatCapable(0)
  76.       Marrowgar:SetMaxHealth(10500000)
  77.    end
  78.     if Dungeon == 2 then
  79.       Marrowgar:SetCombatCapable(0)
  80.       Marrowgar:SetMaxHealth(23700000)
  81.    end
  82.     if Dungeon == 3 then
  83.       Marrowgar:SetCombatCapable(0)
  84.       Marrowgar:SetMaxHealth(31376000)
  85.    end
  86.     local Player = punit:GetClosestPlayer()
  87.       if punit:GetDistanceYards(Player) < 65 then
  88.         Marrowgar:SendChatMessage(14, 0, Say_Marrowgar_Enter_Zone_Speak)
  89.         Marrowgar:PlaySoundToSet(Say_Marrowgar_Enter_Zone)
  90.     end
  91. end
  92.  
  93. RegisterUnitEvent(LordMarrowgar, 18, "LordMarrowgar_OnSpawn")
  94.  
  95. --[ Lord Marrowgar Combat ]--
  96.  
  97. function LordMarrowgar_OnCombat(punit, event)
  98.       punit:SendChatMessage(14, 0, Say_Marrowgar_Aggro_Speak)
  99.       punit:PlaySoundToSet(Say_Marrowgar_Aggro)
  100.     local Dungeon = punit:GetDungeonDifficulty()
  101.       if Dungeon == 0 then
  102.        punit:RegisterEvent("Marrowgar_Bone_Slice", 10000, 0)
  103.        punit:RegisterEvent("Marrowgar_Bone_Spike_Graveyard", math.random (10000, 15000), 0)
  104.        punit:RegisterEvent("Marrowgar_ColdFlame", math.random (5000, 6000), 0)
  105.        punit:RegisterEvent("Marrowgar_BoneStorm", math.random (45000, 50000), 0)
  106.     end
  107.       if Dungeon == 1 then
  108.        punit:RegisterEvent("Marrowgar_Bone_Slice", 10000, 0)
  109.        punit:RegisterEvent("Marrowgar_Bone_Spike_Graveyard", math.random (10000, 15000), 0)
  110.        punit:RegisterEvent("Marrowgar_ColdFlame", math.random (5000, 6000), 0)
  111.        punit:RegisterEvent("Marrowgar_BoneStorm", math.random (45000, 50000), 0)
  112.     end
  113.       if Dungeon == 2 then
  114.        punit:RegisterEvent("Marrowgar_Bone_Slice", 10000, 0)
  115.        punit:RegisterEvent("Marrowgar_Bone_Spike_Graveyard", math.random (10000, 15000), 0)
  116.        punit:RegisterEvent("Marrowgar_ColdFlame", math.random (5000, 6000), 0)
  117.        punit:RegisterEvent("Marrowgar_BoneStorm", math.random (45000, 50000), 0)
  118.     end
  119.       if Dungeon == 3 then
  120.        punit:RegisterEvent("Marrowgar_Bone_Slice", 10000, 0)
  121.        punit:RegisterEvent("Marrowgar_Bone_Spike_Graveyard", math.random (10000, 15000), 0)
  122.        punit:RegisterEvent("Marrowgar_ColdFlame", math.random (5000, 6000), 0)
  123.        punit:RegisterEvent("Marrowgar_BoneStorm", math.random (45000, 50000), 0)
  124.     end
  125. end
  126.  
  127. RegisterUnitEvent(LordMarrowgar, 1, "LordMarrowgar_OnCombat")
  128.  
  129. function Marrowgar_Bone_Slice(punit, event)
  130.   local Player = punit:GetClosestPlayer()
  131.    if Player ~= nil then
  132.     punit:CastSpellOnTarget(Spell_Bone_Slice, Player)
  133.   end
  134. end
  135.  
  136. function Marrowgar_Bone_Spike_Graveyard(punit, event)
  137.    if Dungeon == 0 then
  138.      local player10 = punit:GetRandomPlayer(0)
  139.       local x = player:GetX()
  140.       local y = player:GetY()
  141.       local z = player:GetZ()
  142.        punit:SpawnCreature(Spike, x, y, z, o, 21, 650000)
  143. end
  144.    if Dungeon == 1 then
  145.      local player10 = punit:GetRandomPlayer(0)
  146.       local x = player:GetX()
  147.       local y = player:GetY()
  148.       local z = player:GetZ()
  149.        punit:SpawnCreature(Spike, x, y, z, o, 21, 650000)
  150. end
  151.    if Dungeon == 2 then
  152.      local targets = GetThreeRandomEnemies(pUnit)
  153.         if(targets) then
  154.            for k,v in ipairs(targets) do
  155.       local x = player:GetX()
  156.       local y = player:GetY()
  157.       local z = player:GetZ()
  158.        punit:SpawnCreature(Spike, x, y, z, o, 21, 650000)
  159.      end
  160.   end
  161. end
  162.    if Dungeon == 3 then
  163.      local targets = GetThreeRandomEnemies(pUnit)
  164.         if(targets) then
  165.            for k,v in ipairs(targets) do
  166.       local x = player:GetX()
  167.       local y = player:GetY()
  168.       local z = player:GetZ()
  169.        punit:SpawnCreature(Spike, x, y, z, o, 21, 650000)
  170.       end
  171.     end
  172.   end
  173. end
  174.  
  175. function Marrowgar_ColdFlame(punit, event)
  176.    local x = punit:GetX()
  177.    local y = punit:GetY()
  178.    local z = punit:GetZ()
  179.    local o = punit:GetO()
  180.     punit:SpawnCreature(ColdFlame, x, y, z, o, 21, 30000)
  181. end
  182.  
  183. function Marrowgar_BoneStorm(punit, event)
  184.     local Dungeon = punit:GetDungeonDifficulty()
  185.       if Dungeon == 0 then
  186.      punit:RemoveEvents()
  187.       punit:Root()
  188.        punit:SetCombatCapable(1)
  189.        punit:FullCastSpell(Spell_Bone_Storm_10N)
  190.        punit:AddAura(Spell_Bone_Storm_10N, 20000)
  191.        punit:RegisterEvent("Event_Marrowgar_Move", 7000, 2)
  192.        punit:RegisterEvent("Event_Marrowgar_Stop", 20000, 1)
  193.     end
  194.       if Dungeon == 1 then
  195.      punit:RemoveEvents()
  196.       punit:Root()
  197.        punit:SetCombatCapable(1)
  198.        punit:FullCastSpell(Spell_Bone_Storm_25N)
  199.        punit:AddAura(Spell_Bone_Storm_25N, 30000)
  200.            punit:RegisterEvent("Marrowgar_Bone_Spike_Graveyard", math.random (10000, 15000), 0)
  201.        punit:RegisterEvent("Event_Marrowgar_Move", 10000, 2)
  202.        punit:RegisterEvent("Event_Marrowgar_Stop", 30000, 1)
  203.     end
  204.       if Dungeon == 2 then
  205.      punit:RemoveEvents()
  206.       punit:Root()
  207.        punit:SetCombatCapable(1)
  208.        punit:FullCastSpell(Spell_Bone_Storm_10HC)
  209.        punit:AddAura(Spell_Bone_Storm_10HC, 20000)
  210.            punit:RegisterEvent("Marrowgar_Bone_Spike_Graveyard", math.random (10000, 15000), 0)
  211.        punit:RegisterEvent("Event_Marrowgar_Move", 7000, 2)
  212.        punit:RegisterEvent("Event_Marrowgar_Stop", 20000, 1)
  213.     end
  214.       if Dungeon == 3 then
  215.      punit:RemoveEvents()
  216.       punit:Root()
  217.        punit:SetCombatCapable(1)
  218.        punit:FullCastSpell(Spell_Bone_Storm_25HC)
  219.        punit:AddAura(Spell_Bone_Storm_25HC, 30000)
  220.            punit:RegisterEvent("Marrowgar_Bone_Spike_Graveyard", math.random (10000, 15000), 0)
  221.        punit:RegisterEvent("Event_Marrowgar_Move", 10000, 2)
  222.        punit:RegisterEvent("Event_Marrowgar_Stop", 30000, 1)
  223.     end
  224. end
  225.  
  226. function Event_Marrowgar_Move(punit, event)
  227.    punit:UnRoot()
  228.      punit:SetMovementFlags(1)
  229.      punit:ModifyRunSpeed(30)
  230.       local target = punit:GetRandomPlayer(0)
  231.        local x = target:GetX()
  232.        local y = target:GetY()
  233.        local z = target:GetZ()
  234.        local o = target:GetO()
  235.       punit:MoveTo(x, y, z, o)
  236.      punit:Root()
  237. end
  238.  
  239. function Event_Marrowgar_Stop(punit, event)
  240.     local Dungeon = punit:GetDungeonDifficulty()
  241.       if Dungeon == 0 then
  242.         if punit:HasAura(Spell_Bone_Storm_10N) == true then
  243.          punit:RemoveAura(Spell_Bone_Storm_10N)
  244.          punit:UnRoot()
  245.          punit:RemoveEvents()
  246.            punit:RegisterEvent("LordMarrowgar_OnCombat", 1, 1)
  247.       end
  248.     end
  249.       if Dungeon == 1 then
  250.         if punit:HasAura(Spell_Bone_Storm_25N) == true then
  251.          punit:RemoveAura(Spell_Bone_Storm_25N)
  252.          punit:UnRoot()
  253.          punit:RemoveEvents()
  254.            punit:RegisterEvent("LordMarrowgar_OnCombat", 1, 1)
  255.       end
  256.     end
  257.       if Dungeon == 2 then
  258.         if punit:HasAura(Spell_Bone_Storm_10HC) == true then
  259.          punit:RemoveAura(Spell_Bone_Storm_10HC)
  260.          punit:UnRoot()
  261.          punit:RemoveEvents()
  262.            punit:RegisterEvent("LordMarrowgar_OnCombat", 1, 1)
  263.       end
  264.     end
  265.       if Dungeon == 3 then
  266.         if punit:HasAura(Spell_Bone_Storm_25HC) == true then
  267.          punit:RemoveAura(Spell_Bone_Storm_25HC)
  268.          punit:UnRoot()
  269.          punit:RemoveEvents()
  270.            punit:RegisterEvent("LordMarrowgar_OnCombat", 1, 1)
  271.          end
  272.     end
  273. end
  274.  
  275. --[Lord Marrowgar End's & Adds Start]--
  276.  
  277. function ColdFlame_OnSpawn(punit, event)
  278.   local target = punit:GetRandomPlayer(0)
  279.    if target ~= nil then
  280.     punit:SetMovementFlags(0)
  281.      punit:ModifyRunSpeed(8)
  282.       local x = target:GetX()
  283.       local y = target:GetY()
  284.       local z = target:GetZ()
  285.       local o = target:GetO()
  286.      punit:MoveTo(x+x, y+y, z, o)
  287.       punit:RegisterEvent("Event_ColdFlame_Spell", 200, 0)
  288.     end
  289. end
  290.  
  291. function Event_ColdFlame_Spell(punit, event)
  292.     local Dungeon = punit:GetDungeonDifficulty()
  293.       if Dungeon == 0 then
  294.         local x = punit:GetX()
  295.         local y = punit:GetY()
  296.         local z = punit:GetZ()
  297.         punit:CastSpellAoF(x, y, z, Spell_ColdFlame_10N)
  298.     end
  299.       if Dungeon == 1 then
  300.         local x = punit:GetX()
  301.         local y = punit:GetY()
  302.         local z = punit:GetZ()
  303.         punit:CastSpellAoF(x, y, z, Spell_ColdFlame_25N)
  304.     end
  305.       if Dungeon == 2 then
  306.         local x = punit:GetX()
  307.         local y = punit:GetY()
  308.         local z = punit:GetZ()
  309.         punit:CastSpellAoF(x, y, z, Spell_ColdFlame_10HC)
  310.     end
  311.       if Dungeon == 3 then
  312.         local x = punit:GetX()
  313.         local y = punit:GetY()
  314.         local z = punit:GetZ()
  315.         punit:CastSpellAoF(x, y, z, Spell_ColdFlame_25HC)
  316.     end
  317. end
  318.  
  319. function Spike_OnSpawn(punit, event)
  320.     local Dungeon = punit:GetDungeonDifficulty()
  321.       if Dungeon == 0 then
  322.        punit:SetMaxHealth(46255)
  323.         punit:Root
  324.          local target = punit:GetClosestPlayer()
  325.           if target ~= nil then
  326.            target:AddAura(Spell_Impale, 0)
  327.         end
  328.           if punit:GetHealthPct() <= 10 then
  329.            target:RemoveAura(Spell_Impale)
  330.         end
  331.     end
  332.           if Dungeon == 1 then
  333.        punit:SetMaxHealth(74605)
  334.         punit:Root
  335.          local target = punit:GetClosestPlayer()
  336.           if target ~= nil then
  337.            target:AddAura(Spell_Impale, 0)
  338.         end
  339.           if punit:GetHealthPct() <= 10 then
  340.            target:RemoveAura(Spell_Impale)
  341.         end
  342.     end
  343.           if Dungeon == 2 then
  344.        punit:SetMaxHealth(134289)
  345.         punit:Root
  346.          local target = punit:GetClosestPlayer()
  347.           if target ~= nil then
  348.            target:AddAura(Spell_Impale, 0)
  349.         end
  350.           if punit:GetHealthPct() <= 10 then
  351.            target:RemoveAura(Spell_Impale)
  352.         end
  353.     end
  354.           if Dungeon == 3 then
  355.        punit:SetMaxHealth(129816)
  356.         punit:Root
  357.          local target = punit:GetClosestPlayer()
  358.           if target ~= nil then
  359.            target:AddAura(Spell_Impale, 0)
  360.         end
  361.           if punit:GetHealthPct() <= 10 then
  362.            target:RemoveAura(Spell_Impale)
  363.         end
  364.     end
  365. end
  366.  
  367. RegisterUnitEvent(ColdFlame, 18, "ColdFlame_OnSpawn")
  368. RegisterUnitEvent(Spike, 18, "Spike_OnSpawn")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement