roach_

[1.0d] SidasAutoCarryPlugin - Pantheon

Sep 27th, 2013
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.  
  3.         Auto Carry Plugin - Pantheon Edition
  4.         Author: Roach_
  5.         Version: 1.0d
  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.  
  24.         History:
  25.             Version: 1.0d
  26.                 Fixed Escape Artist
  27.                 Fixed a problem with Flash, it was flashing before Stunning the enemy
  28.                 Optimised Escape Artist
  29.                 Fully removed Auto-Ignite
  30.                 Fixed all the Bugsplats (TESTED)
  31.                 Fixed Mixed Mode Harass
  32.                
  33.             Version: 1.0c
  34.                 Real fix for E.
  35.                 Fixed Killsteal.
  36.                 Hopefully fixed OnTick bugsplat.
  37.                 Removed Auto-Ignite, because it exists in SAC too.
  38.            
  39.             Version: 1.0b
  40.                 Temporarily fix for E.
  41.                 Fixed some bugsplats on draw.
  42.            
  43.             Version: 1.0a
  44.                 First release
  45. --]]
  46.  
  47. local target
  48.  
  49. function PluginOnLoad()
  50.     AutoCarry.PluginMenu:addParam("pCombo", "Use Combo With Auto Carry", SCRIPT_PARAM_ONOFF, true)
  51.     AutoCarry.PluginMenu:addParam("pHarass", "Harass with Mixed Mode", SCRIPT_PARAM_ONOFF, true)
  52.     AutoCarry.PluginMenu:addParam("pKillsteal", "Killsteal with Q/W", SCRIPT_PARAM_ONOFF, true)
  53.     AutoCarry.PluginMenu:addParam("pDCR", "Draw Combo Range", SCRIPT_PARAM_ONOFF, true)
  54.     AutoCarry.PluginMenu:addParam("pDCT", "Draw Crit Text", SCRIPT_PARAM_ONOFF, true)
  55.     AutoCarry.PluginMenu:addParam("pEscape", "Escape Artist", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("T"))
  56.     AutoCarry.PluginMenu:addParam("pEscapeFlash", "Escape: Flash to Mouse", SCRIPT_PARAM_ONOFF, false)
  57.    
  58.     AutoCarry.SkillsCrosshair.range = 600
  59.    
  60.     lastAnimation = nil
  61. end
  62.  
  63.  
  64. function PluginOnTick()
  65.     if isChanneling() then
  66.         AutoCarry.CanAttack = false
  67.         AutoCarry.CanMove = false
  68.     else
  69.         AutoCarry.CanAttack = true
  70.         AutoCarry.CanMove = true
  71.     end
  72.  
  73.     if AutoCarry.PluginMenu.pCombo and AutoCarry.MainMenu.AutoCarry then pCombo() end
  74.     if AutoCarry.PluginMenu.pHarass and AutoCarry.MainMenu.MixedMode then pHarass() end
  75.     if AutoCarry.PluginMenu.pKillsteal then pKillsteal() end
  76.     if AutoCarry.PluginMenu.pEscape then pEscapeCombo() end
  77.    
  78.     if not myHero.dead and AutoCarry.PluginMenu.pDCT then
  79.         for _, enemy in pairs(AutoCarry.EnemyTable) do
  80.             if ValidTarget(enemy) then
  81.                 if (enemy.health/enemy.maxHealth*100) < 15 then
  82.                     PrintFloatText(enemy, 0, "CRITICAL HIT")
  83.                 end
  84.             end
  85.         end
  86.     end
  87. end
  88.  
  89. function PluginOnDraw()
  90.     if not myHero.dead and AutoCarry.PluginMenu.pDCR then
  91.         DrawCircle(myHero.x, myHero.y, myHero.z, 600, 0x00FFFF)
  92.     end
  93. end
  94.  
  95. function PluginOnAnimation(unit, animationName)
  96.     if unit.isMe and lastAnimation ~= animationName then lastAnimation = animationName end
  97. end
  98.  
  99. --
  100.  
  101. function pCombo()
  102.     target = AutoCarry.GetAttackTarget()
  103.  
  104.     if ValidTarget(target) then
  105.         if myHero:CanUseSpell(_Q) == READY and GetDistance(target) < 600 then
  106.             CastSpell(_Q, target)
  107.         end
  108.        
  109.         if myHero:CanUseSpell(_W) == READY and GetDistance(target) < 600 then
  110.             CastSpell(_W, target)
  111.         end
  112.        
  113.         if myHero:CanUseSpell(_E) == READY and GetDistance(target) < 600 then
  114.             CastSpell(_E, target.x, target.z)
  115.         end
  116.     end
  117. end
  118.  
  119. function pHarass()
  120.     if ValidTarget(target) then
  121.         if myHero:CanUseSpell(_Q) == READY and GetDistance(target) < 600 then
  122.             CastSpell(_Q, target)
  123.         end
  124.     end
  125. end
  126.  
  127. function pKillsteal()
  128.     for _, enemy in pairs(AutoCarry.EnemyTable) do
  129.         if myHero:CanUseSpell(_Q) == READY then
  130.             if ValidTarget(enemy) and GetDistance(enemy) < 600 and enemy.health < getDmg("Q", enemy, myHero) then
  131.                 CastSpell(_Q, enemy)
  132.             end
  133.         elseif myHero:CanUseSpell(_Q) ~= READY and myHero:CanUseSpell(_W) == READY then
  134.             if ValidTarget(enemy) and GetDistance(enemy) < 600 and enemy.health < getDmg("W", enemy, myHero) then
  135.                 CastSpell(_W, enemy)
  136.             end
  137.         end
  138.     end
  139. end
  140.  
  141. function pEscapeCombo()
  142.     local FlashSlot
  143.  
  144.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerFlash") then
  145.         FlashSlot = SUMMONER_1
  146.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerFlash") then
  147.         FlashSlot = SUMMONER_2
  148.     end
  149.    
  150.     --
  151.     if myHero:CanUseSpell(_W) == READY then
  152.         CastSpell(_W, target)
  153.         if AutoCarry.PluginMenu.pEscapeFlash and FlashSlot ~= nil and myHero:CanUseSpell(FlashSlot) == READY and GetDistance(mousePos) > 400 and lastAnimation == "Spell2" then
  154.             CastSpell(FlashSlot, mousePos.x, mousePos.z)
  155.         end
  156.     end
  157.    
  158.     if AutoCarry.PluginMenu.pEscapeFlash then
  159.         myHero:MoveTo(mousePos.x, mousePos.z)
  160.     end
  161. end
  162.  
  163. function isChanneling()
  164.     if lastAnimation == "Spell3" then
  165.         return true
  166.     else
  167.         return false
  168.     end
  169. end
Advertisement
Add Comment
Please, Sign In to add comment