AnonymousBOL

aVladimir BETA v0.1

Oct 21st, 2013
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.35 KB | None | 0 0
  1. --
  2. --              aVladimir by Anonymous v0.1
  3. --              based on Eve script, for fun :P
  4. --
  5.  
  6. class 'Plugin'
  7. require 'AoE_Skillshot_Position'
  8. if myHero.charName ~= "Vladimir" then return end
  9.  
  10. local Target
  11. local UltByScript = false
  12.  
  13. function Plugin:__init()
  14.     AutoCarry.Crosshair:SetSkillCrosshairRange(700)
  15. end
  16.  
  17. function Plugin:OnTick()
  18.     Target = AutoCarry.Crosshair:GetTarget()
  19.     if Menu.spamQE then
  20.         if Target ~= nil and AutoCarry.Keys.AutoCarry then
  21.             local CanQ = (myHero:CanUseSpell(_Q) == READY and GetDistance(Target, myHero) < 600)
  22.             local CanE = (myHero:CanUseSpell(_E) == READY and GetDistance(Target, myHero) < 600 and myHero.health/myHero.maxHealth*100 >= Menu.minEhp)
  23.             if CanQ then CastSpell(_Q, Target) end
  24.             if CanE then CastSpell(_E) end
  25.         end
  26.     end
  27.     if Menu.burstTarget then
  28.         if Target ~= nil then
  29.             local CanQ = (myHero:CanUseSpell(_Q) == READY and GetDistance(Target, myHero) < 600)
  30.             local CanE = (myHero:CanUseSpell(_E) == READY and GetDistance(Target, myHero) < 600)
  31.             local CanR = (myHero:CanUseSpell(_R) == READY and GetDistance(Target, myHero) < 700)
  32.             if CanR then CastSpell(_R, Target.x, Target.z) end -- Packets will target it better anyway :p
  33.             if CanQ then CastSpell(_Q, Target) end
  34.             if CanE then CastSpell(_E) end
  35.             --if not AutoCarry.Keys.AutoCarry then myHero:Attack(Target) end
  36.         end
  37.     end
  38. end
  39.  
  40. function Plugin:OnDraw()
  41.     if myHero ~= nil and not myHero.dead and Menu.drawQrange then DrawCircle(myHero.x, myHero.y, myHero.z, 600, 0xFFFF0000) end
  42.     if myHero ~= nil and not myHero.dead and Menu.drawRrange and myHero:CanUseSpell(_R) == READY then DrawCircle(myHero.x, myHero.y, myHero.z, 700, 0xFF80FF00) end
  43.    
  44.     if Menu.drawRmec then -- Test MEC IT Draws where ultimate will be casted :) You can uncomment it, and it will work.
  45.         local Enemies = AutoCarry.Helper.EnemyTable
  46.         local ClosestEnemy = nil
  47.         local Position1 = { x=mousePos.x, y=mousePos.y, z=mousePos.z }
  48.         for i, Enemy in pairs(Enemies) do
  49.             if Enemy ~= nil and not Enemy.dead and Enemy.visible then
  50.                 if ClosestEnemy ~= nil then
  51.                     if GetDistance(Enemy, Position1) < GetDistance(ClosestEnemy, Position1) then
  52.                         ClosestEnemy = Enemy
  53.                     end
  54.                 else
  55.                     ClosestEnemy = Enemy
  56.                 end
  57.             end
  58.         end
  59.         local UltTargetted = ClosestEnemy
  60.         if UltTargetted ~= nil and GetDistance(UltTargetted, CastPosition) < 250 then
  61.             UltTarget = UltTargetted
  62.         else
  63.             UltTarget = AutoCarry.Crosshair:GetTarget()
  64.         end
  65.         if UltTarget ~= nil then
  66.             local ValidEnemies = 0
  67.             for i, Enemy in pairs(Enemies) do
  68.                 if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Enemy, myHero) < 700+350 then ValidEnemies = ValidEnemies + 1 end
  69.             end
  70.             if ValidEnemies > 1 then
  71.                 local spellPos = GetAoESpellPosition(350, UltTarget)
  72.                 DrawCircle(spellPos.x, spellPos.y, spellPos.z, 350, 0xFFFF0000)
  73.             else
  74.                 DrawCircle(UltTarget.x, UltTarget.y, UltTarget.z, 350, 0xFFFF0000)
  75.             end
  76.         end
  77.     end
  78. end
  79.  
  80. function Plugin:OnSendPacket(p)
  81.     local packet = Packet(p)
  82.     if packet:get('name') == 'S_CAST' then
  83.         local SpellID = packet:get('spellId')
  84.         if SpellID == SPELL_4 then
  85.             local Enemies = AutoCarry.Helper.EnemyTable
  86.             local CastPosition = { x = packet:get('toX'), y = packet:get('toY'), z = packet:get('toY') }
  87.             if Menu.blockR then
  88.                 local ValidTargets = 0
  89.                 for i, Enemy in pairs(Enemies) do
  90.                     if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Enemy, CastPosition) < 350 then ValidTargets = ValidTargets + 1 end
  91.                 end
  92.                 if ValidTargets == 0 then p:Block() end
  93.             end
  94.             if Menu.autoUltaiming then
  95.                 if UltByScript == true then
  96.                     UltByScript = false
  97.                 elseif UltByScript == false then
  98.                     p:Block()
  99.                     UltByScript = true
  100.                     local ClosestEnemy = nil
  101.                     local Position1 = { x=CastPosition.x, y=CastPosition.y, z=CastPosition.z }
  102.                     for i, Enemy in pairs(Enemies) do
  103.                         if Enemy ~= nil and not Enemy.dead and Enemy.visible then
  104.                             if ClosestEnemy ~= nil then
  105.                                 if GetDistance(Enemy, Position1) < GetDistance(ClosestEnemy, Position1) then
  106.                                     ClosestEnemy = Enemy
  107.                                 end
  108.                             else
  109.                                 ClosestEnemy = Enemy
  110.                             end
  111.                         end
  112.                     end
  113.                     local UltTargetted = ClosestEnemy
  114.                     if UltTargetted ~= nil and GetDistance(UltTargetted, CastPosition) < 300 then
  115.                         UltTarget = UltTargetted
  116.                     else
  117.                         UltTarget = AutoCarry.Crosshair:GetTarget()
  118.                     end
  119.                     if UltTarget ~= nil then
  120.                         local ValidEnemies = 0
  121.                         for i, Enemy in pairs(Enemies) do
  122.                             if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Enemy, myHero) < 700+350 then ValidEnemies = ValidEnemies + 1 end
  123.                         end
  124.                         if ValidEnemies > 1 then
  125.                             local spellPos = GetAoESpellPosition(350, UltTarget)
  126.                             CastSpell(_R, spellPos.x, spellPos.z)
  127.                         else
  128.                             CastSpell(_R, UltTarget.x, UltTarget.z)
  129.                         end
  130.                     end
  131.                 end
  132.             end
  133.         end
  134.     end
  135. end
  136.  
  137. --[[function Plugin:OnProcessSpell(unit, spell)
  138.     if Menu.dodgeW then
  139.         local Enemies = AutoCarry.Helper.EnemyTable
  140.         for _, Enemy in pairs(Enemies) do
  141.             if unit == Enemy then
  142.                 if unit.charName == "Lux" then -- Dodge lux spells
  143.                     if spell.name == "" then
  144.                        
  145.                     end
  146.                 end
  147.             end
  148.         end
  149.     end
  150. end]]
  151.  
  152. Menu = AutoCarry.Plugins:RegisterPlugin(Plugin(), "aVladimir v1.0")
  153. Menu:addParam("Information1", "  aVladimir v1.0 by Anonymous", SCRIPT_PARAM_INFO, "")
  154. Menu:addParam("Information2", "== Helper-Settings: ==", SCRIPT_PARAM_INFO, "")
  155. Menu:addParam("burstTarget", "Full Combo", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("A"))
  156. Menu:addParam("spamQE","QE Haras in AutoCarry/MixedMode", SCRIPT_PARAM_ONOFF, true)
  157. Menu:addParam("minEhp","Dont harras with E if below X% HP", SCRIPT_PARAM_SLICE, 30, 0, 100, 0)
  158. --Menu:addParam("dodgeW","Dodge dangerous spells with W", SCRIPT_PARAM_ONOFF, true)
  159. Menu:addParam("Information4", "VIP only functions:", SCRIPT_PARAM_INFO, "")
  160. Menu:addParam("blockR","Block wrong ult", SCRIPT_PARAM_ONOFF, true)
  161. Menu:addParam("autoUltaiming","Automaticly aim with ult", SCRIPT_PARAM_ONOFF, true)
  162. Menu:addParam("Information3", "== Drawer-Settings: ==", SCRIPT_PARAM_INFO, "")
  163. Menu:addParam("drawQrange","Draw QE range", SCRIPT_PARAM_ONOFF, true)
  164. Menu:addParam("drawRrange","Draw R range", SCRIPT_PARAM_ONOFF, true)
  165. 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