roach_

[1.0b] SidasAutoCarryPlugin - Pantheon

Sep 26th, 2013
104
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.0b
  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.0a
  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.     end
  75. end
  76.  
  77. function PluginOnDeleteObj(obj)
  78.     if obj and GetDistance(obj) <= 100 and obj.name == "pantheon_heartseeker_cas2" then
  79.         AutoCarry.CanMove = true
  80.     end
  81. end
  82.  
  83. --
  84.  
  85. function pCombo()
  86.     target = AutoCarry.GetAttackTarget()
  87.  
  88.     if ValidTarget(target) then
  89.         if myHero:CanUseSpell(_Q) == READY and GetDistance(target) < 600 then
  90.             CastSpell(_Q, target)
  91.         end
  92.        
  93.         if myHero:CanUseSpell(_W) == READY and GetDistance(target) < 600 then
  94.             CastSpell(_W, target)
  95.         end
  96.        
  97.         if myHero:CanUseSpell(_E) == READY and GetDistance(target) < 600 then
  98.             CastSpell(_E, target.x, target.z)
  99.         end
  100.     end
  101. end
  102.  
  103. function pHarass()
  104.     if ValidTarget(target) then
  105.         if myHero:CanUseSpell(_Q) == READY and GetDistance(target) < 600 then
  106.             CastSpell(_Q, target)
  107.         end
  108.     end
  109. end
  110.  
  111. function pKillsteal()
  112.     if myHero:CanUseSpell(_Q) == READY then
  113.         for _, enemy in pairs(AutoCarry.EnemyTable) do
  114.             if ValidTarget(enemy) and GetDistance(enemy) < 600 and enemy.health < getDmg("Q", enemy, myHero) then
  115.                 CastSpell(_Q, target)
  116.             end
  117.         end
  118.     end
  119.     if myHero:CanUseSpell(_W) == READY and myHero:CanUseSpell(_Q) ~= READY then
  120.         for _, enemy in pairs(AutoCarry.EnemyTable) do
  121.             if ValidTarget(enemy) and GetDistance(enemy) < 600 and enemy.health < getDmg("W", enemy, myHero) then
  122.                 CastSpell(_W, target)
  123.             end
  124.         end
  125.     end
  126. end
  127.  
  128. function pEscapeCombo()
  129.     local FlashSlot
  130.  
  131.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerFlash") then
  132.         FlashSlot = SUMMONER_1
  133.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerFlash") then
  134.         FlashSlot = SUMMONER_2
  135.     end
  136.    
  137.     --
  138.    
  139.     if myHero:CanUseSpell(_W) == READY then
  140.         CastSpell(_W, target)
  141.     end
  142.  
  143.     if AutoCarry.PluginMenu.pEscapeFlash and FlashSlot ~= nil and myHero:CanUseSpell(FlashSlot) == READY and GetDistance(mousePos) > 300 then
  144.         CastSpell(FlashSlot, mousePos.x, mousePos.z)
  145.     end
  146.  
  147.     if AutoCarry.PluginMenu.pEscapeFlash then
  148.         myHero:MoveTo(mousePos.x, mousePos.z)
  149.     end
  150. end
  151.  
  152. function pAutoIgnite()
  153.     local IgniteSlot
  154.    
  155.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then
  156.         IgniteSlot = SUMMONER_1
  157.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then
  158.         IgniteSlot = SUMMONER_2
  159.     end
  160.  
  161.     --
  162.  
  163.     if AutoCarry.PluginMenu.pAutoIgnite and IgniteSlot ~= nil and myHero:CanUseSpell(IgniteSlot) == READY then
  164.         local iDmg = 0    
  165.         for _, enemy in pairs(AutoCarry.EnemyTable) do
  166.             if ValidTarget(enemy) and GetDistance(enemy) < 600 then
  167.                 iDmg = 50 + 20 * myHero.level
  168.                
  169.                 if enemy.health <= iDmg then CastSpell(IgniteSlot, enemy) end
  170.             end
  171.         end
  172.     end
  173. end
Advertisement
Add Comment
Please, Sign In to add comment