Don't like ads? PRO users don't see any ads ;-)
Guest

Lord Marrowgar - Holystone Productions

By: a guest on May 2nd, 2012  |  syntax: Lua  |  size: 11.74 KB  |  hits: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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))
  104.            punit:RegisterEvent("Marrowgar_ColdFlame", math.random (5000, 6000))
  105.            punit:RegisterEvent("Marrowgar_BoneStorm", math.random (45000, 50000))
  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))
  110.            punit:RegisterEvent("Marrowgar_ColdFlame", math.random (5000, 6000))
  111.            punit:RegisterEvent("Marrowgar_BoneStorm", math.random (45000, 50000))
  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))
  116.            punit:RegisterEvent("Marrowgar_ColdFlame", math.random (5000, 6000))
  117.            punit:RegisterEvent("Marrowgar_BoneStorm", math.random (45000, 50000))
  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))
  122.            punit:RegisterEvent("Marrowgar_ColdFlame", math.random (5000, 6000))
  123.            punit:RegisterEvent("Marrowgar_BoneStorm", math.random (45000, 50000))
  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("Event_Marrowgar_Move", 10000, 2)
  201.            punit:RegisterEvent("Event_Marrowgar_Stop", 30000, 1)
  202.         end
  203.           if Dungeon == 2 then
  204.          punit:RemoveEvents()
  205.           punit:Root()
  206.            punit:SetCombatCapable(1)
  207.            punit:FullCastSpell(Spell_Bone_Storm_10HC)
  208.            punit:AddAura(Spell_Bone_Storm_10HC, 20000)
  209.            punit:RegisterEvent("Event_Marrowgar_Move", 7000, 2)
  210.            punit:RegisterEvent("Event_Marrowgar_Stop", 20000, 1)
  211.         end
  212.           if Dungeon == 3 then
  213.          punit:RemoveEvents()
  214.           punit:Root()
  215.            punit:SetCombatCapable(1)
  216.            punit:FullCastSpell(Spell_Bone_Storm_25HC)
  217.            punit:AddAura(Spell_Bone_Storm_25HC, 30000)
  218.            punit:RegisterEvent("Event_Marrowgar_Move", 10000, 2)
  219.            punit:RegisterEvent("Event_Marrowgar_Stop", 30000, 1)
  220.         end
  221. end
  222.  
  223. function Event_Marrowgar_Move(punit, event)
  224.    punit:UnRoot()
  225.      punit:SetMovementFlags(1)
  226.          punit:ModifyRunSpeed(30)
  227.           local target = punit:GetRandomPlayer(0)
  228.            local x = target:GetX()
  229.            local y = target:GetY()
  230.            local z = target:GetZ()
  231.            local o = target:GetO()
  232.           punit:MoveTo(x, y, z, o)
  233.          punit:Root()
  234. end
  235.  
  236. function Event_Marrowgar_Stop(punit, event)
  237.     local Dungeon = punit:GetDungeonDifficulty()
  238.           if Dungeon == 0 then
  239.             if punit:HasAura(Spell_Bone_Storm_10N) == true then
  240.                  punit:RemoveAura(Spell_Bone_Storm_10N)
  241.                  punit:UnRoot()
  242.                  punit:RemoveEvents()
  243.                    punit:RegisterEvent("LordMarrowgar_OnCombat", 1, 1)
  244.           end
  245.         end
  246.           if Dungeon == 1 then
  247.             if punit:HasAura(Spell_Bone_Storm_25N) == true then
  248.                  punit:RemoveAura(Spell_Bone_Storm_25N)
  249.                  punit:UnRoot()
  250.                  punit:RemoveEvents()
  251.                    punit:RegisterEvent("LordMarrowgar_OnCombat", 1, 1)
  252.           end
  253.         end
  254.           if Dungeon == 2 then
  255.             if punit:HasAura(Spell_Bone_Storm_10HC) == true then
  256.                  punit:RemoveAura(Spell_Bone_Storm_10HC)
  257.                  punit:UnRoot()
  258.                  punit:RemoveEvents()
  259.                    punit:RegisterEvent("LordMarrowgar_OnCombat", 1, 1)
  260.           end
  261.         end
  262.           if Dungeon == 3 then
  263.             if punit:HasAura(Spell_Bone_Storm_25HC) == true then
  264.                  punit:RemoveAura(Spell_Bone_Storm_25HC)
  265.                  punit:UnRoot()
  266.                  punit:RemoveEvents()
  267.                    punit:RegisterEvent("LordMarrowgar_OnCombat", 1, 1)
  268.                  end
  269.         end
  270. end
  271.  
  272. --[Lord Marrowgar End's & Adds Start]--
  273.  
  274. function ColdFlame_OnSpawn(punit, event)
  275.   local target = punit:GetRandomPlayer(0)
  276.    if target ~= nil then
  277.     punit:SetMovementFlags(0)
  278.          punit:ModifyRunSpeed(8)
  279.           local x = target:GetX()
  280.       local y = target:GetY()
  281.           local z = target:GetZ()
  282.           local o = target:GetO()
  283.          punit:MoveTo(x+x, y+y, z, o)
  284.           punit:RegisterEvent("Event_ColdFlame_Spell", 200, 0)
  285.         end
  286. end
  287.  
  288. function Event_ColdFlame_Spell(punit, event)
  289.     local Dungeon = punit:GetDungeonDifficulty()
  290.           if Dungeon == 0 then
  291.         local x = punit:GetX()
  292.         local y = punit:GetY()
  293.         local z = punit:GetZ()
  294.         punit:CastSpellAoF(x, y, z, Spell_ColdFlame_10N)
  295.         end
  296.           if Dungeon == 1 then
  297.         local x = punit:GetX()
  298.         local y = punit:GetY()
  299.         local z = punit:GetZ()
  300.         punit:CastSpellAoF(x, y, z, Spell_ColdFlame_25N)
  301.         end
  302.           if Dungeon == 2 then
  303.         local x = punit:GetX()
  304.         local y = punit:GetY()
  305.         local z = punit:GetZ()
  306.         punit:CastSpellAoF(x, y, z, Spell_ColdFlame_10HC)
  307.         end
  308.           if Dungeon == 3 then
  309.         local x = punit:GetX()
  310.         local y = punit:GetY()
  311.         local z = punit:GetZ()
  312.         punit:CastSpellAoF(x, y, z, Spell_ColdFlame_25HC)
  313.         end
  314. end
  315.  
  316. function Spike_OnSpawn(punit, event)
  317.     local Dungeon = punit:GetDungeonDifficulty()
  318.           if Dungeon == 0 then
  319.            punit:SetMaxHealth(46255)
  320.         punit:Root
  321.          local target = punit:GetClosestPlayer()
  322.               if target ~= nil then
  323.                    target:AddAura(Spell_Impale, 0)
  324.             end
  325.               if punit:GetHealthPct() <= 10 then
  326.                    target:RemoveAura(Spell_Impale)
  327.             end
  328.         end
  329.                   if Dungeon == 1 then
  330.            punit:SetMaxHealth(74605)
  331.         punit:Root
  332.          local target = punit:GetClosestPlayer()
  333.               if target ~= nil then
  334.                    target:AddAura(Spell_Impale, 0)
  335.             end
  336.               if punit:GetHealthPct() <= 10 then
  337.                    target:RemoveAura(Spell_Impale)
  338.             end
  339.         end
  340.                   if Dungeon == 2 then
  341.            punit:SetMaxHealth(134289)
  342.         punit:Root
  343.          local target = punit:GetClosestPlayer()
  344.               if target ~= nil then
  345.                    target:AddAura(Spell_Impale, 0)
  346.             end
  347.               if punit:GetHealthPct() <= 10 then
  348.                    target:RemoveAura(Spell_Impale)
  349.             end
  350.         end
  351.                   if Dungeon == 3 then
  352.            punit:SetMaxHealth(129816)
  353.         punit:Root
  354.          local target = punit:GetClosestPlayer()
  355.               if target ~= nil then
  356.                    target:AddAura(Spell_Impale, 0)
  357.             end
  358.               if punit:GetHealthPct() <= 10 then
  359.                    target:RemoveAura(Spell_Impale)
  360.             end
  361.         end
  362. end