AnonymousBOL

aEvelynn v1.0b (REBORN VERSION)

Oct 21st, 2013
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.13 KB | None | 0 0
  1. --
  2. --              aEvelynn by Anonymous v1.0b
  3. --              Version for SAC: Reborn with fixed menu ;)
  4. --
  5.  
  6. class 'Plugin'
  7. require 'AoE_Skillshot_Position'
  8. if myHero.charName ~= "Evelynn" then return end
  9.  
  10. local Target
  11. local UltByScript = false
  12.  
  13. function Plugin:__init()
  14.     AutoCarry.Crosshair:SetSkillCrosshairRange(800)
  15.     --Menu = scriptConfig("Sida's Auto Carry Plugin: aEvelynn Config", "aevelynn")
  16.     for _, Item in pairs(AutoCarry.Items.ItemList) do
  17.         if Item.ID == 3128 then
  18.             Item.Enabled = false
  19.         end
  20.     end
  21. end
  22.  
  23. function Plugin:OnTick()
  24.     Target = AutoCarry.Crosshair:GetTarget()
  25.     if Menu.spamQE then
  26.         if Target ~= nil and AutoCarry.Keys.AutoCarry then
  27.             local CanQ = (myHero:CanUseSpell(_Q) == READY and GetDistance(Target, myHero) < 500)
  28.             local CanE = (myHero:CanUseSpell(_E) == READY and GetDistance(Target, myHero) < 225)
  29.             if CanQ then CastSpell(_Q) end
  30.             if CanE then CastSpell(_E, Target) end
  31.         end
  32.     end
  33.     if Menu.spamQ then
  34.         if AutoCarry.Keys.LaneClear and myHero.mana/myHero.maxMana*100 >= Menu.autoMinMana then
  35.             local CanQ = (myHero:CanUseSpell(_Q) == READY)
  36.             if CanQ then CastSpell(_Q) end
  37.         end
  38.     end
  39.     if Menu.spamE then
  40.         if AutoCarry.Keys.LaneClear and myHero.mana/myHero.maxMana*100 >= Menu.autoMinMana then
  41.             local JunngleTarget = AutoCarry.Jungle:GetAttackableMonster()
  42.             local CanE = (myHero:CanUseSpell(_E) == READY and JunngleTarget ~= nil and GetDistance(JunngleTarget, myHero) < 225)
  43.             if CanE and JunngleTarget ~= nil then CastSpell(_E, JunngleTarget) end
  44.         end
  45.     end
  46.     if Menu.burstTarget then
  47.         if Target ~= nil then
  48.             local CanQ = (myHero:CanUseSpell(_Q) == READY and GetDistance(Target, myHero) < 500)
  49.             local CanE = (myHero:CanUseSpell(_E) == READY and GetDistance(Target, myHero) < 325)
  50.             local CanR = (myHero:CanUseSpell(_R) == READY and GetDistance(Target, myHero) < 800)
  51.             AutoCarry.Items:UseAll(Target)
  52.             CastItem(3128, Target)
  53.             if CanR then CastSpell(_R, Target.x,            Target.z) end -- Packets will target it better anyway :p
  54.             if CanE then CastSpell(_E, Target) end
  55.             if CanQ then CastSpell(_Q) end
  56.             if not AutoCarry.Keys.AutoCarry then myHero:Attack(Target) end
  57.         end
  58.     end
  59. end
  60.  
  61. function Plugin:OnDraw()
  62.     if myHero ~= nil and not myHero.dead and Menu.drawQrange then DrawCircle(myHero.x, myHero.y, myHero.z, 500, 0xFF80FF00) end
  63.     if myHero ~= nil and not myHero.dead and Menu.drawErange then DrawCircle(myHero.x, myHero.y, myHero.z, 225, 0xFF80FF00) end
  64.     if myHero ~= nil and not myHero.dead and Menu.drawRrange and myHero:CanUseSpell(_R) == READY then DrawCircle(myHero.x, myHero.y, myHero.z, 800, 0xFF80FF00) end
  65.    
  66.     if Menu.drawRmec then -- Test MEC IT Draws where ultimate will be casted :) You can uncomment it, and it will work.
  67.         local Enemies = AutoCarry.Helper.EnemyTable
  68.         local ClosestEnemy = nil
  69.         local Position1 = { x=mousePos.x, y=mousePos.y, z=mousePos.z }
  70.         for i, Enemy in pairs(Enemies) do
  71.             if Enemy ~= nil and not Enemy.dead and Enemy.visible then
  72.                 if ClosestEnemy ~= nil then
  73.                     if GetDistance(Enemy, Position1) < GetDistance(ClosestEnemy, Position1) then
  74.                         ClosestEnemy = Enemy
  75.                     end
  76.                 else
  77.                     ClosestEnemy = Enemy
  78.                 end
  79.             end
  80.         end
  81.         local UltTargetted = ClosestEnemy
  82.         if GetDistance(UltTargetted, CastPosition) < 300 then
  83.             UltTarget = UltTargetted
  84.         else
  85.             UltTarget = AutoCarry.Crosshair:GetTarget()
  86.         end
  87.         if UltTarget ~= nil then
  88.             local ValidEnemies = 0
  89.             for i, Enemy in pairs(Enemies) do
  90.                 if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Enemy, myHero) < 1050 then ValidEnemies = ValidEnemies + 1 end
  91.             end
  92.             if ValidEnemies > 1 then
  93.                 local spellPos = GetAoESpellPosition(250, UltTarget)
  94.                 DrawCircle(spellPos.x, spellPos.y, spellPos.z, 250, 0xFF80FF00)
  95.             else
  96.                 DrawCircle(UltTarget.x, UltTarget.y, UltTarget.z, 250, 0xFF80FF00)
  97.             end
  98.         end
  99.     end
  100. end
  101.  
  102. function Plugin:OnSendPacket(p)
  103.     local packet = Packet(p)
  104.     if packet:get('name') == 'S_CAST' then
  105.         local SpellID = packet:get('spellId')
  106.         if SpellID == SPELL_4 then
  107.             local Enemies = AutoCarry.Helper.EnemyTable
  108.             local CastPosition = { x = packet:get('toX'), y = packet:get('toY'), z = packet:get('toY') }
  109.             if Menu.blockR then
  110.                 local ValidTargets = 0
  111.                 for i, Enemy in pairs(Enemies) do
  112.                     if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Enemy, CastPosition) < 250 then ValidTargets = ValidTargets + 1 end
  113.                 end
  114.                 if ValidTargets == 0 then p:Block() end
  115.             end
  116.             if Menu.autoUltaiming then
  117.                 if UltByScript == true then
  118.                     UltByScript = false
  119.                 elseif UltByScript == false then
  120.                     p:Block()
  121.                     UltByScript = true
  122.                     local ClosestEnemy = nil
  123.                     local Position1 = { x=CastPosition.x, y=CastPosition.y, z=CastPosition.z }
  124.                     for i, Enemy in pairs(Enemies) do
  125.                         if Enemy ~= nil and not Enemy.dead and Enemy.visible then
  126.                             if ClosestEnemy ~= nil then
  127.                                 if GetDistance(Enemy, Position1) < GetDistance(ClosestEnemy, Position1) then
  128.                                     ClosestEnemy = Enemy
  129.                                 end
  130.                             else
  131.                                 ClosestEnemy = Enemy
  132.                             end
  133.                         end
  134.                     end
  135.                     local UltTargetted = ClosestEnemy
  136.                     if GetDistance(UltTargetted, CastPosition) < 300 then
  137.                         UltTarget = UltTargetted
  138.                     else
  139.                         UltTarget = AutoCarry.Crosshair:GetTarget()
  140.                     end
  141.                     if UltTarget ~= nil then
  142.                         local ValidEnemies = 0
  143.                         for i, Enemy in pairs(Enemies) do
  144.                             if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Enemy, myHero) < 1050 then ValidEnemies = ValidEnemies + 1 end
  145.                         end
  146.                         if ValidEnemies > 1 then
  147.                             local spellPos = GetAoESpellPosition(250, UltTarget)
  148.                             CastSpell(_R, spellPos.x, spellPos.z)
  149.                         else
  150.                             CastSpell(_R, UltTarget.x, UltTarget.z)
  151.                         end
  152.                     end
  153.                 end
  154.             end
  155.         end
  156.     end
  157. end
  158.  
  159. Menu = AutoCarry.Plugins:RegisterPlugin(Plugin(), "aEvelynn v1.0b")
  160. Menu:addParam("Information1", "  aEvelynn v1.0a by Anonymous", SCRIPT_PARAM_INFO, "")
  161. Menu:addParam("Information2", "== Helper-Settings: ==", SCRIPT_PARAM_INFO, "")
  162. Menu:addParam("burstTarget", "Full Combo", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("A"))
  163. Menu:addParam("spamQE","Use QE in AutoCarry mode", SCRIPT_PARAM_ONOFF, true)
  164. Menu:addParam("spamQ","Use Q in LaneClear mode", SCRIPT_PARAM_ONOFF, true)
  165. Menu:addParam("spamE","Use E in LaneClear mode", SCRIPT_PARAM_ONOFF, true)
  166. Menu:addParam("autoMinMana","Minimum % mana (LaneClear)", SCRIPT_PARAM_SLICE, 35, 0, 100, 0)
  167. --Menu:addParam("spamQblueonly","Only with bluebuff", SCRIPT_PARAM_ONOFF, true)
  168. Menu:addParam("Information4", "VIP only functions:", SCRIPT_PARAM_INFO, "")
  169. Menu:addParam("blockR","Block wrong ult", SCRIPT_PARAM_ONOFF, true)
  170. Menu:addParam("autoUltaiming","Automaticly aim with ult", SCRIPT_PARAM_ONOFF, true)
  171. Menu:addParam("Information3", "== Drawer-Settings: ==", SCRIPT_PARAM_INFO, "")
  172. Menu:addParam("drawQrange","Draw Q range", SCRIPT_PARAM_ONOFF, true)
  173. Menu:addParam("drawErange","Draw E range", SCRIPT_PARAM_ONOFF, false) -- useless imo, too much circles.
  174. Menu:addParam("drawRrange","Draw R range", SCRIPT_PARAM_ONOFF, true)
  175. Menu:addParam("drawRmec","Draw R prediction", SCRIPT_PARAM_ONOFF, false) -- This is only to let you see how it casts ultimate, imo should be disable during game.
Advertisement
Add Comment
Please, Sign In to add comment