Advertisement
TallyHo

TallyHo's Irelia V1.0

Aug 23rd, 2014
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.38 KB | None | 0 0
  1. require 'Utils'
  2. require 'uiconfig'
  3.  
  4. --Variables
  5. local yayo = require 'yayo'
  6. local uiconfig = require 'uiconfig'
  7. local target
  8. local minion
  9.  
  10. --Menu
  11. CfgIrelia, menu = uiconfig.add_menu('BASIC')
  12. menu.keydown('combo', 'Combo', Keys.Space, 200)
  13. menu.keydown('cleverW','Auto W Lifesteal Minions', Keys.V)
  14. menu.keytoggle('smartE','Auto E Stun', Keys.T)
  15. menu.slider('smartW','Auto W Health Percentage', 0, 100, 50, nil, true)
  16.  
  17. --Main
  18. function main()
  19.     if IsChatOpen() == 0 and tostring(winapi.get_foreground_window()) == "League of Legends (TM) Client" then
  20.         local target = GetWeakEnemy('PHYS', 650)
  21.         if target ~= nil then
  22.             if CfgIrelia.smartE then smartE()
  23.             end
  24.             if CfgIrelia.combo then combo()
  25.             end
  26.         end
  27.         local minion = GetLowestHealthEnemyMinion(500)
  28.         if minion ~= nil then
  29.             if CfgIrelia.cleverW then smartW()
  30.             end
  31.         end
  32.     end
  33. end
  34.  
  35. --Q
  36. function ireliaQ()
  37.     local target = GetWeakEnemy('PHYS', 650)
  38.     if target ~= nil then
  39.         if myHero.SpellTimeQ > 1.0 and GetDistance(myHero, target) <= 650 then
  40.             CastSpellTarget('Q', target)
  41.         end
  42.     end
  43. end
  44.  
  45. --W
  46. function ireliaW()
  47.     local target = GetWeakEnemy('PHYS', 125)
  48.     if target ~= nil then
  49.         if myHero.SpellTimeW > 1.0 and GetDistance(myHero, target) <= 125 then
  50.             CastSpellTarget('W', myHero)
  51.         end
  52.     end
  53. end
  54.  
  55. --E
  56. function ireliaE()
  57.     local target = GetWeakEnemy('PHYS', 425)
  58.     if target ~= nil then
  59.         if myHero.SpellTimeE > 1.0 and GetDistance(myHero, target) <= 425 then
  60.             CastSpellTarget('E', target)
  61.         end
  62.     end
  63. end
  64.  
  65. --R
  66. function ireliaR()
  67.     local target = GetWeakEnemy('PHYS', 1000)
  68.     if target ~= nil then
  69.         if myHero.SpellTimeR > 1.0 and GetDistance(myHero, target) <= 1000 then
  70.             CastSpellXYZ('R', target.x, target.y, target.z)
  71.         end
  72.     end
  73. end
  74.  
  75. --Combo
  76. function combo()
  77.     local target = GetWeakEnemy('PHYS', 650)
  78.     if target ~= nil then
  79.         ireliaQ()
  80.         ireliaW()
  81.         ireliaE()
  82.         ireliaR()
  83.     end
  84. end
  85.  
  86. --SmartE
  87. function smartE()
  88.     local target = GetWeakEnemy('PHYS', 425)
  89.     if target ~= nil then
  90.         if ((myHero.health/myHero.maxHealth)*100) < ((target.health/target.maxHealth)*100) then
  91.             ireliaE()
  92.         end
  93.     end
  94. end
  95.  
  96. --SmartW
  97. function smartW()
  98.     local minion = GetLowestHealthEnemyMinion(500)
  99.     if minion ~= nil then
  100.         if CfgIrelia.cleverW then
  101.             if myHero.health <= myHero.maxHealth*(CfgIrelia.smartW / 100) then
  102.                 CastSpellTarget('W', myHero)
  103.             end
  104.         end
  105.     end
  106. end
  107.  
  108. SetTimerCallback('main')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement