Advertisement
roach_

[1.1b] SidasAutoCarryPlugin - Pantheon

Sep 28th, 2013
110
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.1b
  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 or Q+W
  20.             Draw Combo Range
  21.             Draw Critical Hit on Target
  22.             Escape Artist(with Flash)
  23.  
  24.         History:
  25.             Version: 1.1b
  26.                 Auto combo after Ultimate. (With a check!)
  27.                 Toggle for Auto Q Harass when in enemy range , with a mana check. (You will harass them until you'll have Mana for one last Combo)
  28.        
  29.             Version: 1.1a
  30.                 Optimised Escape Artist
  31.                 Optimised Killsteal(You can KS with Q+W)
  32.                 Fixed Ultimate Bugsplat(TESTED)
  33.                 Fixed Mixed Mode Harass
  34.                 Re-wrote majority of the Functions
  35.                 Hopefully fixed DCT(Draw Critical Text)
  36.                 Changed Circle's Color(Range Circle)
  37.                 Speeded-Up the Script(Some FPS Drops on Escape Artist and Ultimate)
  38.                
  39.             Version: 1.0d
  40.                 Fixed Escape Artist
  41.                 Fixed a problem with Flash, it was flashing before Stunning the enemy
  42.                 Optimised Escape Artist
  43.                 Fully removed Auto-Ignite
  44.                 Fixed all the Bugsplats (TESTED)
  45.                 Hopefully fixed Mixed Mode Harass
  46.                
  47.             Version: 1.0c
  48.                 Real fix for E.
  49.                 Fixed Killsteal.
  50.                 Hopefully fixed OnTick bugsplat.
  51.                 Removed Auto-Ignite, because it exists in SAC too.
  52.            
  53.             Version: 1.0b
  54.                 Temporarily fix for E.
  55.                 Fixed some bugsplats on draw.
  56.            
  57.             Version: 1.0a
  58.                 First release
  59. --]]
  60. if myHero.charName ~= "Pantheon" then return end
  61.  
  62. local Target
  63. local pEscapeHotkey = string.byte("T")
  64.  
  65. -- Prediction
  66. local cRange = 600
  67.  
  68. local FlashSlot = nil
  69.  
  70. local SkillQ = {spellKey = _Q, range = cRange, speed = 2, delay = 0, width = 200, configName = "spearShot", displayName = "Q (Spear Shot)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = true }
  71. local SkillW = {spellKey = _W, range = cRange, speed = 2, delay = 0, width = 200, configName = "AoZ", displayName = "W (Aegis of Zeonia)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = true }
  72. local SkillE = {spellKey = _E, range = cRange, speed = 2, delay = 0, width = 200, configName = "heartseekerStrike", displayName = "E (Heartseeker Strike)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true }
  73.  
  74. local QReady, WReady, EReady, RReady, FlashReady = false, false, false, false, false
  75.  
  76. function PluginOnLoad()
  77.     -- Params
  78.     AutoCarry.PluginMenu:addParam("pCombo", "Use Combo With Auto Carry", SCRIPT_PARAM_ONOFF, true)
  79.     AutoCarry.PluginMenu:addParam("pHarass", "Harass with Mixed Mode", SCRIPT_PARAM_ONOFF, true)
  80.     AutoCarry.PluginMenu:addParam("pUltCombo", "Auto-Combo After Ultimate", SCRIPT_PARAM_ONOFF, false)
  81.     AutoCarry.PluginMenu:addParam("pKillsteal", "Killsteal with Q/W", SCRIPT_PARAM_ONOFF, true)
  82.     AutoCarry.PluginMenu:addParam("pDCR", "Draw Combo Range", SCRIPT_PARAM_ONOFF, true)
  83.     AutoCarry.PluginMenu:addParam("pDCT", "Draw Crit Text", SCRIPT_PARAM_ONOFF, true)
  84.     AutoCarry.PluginMenu:addParam("pEscape", "Escape Artist", SCRIPT_PARAM_ONKEYDOWN, false, pEscapeHotkey)
  85.     AutoCarry.PluginMenu:addParam("pEscapeFlash", "Escape: Flash to Mouse", SCRIPT_PARAM_ONOFF, false)
  86.    
  87.     -- Range
  88.     AutoCarry.SkillsCrosshair.range = cRange
  89.    
  90.     lastAnimation = nil
  91. end
  92.  
  93.  
  94. function PluginOnTick()
  95.     -- Get Attack Target
  96.     Target = AutoCarry.GetAttackTarget()
  97.  
  98.     -- Check Spells
  99.     pSpellCheck()
  100.  
  101.     -- Check if myHero is using _E
  102.     if isChanneling("Spell3") then
  103.         AutoCarry.CanAttack = false
  104.         AutoCarry.CanMove = false
  105.     else
  106.         AutoCarry.CanAttack = true
  107.         AutoCarry.CanMove = true
  108.     end
  109.  
  110.     -- Combo, Harass, Killsteal, Escape Combo - Checks
  111.     if AutoCarry.PluginMenu.pCombo and AutoCarry.MainMenu.AutoCarry then pCombo() end
  112.     if AutoCarry.PluginMenu.pHarass and AutoCarry.MainMenu.MixedMode then pHarass() end
  113.     if AutoCarry.PluginMenu.pUltCombo then pUltCombo() end
  114.     if AutoCarry.PluginMenu.pKillsteal then pKillsteal() end
  115.     if AutoCarry.PluginMenu.pEscape then pEscapeCombo() end
  116.    
  117.     -- Draw Critical Text
  118.     if not myHero.dead and AutoCarry.PluginMenu.pDCT then pDrawCritText() end
  119. end
  120.  
  121. function PluginOnDraw()
  122.     -- Draw Panth's Range = 600
  123.     if not myHero.dead and AutoCarry.PluginMenu.pDCR then
  124.         DrawCircle(myHero.x, myHero.y, myHero.z, cRange, 0x00FF00)
  125.     end
  126. end
  127.  
  128. function PluginOnAnimation(unit, animationName)
  129.     -- Set lastAnimation = Last Animation used
  130.     if unit.isMe and lastAnimation ~= animationName then lastAnimation = animationName end
  131. end
  132.  
  133. -- Custom Functions
  134. function pCombo()
  135.     if ValidTarget(Target) then
  136.         if QReady and GetDistance(Target) < cRange then
  137.             CastSpell(SkillQ.spellKey, Target)
  138.         end
  139.        
  140.         if WReady and GetDistance(Target) < cRange then
  141.             CastSpell(SkillW.spellKey, Target)
  142.         end
  143.        
  144.         if EReady and GetDistance(Target) < cRange then
  145.             AutoCarry.CastSkillshot(SkillE, Target)
  146.         end
  147.     end
  148. end
  149.  
  150. function pHarass()
  151.     if ValidTarget(Target) then
  152.         if QReady and GetDistance(Target) < cRange and (myHero.mana > (45+55+40+(GetSpellData(_E).level*5))) then
  153.             CastSpell(SkillQ.spellKey, Target)
  154.             myHero:Attack(Target)
  155.         end
  156.     end
  157. end
  158.  
  159. function pUltCombo()
  160.     if isChanneling("Spell4") then pCombo() end
  161. end
  162.  
  163. function pKillsteal()
  164.     for _, enemy in pairs(AutoCarry.EnemyTable) do
  165.         if QReady and WReady then
  166.             if ValidTarget(enemy) and GetDistance(enemy) < cRange and enemy.health < (getDmg("Q", enemy, myHero) + getDmg("W", enemy, myHero)) then
  167.                 CastSpell(SkillQ.spellKey, enemy)
  168.                 CastSpell(SkillW.spellKey, enemy)
  169.             end
  170.         elseif not QReady and WReady then
  171.             if ValidTarget(enemy) and GetDistance(enemy) < cRange and enemy.health < getDmg("W", enemy, myHero) then
  172.                 CastSpell(SkillW.spellKey, enemy)
  173.             end
  174.         elseif QReady and not WReady then
  175.             if ValidTarget(enemy) and GetDistance(enemy) < cRange and enemy.health < getDmg("Q", enemy, myHero) then
  176.                 CastSpell(SkillQ.spellKey, enemy)
  177.             end
  178.         end
  179.     end
  180. end
  181.  
  182. function pEscapeCombo()
  183.     if WReady and GetDistance(Target) < cRange then
  184.         CastSpell(SkillW.spellKey, Target)
  185.         if AutoCarry.PluginMenu.pEscapeFlash and FlashReady and GetDistance(mousePos) > 300 and isChanneling("Spell2") then
  186.             CastSpell(FlashSlot, mousePos.x, mousePos.z)
  187.         end
  188.     end
  189.    
  190.     if AutoCarry.PluginMenu.pEscapeFlash then
  191.         myHero:MoveTo(mousePos.x, mousePos.z)
  192.     end
  193. end
  194.  
  195. function isChanneling(animationName)
  196.     if lastAnimation == animationName then
  197.         return true
  198.     else
  199.         return false
  200.     end
  201. end
  202.  
  203. function pSpellCheck()
  204.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerFlash") then
  205.         FlashSlot = SUMMONER_1
  206.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerFlash") then
  207.         FlashSlot = SUMMONER_2
  208.     end
  209.  
  210.     QReady = (myHero:CanUseSpell(SkillQ.spellKey) == READY)
  211.     WReady = (myHero:CanUseSpell(SkillW.spellKey) == READY)
  212.     EReady = (myHero:CanUseSpell(SkillE.spellKey) == READY)
  213.     RReady = (myHero:CanUseSpell(_R) == READY)
  214.  
  215.     FlashReady = (FlashSlot ~= nil and myHero:CanUseSpell(FlashSlot) == READY)
  216. end
  217.  
  218. function pDrawCritText()
  219.     for _, enemy in pairs(AutoCarry.EnemyTable) do
  220.         if ValidTarget(enemy) then
  221.             if enemy.health <= enemy.maxHealth*0.15 then
  222.                 PrintFloatText(enemy, 10, "CRITICAL HIT!")
  223.             end
  224.         end
  225.     end
  226. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement