AnonymousBOL

aEvelynn v1.1

Oct 24th, 2013
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.73 KB | None | 0 0
  1. --
  2. --              aEvelynn by Anonymous v1.1
  3. --              Version with better ulting ( free users ), and drawing text on enemies.
  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. local Enemies = AutoCarry.Helper.EnemyTable
  13.  
  14. function Plugin:__init()
  15.     AutoCarry.Crosshair:SetSkillCrosshairRange(800)
  16.     --Menu = scriptConfig("Sida's Auto Carry Plugin: aEvelynn Config", "aevelynn")
  17.     for _, Item in pairs(AutoCarry.Items.ItemList) do
  18.         if Item.ID == 3128 then
  19.             Item.Enabled = false
  20.         end
  21.     end
  22. end
  23.  
  24. function Plugin:OnTick()
  25.     Target = AutoCarry.Crosshair:GetTarget()
  26.     if Menu.spamQE then
  27.         if Target ~= nil and AutoCarry.Keys.AutoCarry then
  28.             local CanQ = (myHero:CanUseSpell(_Q) == READY and GetDistance(Target, myHero) < 500)
  29.             local CanE = (myHero:CanUseSpell(_E) == READY and GetDistance(Target, myHero) < 225)
  30.             if CanQ then CastSpell(_Q) end
  31.             if CanE then CastSpell(_E, Target) end
  32.         end
  33.     end
  34.     if Menu.spamQ then
  35.         if AutoCarry.Keys.LaneClear and myHero.mana/myHero.maxMana*100 >= Menu.autoMinMana then
  36.             local CanQ = (myHero:CanUseSpell(_Q) == READY)
  37.             if CanQ then CastSpell(_Q) end
  38.         end
  39.     end
  40.     if Menu.spamE then
  41.         if AutoCarry.Keys.LaneClear and myHero.mana/myHero.maxMana*100 >= Menu.autoMinMana then
  42.             local JunngleTarget = AutoCarry.Jungle:GetAttackableMonster()
  43.             if JunngleTarget ~= nil then
  44.                 local CanE = (myHero:CanUseSpell(_E) == READY and GetDistance(JunngleTarget, myHero) < 225)
  45.                 if CanE then CastSpell(_E, JunngleTarget) end
  46.             end
  47.         end
  48.     end
  49.     if Menu.burstTarget then
  50.         if Target ~= nil then
  51.             local CanQ = (myHero:CanUseSpell(_Q) == READY and GetDistance(Target, myHero) < 500)
  52.             local CanE = (myHero:CanUseSpell(_E) == READY and GetDistance(Target, myHero) < 325)
  53.             local CanR = (myHero:CanUseSpell(_R) == READY and GetDistance(Target, myHero) < 800)
  54.             AutoCarry.Items:UseAll(Target)
  55.             CastItem(3128, Target)
  56.             if CanR then
  57.                 if VIP_USER then
  58.                     if Menu.autoUltaiming then
  59.                         CastSpell(_R, Target.x, Target.z)
  60.                     else
  61.                         local spellPos = GetAoESpellPosition(250, Target)
  62.                         CastSpell(_R, spellPos.x, spellPos.z)
  63.                     end
  64.                 else
  65.                     local spellPos = GetAoESpellPosition(250, Target)
  66.                     CastSpell(_R, spellPos.x, spellPos.z)
  67.                     --PrintChat("NonVIPCast")
  68.                 end
  69.             end -- Packets will target it better anyway :p
  70.             if CanE then CastSpell(_E, Target) end
  71.             if CanQ then CastSpell(_Q) end
  72.             if not AutoCarry.Keys.AutoCarry then myHero:Attack(Target) end
  73.         end
  74.     end
  75. end
  76.  
  77. function Plugin:OnDraw()
  78.     if myHero ~= nil and not myHero.dead and Menu.drawQrange then DrawCircle(myHero.x, myHero.y, myHero.z, 500, 0xFF80FF00) end
  79.     if myHero ~= nil and not myHero.dead and Menu.drawErange then DrawCircle(myHero.x, myHero.y, myHero.z, 225, 0xFF80FF00) end
  80.     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
  81.     if Menu.drawRmec then -- Test MEC IT Draws where ultimate will be casted :) You can uncomment it, and it will work.
  82.         local ClosestEnemy = nil
  83.         local Position1 = { x=mousePos.x, y=mousePos.y, z=mousePos.z }
  84.         for i, Enemy in pairs(Enemies) do
  85.             if Enemy ~= nil and not Enemy.dead and Enemy.visible then
  86.                 if ClosestEnemy ~= nil then
  87.                     if GetDistance(Enemy, Position1) < GetDistance(ClosestEnemy, Position1) then
  88.                         ClosestEnemy = Enemy
  89.                     end
  90.                 else
  91.                     ClosestEnemy = Enemy
  92.                 end
  93.             end
  94.         end
  95.         local UltTargetted = ClosestEnemy
  96.         if UltTargetted ~= nil and GetDistance(UltTargetted, CastPosition) < 300 then
  97.             UltTarget = UltTargetted
  98.         else
  99.             UltTarget = AutoCarry.Crosshair:GetTarget()
  100.         end
  101.         if UltTarget ~= nil then
  102.             local ValidEnemies = 0
  103.             for i, Enemy in pairs(Enemies) do
  104.                 if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Enemy, myHero) < 1050 then ValidEnemies = ValidEnemies + 1 end
  105.             end
  106.             if ValidEnemies > 1 then
  107.                 local spellPos = GetAoESpellPosition(250, UltTarget)
  108.                 DrawCircle(spellPos.x, spellPos.y, spellPos.z, 250, 0xFF80FF00)
  109.             else
  110.                 DrawCircle(UltTarget.x, UltTarget.y, UltTarget.z, 250, 0xFF80FF00)
  111.             end
  112.         end
  113.     end
  114.     if myHero ~= nil and not myHero.dead and Menu.drawText then
  115.         for i, Enemy in pairs(Enemies) do
  116.             if ValidTarget(Enemy) then
  117.                 local TotalDMG = 0
  118.                 local CanDFG = GetInventoryItemIsCastable(3128)
  119.                 local CanQ = (myHero:CanUseSpell(_Q) == READY and GetDistance(Enemy, myHero) < 500)
  120.                 local CanE = (myHero:CanUseSpell(_E) == READY and GetDistance(Enemy, myHero) < 325)
  121.                 local CanR = (myHero:CanUseSpell(_R) == READY and GetDistance(Enemy, myHero) < 800)
  122.                 if CanR then TotalDMG = TotalDMG + getDmg("R", Enemy, myHero) end
  123.                 if CanE then TotalDMG = TotalDMG + getDmg("E", Enemy, myHero) end
  124.                 if CanQ then TotalDMG = TotalDMG + getDmg("Q", Enemy, myHero) end
  125.                 if CanDFG then
  126.                     TotalDMG = TotalDMG * 0.2
  127.                     TotalDMG = TotalDMG + getDmg("DFG", Enemy, myHero)
  128.                 end
  129.                 TotalDMG = TotalDMG + getDmg("AD", Enemy, myHero)
  130.                 if TotalDMG >= Enemy.health then
  131.                     PrintFloatText(Enemy, 0, "Killable")
  132.                 else
  133.                     local HPafter = round(Enemy.health - TotalDMG, 1)
  134.                     PrintFloatText(Enemy, 0, "HP: "..HPafter)
  135.                 end
  136.             end
  137.         end
  138.     end
  139. end
  140.  
  141. function round(num, idp)
  142.   return tonumber(string.format("%." .. (idp or 0) .. "f", num))
  143. end
  144.  
  145. function Plugin:OnSendPacket(p)
  146.     local packet = Packet(p)
  147.     if packet:get('name') == 'S_CAST' then
  148.         local SpellID = packet:get('spellId')
  149.         if SpellID == SPELL_4 then
  150.             local CastPosition = { x = packet:get('toX'), y = packet:get('toY'), z = packet:get('toY') }
  151.             if Menu.blockR then
  152.                 local ValidTargets = 0
  153.                 for i, Enemy in pairs(Enemies) do
  154.                     if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Enemy, CastPosition) < 250 then ValidTargets = ValidTargets + 1 end
  155.                 end
  156.                 if ValidTargets == 0 then p:Block() end
  157.             end
  158.             if Menu.autoUltaiming then
  159.                 if UltByScript == true then
  160.                     UltByScript = false
  161.                 elseif UltByScript == false then
  162.                     p:Block()
  163.                     UltByScript = true
  164.                     local ClosestEnemy = nil
  165.                     local Position1 = { x=CastPosition.x, y=CastPosition.y, z=CastPosition.z }
  166.                     for i, Enemy in pairs(Enemies) do
  167.                         if Enemy ~= nil and not Enemy.dead and Enemy.visible then
  168.                             if ClosestEnemy ~= nil then
  169.                                 if GetDistance(Enemy, Position1) < GetDistance(ClosestEnemy, Position1) then
  170.                                     ClosestEnemy = Enemy
  171.                                 end
  172.                             else
  173.                                 ClosestEnemy = Enemy
  174.                             end
  175.                         end
  176.                     end
  177.                     local UltTargetted = ClosestEnemy
  178.                     if UltTargetted ~= nil and GetDistance(UltTargetted, CastPosition) < 300 then
  179.                         UltTarget = UltTargetted
  180.                     else
  181.                         UltTarget = AutoCarry.Crosshair:GetTarget()
  182.                     end
  183.                     if UltTarget ~= nil then
  184.                         local ValidEnemies = 0
  185.                         for i, Enemy in pairs(Enemies) do
  186.                             if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Enemy, myHero) < 1050 then ValidEnemies = ValidEnemies + 1 end
  187.                         end
  188.                         if ValidEnemies > 1 then
  189.                             local spellPos = GetAoESpellPosition(250, UltTarget)
  190.                             CastSpell(_R, spellPos.x, spellPos.z)
  191.                         else
  192.                             CastSpell(_R, UltTarget.x, UltTarget.z)
  193.                         end
  194.                     end
  195.                 end
  196.             end
  197.         end
  198.     end
  199. end
  200.  
  201. Menu = AutoCarry.Plugins:RegisterPlugin(Plugin(), "aEvelynn v1.1")
  202. Menu:addParam("Information1", "  aEvelynn v1.1 by Anonymous", SCRIPT_PARAM_INFO, "")
  203. Menu:addParam("Information2", "== Helper-Settings: ==", SCRIPT_PARAM_INFO, "")
  204. Menu:addParam("burstTarget", "Full Combo", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("A"))
  205. Menu:addParam("spamQE","Use QE in AutoCarry mode", SCRIPT_PARAM_ONOFF, true)
  206. Menu:addParam("spamQ","Use Q in LaneClear mode", SCRIPT_PARAM_ONOFF, true)
  207. Menu:addParam("spamE","Use E in LaneClear mode", SCRIPT_PARAM_ONOFF, true)
  208. Menu:addParam("autoMinMana","Minimum % mana (LaneClear)", SCRIPT_PARAM_SLICE, 35, 0, 100, 0)
  209. --Menu:addParam("spamQblueonly","Only with bluebuff", SCRIPT_PARAM_ONOFF, true)
  210. Menu:addParam("Information4", "VIP only functions:", SCRIPT_PARAM_INFO, "")
  211. Menu:addParam("blockR","Block wrong ult", SCRIPT_PARAM_ONOFF, true)
  212. Menu:addParam("autoUltaiming","Automaticly aim with ult", SCRIPT_PARAM_ONOFF, true)
  213. Menu:addParam("Information3", "== Drawer-Settings: ==", SCRIPT_PARAM_INFO, "")
  214. Menu:addParam("drawQrange","Draw Q range", SCRIPT_PARAM_ONOFF, true)
  215. Menu:addParam("drawErange","Draw E range", SCRIPT_PARAM_ONOFF, false) -- useless imo, too much circles.
  216. Menu:addParam("drawRrange","Draw R range", SCRIPT_PARAM_ONOFF, true)
  217. 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.
  218. Menu:addParam("drawText","Draw text on enemies", SCRIPT_PARAM_ONOFF, true) -- Killable, Murder him, etc.
Advertisement
Add Comment
Please, Sign In to add comment