SHARE
TWEET

Untitled

a guest Jan 21st, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     AutoSmiteee v1.7
  3.  
  4.     Credits to Zynox for original AutoSmite v1.2
  5.     Mod by Manciuszz
  6.     Modified by Mariopart for BoL
  7. v1.0    : First release
  8. v1.1    : Update for new Animation Lib v0.3
  9. v1.2    : Added Nunu Q-Consume and ChoGath's R-Feast.
  10.         : Will now attempt to use Q + Smite for Nunu and Smite + R for ChoGath
  11.         : Will load the script on Nunu and ChoGath without Smite.
  12. v1.3    : Edited slightly and Modified for BoL Studio by eXtragoZ
  13.  
  14.     1) Hotkey for switching AutoSmite On/Off (by default: N). Remember that AutoSmite is OFF until you switch it.
  15.     2) Hold-Hotkey for using AutoSmite (by default: ALT) if you want to use it in this way.
  16. ]]
  17.  
  18. --[[            Config          ]]
  19. local range = 800         -- Range of smite (~800)
  20. local switcher = 78      -- Let's you to switches AutoSmite ON/OFF by pressing this hotkey (N)
  21. local hold = 12           -- Let's you to AutoSmite even if it's OFF by holding this hotkey (ALT by default). Set it to nil if you don't want to use this feature.
  22. local scanInterval = 10   -- Interval for Smite part of the script. Recommended to set from 10 to 500. If it drops FPS hard for you then try to set it to 500. (default: 50 ms)
  23.  
  24. --[[            Globals         ]]
  25. local sleepTick = 0
  26. local scanTick = 0
  27. local activated = 0
  28. local holding = 0
  29. local holdingshift = false
  30. local smiteSlot = nil
  31. local ASminionTable = {}
  32.  
  33. --[[            Code            ]]
  34. function OnWndMsg(msg,wParam)
  35.     if wParam ~= switcher and wParam ~= hold then return end
  36.     if wParam == switcher and msg == KEY_DOWN then
  37.         if activated == 0 then
  38.             activated = 1
  39.             holding = 0
  40.             PrintChat("<font color='#7CFC00'> >> AutoSmite: ON</font>")
  41.         else
  42.             activated = 0
  43.             holding = 0
  44.             PrintChat("<font color='#FF4500'> >> AutoSmite: OFF</font>")
  45.         end
  46.     end
  47.     if wParam == hold then
  48.         if msg == KEY_DOWN and activated == 0 and holding == 0 then
  49.             activated = 1
  50.             holding = 1
  51.             PrintChat("<font color='#7CFC00'> >> AutoSmite: ON</font>")
  52.         end
  53.         if msg == KEY_UP and activated == 1 and holding == 1 or holdingshift == false then
  54.             activated = 0
  55.             holding = 0
  56.             PrintChat("<font color='#FF4500'> >> AutoSmite: OFF</font>")
  57.         end
  58.     end
  59. end
  60.  
  61. function OnTick()
  62.     local tick = GetTickCount()
  63.     if GetTickCount()-scanTick < scanInterval and GetTickCount()<sleepTick then return end
  64.     scanTick = GetTickCount()
  65.     if activated == 1 and not myHero.dead then
  66.         local canusesmite = false
  67.         if smiteSlot ~= nil then
  68.             if myHero:CanUseSpell(smiteSlot) == READY then
  69.                 canusesmite = true
  70.             end
  71.         end
  72.         if myHero.charName == "Nunu" and myHero:CanUseSpell(_Q) == READY then  
  73.             local qDamage = 400 + 100 * myHero:GetSpellData(_Q).level
  74.             local smiteDamage = 420 + 25 * myHero.level
  75.             local mixDamage = qDamage + smiteDamage
  76.             for i,object in ipairs(ASminionTable) do
  77.                 if object ~= nil and myHero:GetDistance(object) < myHero:GetSpellData(_Q).range+200 then
  78.                     if canusesmite and object.health <= mixDamage then
  79.                         CastSpell(_Q, object)
  80.                         CastSpell(smiteSlot, object)
  81.                         Sleep(1000)
  82.                         return
  83.                     elseif not canusesmite and object.health <= qDamage then
  84.                         CastSpell(_Q, object)
  85.                         Sleep(1000)
  86.                         return
  87.                     end
  88.                 end
  89.             end
  90.         end
  91.         if myHero.charName == "Chogath" and myHero:CanUseSpell(_R) == READY then
  92.             local rDamage = 1000
  93.             local smiteDamage = 420 + 25 * myHero.level
  94.             local mixdDamage = rDamage + smiteDamage
  95.             for i,object in ipairs(ASminionTable) do
  96.                 if object ~= nil and myHero:GetDistance(object) < myHero:GetSpellData(_R).range+200 then
  97.                     if canusesmite and object.health <= mixdDamage then
  98.                         CastSpell(_R, object)
  99.                         CastSpell(smiteSlot, object)
  100.                         Sleep(1000)
  101.                         return
  102.                     elseif not canusesmite and object.health <= rDamage then
  103.                         CastSpell(_R, object)
  104.                         Sleep(1000)
  105.                         return
  106.                     end
  107.                 end
  108.             end
  109.         end        
  110.         if canusesmite then
  111.             local smiteDamage = 420 + 25 * myHero.level
  112.             for i,object in ipairs(ASminionTable) do
  113.                 if object ~= nil and myHero:GetDistance(object) < range and object.health <= smiteDamage then
  114.                     CastSpell(smiteSlot, object)
  115.                     Sleep(1000)
  116.                     return
  117.                 end
  118.             end
  119.         end
  120.     end
  121. end
  122.  
  123. function OnCreateObj(obj)
  124.     if obj ~= nil and (string.find(obj.name,"Worm12.1.1") ~= nil or string.find(obj.name,"Dragon6.1.1") ~= nil or string.find(obj.name,"TwistedLizardElder8$1") ~= nil or string.find(obj.name,"blueDragon7$1") ~= nil or string.find(obj.name,"AncientGolem1.1.1") ~= nil or string.find(obj.name,"AncientGolem7.1.1") ~= nil or string.find(obj.name,"LizardElder4.1.1") ~= nil or string.find(obj.name,"LizardElder10.1.1") ~= nil) then
  125.         table.insert(ASminionTable, obj)
  126.     end
  127. end
  128.  
  129. function OnDeleteObj(obj)
  130.     for i,v in ipairs(ASminionTable) do
  131.         if string.find(obj.name, v.name) then
  132.             table.remove(ASminionTable,i)
  133.         end
  134.     end
  135. end
  136.  
  137. function LoadMinions()
  138.     for i = 1, objManager.maxObjects do
  139.         local object = objManager:getObject(i)
  140.         if object ~= nil and object.team == TEAM_NEUTRAL and object.dead == false and (string.find(object.name,"Worm12.1.1") ~= nil or string.find(object.name,"Dragon6.1.1") ~= nil or string.find(object.name,"TwistedLizardElder8$1") ~= nil or string.find(object.name,"blueDragon7$1") ~= nil or string.find(object.name,"AncientGolem1.1.1") ~= nil or string.find(object.name,"AncientGolem7.1.1") ~= nil or string.find(object.name,"LizardElder4.1.1") ~= nil or string.find(object.name,"LizardElder10.1.1") ~= nil) then
  141.             table.insert(ASminionTable, object)
  142.         end
  143.     end
  144. end
  145.  
  146. function Sleep( ms )
  147.     sleepTick = GetTickCount() + ms
  148. end
  149.      
  150. function OnLoad()
  151.     if string.find(myHero:GetSpellData(SUMMONER_1).name, "Smite") ~= nil then
  152.         smiteSlot = SUMMONER_1
  153.         LoadMinions()
  154.         PrintChat(" >> AutoSmiteee v1.7 loaded!")
  155.     elseif string.find(myHero:GetSpellData(SUMMONER_2).name, "Smite") ~= nil then
  156.         smiteSlot = SUMMONER_2
  157.         LoadMinions()
  158.         PrintChat(" >> AutoSmiteee v1.7 loaded!")
  159.     elseif myHero.charName == "Nunu" and myHero:GetSpellData(SUMMONER_1).name:find("Smite") == nil then
  160.         smiteSlot = nil
  161.         LoadMinions()
  162.         PrintChat(" >> AutoSmiteee v1.7 loaded!")
  163.     elseif myHero.charName == "Chogath" and myHero:GetSpellData(SUMMONER_1).name:find("Smite") == nil then
  164.         smiteSlot = nil
  165.         LoadMinions()
  166.         PrintChat(" >> AutoSmiteee v1.7 loaded!")
  167.     else
  168.         smiteSlot = nil
  169.     end
  170. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top