bol_aureus

SidasAutoCarryPlugin - Mordekaiser.lua

Aug 8th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.91 KB | None | 0 0
  1. function  PluginOnLoad()
  2.     mainLoad()
  3.     mainMenu()
  4. end
  5.  
  6. function PluginOnTick()
  7.     Target = AutoCarry.GetAttackTarget()
  8.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  9.     WREADY = (myHero:CanUseSpell(_W) == READY)
  10.     EREADY = (myHero:CanUseSpell(_E) == READY)
  11.     RREADY = (myHero:CanUseSpell(_R) == READY)
  12.  
  13.     if Menu.autoks and (QREADY or WREADY or EREADY or RREADY)
  14.         for i = 1, heroManager.iCount, 1 do
  15.             local ksTarget = heroManager:getHero(i)
  16.             if ValidTarget(ksTarget, 700) then
  17.                 if ksTarget.health <= getDmg("E", ksTarget, myHero) then
  18.                     CastSpell(_E, ksTarget.x, ksTarget.z)
  19.                 end
  20.             end
  21.             if ValidTarget(ksTarget, 850) then
  22.                 if ksTarget.health <= getDmg("R", ksTarget, myHero) then
  23.                     CastSpell(_R, ksTarget)
  24.                 end
  25.             end
  26.         end
  27.     end
  28.  
  29.     if Menu2.AutoCarry then
  30.         if QREADY and GetDistance(Target) <= 600 then
  31.             CastSpell(_Q)
  32.         end
  33.         if WREADY then
  34.             CastSpell(_W, myHero)
  35.         end
  36.         if EREADY and GetDistance(Target) <= 700 then
  37.             CastSpell(_E, Target.x, Target.z)
  38.         end
  39.         if RREADY and GetDistance(Target) <= 850 then
  40.             CastSpell(_R, Target)
  41.         end
  42.     end
  43.  
  44.     if not Target then
  45.         CastSpell(_R, mousePos.x, mousePos.z)
  46.     end
  47. end
  48.  
  49. function OnAttacked()
  50.     if Target and Menu2.AutoCarry then
  51.         if QREADY and Menu.useQ and GetDistance(Target) <= 125 then CastSpell(_Q) end
  52.     end
  53. end
  54.  
  55. function mainLoad()
  56.     Menu = AutoCarry.PluginMenu
  57.     Menu2 = AutoCarry.MainMenu
  58.     QREADY, WREADY, EREADY, RREADY = false, false, false, false
  59. end
  60.  
  61. function mainMenu()
  62.     Menu:addParam("autoks", "Auto Kill with E and R", SCRIPT_PARAM_ONOFF, true)
  63.     Menu:addParam("sep", "-- Abilities --", SCRIPT_PARAM_INFO, "")
  64.     Menu:addParam("useQ", "Use Q with Combo", SCRIPT_PARAM_ONOFF, true)
  65.     Menu:addParam("useW", "Use W on self with Combo", SCRIPT_PARAM_ONOFF, true)
  66.     Menu:addParam("useE", "Use E with Combo", SCRIPT_PARAM_ONOFF, true)
  67.     Menu:addParam("useR" "Use R with Combo", SCRIPT_PARAM_ONOFF, true)
  68. end
Advertisement
Add Comment
Please, Sign In to add comment