bol_aureus

SidasAutoCarryPlugin - Warwick.lua

Aug 21st, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.16 KB | None | 0 0
  1. -- SidasAutoCarryPlugin - Warwick --
  2.  
  3. function PluginOnLoad()
  4.     mainLoad()
  5.     mainMenu()
  6. end
  7.  
  8. function PluginOnTick()
  9.     Target = AutoCarry.GetAttackTarget()
  10.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  11.     WREADY = (myHero:CanUseSpell(_W) == READY)
  12.  
  13.     if Menu.autoks then
  14.         for i = 1, heroManager.iCount, 1 do
  15.             local ksTarget = heroManager:getHero(i)
  16.             if ValidTarget(ksTarget, QRange) then
  17.                 if ksTarget.health <= getDmg("Q", ksTarget, myHero) then CastSpell(_Q, Target) end
  18.             end
  19.         end
  20.     end
  21.  
  22.     if Menu2.AutoCarry and Target then
  23.         if WREADY and GetDistance(Target) <= WRange and Menu.useW then
  24.             CastSpell(_W)
  25.         end
  26.         if QREADY and GetDistance(Target) <= QRange and Menu.useQ then
  27.             CastSpell(_Q, Target)
  28.         end
  29.     end
  30. end
  31.  
  32. function mainLoad()
  33.     Menu = AutoCarry.PluginMenu
  34.     Menu2 = AutoCarry.MainMenu
  35.     AutoCarry.SkillsCrosshair.range = 1250
  36.     QREADY, WREADY = false, false
  37.     QRange, WRange = 400, 1250
  38. end
  39.  
  40. function mainMenu()
  41.     Menu:addParam("useQ", "Use Q with AutoCarry", SCRIPT_PARAM_ONOFF, true)
  42.     Menu:addParam("useW", "Use W with AutoCarry", SCRIPT_PARAM_ONOFF, true)
  43.     Menu:addParam("autoks", "Auto KS with Q", SCRIPT_PARAM_ONOFF, true)
  44. end
Advertisement
Add Comment
Please, Sign In to add comment