bol_aureus

SidasAutoCarryPlugin - Morgana.lua

Aug 21st, 2013
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.23 KB | None | 0 0
  1. --[[
  2. SidasAutoCarryPlugin - Morgana
  3. by Aureus
  4.  
  5. Features:
  6. * Use Q and W with AutoCarry
  7. * Auto Ult with minimum enemies
  8. * Use AutoAttacks
  9. * Draw Q Range
  10.  
  11. Credits to Hex for template, vadash for Q values (practically copy-pasted from his goodevade), and ofcourse Sida for this wonderful feature
  12.  ]]--
  13.  
  14. local SkillQ = {spellKey = _Q, range = 1300, speed = 1200, width = 70, delay = 250}
  15.  
  16. function PluginOnLoad()
  17.     mainLoad()
  18.     mainMenu()
  19. end
  20.  
  21. function PluginOnTick()
  22.     Target = AutoCarry.GetAttackTarget()
  23.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  24.     WREADY = (myHero:CanUseSpell(_W) == READY)
  25.     RREADY = (myHero:CanUseSpell(_R) == READY)
  26.  
  27.     if Menu2.LastHit then
  28.         AutoCarry.CanAttack = true
  29.     end
  30.  
  31.     if Menu.useR and RREADY then
  32.         local champCount = 0
  33.         for i = 1, heroManager.iCount do
  34.             local enemy = heroManager:getHero(i)
  35.             if ValidTarget(enemy, RRange) then
  36.                 champCount = champCount + 1
  37.             end
  38.         end
  39.         if Menu.minR <= champCount then
  40.             CastSpell(_R)
  41.         end
  42.     end
  43.  
  44.     if Menu2.AutoCarry and Target then
  45.         if Menu.useQ and QREADY and GetDistance(Target) <= QRange and not AutoCarry.GetCollision(SkillQ, Target) then
  46.             AutoCarry.CastSkillshot(SkillQ, Target)
  47.         end
  48.         if Menu.useW and WREADY and GetDistance(Target) <= WRange and not Target.canMove then
  49.             CastSpell(_W, Target.x, Target.z)
  50.         end
  51.  
  52.         if Menu.useAA then
  53.             AutoCarry.CanAttack = true
  54.         else
  55.             AutoCarry.CanAttack = false
  56.         end
  57.     end
  58. end
  59.  
  60. function PluginOnDraw()
  61.     if Menu.drawQ and not myHero.dead then
  62.         DrawCircle(myHero.x, myHero.y, myHero.z, QRange, 0x00FF00)
  63.     end
  64. end
  65.  
  66. function mainLoad()
  67.     Menu = AutoCarry.PluginMenu
  68.     Menu2 = AutoCarry.MainMenu
  69.     AutoCarry.SkillsCrosshair.range = 1300
  70.     QREADY, WREADY, RREADY = false, false, false
  71.     QRange, WRange, RRange = 1300, 900, 600
  72. end
  73.  
  74. function mainMenu()
  75.     Menu:addParam("useQ", "Use Q with AutoCarry", SCRIPT_PARAM_ONOFF, true)
  76.     Menu:addParam("useW", "Use W with AutoCarry", SCRIPT_PARAM_ONOFF, true)
  77.     Menu:addParam("useR", "Auto Ult", SCRIPT_PARAM_ONOFF, true)
  78.     Menu:addParam("minR", "Minimum enemies to Auto Ult", SCRIPT_PARAM_SLICE, 1, 0, 4, 0)
  79.     Menu:addParam("useAA", "Use AutoAttacks", SCRIPT_PARAM_ONOFF, false)
  80.     Menu:addParam("drawQ", "Draw Q Range", SCRIPT_PARAM_ONOFF, true)
  81. end
Advertisement
Add Comment
Please, Sign In to add comment