roach_

[1.0a] SidasAutoCarryPlugin - Pantheon

Sep 26th, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.99 KB | None | 0 0
  1. --[[
  2.  
  3.         Auto Carry Plugin - Pantheon Edition
  4.         Author: Roach_
  5.         Version: 1.0a
  6.         Copyright 2013
  7.  
  8.         Dependency: Sida's Auto Carry: Revamped
  9.  
  10.         How to install:
  11.             Make sure you already have AutoCarry installed.
  12.             Name the script EXACTLY "SidasAutoCarryPlugin - Pantheon.lua" without the quotes.
  13.             Place the plugin in BoL/Scripts/Common folder.
  14.  
  15.         Features:
  16.             Combo with Autocarry
  17.             Fully supports E with movement/attack disable
  18.             Harass with Mixed Mode
  19.             Killsteal with Q/W
  20.             Draw Combo Range
  21.             Draw Critical Hit on Target
  22.             Escape Artist(with Flash)
  23.             Auto-Ignite
  24.  
  25.         History:
  26.             Version: 1.0
  27.                 First release
  28. --]]
  29.  
  30. local target
  31.  
  32. function PluginOnLoad()
  33.     AutoCarry.PluginMenu:addParam("pCombo", "Use Combo With Auto Carry", SCRIPT_PARAM_ONOFF, true)
  34.     AutoCarry.PluginMenu:addParam("pHarass", "Harass with Mixed Mode", SCRIPT_PARAM_ONOFF, true)
  35.     AutoCarry.PluginMenu:addParam("pKillsteal", "Killsteal with Q/W", SCRIPT_PARAM_ONOFF, true)
  36.     AutoCarry.PluginMenu:addParam("pDCR", "Draw Combo Range", SCRIPT_PARAM_ONOFF, true)
  37.     AutoCarry.PluginMenu:addParam("pDCT", "Draw Crit Text", SCRIPT_PARAM_ONOFF, true)
  38.     AutoCarry.PluginMenu:addParam("pEscape", "Escape Artist", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("T"))
  39.     AutoCarry.PluginMenu:addParam("pEscapeFlash", "Escape: Flash to Mouse", SCRIPT_PARAM_ONOFF, false)
  40.     AutoCarry.PluginMenu:addParam("pAutoIgnite", "Auto-Ignite", SCRIPT_PARAM_ONOFF, false)
  41.    
  42.     AutoCarry.SkillsCrosshair.range = 600
  43. end
  44.  
  45.  
  46. function PluginOnTick()
  47.     if AutoCarry.PluginMenu.pCombo and AutoCarry.MainMenu.AutoCarry then pCombo() end
  48.     if AutoCarry.PluginMenu.pHarass and AutoCarry.MainMenu.MixedMode then pHarass() end
  49.     if AutoCarry.PluginMenu.pKillsteal then pKillsteal() end
  50.     if AutoCarry.PluginMenu.pEscape then pEscapeCombo() end
  51.    
  52.     if not myHero.dead and AutoCarry.PluginMenu.pDCT then
  53.         for i=1, heroManager.iCount do
  54.             local enemydraw = heroManager:GetHero(i)
  55.            
  56.             if ValidTarget(enemydraw) then
  57.                 if(enemydraw.health/enemydraw.maxHealth*100 < 15) then
  58.                     PrintFloatText(Target, 0, "CRITICAL HIT")
  59.                 end
  60.             end
  61.         end
  62.     end
  63. end
  64.  
  65. function PluginOnDraw()
  66.     if not myHero.dead and AutoCarry.PluginMenu.pDCR then
  67.         DrawCircle(myHero.x, myHero.y, myHero.z, 600, 0x00FFFF)
  68.     end
  69. end
  70.  
  71. function PluginOnCreateObj(obj)
  72.     if obj and GetDistance(obj) <= 100 and obj.name == "pantheon_heartseeker_cas2" then
  73.         AutoCarry.CanMove = false
  74.         AutoCarry.CanAttack = false
  75.     end
  76. end
  77.  
  78. function PluginOnDeleteObj(obj)
  79.     if obj and GetDistance(obj) <= 100 and obj.name == "pantheon_heartseeker_cas2" then
  80.         AutoCarry.CanMove = true
  81.         AutoCarry.CanAttack = true
  82.     end
  83. end
  84.  
  85. --
  86.  
  87. function pCombo()
  88.     target = AutoCarry.GetAttackTarget()
  89.  
  90.     if ValidTarget(target) then
  91.         if myHero:CanUseSpell(_Q) == READY and GetDistance(target) < 600 then
  92.             CastSpell(_Q, target)
  93.         end
  94.        
  95.         if myHero:CanUseSpell(_W) == READY and GetDistance(target) < 600 then
  96.             CastSpell(_W, target)
  97.         end
  98.        
  99.         if myHero:CanUseSpell(_E) == READY and GetDistance(target) < 600 then
  100.             CastSpell(_E, target.x, target.z)
  101.         end
  102.     end
  103. end
  104.  
  105. function pHarass()
  106.     if ValidTarget(target) then
  107.         if myHero:CanUseSpell(_Q) == READY and GetDistance(target) < 600 then
  108.             CastSpell(_Q, target)
  109.         end
  110.     end
  111. end
  112.  
  113. function pKillsteal()
  114.     if myHero:CanUseSpell(_Q) == READY then
  115.         for _, enemy in pairs(AutoCarry.EnemyTable) do
  116.             if ValidTarget(enemy) and GetDistance(enemy) < 600 and enemy.health < getDmg("Q", enemy, myHero) then
  117.                 CastSpell(_Q, target)
  118.             end
  119.         end
  120.     end
  121.     if myHero:CanUseSpell(_W) == READY and myHero:CanUseSpell(_Q) ~= READY then
  122.         for _, enemy in pairs(AutoCarry.EnemyTable) do
  123.             if ValidTarget(enemy) and GetDistance(enemy) < 600 and enemy.health < getDmg("W", enemy, myHero) then
  124.                 CastSpell(_W, target)
  125.             end
  126.         end
  127.     end
  128. end
  129.  
  130. function pEscapeCombo()
  131.     local FlashSlot
  132.  
  133.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerFlash") then
  134.         FlashSlot = SUMMONER_1
  135.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerFlash") then
  136.         FlashSlot = SUMMONER_2
  137.     end
  138.    
  139.     --
  140.    
  141.     if myHero:CanUseSpell(_W) == READY then
  142.         CastSpell(_W, target)
  143.     end
  144.  
  145.     if AutoCarry.PluginMenu.pEscapeFlash and FlashSlot ~= nil and myHero:CanUseSpell(FlashSlot) == READY and GetDistance(mousePos) > 300 then
  146.         CastSpell(FlashSlot, mousePos.x, mousePos.z)
  147.     end
  148.  
  149.     if AutoCarry.PluginMenu.pEscapeFlash then
  150.         myHero:MoveTo(mousePos.x, mousePos.z)
  151.     end
  152. end
  153.  
  154. function pAutoIgnite()
  155.     local IgniteSlot
  156.    
  157.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then
  158.         IgniteSlot = SUMMONER_1
  159.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then
  160.         IgniteSlot = SUMMONER_2
  161.     end
  162.  
  163.     --
  164.  
  165.     if AutoCarry.PluginMenu.pAutoIgnite and IgniteSlot ~= nil and myHero:CanUseSpell(IgniteSlot) == READY then
  166.         local iDmg = 0    
  167.         for _, enemy in pairs(AutoCarry.EnemyTable) do
  168.             if ValidTarget(enemy) and GetDistance(enemy) < 600 then
  169.                 iDmg = 50 + 20 * myHero.level
  170.                
  171.                 if enemy.health <= iDmg then CastSpell(ignite, enemy) end
  172.             end
  173.         end
  174.     end
  175. end
Advertisement
Add Comment
Please, Sign In to add comment