bol_aureus

SidasAutoCarryPlugin - XinZhao.lua

Aug 6th, 2013
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.28 KB | None | 0 0
  1. --[[
  2.  
  3. Sidas AutoCarry Plugin - Xin Zhao
  4. Made by: Aureus †
  5.  
  6. Features:
  7. * AA Reset with Q and W
  8. * Initiate with E
  9. * Use ult with minimum champs(slider)
  10. * Auto KS with E and R (toggleable)
  11.  
  12. --]]
  13.  
  14. function PluginOnLoad()
  15.         mainLoad()
  16.         mainMenu()
  17. end
  18.  
  19. function PluginOnTick()
  20.         Target = AutoCarry.GetAttackTarget()
  21.         QREADY = (myHero:CanUseSpell(_Q) == READY)
  22.         WREADY = (myHero:CanUseSpell(_W) == READY)
  23.         EREADY = (myHero:CanUseSpell(_E) == READY)
  24.         RREADY = (myHero:CanUseSpell(_R) == READY)
  25.  
  26.         --Auto KS
  27.         if Menu.autoks and EREADY or RREADY then
  28.                 for i = 1, heroManager.iCount, 1 do
  29.                         local ksTarget = heroManager:getHero(i)
  30.                         if ValidTarget(ksTarget, ERange) then
  31.                                 if ksTarget.health <= getDmg("E", ksTarget, myHero) then
  32.                                         CastSpell(_E, ksTarget)
  33.                                 end
  34.                         end
  35.                         if ValidTarget(ksTarget, 187.5) then
  36.                                 if ksTarget.health <= getDmg("R", ksTarget, myHero) then
  37.                                         CastSpell(_R)
  38.                                 end
  39.                         end
  40.                 end
  41.         end
  42.  
  43.         --Min Ult Count
  44.         if Menu.useR and RREADY then
  45.                 local champCount = 0
  46.                 for i = 1, heroManager.iCount do
  47.                         local enemy = heroManager:getHero(i)
  48.                         if ValidTarget(enemy, 187.5) then
  49.                                 champCount = champCount + 1
  50.                         end
  51.                 end
  52.                 if champCount >= (Menu.minR) then
  53.                         CastSpell(_R)
  54.                 end
  55.         end
  56.  
  57.         --Main Combo / AutoCarry
  58.         if Target and Menu2.AutoCarry then
  59.                 if EREADY and Menu.useE and GetDistance(Target) <= ERange then
  60.                         CastSpell(_E, Target)
  61.                 end
  62.                 if WREADY and Menu.useW and GetDistance(Target) <= 175 then
  63.                         CastSpell(_W)
  64.                 end
  65.         end
  66. end
  67.  
  68. function OnAttacked()
  69.         if Target and Menu2.AutoCarry then
  70.                 if WREADY and Menu.useW and GetDistance(Target) <= 175 then CastSpell(_W) end
  71.                 if QREADY and Menu.useQ and GetDistance(Target) <= 175 then CastSpell(_Q) end
  72.         end
  73. end
  74.  
  75. function mainLoad()
  76.         AutoCarry.SkillsCrosshair.range = 600
  77.         Menu = AutoCarry.PluginMenu
  78.         Menu2 = AutoCarry.MainMenu
  79.         QREADY, WREADY, EREADY, RREADY = false, false, false, false
  80.         ERange, RRange = 600, 187.5
  81. end
  82.  
  83. function mainMenu()
  84.         Menu:addParam("autoks", "Auto KS with E and R", SCRIPT_PARAM_ONOFF, true)
  85.         Menu:addParam("sep", "-- Abilities --", SCRIPT_PARAM_INFO, "")
  86.         Menu:addParam("useQ", "Use Q with AutoCarry", SCRIPT_PARAM_ONOFF, true)
  87.         Menu:addParam("useW", "Use W with AutoCarry", SCRIPT_PARAM_ONOFF, true)
  88.         Menu:addParam("useE", "Use E with AutoCarry", SCRIPT_PARAM_ONOFF, true)
  89.         Menu:addParam("useR", "Auto use ULt", SCRIPT_PARAM_ONOFF, true)
  90.         Menu:addParam("minR", "Minimum enemies to use Ult", SCRIPT_PARAM_SLICE, 1, 0, 4, 0)
  91. end
Advertisement
Add Comment
Please, Sign In to add comment