Guest User

Sida's Auto Carry: Revamped

a guest
Jul 6th, 2013
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 71.29 KB | None | 0 0
  1. --[[
  2.                 Sida's Auto Carry: Revamped
  3.                                 v4.6
  4. ]]--
  5.  
  6. --[[ Configuration ]]--
  7.  
  8. local AutoCarryKey = 32
  9. local LastHitKey = string.byte("X")
  10. local MixedModeKey = string.byte("C")
  11. local LaneClearKey = string.byte("V")
  12.  
  13. ------------ > Don't touch anything below here < --------------
  14.  
  15. --[[ Vars ]] --
  16. local projSpeed = 0
  17. local startAttackSpeed = 0.665
  18. local attackDelayOffset = 600
  19. local lastAttack = 0
  20. local projAt = 0
  21. local Skills
  22. local enemyMinions
  23. local allyMinions
  24. local lastEnemy
  25. local lastRange
  26. local killableMinion
  27. local pluginMinion
  28. local minionInfo = {}
  29. local incomingDamage = {}
  30. local jungleMobs = {}
  31. local turretMinion = {timeToHit = 0, obj = nil}
  32. local isMelee = myHero.range < 300
  33. local movementStopped = false
  34. local hasPlugin = false
  35. local nextClick = 500
  36. local TimedMode = false
  37. local Tristana = false
  38. local hudDisabled = false
  39. local ChampInfo = {}
  40. local useVIPCol = false
  41. local previousWindUp = 0
  42. local previousAttackCooldown = 0
  43. _G.AutoCarry = _G
  44.  
  45.  
  46. --[[ Global Vars : Can be used by plugins ]]--
  47. AutoCarry.Orbwalker = nil
  48. AutoCarry.SkillsCrosshair = nil
  49. AutoCarry.CanMove = true
  50. AutoCarry.CanAttack = true
  51. AutoCarry.MainMenu = nil
  52. AutoCarry.PluginMenu = nil
  53. AutoCarry.EnemyTable = nil
  54. AutoCarry.shotFired = false
  55. AutoCarry.OverrideCustomChampionSupport = false
  56.  
  57. --[[ Global Functions ]]--
  58. function getTrueRange()
  59.     return myHero.range + GetDistance(myHero.minBBox)
  60. end
  61.  
  62. function attackEnemy(enemy)
  63.     if CustomAttackEnemy then CustomAttackEnemy(enemy) return end
  64.     if enemy.dead or not enemy.valid or not AutoCarry.CanAttack then return end
  65.     myHero:Attack(enemy)
  66.     AutoCarry.shotFired = true
  67. end
  68.  
  69. function getHitBoxRadius(target)
  70.     return GetDistance(target.minBBox, target.maxBBox)/2
  71. end
  72.  
  73. function timeToShoot()
  74.     return (GetTickCount() + GetLatency()/2 > lastAttack + previousAttackCooldown)
  75. end
  76.  
  77. function attackedSuccessfully()
  78.     projAt = GetTickCount()
  79.     if OnAttacked then OnAttacked() end
  80. end
  81.  
  82. function heroCanMove()
  83.     return (GetTickCount() + GetLatency()/2 > lastAttack + previousWindUp + 20)
  84. end
  85.  
  86. function setMovement()
  87.     if GetDistance(mousePos) <= AutoCarry.MainMenu.HoldZone and (AutoCarry.MainMenu.AutoCarry or AutoCarry.MainMenu.LastHit or AutoCarry.MainMenu.MixedMode or AutoCarry.MainMenu.LaneClear) then
  88.         if not movementStopped then
  89.             myHero:HoldPosition()
  90.             movementStopped = true
  91.         end
  92.         AutoCarry.CanMove = false
  93.     else
  94.         movementStopped = false
  95.         AutoCarry.CanMove = true
  96.     end
  97. end
  98.  
  99. function moveToCursor(range)
  100.     if not disableMovement and AutoCarry.CanMove then
  101.         local moveDist = 480 + (GetLatency()/10)
  102.         if not range then
  103.             if isMelee and AutoCarry.Orbwalker.target and AutoCarry.Orbwalker.type == myHero.type and GetDistance(AutoCarry.Orbwalker.target) < 150 then
  104.                 return
  105.             elseif GetDistance(mousePos) < moveDist and GetDistance(mousePos) > 100 then
  106.                 moveDist = GetDistance(mousePos)
  107.             end
  108.         end
  109.         local moveSqr = math.sqrt((mousePos.x - myHero.x)^2+(mousePos.z - myHero.z)^2)
  110.         local moveX = myHero.x + (range and range or moveDist)*((mousePos.x - myHero.x)/moveSqr)
  111.         local moveZ = myHero.z + (range and range or moveDist)*((mousePos.z - myHero.z)/moveSqr)
  112.         if StreamingMenu.MinRand > StreamingMenu.MaxRand then
  113.             PrintChat("You must set Max higher than Min in streaming menu")
  114.         elseif StreamingMenu.ShowClick and GetTickCount() > nextClick then
  115.             if StreamingMenu.Colour == 0 then
  116.                 ShowGreenClick(mousePos)
  117.             else
  118.                 ShowRedClick(mousePos)
  119.             end
  120.             nextClick = GetTickCount() + math.random(StreamingMenu.MinRand, StreamingMenu.MaxRand)
  121.         end
  122.         myHero:MoveTo(moveX, moveZ)
  123.     end
  124. end
  125.  
  126. --[[ Orbwalking ]]--
  127.  
  128. function OrbwalkingOnLoad()
  129.     AutoCarry.Orbwalker = TargetSelector(TARGET_LOW_HP_PRIORITY, getTrueRange(), DAMAGE_PHYSICAL, false)
  130.     AutoCarry.Orbwalker:SetBBoxMode(true)
  131.     AutoCarry.Orbwalker:SetDamages(0, myHero.totalDamage, 0)
  132.     AutoCarry.Orbwalker.name = "AutoCarry"
  133.     lastRange = getTrueRange()
  134.     if ChampInfo ~= nil then
  135.          if ChampInfo.projSpeed ~= nil then
  136.              projSpeed = ChampInfo.projSpeed
  137.          end
  138.     end
  139. end
  140.  
  141. function OrbwalkingOnTick()
  142.     AutoCarry.Orbwalker.targetSelected = AutoCarry.MainMenu.Focused
  143.     if GetTickCount() + GetLatency()/2 > lastAttack + previousWindUp + 20 and GetTickCount() + GetLatency()/2 < lastAttack + previousWindUp + 500 then attackedSuccessfully() end
  144.     isMelee = myHero.range < 300
  145.     if myHero.range ~= lastRange then
  146.             AutoCarry.Orbwalker.range = myHero.range
  147.             lastRange = myHero.range
  148.     end
  149.     AutoCarry.Orbwalker:update()
  150. end
  151.  
  152. function OrbwalkingOnProcessSpell(unit, spell)
  153.         if myHero.dead then return end
  154.    
  155.     if unit.isMe and (spell.name:lower():find("attack") or isSpellAttack(spell.name)) and not isNotAttack(spell.name) then
  156.         lastAttack = GetTickCount() - GetLatency()/2
  157.         previousWindUp = spell.windUpTime*1000
  158.         previousAttackCooldown = spell.animationTime*1000
  159.     elseif unit.isMe and refreshAttack(spell.name) then
  160.         lastAttack = GetTickCount() - GetLatency()/2 - previousAttackCooldown
  161.     end
  162. end
  163.  
  164. function refreshAttack(spellName)
  165.     return (
  166.         --Blitzcrank
  167.         spellName == "PowerFist"
  168.         --Darius
  169.         or spellName == "DariusNoxianTacticsONH"
  170.         --Nidalee
  171.         or spellName == "Takedown"
  172.         --Sivir
  173.         or spellName == "Ricochet"
  174.         --Teemo
  175.         or spellName == "BlindingDart"
  176.         --Vayne
  177.         or spellName == "VayneTumble"
  178.         --Jax
  179.         or spellName == "JaxEmpowerTwo"
  180.         --Mordekaiser
  181.         or spellName == "MordekaiserMaceOfSpades"
  182.         --Nasus
  183.         or spellName == "SiphoningStrikeNew"
  184.         --Rengar
  185.         or spellName == "RengarQ"
  186.         --Wukong
  187.         or spellName == "MonkeyKingDoubleAttack"
  188.         --Yorick
  189.         or spellName == "YorickSpectral"
  190.         --Vi
  191.         or spellName == "ViE"
  192.         --Garen
  193.         or spellName == "GarenSlash3"
  194.         --Hecarim
  195.         or spellName == "HecarimRamp"
  196.         --XinZhao
  197.         or spellName == "XenZhaoComboTarget"
  198.         --Leona
  199.         or spellName == "LeonaShieldOfDaybreak"
  200.         --Shyvana
  201.         or spellName == "ShyvanaDoubleAttack"
  202.         or spellName == "shyvanadoubleattackdragon"
  203.         --Talon
  204.         or spellName == "TalonNoxianDiplomacy"
  205.         --Trundle
  206.         or spellName == "TrundleTrollSmash"
  207.         --Volibear
  208.         or spellName == "VolibearQ"
  209.         --Poppy
  210.         or spellName == "PoppyDevastatingBlow"
  211.     )
  212. end
  213.  
  214. function isSpellAttack(spellName)
  215.     return (
  216.         --Ashe
  217.         spellName == "frostarrow"
  218.         --Caitlyn
  219.         or spellName == "CaitlynHeadshotMissile"
  220.         --Quinn
  221.         or spellName == "QuinnWEnhanced"
  222.         --Trundle
  223.         or spellName == "TrundleQ"
  224.         --XinZhao
  225.         or spellName == "XenZhaoThrust"
  226.         or spellName == "XenZhaoThrust2"
  227.         or spellName == "XenZhaoThrust3"
  228.         --Garen
  229.         or spellName == "GarenSlash2"
  230.         --Renekton
  231.         or spellName == "RenektonExecute"
  232.         or spellName == "RenektonSuperExecute"
  233.     )
  234. end
  235. function isNotAttack(spellName)
  236.     return (
  237.         --Shyvana
  238.         spellName == "shyvanadoubleattackdragon"
  239.         or spellName == "ShyvanaDoubleAttack"
  240.         --MonkeyKing
  241.         or spellName == "MonkeyKingDoubleAttack"
  242.         --JarvanIV
  243.         --or spellName == "JarvanIVCataclysmAttack"
  244.         --or spellName == "jarvanivcataclysmattack"
  245.     )
  246. end
  247.  
  248. function OrbwalkingOnDraw()
  249.         if DisplayMenu.target and AutoCarry.Orbwalker.target ~= nil then
  250.                 for j=0, 5 do
  251.                         DrawCircle(AutoCarry.Orbwalker.target.x, AutoCarry.Orbwalker.target.y, AutoCarry.Orbwalker.target.z, 100 + j, 0x00FF00)
  252.                 end
  253.                 DrawCircle(AutoCarry.Orbwalker.target.x, AutoCarry.Orbwalker.target.y, AutoCarry.Orbwalker.target.z, GetDistance(AutoCarry.Orbwalker.target, AutoCarry.Orbwalker.target.minBBox), 0xFFFFFF)
  254.         elseif DisplayMenu.target and AutoCarry.SkillsCrosshair.target then
  255.                 for j=0, 5 do
  256.                         DrawCircle(AutoCarry.SkillsCrosshair.target.x, AutoCarry.SkillsCrosshair.target.y, AutoCarry.SkillsCrosshair.target.z, 100 + j, 0x990000)
  257.                 end
  258.                 DrawCircle(AutoCarry.SkillsCrosshair.target.x, AutoCarry.SkillsCrosshair.target.y, AutoCarry.SkillsCrosshair.target.z, GetDistance(AutoCarry.SkillsCrosshair.target, AutoCarry.SkillsCrosshair.target.minBBox), 0xFFFFFF)
  259.         end
  260. end
  261.  
  262. function EnemyInRange(enemy)
  263.         if ValidBBoxTarget(enemy, getTrueRange()) then
  264.                 return true
  265.         end
  266.     return false
  267. end
  268.  
  269. --[[ Last Hitting ]]--
  270.  
  271. function LastHitOnLoad()
  272.     minionInfo[(myHero.team == 100 and "Blue" or "Red").."_Minion_Basic"] =      { aaDelay = 400, projSpeed = 0    }
  273.     minionInfo[(myHero.team == 100 and "Blue" or "Red").."_Minion_Caster"] =     { aaDelay = 484, projSpeed = 0.68 }
  274.     minionInfo[(myHero.team == 100 and "Blue" or "Red").."_Minion_Wizard"] =     { aaDelay = 484, projSpeed = 0.68 }
  275.     minionInfo[(myHero.team == 100 and "Blue" or "Red").."_Minion_MechCannon"] = { aaDelay = 365, projSpeed = 1.18 }
  276.     minionInfo.obj_AI_Turret =                                         { aaDelay = 150, projSpeed = 1.14 }
  277.    
  278.     for i = 0, objManager.maxObjects do
  279.         local obj = objManager:getObject(i)
  280.         for _, mob in pairs(getJungleMobs()) do
  281.             if obj and obj.valid and obj.name:find(mob) then
  282.                 table.insert(jungleMobs, obj)
  283.             end
  284.         end
  285.     end
  286. end
  287.  
  288. function LastHitOnTick()
  289.     if AutoCarry.MainMenu.LastHit or AutoCarry.MainMenu.MixedMode or AutoCarry.MainMenu.LaneClear then
  290.         enemyMinions:update()
  291.         allyMinions:update()
  292.     end
  293. end
  294.  
  295. function LastHitOnProcessSpell(object, spell)
  296.     if not isMelee and isAllyMinionInRange(object) then
  297.         for i,minion in pairs(enemyMinions.objects) do
  298.             if ValidTarget(minion) and minion ~= nil and GetDistance(minion, spell.endPos) < 3 then
  299.                 if object ~= nil and (minionInfo[object.charName] or object.type == "obj_AI_turret") then
  300.                     incomingDamage[object.name] = getNewAttackDetails(object, minion)
  301.                 end
  302.                 --if object.type == "obj_AI_Turret" and object.team == myHero.team then
  303.                     --if FarmMenu.Predict then
  304.                             --handleTurretShot(object, minion)
  305.                     --end
  306.                 --end
  307.             end
  308.         end
  309.     end
  310. end
  311.  
  312. function LastHitOnCreateObj(obj)
  313.     for _, mob in pairs(getJungleMobs()) do
  314.         if obj.name:find(mob) then
  315.             table.insert(jungleMobs, obj)
  316.         end
  317.     end
  318. end
  319.  
  320. function LastHitOnDeleteObj(obj)
  321.     for i, mob in pairs(getJungleMobs()) do
  322.         if obj and obj.valid and mob and mob.valid and obj.name:find(mob.name) then
  323.             table.remove(jungleMobs, i)
  324.         end
  325.     end
  326. end
  327.  
  328. function getJungleMinion()
  329.     for _, mob in pairs(jungleMobs) do
  330.         if ValidTarget(mob) and GetDistance(mob) <= getTrueRange() then return mob end
  331.     end
  332.     return nil
  333. end
  334.  
  335. function LastHitOnDraw()
  336.     if DisplayMenu.minion and enemyMinions.objects[1] and ValidTarget(enemyMinions.objects[1]) and not isMelee then
  337.         DrawCircle(enemyMinions.objects[1].x, enemyMinions.objects[1].y, enemyMinions.objects[1].z, 100, 0x19A712)
  338.     end
  339. end
  340.  
  341. function getTimeToHit(enemy, speed)
  342.     return (( GetDistance(enemy) / speed ) + GetLatency()/2)
  343. end
  344.  
  345. function isAllyMinionInRange(minion)
  346.     if minion ~= nil and minion.team == myHero.team
  347.         and (minion.type == "obj_AI_Minion" or minion.type == "obj_AI_Turret")
  348.         and GetDistance(minion) <= 2000 then return true
  349.     else return false end
  350. end
  351.  
  352. function getMinionDelay(minion)
  353.     return ( minion.type == "obj_AI_Turret" and minionInfo.obj_AI_Turret.aaDelay or minionInfo[minion.charName].aaDelay )
  354. end
  355.  
  356. function getMinionProjSpeed(minion)
  357.     return ( minion.type == "obj_AI_Turret" and minionInfo.obj_AI_Turret.projSpeed or minionInfo[minion.charName].projSpeed )
  358. end
  359.  
  360. function minionSpellStillViable(attack)
  361.     if attack == nil then return false end
  362.     local sourceMinion = getAllyMinion(attack.sourceName)
  363.     local targetMinion = getEnemyMinion(attack.targetName)
  364.     if sourceMinion == nil or targetMinion == nil then return false end
  365.     if sourceMinion.dead or targetMinion.dead or GetDistance(sourceMinion, attack.origin) > 3 then return false else return true end
  366. end
  367.  
  368. function getAllyMinion(name)
  369.     for i, minion in pairs(allyMinions.objects) do
  370.         if minion ~= nil and minion.valid and minion.name == name then
  371.             return minion
  372.         end
  373.     end
  374.     return nil
  375. end
  376.  
  377. function getEnemyMinion(name)
  378.     for i, minion in pairs(enemyMinions.objects) do
  379.         if minion ~= nil and ValidTarget(minion) and minion.name == name then
  380.             return minion
  381.         end
  382.     end
  383.     return nil
  384. end
  385.  
  386. function isSameMinion(minion1, minion2)
  387.     if minion1.networkID == minion2.networkID then return true
  388.     else return false end
  389. end
  390.  
  391. function getMinionTimeToHit(minion, attack)
  392.     local sourceMinion = getAllyMinion(attack.sourceName)
  393.     return ( attack.speed == 0 and ( attack.delay ) or ( attack.delay + GetDistance(sourceMinion, minion) / attack.speed ) )
  394. end
  395.  
  396. function getNewAttackDetails(source, target)
  397.     return  {
  398.             sourceName = source.name,
  399.             targetName = target.name,
  400.             damage = source:CalcDamage(target),
  401.             started = GetTickCount(),
  402.             origin = { x = source.x, z = source.z },
  403.             delay = getMinionDelay(source),
  404.             speed = getMinionProjSpeed(source),
  405.             sourceType = source.type}
  406. end
  407.    
  408. function getPredictedDamage(counter, minion, attack)
  409.     if not minionSpellStillViable(attack) then
  410.         incomingDamage[counter] = nil
  411.     elseif isSameMinion(minion, getEnemyMinion(attack.targetName)) then
  412.         local myTimeToHit = getTimeToHit(minion, projSpeed)
  413.         minionTimeToHit = getMinionTimeToHit(minion, attack)
  414.         if GetTickCount() >= (attack.started + minionTimeToHit) then
  415.             incomingDamage[counter] = nil
  416.         elseif GetTickCount() + myTimeToHit > attack.started + minionTimeToHit then
  417.             return attack.damage
  418.         end
  419.     end
  420.     return 0
  421. end
  422.  
  423. function getKillableCreep(iteration)
  424.     if isMelee then return meleeLastHit() end
  425.     local minion = enemyMinions.objects[iteration]
  426.     if minion ~= nil then
  427.         local distanceToMinion = GetDistance(minion)
  428.         local predictedDamage = 0
  429.         if distanceToMinion < getTrueRange() then
  430.             if FarmMenu.Predict then
  431.                 for l, attack in pairs(incomingDamage) do
  432.                     predictedDamage = predictedDamage + getPredictedDamage(l, minion, attack)
  433.                 end
  434.             end
  435.             local myDamage = myHero:CalcDamage(minion, myHero.totalDamage) + getBonusLastHitDamage(minion) + LastHitPassiveDamage()
  436.             myDamage = (MasteryMenu.Executioner and myDamage * 1.05 or myDamage)
  437.             myDamage = myDamage - 10
  438.             if minion.health - predictedDamage <= 0 then
  439.                     return getKillableCreep(iteration + 1)
  440.             elseif minion.health + 1.2 - predictedDamage < myDamage then
  441.                     return minion
  442.             --elseif minion.health + 1.2 - predictedDamage < myDamage + (0.5 * predictedDamage) then
  443.             --      return nil
  444.             end
  445.         end
  446.     end
  447.     return nil
  448. end
  449.  
  450. function getBonusLastHitDamage(minion)
  451.     if PluginBonusLastHitDamage then
  452.         return PluginBonusLastHitDamage(minion)
  453.     elseif BonusLastHitDamage then
  454.         return BonusLastHitDamage(minion)
  455.     else
  456.         return 0
  457.     end
  458. end
  459.  
  460. function meleeLastHit()
  461.         for _, minion in pairs(enemyMinions.objects) do
  462.                 local aDmg = getDmg("AD", minion, myHero)
  463.                 if GetDistance(minion) <= (myHero.range + 75) then
  464.                         if minion.health < aDmg then
  465.                                 return minion
  466.                         end            
  467.                 end
  468.         end
  469. end
  470.  
  471. function LastHitPassiveDamage(minion)
  472.         if PluginLastHitPassiveDamage then return PluginLastHitPassiveDamage(minion) end
  473.         local bonus = 0
  474.         if GetInventoryHaveItem(3153) then
  475.                 if ValidTarget(minion) then
  476.                         bonus = minion.health / 20
  477.                         if bonus >= 60 then
  478.                                 bonus = 60
  479.                         end
  480.                 end
  481.         end
  482.         bonus = bonus + (MasteryMenu.Butcher * 2)
  483.         bonus = (MasteryMenu.Spellblade and bonus + (myHero.ap * 0.05) or 0)
  484.         return bonus
  485. end
  486.  
  487. function getHighestMinion()
  488.     if GetTarget() ~= nil then
  489.         local currentTarget = GetTarget()
  490.         local validTarget = false
  491.         validTarget = ValidTarget(currentTarget, getTrueRange(), player.enemyTeam)
  492.         if validTarget and (currentTarget.type == "obj_BarracksDampener" or currentTarget.type == "obj_HQ" or currentTarget.type == "obj_AI_Turret") then
  493.             return currentTarget
  494.         end
  495.     end
  496.  
  497.     local highestHp = {obj = nil, hp = 0}
  498.     for _, tMinion in pairs(enemyMinions.objects) do
  499.         if GetDistance(tMinion) <= getTrueRange() and tMinion.health > highestHp.hp then
  500.                 highestHp = {obj = tMinion, hp = tMinion.health}
  501.         end
  502.     end
  503.     return highestHp.obj
  504. end
  505.  
  506. function getPredictedDamageOnMinion(minion)
  507.         local predictedDamage = 0
  508.         if minion ~= nil then
  509.                 local distanceToMinion = GetDistance(minion)
  510.                 if distanceToMinion < getTrueRange() then
  511.                         for l, attack in pairs(incomingDamage) do
  512.                                 if attack.sourceType ~= "obj_AI_Turret" then
  513.                                         predictedDamage = predictedDamage + getPredictedDamage(l, minion, attack)
  514.                                 end
  515.                         end
  516.                 end
  517.         end
  518.         return predictedDamage
  519. end
  520.  
  521. function handleTurretShot(turret, minion)
  522.         local dmg = turret:CalcDamage(minion)
  523.         local myDmg = myHero:CalcDamage(minion, myHero.totalDamage) + (BonusLastHitDamage and BonusLastHitDamage(minion) or 0) + LastHitPassiveDamage()
  524.         myDmg = (MasteryMenu.Executioner and myDmg * 1.05 or myDmg)
  525.         local predic = getPredictedDamageOnMinion(minion)
  526.         if minion.health > myDmg + dmg + predic and minion.health < (myDmg * 2) + dmg + predic then
  527.                 turretMinion = {timeToHit = minionInfo.obj_AI_Turret.aaDelay + GetDistance(turret, minion) / minionInfo.obj_AI_Turret.projSpeed, obj = minion }
  528.         end
  529. end
  530.  
  531. --[[ Abilities ]]--
  532. function SkillsOnLoad()
  533.         Skills = getSpellList()
  534.         if Skills == nil then
  535.                 AutoCarry.SkillsCrosshair = TargetSelector(TARGET_LOW_HP_PRIORITY, 0, DAMAGE_PHYSICAL, false)
  536.                 return
  537.         end
  538.         local maxRange = 0
  539.         for _, skill in pairs(Skills) do
  540.                 if skill.range > maxRange then maxRange = skill.range end
  541.         end
  542.         AutoCarry.SkillsCrosshair = TargetSelector(TARGET_LOW_HP_PRIORITY, maxRange, DAMAGE_PHYSICAL, false)
  543. end
  544.  
  545. function SkillsOnTick()
  546.         if Skills == nil then return end
  547.         local target = AutoCarry.GetAttackTarget()
  548.         if ValidTarget(target) and target.type == myHero.type then
  549.                 for _, skill in pairs(Skills) do
  550.                 if  (AutoCarry.MainMenu.AutoCarry and SkillsMenu[skill.configName.."AutoCarry"]) or
  551.                         (AutoCarry.MainMenu.MixedMode and SkillsMenu[skill.configName.."MixedMode"]) then
  552.                                 if not skill.reset or (skill.reset and GetTickCount() < projAt + 500) then
  553.                                         if skill.skillShot then
  554.                                                 AutoCarry.CastSkillshot(skill, target)
  555.                                         elseif skill.reqTarget == false and not skill.atMouse then
  556.                                                 CastSelf(skill, target)
  557.                                         elseif skill.reqTarget == false and skill.atMouse then
  558.                                                 CastMouse(skill)
  559.                                         else
  560.                                                 CastTargettedSpell(skill, target)
  561.                                         end
  562.                                 end
  563.                         end
  564.                 end
  565.         end
  566. end
  567.  
  568. AutoCarry.GetCollision = function (skill, source, destination)
  569.     if VIP_USER and useVIPCol then
  570.         local col = Collision(skill.range, skill.speed*1000, skill.delay/1000, skill.width)
  571.         return col:GetMinionCollision(source, destination)
  572.     else
  573.         return willHitMinion(destination, skill.width)
  574.     end
  575. end
  576.  
  577. AutoCarry.CastSkillshot = function (skill, target)
  578.         if VIP_USER then
  579.                 pred = TargetPredictionVIP(skill.range, skill.speed*1000, skill.delay/1000, skill.width)
  580.         elseif not VIP_USER then
  581.                 pred = TargetPrediction(skill.range, skill.speed, skill.delay, skill.width)
  582.         end
  583.         local predPos = pred:GetPrediction(target)
  584.         if predPos and GetDistance(predPos) <= skill.range then
  585.                 if VIP_USER and pred:GetHitChance(target) > SkillsMenu.hitChance/100 then
  586.                         if not skill.minions or not AutoCarry.GetCollision(skill, myHero, predPos) then
  587.                                 CastSpell(skill.spellKey, predPos.x, predPos.z)
  588.                         end
  589.                 elseif not VIP_USER then
  590.                         if not skill.minions or not AutoCarry.GetCollision(skill, myHero, predPos) then
  591.                                 CastSpell(skill.spellKey, predPos.x, predPos.z)
  592.                         end
  593.                 end
  594.         end
  595. end
  596.  
  597. function CastTargettedSpell(skill, target)
  598.         if GetDistance(target) <= skill.range then
  599.                 CastSpell(skill.spellKey, target)
  600.         end
  601. end
  602.  
  603. function CastMouse(skill)
  604.         CastSpell(skill.spellKey, mousePos.x, mousePos.z)
  605. end
  606.  
  607. function CastSelf(skill, target)
  608.         if not skill.forceRange or (skill.forceRange and GetDistance(target) - (skill.forceToHitBox and GetDistance(target, target.minBBox) or 0) <= skill.range) then
  609.                 CastSpell(skill.spellKey)
  610.         end
  611. end
  612.  
  613. function getPrediction(speed, delay, target)
  614.         if target == nil then return nil end
  615.         local travelDuration = (delay + GetDistance(myHero, target)/speed)
  616.         travelDuration = (delay + GetDistance(GetPredictionPos(target, travelDuration))/speed)
  617.         travelDuration = (delay + GetDistance(GetPredictionPos(target, travelDuration))/speed)
  618.         travelDuration = (delay + GetDistance(GetPredictionPos(target, travelDuration))/speed)  
  619.         return GetPredictionPos(target, travelDuration)
  620. end
  621.  
  622. function willHitMinion(predic, width)
  623.     for _, minion in pairs(enemyMinions.objects) do
  624.         if minion ~= nil and minion.valid and string.find(minion.name,"Minion_") == 1 and minion.team ~= player.team and minion.dead == false then
  625.             if predic ~= nil then
  626.                 ex = player.x
  627.                 ez = player.z
  628.                 tx = predic.x
  629.                 tz = predic.z
  630.                 dx = ex - tx
  631.                 dz = ez - tz
  632.                 if dx ~= 0 then
  633.                     m = dz/dx
  634.                     c = ez - m*ex
  635.                 end
  636.                 mx = minion.x
  637.                 mz = minion.z
  638.                 distanc = (math.abs(mz - m*mx - c))/(math.sqrt(m*m+1))
  639.                 if distanc < width and math.sqrt((tx - ex)*(tx - ex) + (tz - ez)*(tz - ez)) > math.sqrt((tx - mx)*(tx - mx) + (tz - mz)*(tz - mz)) then
  640.                     return true
  641.                 end
  642.             end
  643.         end
  644.     end
  645.     return false
  646. end
  647.  
  648. --[[ Champion Specific ]]--
  649.  
  650. if not AutoCarry.OverrideCustomChampionSupport then
  651.             -- >> Vayne << --
  652.     if myHero.charName == "Vayne" then
  653.             function BonusLastHitDamage()
  654.                     if myHero:GetSpellData(_Q).level > 0 and myHero:CanUseSpell(_Q) == SUPRESSED then
  655.                 return math.round( ((0.05*myHero:GetSpellData(_Q).level) + 0.25 )*myHero.totalDamage )
  656.             end
  657.                     return 0
  658.             end
  659.            
  660.             -- >> Teemo << --
  661.     elseif myHero.charName == "Teemo" then
  662.             function BonusLastHitDamage()
  663.                     if myHero:GetSpellData(_E).level > 0 then
  664.                 return math.floor( (myHero:GetSpellData(_E).level * 10) + (myHero.ap * 0.3) )
  665.             end
  666.                     return 0
  667.             end    
  668.             -- >> Corki << --
  669.     elseif myHero.charName == "Corki" then
  670.             function BonusLastHitDamage()
  671.                     return myHero.totalDamage/10
  672.             end
  673.              
  674.             -- >> Miss Fortune << --
  675.     elseif myHero.charName == "MissFortune" then
  676.             function BonusLastHitDamage()
  677.                     if myHero:GetSpellData(_W).level > 0 then
  678.                             return (4+2*myHero:GetSpellData(_W).level) + (myHero.ap/20)
  679.                     end
  680.                     return 0
  681.             end
  682.            
  683.             -- >> Varus << --
  684.     elseif myHero.charName == "Varus" then
  685.             function BonusLastHitDamage()
  686.                     if myHero:GetSpellData(_W).level > 0 then
  687.                             return (6 + (myHero:GetSpellData(_W).level * 4) + (myHero.ap * 0.25))
  688.                     end
  689.                     return 0
  690.             end
  691.      
  692.             -- >> Caitlyn << --
  693.     elseif myHero.charName == "Caitlyn" then
  694.             local headShotPart
  695.             function CustomOnCreateObj(obj)
  696.                     if GetDistance(obj) < 100 and obj.name:lower():find("caitlyn_headshot_rdy") then
  697.                             headShotPart = obj
  698.                     end
  699.             end
  700.            
  701.             function BonusLastHitDamage(minion)
  702.                     if headShotPart and headShotPart.valid and minion and ValidTarget(minion) then
  703.                             return myHero:CalcDamage(minion, myHero.totalDamage) * 1.5
  704.                     end
  705.                     return 0
  706.             end
  707.      
  708.             -- >> Tristana << --
  709.     elseif myHero.charName == "Tristana" then
  710.             function CustomOnTick()
  711.                     Skills[2].range = myHero.range
  712.             end
  713.            
  714.             -- >> KogMaw << --
  715.     elseif myHero.charName == "KogMaw" then
  716.             function CustomOnTick()
  717.                     Skills[2].range = getTrueRange() + 110 + (myHero:GetSpellData(_W).level * 20)
  718.                     if myHero:GetSpellData(_R).level == 1 then
  719.                             Skills[4].range = 1400
  720.                     elseif myHero:GetSpellData(_R).level == 2 then
  721.                             Skills[4].range = 1700
  722.                     elseif myHero:GetSpellData(_R).level == 3 then
  723.                             Skills[4].range = 2200
  724.                     end
  725.             end
  726.            
  727.             -- >> Twisted Fate << --
  728.     elseif myHero.charName == "TwistedFate" then
  729.             local tfLastUse = 0
  730.             TFConfig = scriptConfig("Sida's Auto Carry: Twisted Fate Edition", "autocarrytf")
  731.             TFConfig:addParam("selectgold", "Select Gold", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("W"))
  732.             TFConfig:addParam("selectblue", "Select Blue", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("E"))
  733.             TFConfig:addParam("selectred", "Select Red", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  734.             TFConfig:addParam("qStunned", "Auto Q Stunned Enemies", SCRIPT_PARAM_ONOFF, true)
  735.            
  736.             function CustomOnTick()
  737.                     PickACard()
  738.                     if TFConfig.qStunned then
  739.                             for _, enemy in pairs(AutoCarry.EnemyTable) do
  740.                                     if ValidTarget(enemy) and not enemy.canMove and GetDistance(enemy) < 1350 then
  741.                                             CastSpell(_Q, enemy.x, enemy.z)
  742.                                     end
  743.                             end
  744.                     end
  745.             end
  746.            
  747.             function PickACard()
  748.                     if myHero:CanUseSpell(_W) == READY and GetTickCount()-tfLastUse <= 2300 then
  749.                             if myHero:GetSpellData(_W).name == selected then CastSpellEx(_W) end
  750.                     end
  751.                     if myHero:CanUseSpell(_W) == READY and GetTickCount()-tfLastUse >= 2400 then
  752.                             if TFConfig.selectgold then selected = "goldcardlock"
  753.                             elseif TFConfig.selectblue then selected = "bluecardlock"
  754.                             elseif TFConfig.selectred then selected = "redcardlock"
  755.                             else return end
  756.                             CastSpellEx(_W)
  757.                             tfLastUse = GetTickCount()
  758.                     end
  759.             end
  760.      
  761.             -- >> Draven << --
  762.     elseif myHero.charName == "Draven" then
  763.             local reticles = {}
  764.             local qStacks = 0
  765.             local closestReticle
  766.             local qBuff = 0
  767.             local stopped = false
  768.             local qRad = 150
  769.             disableRangeDraw = true
  770.             local qParticles = {"Draven_Q_mis",
  771.                                             "Draven_Q_mis_bloodless",
  772.                                             "Draven_Q_mis_shadow",
  773.                                             "Draven_Q_mis_shadow_bloodless",
  774.                                             "Draven_Qcrit_mis",
  775.                                             "Draven_Qcrit_mis_bloodless",
  776.                                             "Draven_Qcrit_mis_shadow",
  777.                                             "Draven_Qcrit_mis_shadow_bloodless" }
  778.                                            
  779.             DravenConfig = scriptConfig("Sida's Auto Carry: Draven Edition", "autocarrdraven")
  780.             DravenConfig:addParam("HoldRange", "Stand Zone", SCRIPT_PARAM_SLICE, 130, 0, 450, 0)
  781.             DravenConfig:addParam("CatchRange", "Catch Axe Range", SCRIPT_PARAM_SLICE, 575, 0, 2000, 0)
  782.             DravenConfig:addParam("AutoW", "Keep W Buff Active Against Enemy", SCRIPT_PARAM_ONOFF, true)
  783.             DravenConfig:addParam("AutoCarry", "Use / Catch Axes: Auto Carry Mode", SCRIPT_PARAM_ONOFF, true)
  784.             DravenConfig:addParam("LastHit", "Use / Catch Axes: Last Hit Mode", SCRIPT_PARAM_ONOFF, true)
  785.             DravenConfig:addParam("LaneClear", "Use / Catch Axes: Lane Clear Mode", SCRIPT_PARAM_ONOFF, true)
  786.             DravenConfig:addParam("MixedMode", "Use / Catch Axes: Mixed Mode Mode", SCRIPT_PARAM_ONOFF, true)
  787.             DravenConfig:addParam("Reminder", "Display Reminder Text", SCRIPT_PARAM_ONOFF, true)
  788.            
  789.             function Move(pos)
  790.                     local moveSqr = math.sqrt((pos.x - myHero.x)^2+(pos.z - myHero.z)^2)
  791.                     local moveX = myHero.x + 200*((pos.x - myHero.x)/moveSqr)
  792.                     local moveZ = myHero.z + 200*((pos.z - myHero.z)/moveSqr)
  793.                     myHero:MoveTo(moveX, moveZ)
  794.             end
  795.            
  796.             function CustomOnProcessSpell(unit, spell)
  797.                     if unit.isMe and spell.name == "dravenspinning" then
  798.                             qStacks = qStacks + 1
  799.                     end
  800.             end
  801.                                            
  802.             function CustomOnCreateObj(obj)
  803.                     if obj.name == "Draven_Q_buf.troy" then
  804.                             qBuff = qBuff + 1
  805.                     end
  806.            
  807.                     for _, particle in pairs(qParticles) do
  808.                              if obj ~= nil and obj.valid and obj.name:lower():find(particle:lower()) and GetDistance(obj) < 333 then
  809.                                     attackedSuccessfully()
  810.                              end
  811.                     end
  812.                    
  813.                     if obj ~= nil and obj.name ~= nil and obj.x ~= nil and obj.z ~= nil then
  814.                 if obj.name == "Draven_Q_reticle_self.troy" then
  815.                     table.insert(reticles, {object = obj, created = GetTickCount()})
  816.                 elseif obj.name == "draven_spinning_buff_end_sound.troy" then
  817.                     qStacks = 0
  818.                 end
  819.             end
  820.             end
  821.            
  822.             function CustomOnDeleteObj(obj)
  823.                     if obj.name == "Draven_Q_reticle_self.troy" then
  824.                             if GetDistance(obj) > qRad then
  825.                                     qStacks = qStacks - 1
  826.                             end
  827.                             for i, reticle in ipairs(reticles) do
  828.                                     if obj and obj.valid and reticle.object and reticle.object.valid and obj.x == reticle.object.x and obj.z == reticle.object.z then
  829.                                             table.remove(reticles, i)
  830.                                     end
  831.                             end
  832.                     elseif obj.name == "Draven_Q_buf.troy" then
  833.                             qBuff = qBuff - 1                      
  834.                     end
  835.             end
  836.            
  837.             function axesActive()
  838.                     if (AutoCarry.MainMenu.AutoCarry and DravenConfig.AutoCarry)
  839.                     or (AutoCarry.MainMenu.LastHit and DravenConfig.LastHit)
  840.                     or (AutoCarry.MainMenu.MixedMode and DravenConfig.MixedMode)
  841.                     or (AutoCarry.MainMenu.LaneClear and DravenConfig.LaneClear) then
  842.                             return true
  843.                     end
  844.                     return false
  845.             end
  846.            
  847.             function CustomAttackEnemy(enemy)
  848.                     if enemy.dead or not enemy.valid or disableAttacks then return end
  849.                     if axesActive() and GetDistance(mousePos) <= DravenConfig.CatchRange then
  850.                             if qStacks < 2 then CastSpell(_Q) end
  851.                     end
  852.                     myHero:Attack(enemy)
  853.                     AutoCarry.shotFired = true
  854.             end
  855.            
  856.             function CustomOnTick()
  857.                     if myHero.dead then return end
  858.                     if (AutoCarry.MainMenu.AutoCarry or AutoCarry.MainMenu.MixedMode) and DravenConfig.AutoW and ValidTarget(AutoCarry.Orbwalker.target) and not TargetHaveBuff("dravenfurybuff" , myHero) then
  859.                             CastSpell(_W)
  860.                     end
  861.                    
  862.                     for _, particle in pairs(reticles) do
  863.                             if closestReticle and closestReticle.object.valid and particle.object and particle.object.valid then
  864.                                     if GetDistance(particle.object) > GetDistance(closestReticle.object) then
  865.                                             closestReticle = particle
  866.                                     end
  867.                             else
  868.                                     closestReticle = particle
  869.                             end
  870.                     end    
  871.      
  872.                     if GetDistance(mousePos) <= DravenConfig.HoldRange and axesActive() then
  873.                             if not stopped then
  874.                                     myHero:HoldPosition()
  875.                                     stopped = true
  876.                             end
  877.                             disableMovement = true
  878.                     else
  879.                             stopped = false
  880.                     end
  881.                    
  882.                     function doMovement()
  883.                             disableMovement = true
  884.                             disableAttacks = true
  885.                             if myHero.canMove then Move({x = closestReticle.object.x, z = closestReticle.object.z}) end
  886.                     end
  887.                    
  888.                     if axesActive() and closestReticle and closestReticle.object and closestReticle.object.valid then
  889.                             if GetDistance(mousePos) <= DravenConfig.CatchRange and ((AutoCarry.MainMenu.AutoCarry and ShouldCatch(closestReticle.object)) or (not AutoCarry.MainMenu.AutoCarry)) then
  890.                                     if GetDistance(closestReticle.object) > qRad then
  891.                                             doMovement()
  892.                                     else
  893.                                             disableMovement = true
  894.                                             disableAttacks = false
  895.                                     end
  896.                             else
  897.                                     disableMovement = false
  898.                                     disableAttacks = false
  899.                             end
  900.                     elseif GetDistance(mousePos) <= DravenConfig.HoldRange then
  901.                             disableMovement = true
  902.                             disableAttacks = false
  903.                     else
  904.                             disableMovement = false
  905.                             disableAttacks = false
  906.                     end
  907.             end
  908.                    
  909.             function ShouldCatch(reticle)
  910.                     local enemy
  911.                     if AutoCarry.Orbwalker.target ~= nil then enemy = AutoCarry.Orbwalker.target
  912.                     elseif AutoCarry.SkillsCrosshair.target ~= nil then enemy = AutoCarry.SkillsCrosshair.target
  913.                     else return true end
  914.                     if not reticle then return false end
  915.                     if GetDistance(mousePos, enemy) > GetDistance(enemy) then
  916.                             if GetDistance(reticle, enemy) < GetDistance(enemy) then
  917.                                     return false
  918.                             end
  919.                             return true
  920.                     else
  921.                             local closestEnemy
  922.                             for _, thisEnemy in pairs(AutoCarry.EnemyTable) do
  923.                                     if not closestEnemy then closestEnemy = thisEnemy
  924.                                     elseif GetDistance(thisEnemy) < GetDistance(closestEnemy) then closestEnemy = thisEnemy end
  925.                             end
  926.                             if closestEnemy then
  927.                                     local predPos = getPrediction(1.9, 100, closestEnemy)
  928.                                     if not predPos then return true end
  929.                                     if GetDistance(reticle, predPos) > getTrueRange() + getHitBoxRadius(closestEnemy) then
  930.                                             return false
  931.                                     end
  932.                                     return true
  933.                             else
  934.                                     return true
  935.                             end
  936.                     end
  937.             end
  938.            
  939.             function BonusLastHitDamage(minion)
  940.                     if myHero:GetSpellData(_Q).level > 0 and qBuff > 0 then
  941.                             return ((myHero.damage + myHero.addDamage) * (0.35 + (0.1 * myHero:GetSpellData(_Q).level)))
  942.                     end
  943.             end
  944.            
  945.             function CustomOnDraw()
  946.                     DrawCircle(myHero.x, myHero.y, myHero.z, DravenConfig.HoldRange, 0xFFFFFF)
  947.                     DrawCircle(myHero.x, myHero.y, myHero.z, DravenConfig.HoldRange-1, 0xFFFFFF)
  948.                     DrawCircle(myHero.x, myHero.y, myHero.z, DravenConfig.CatchRange-1, 0x19A712)
  949.                    
  950.                     if axesActive() and DravenConfig.Reminder then
  951.                             if GetDistance(mousePos) <= DravenConfig.HoldRange then
  952.                                     DrawText("Holding Position & Catching",16,100, 100, 0xFF00FF00)
  953.                             elseif GetDistance(mousePos) <= DravenConfig.CatchRange then
  954.                                     DrawText("Orbwalking & Catching",16,100, 100, 0xFF00FF00)
  955.                             else
  956.                                     DrawText("Only Orbwalking",16,100, 100, 0xFF00FF00)
  957.                             end
  958.                     end
  959.             end
  960.      
  961.     end
  962. end
  963. --[[ Items ]]--
  964. local items =
  965.     {
  966.         {name = "Blade of the Ruined King", menu = "BRK", id=3153, range = 500, reqTarget = true, slot = nil },
  967.         {name = "Bilgewater Cutlass", menu = "BWC", id=3144, range = 500, reqTarget = true, slot = nil },
  968.         {name = "Deathfire Grasp", menu = "DFG", id=3128, range = 750, reqTarget = true, slot = nil },
  969.         {name = "Hextech Gunblade", menu = "HGB", id=3146, range = 400, reqTarget = true, slot = nil },
  970.         {name = "Ravenous Hydra", menu = "RSH", id=3074, range = 350, reqTarget = false, slot = nil},
  971.         {name = "Sword of the Divine", menu = "STD", id=3131, range = 350, reqTarget = false, slot = nil},
  972.         {name = "Tiamat", menu = "TMT", id=3077, range = 350, reqTarget = false, slot = nil},
  973.         {name = "Entropy", menu = "ETR", id=3184, range = 350, reqTarget = false, slot = nil},
  974.         {name = "Youmuu's Ghostblade", menu = "YGB", id=3142, range = 350, reqTarget = false, slot = nil}
  975.     }
  976.        
  977. function UseItemsOnTick()
  978.     if AutoCarry.Orbwalker.target then
  979.         for _,item in pairs(items) do
  980.             item.slot = GetInventorySlotItem(item.id)
  981.             if item.slot ~= nil then
  982.                 if item.reqTarget and GetDistance(AutoCarry.Orbwalker.target) <= item.range and item.menu ~= "BRK" then
  983.                     CastSpell(item.slot, AutoCarry.Orbwalker.target)
  984.                 elseif item.reqTarget and GetDistance(AutoCarry.Orbwalker.target) <= item.range and item.menu == "BRK" then
  985.                     if myHero.health <= myHero.maxHealth*0.65 or GetDistance(AutoCarry.Orbwalker.target) > 400 then
  986.                         CastSpell(item.slot, AutoCarry.Orbwalker.target)
  987.                     end
  988.                 elseif not item.reqTarget then
  989.                     CastSpell(item.slot)
  990.                 end
  991.             end
  992.         end
  993.     end
  994. end
  995.  
  996. function SetMuramana()
  997.     if AutoCarry.Orbwalker.target ~= nil and ItemMenu.muraMana and not MuramanaIsActive() and (AutoCarry.MainMenu.AutoCarry or AutoCarry.MainMenu.MixedMode) then
  998.         MuramanaOn()
  999.     elseif AutoCarry.Orbwalker.target == nil and ItemMenu.muraMana and MuramanaIsActive() then
  1000.         MuramanaOff()
  1001.     end
  1002. end
  1003.  
  1004. --[[ Summoner Spells ]]--
  1005.  local ignite, barrier, healthBefore, healthBeforeTimer, nextUpdate, nextCheck = nil, nil, 0, 0, 0, 0, 0
  1006.  
  1007.  function SummonerOnLoad()
  1008.          ignite = (player:GetSpellData(SUMMONER_1).name == "SummonerDot" and SUMMONER_1 or (player:GetSpellData(SUMMONER_2).name == "SummonerDot" and SUMMONER_2 or nil))
  1009.          barrier = (player:GetSpellData(SUMMONER_1).name == "SummonerBarrier" and SUMMONER_1 or (player:GetSpellData(SUMMONER_2).name == "SummonerBarrier" and SUMMONER_2 or nil))
  1010.  end
  1011.  
  1012. function SummonerOnTick()
  1013.         if ignite and SummonerMenu.Ignite and myHero:CanUseSpell(ignite) == READY then
  1014.                 for _, enemy in pairs(GetEnemyHeroes()) do
  1015.                         if ValidTarget(enemy, 600) and enemy.health <= 50 + (20 * player.level) then
  1016.                                 CastSpell(ignite, enemy)
  1017.                         end
  1018.                 end
  1019.         end
  1020.         if barrier and SummonerMenu.Barrier and myHero:CanUseSpell(barrier) == READY then
  1021.                 if GetTickCount() >= nextCheck then
  1022.                         local co = ((myHero.health / myHero.maxHealth * 100) - 20)*(0.3-0.1)/(100-20)+0.1
  1023.                         local proc = myHero.maxHealth * co
  1024.                         if healthBefore - myHero.health > proc and myHero.health < myHero.maxHealth * 0.3 then
  1025.                                 CastSpell(barrier)
  1026.                         end
  1027.                         nextCheck = GetTickCount() + 100
  1028.                         if GetTickCount() >= nextUpdate then
  1029.                                 healthBefore = myHero.health
  1030.                                 healthBeforeTimer = GetTickCount()
  1031.                                 nextUpdate = GetTickCount() + 1000
  1032.                         end
  1033.                 end
  1034.         end
  1035. end
  1036.  
  1037. --[[ Plugins ]]--
  1038. if FileExist(LIB_PATH .."SidasAutoCarryPlugin - "..myHero.charName..".lua") then
  1039.         hasPlugin = true
  1040. end
  1041.  
  1042. AutoCarry.GetAttackTarget = function()
  1043.     if ValidTarget(AutoCarry.Orbwalker.target) then
  1044.         return AutoCarry.Orbwalker.target
  1045.     else
  1046.         AutoCarry.SkillsCrosshair:update()
  1047.         return AutoCarry.SkillsCrosshair.target
  1048.     end
  1049. end
  1050.  
  1051. AutoCarry.GetKillableMinion = function()
  1052.     return killableMinion
  1053. end
  1054.  
  1055. AutoCarry.GetMinionTarget = function()
  1056.     if killableMinion then
  1057.         return killableMinion
  1058.     elseif pluginMinion then
  1059.         return pluginMinion
  1060.     else
  1061.         return nil
  1062.     end
  1063. end
  1064.  
  1065. AutoCarry.EnemyMinions = function()
  1066.     return enemyMinions
  1067. end
  1068.  
  1069. AutoCarry.AllyMinions = function()
  1070.     return allyMinions
  1071. end
  1072.  
  1073. --[[ Callbacks ]]--
  1074. function OnLoad()
  1075.         enemyMinions = minionManager(MINION_ENEMY, 2000, player, MINION_SORT_HEALTH_ASC)
  1076.         allyMinions = minionManager(MINION_ALLY, 2000, player, MINION_SORT_HEALTH_ASC)
  1077.         if getChampTable()[myHero.charName] then
  1078.             ChampInfo = getChampTable()[myHero.charName]
  1079.         end
  1080.         OrbwalkingOnLoad()
  1081.         SkillsOnLoad()
  1082.         LastHitOnLoad()
  1083.         SummonerOnLoad()
  1084.         AutoCarry.EnemyTable = GetEnemyHeroes()
  1085.         PriorityOnLoad()
  1086.         setMenus()
  1087.         StreamingMenu.DisableDrawing = false
  1088.         if VIP_USER and PerformanceMenu.VipCol then
  1089.             require "Collision"
  1090.             PrintChat(">> Sida's Auto Carry: VIP Collision Enabled")  
  1091.             useVIPCol = true
  1092.         end
  1093.         if CustomOnLoad then CustomOnLoad() end
  1094.         if PluginOnLoad then PluginOnLoad() end
  1095.         PrintChat(">> Sida's Auto Carry: Revamped!")
  1096. end
  1097.  
  1098. function OnTick()
  1099.         OrbwalkingOnTick()
  1100.         LastHitOnTick()
  1101.         SkillsOnTick()
  1102.         SummonerOnTick()
  1103.         setMovement()
  1104.         SetMuramana()
  1105.         if PluginOnTick then PluginOnTick() end
  1106.         if StreamingMenu.DisableDrawing and not hudDisabled then
  1107.             for i = 0, 10 do
  1108.                 PrintChat("")
  1109.             end
  1110.             hudDisabled = true
  1111.             DisableOverlay()
  1112.         end
  1113.         if (AutoCarry.MainMenu.AutoCarry and ItemMenu.UseItemsAC) or (AutoCarry.MainMenu.LastHit and ItemMenu.UseItemsLastHit) or (AutoCarry.MainMenu.MixedMode and ItemMenu.UseItemsMixed) then
  1114.                  UseItemsOnTick()
  1115.         end
  1116.        
  1117.         if AutoCarry.MainMenu.AutoCarry then
  1118.                 if AutoCarry.Orbwalker.target ~= nil and EnemyInRange(AutoCarry.Orbwalker.target) then
  1119.                         if timeToShoot() and AutoCarry.CanAttack then
  1120.                                 attackEnemy(AutoCarry.Orbwalker.target)
  1121.                         elseif heroCanMove() then
  1122.                                 moveToCursor()
  1123.                         end
  1124.                 elseif heroCanMove() then
  1125.                         moveToCursor()
  1126.                 end
  1127.         end
  1128.        
  1129.         if AutoCarry.MainMenu.LastHit then
  1130.                 if not ValidTarget(killableMinion) then killableMinion = getKillableCreep(1) end
  1131.                 if ValidTarget(killableMinion) and timeToShoot() and AutoCarry.CanAttack then
  1132.                         attackEnemy(killableMinion)
  1133.                 elseif ValidTarget(turretMinion.obj) and timeToShoot() and AutoCarry.CanAttack and turretMinion.timeToHit > getTimeToHit(turretMinion.obj, projSpeed) then
  1134.                         attackEnemy(turretMinion.obj)
  1135.                 elseif heroCanMove() and FarmMenu.moveLastHit then
  1136.                         moveToCursor()
  1137.                 end
  1138.         end
  1139.        
  1140.         if AutoCarry.MainMenu.MixedMode then
  1141.                 if AutoCarry.Orbwalker.target ~= nil and EnemyInRange(AutoCarry.Orbwalker.target) then
  1142.                         if timeToShoot() and AutoCarry.CanAttack then
  1143.                                 attackEnemy(AutoCarry.Orbwalker.target)
  1144.                         elseif heroCanMove() then
  1145.                                 moveToCursor()
  1146.                         end
  1147.                 else
  1148.                         if not ValidTarget(killableMinion) then killableMinion = getKillableCreep(1) end
  1149.                         if ValidTarget(killableMinion) and timeToShoot() and AutoCarry.CanAttack then
  1150.                                 attackEnemy(killableMinion)
  1151.                         elseif heroCanMove() and FarmMenu.moveMixed then
  1152.                                 moveToCursor()
  1153.                         end
  1154.                 end
  1155.         end
  1156.        
  1157.         if AutoCarry.MainMenu.LaneClear then
  1158.             if not ValidTarget(killableMinion) then killableMinion = getKillableCreep(1) end
  1159.             if ValidTarget(killableMinion) and timeToShoot() and AutoCarry.CanAttack then
  1160.                     attackEnemy(killableMinion)
  1161.             else
  1162.                 local tMinion = getHighestMinion()
  1163.                 if tMinion and ValidTarget(tMinion) and timeToShoot() and AutoCarry.CanAttack then
  1164.                     pluginMinion = tMinion
  1165.                     attackEnemy(tMinion)
  1166.                 else
  1167.                     if PerformanceMenu.JungleFarm then
  1168.                         local tMinion = getJungleMinion()
  1169.                         if tMinion and ValidTarget(tMinion) and timeToShoot() and AutoCarry.CanAttack then
  1170.                             pluginMinion = tMinion
  1171.                             attackEnemy(tMinion)
  1172.                         elseif heroCanMove() and FarmMenu.moveClear then
  1173.                             moveToCursor()
  1174.                         end
  1175.                     elseif heroCanMove() and FarmMenu.moveClear then
  1176.                             moveToCursor()
  1177.                     end
  1178.                 end
  1179.             end
  1180.         end
  1181.        
  1182.          if CustomOnTick then CustomOnTick() end
  1183. end
  1184.  
  1185. function OnProcessSpell(unit, spell)
  1186.     OrbwalkingOnProcessSpell(unit, spell)
  1187.     LastHitOnProcessSpell(unit, spell)
  1188.     if CustomOnProcessSpell then CustomOnProcessSpell(unit, spell) end
  1189.     if PluginOnProcessSpell then PluginOnProcessSpell(unit, spell) end
  1190. end
  1191.  
  1192. function OnCreateObj(obj)    
  1193.     if myHero.dead or ChampInfo == nil then return end
  1194.         if PerformanceMenu.JungleFarm then LastHitOnCreateObj(obj) end
  1195.         if CustomOnCreateObj then CustomOnCreateObj(obj) end
  1196.         if PluginOnCreateObj then PluginOnCreateObj(obj) end
  1197. end
  1198.  
  1199. function OnDeleteObj(obj)
  1200.         if PerformanceMenu.JungleFarm then LastHitOnDeleteObj(obj) end
  1201.         if CustomOnDeleteObj then CustomOnDeleteObj(obj) end
  1202.         if PluginOnDeleteObj then PluginOnDeleteObj(obj) end
  1203. end
  1204.  
  1205. function OnDraw()
  1206.         if DisplayMenu.myRange and not disableRangeDraw then
  1207.                 DrawCircle(myHero.x, myHero.y, myHero.z, getTrueRange(), 0x19A712)
  1208.         end
  1209.         DrawCircle(myHero.x, myHero.y, myHero.z, AutoCarry.MainMenu.HoldZone, 0xFFFFFF)
  1210.         OrbwalkingOnDraw()
  1211.         LastHitOnDraw()
  1212.         if CustomOnDraw then CustomOnDraw() end
  1213.         if PluginOnDraw then PluginOnDraw() end
  1214. end
  1215.  
  1216. function OnWndMsg(msg, key)
  1217.     if PluginOnWndMsg then PluginOnWndMsg(msg, key) end
  1218. end
  1219.  
  1220. --[[ Data ]]--
  1221. function getChampTable()
  1222.     return {
  1223.         Ahri         = { projSpeed = 1.6},
  1224.         Anivia       = { projSpeed = 1.05},
  1225.         Annie        = { projSpeed = 1.0},
  1226.         Ashe         = { projSpeed = 2.0},
  1227.         Brand        = { projSpeed = 1.975},
  1228.         Caitlyn      = { projSpeed = 2.5},
  1229.         Cassiopeia   = { projSpeed = 1.22},
  1230.         Corki        = { projSpeed = 2.0},
  1231.         Draven       = { projSpeed = 1.4},
  1232.         Ezreal       = { projSpeed = 2.0},
  1233.         FiddleSticks = { projSpeed = 1.75},
  1234.         Graves       = { projSpeed = 3.0},
  1235.         Heimerdinger = { projSpeed = 1.4},
  1236.         Janna        = { projSpeed = 1.2},
  1237.         Jayce        = { projSpeed = 2.2},
  1238.         Karma        = { projSpeed = 1.2},
  1239.         Karthus      = { projSpeed = 1.25},
  1240.         Kayle        = { projSpeed = 1.8},
  1241.         Kennen       = { projSpeed = 1.35},
  1242.         KogMaw       = { projSpeed = 1.8},
  1243.         Leblanc      = { projSpeed = 1.7},
  1244.         Lulu         = { projSpeed = 2.5},
  1245.         Lux          = { projSpeed = 1.55},
  1246.         Malzahar     = { projSpeed = 1.5},
  1247.         MissFortune  = { projSpeed = 2.0},
  1248.         Morgana      = { projSpeed = 1.6},
  1249.         Nidalee      = { projSpeed = 1.7},
  1250.         Orianna      = { projSpeed = 1.4},
  1251.         Quinn        = { projSpeed = 1.85},
  1252.         Ryze         = { projSpeed = 2.4},
  1253.         Sivir        = { projSpeed = 1.4},
  1254.         Sona         = { projSpeed = 1.6},
  1255.         Soraka       = { projSpeed = 1.0},
  1256.         Swain        = { projSpeed = 1.6},
  1257.         Syndra       = { projSpeed = 1.2},
  1258.         Teemo        = { projSpeed = 1.3},
  1259.         Tristana     = { projSpeed = 2.25},
  1260.         TwistedFate  = { projSpeed = 1.5},
  1261.         Twitch       = { projSpeed = 2.5},
  1262.         Urgot        = { projSpeed = 1.3},
  1263.         Vayne        = { projSpeed = 2.0},
  1264.         Varus        = { projSpeed = 2.0},
  1265.         Veigar       = { projSpeed = 1.05},
  1266.         Viktor       = { projSpeed = 2.25},
  1267.         Vladimir     = { projSpeed = 1.4},
  1268.         Xerath       = { projSpeed = 1.2},
  1269.         Ziggs        = { projSpeed = 1.5},
  1270.         Zilean       = { projSpeed = 1.25},
  1271.         Zyra         = { projSpeed = 1.7},
  1272.     }
  1273. end
  1274.  
  1275. function getSpellList()
  1276.         local spellArray = nil
  1277.         if myHero.charName == "Ezreal" then
  1278.                 spellArray = {
  1279.                 { spellKey = _Q, range = 1100, speed = 2.0, delay = 250, width = 70, configName = "mysticShot", displayName = "Q (Mystic Shot)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true },
  1280.                 { spellKey = _W, range = 1050, speed = 1.6, delay = 250, width = 90, configName = "essenceFlux", displayName = "W (Essence Flux)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true },
  1281.                 }
  1282.         elseif myHero.charName == "KogMaw" then
  1283.                 spellArray = {
  1284.                 { spellKey = _Q, range = 625, speed = 1.3, delay = 260, width = 200, configName = "causticSpittle", displayName = "Q (Caustic Spittle)", enabled = true, skillShot = false, minions = false, reset = true, reqTarget = true },
  1285.                 { spellKey = _W, range = 625, speed = 1.3, delay = 260, width = 200, configName = "bioArcaneBarrage", displayName = "W (Bio-Arcane Barrage)", enabled = true, forceRange = true, forceToHitBox = true, skillShot = false, minions = false, reset = false, reqTarget = false },
  1286.                 { spellKey = _E, range = 850, speed = 1.3, delay = 260, width = 200, configName = "voidOoze", displayName = "E (Void Ooze)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true },
  1287.                 { spellKey = _R, range = 1700, speed = math.huge, delay = 1000, width = 200, configName = "livingArtillery", displayName = "R (Living Artillery)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true },
  1288.                 }
  1289.         elseif myHero.charName == "Sivir" then
  1290.                 spellArray = {
  1291.                 { spellKey = _Q, range = 1000, speed = 1.33, delay = 250, width = 120, configName = "boomerangBlade", displayName = "Q (Boomerang Blade)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true },
  1292.                 { spellKey = _W, range = getTrueRange(), speed = 1, delay = 0, width = 200, configName = "Ricochet", displayName = "W (Ricochet)", enabled = true, skillShot = false, minions = false, reset = true, reqTarget = true },
  1293.                 }
  1294.         elseif myHero.charName == "Graves" then
  1295.                 spellArray = {
  1296.                 { spellKey = _Q, range = 750, speed = 2, delay = 250, width = 200, configName = "buckShot", displayName = "Q (Buck Shot)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true },
  1297.                 { spellKey = _W, range = 700, speed = 1400, delay = 300, width = 500, configName = "smokeScreen", displayName = "W (Smoke Screen)", enabled = false, skillShot = true, minions = false, reset = false, reqTarget = true },
  1298.                 { spellKey = _E, range = 580, speed = 1450, delay = 250, width = 200, configName = "quickDraw", displayName = "E (Quick Draw)", enabled = true, skillShot = false, minions = false, reset = true, reqTarget = false, atMouse = true },
  1299.                 }
  1300.         elseif myHero.charName == "Caitlyn" then
  1301.                 spellArray = {
  1302.                 { spellKey = _Q, range = 1300, speed = 2.1, delay = 625, width = 100, configName = "piltoverPeacemaker", displayName = "Q (Piltover Peacemaker)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true },
  1303.                 }
  1304.         elseif myHero.charName == "Corki" then
  1305.                 spellArray = {
  1306.                 { spellKey = _Q, range = 600, speed = 2, delay = 200, width = 500, configName = "phosphorusBomb", displayName = "Q (Phosphorus Bomb)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true },
  1307.                 { spellKey = _R, range = 1225, speed = 2, delay = 200, width = 50, configName = "missileBarrage", displayName = "R (Missile Barrage)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true },
  1308.                 }
  1309.         elseif myHero.charName == "Teemo" then
  1310.                 spellArray = {
  1311.                 { spellKey = _Q, range = 580, speed = 2, delay = 0, width = 200, configName = "blindingDart", displayName = "Q (Blinding Dart)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = true },
  1312.                 }
  1313.         elseif myHero.charName == "TwistedFate" then
  1314.                 spellArray = {
  1315.                 { spellKey = _Q, range = 1200, speed = 1.45, delay = 250, width = 200, configName = "wildCards", displayName = "Q (Wild Cards)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true },
  1316.                 }
  1317.         elseif myHero.charName == "Vayne" then
  1318.                 spellArray = {
  1319.                 { spellKey = _Q, range = 580, speed = 1.45, delay = 250, width = 200, configName = "tumble", displayName = "Q (Tumble)", enabled = true, skillShot = false, minions = false, reset = true, reqTarget = false, atMouse = true },
  1320.                 { spellKey = _R, range = 580, speed = 1.45, delay = 250, width = 200, configName = "finalHour", displayName = "R (Final Hour)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = false},
  1321.                 }
  1322.         elseif myHero.charName == "MissFortune" then
  1323.                 spellArray = {
  1324.                 { spellKey = _Q, range = 650, speed = 1.45, delay = 250, width = 200, configName = "doubleUp", displayName = "Q (Double Up)", enabled = true, skillShot = false, minions = false, reset = true, reqTarget = true},
  1325.                 { spellKey = _W, range = 580, speed = 1.45, delay = 250, width = 200, configName = "impureShots", displayName = "W (Impure Shots)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = false},
  1326.                 { spellKey = _E, range = 800, speed = math.huge, delay = 500, width = 500, configName = "makeItRain", displayName = "E (Make It Rain)", enabled = false, skillShot = true, minions = false, reset = false, reqTarget = true },
  1327.                 }
  1328.         elseif myHero.charName == "Tristana" then
  1329.                 spellArray = {
  1330.                 { spellKey = _Q, range = 580, speed = 1.45, delay = 250, width = 200, configName = "rapidFire", displayName = "Q (Rapid Fire)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = false},
  1331.                 { spellKey = _E, range = 550, speed = 1.45, delay = 250, width = 200, configName = "explosiveShot", displayName = "E (Explosive Shot)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = true},
  1332.                 }
  1333.         elseif myHero.charName == "Draven" then
  1334.                 spellArray = {
  1335.                 { spellKey = _E, range = 950, speed = 1.37, delay = 300, width = 130, configName = "standAside", displayName = "E (Stand Aside)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true},
  1336.                 }
  1337.         --[[    Added Champs    ]]
  1338.         elseif myHero.charName == "Kennen" then
  1339.                 spellArray = {
  1340.                 { spellKey = _Q, range = 1050, speed = 1.65, delay = 180, width = 80, configName = "thunderingShuriken", displayName = "Q (Thundering Shuriken)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true },
  1341.                 }
  1342.         elseif myHero.charName == "Ashe" then
  1343.                 spellArray = {
  1344.                 { spellKey = _W, range = 1200, speed = 2.0, delay = 120, width = 85, configName = "Volley", displayName = "W (Volley)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true },
  1345.                 }
  1346.         elseif myHero.charName == "Syndra" then
  1347.                 spellArray = {
  1348.                 { spellKey = _Q, range = 800, speed = math.huge, delay = 400, width = 100, configName = "darkSphere", displayName = "Q (Dark Sphere)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true },
  1349.                 }
  1350.         elseif myHero.charName == "Jayce" then
  1351.                 spellArray = {
  1352.                 { spellKey = _Q, range = 1600, speed = 2.0, delay = 350, width = 90, configName = "shockBlast", displayName = "Q (Shock Blast)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true },
  1353.                 }
  1354.         elseif myHero.charName == "Nidalee" then
  1355.                 spellArray = {
  1356.                 { spellKey = _Q, range = 1500, speed = 1.3, delay = 125, width = 80, configName = "javelinToss", displayName = "Q (Javelin Toss)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true },
  1357.                 }
  1358.         --[[elseif myHero.charName == "Varus" then
  1359.                 spellArray = {
  1360.                 { spellKey = _E, range = 925, speed = 1.75, delay = 240, width = 235, configName = "hailofArrows", displayName = "E (Hail of Arrows)", enabled = true, skillShot = true, minions = false, reset = false, reqTarget = true },
  1361.                 }]]
  1362.         elseif myHero.charName == "Quinn" then
  1363.                 spellArray = {
  1364.                 { spellKey = _Q, range = 1050, speed = 1.55, delay = 220, width = 90, configName = "blindingAssault", displayName = "Q (Blinding Assault)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true },
  1365.                 --{ spellKey = _E, range = 725, speed = 1.45, delay = 250, width = nil, configName = "vault", displayName = "E (Vault)", enabled = true, skillShot = false, minions = false, reset = true, reqTarget = true},
  1366.                 }
  1367.         elseif myHero.charName == "LeeSin" then
  1368.                 spellArray = {
  1369.                 { spellKey = _Q, range = 975, speed = 1.5, delay = 250, width = 70, configName = "sonicWave", displayName = "Q (Sonic Wave)", enabled = true, skillShot = true, minions = true, reset = false, reqTarget = true },
  1370.                 }
  1371.         elseif myHero.charName == "Gangplank" then
  1372.                 spellArray = {
  1373.                 { spellKey = _Q, range = 625, speed = 1.45, delay = 250, width = 200, configName = "parley", displayName = "Q (Parley)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = true},
  1374.                 }
  1375.         elseif myHero.charName == "Twitch" then
  1376.                 spellArray = {
  1377.                 { spellKey = _W, range = 950, speed = 1.75, delay = 180, width = 275, configName = "venomCask", displayName = "W (Venom Cask)", enabled = false, skillShot = true, minions = false, reset = false, reqTarget = true },
  1378.                 }
  1379.         elseif myHero.charName == "Darius" then
  1380.             spellArray = {
  1381.             { spellKey = _W, range = 300, speed = 2, delay = 0, width = 200, configName = "cripplingStrike", displayName = "W (Crippling Strike)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1382.             }  
  1383.         elseif myHero.charName == "Hecarim" then
  1384.             spellArray = {
  1385.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "rampage", displayName = "Q (Rampage)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1386.             }          
  1387.         elseif myHero.charName == "Warwick" then
  1388.             spellArray = {
  1389.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "hungeringStrike", displayName = "Q (Hungering Strike)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = true },
  1390.             }  
  1391.         elseif myHero.charName == "MonkeyKing" then
  1392.             spellArray = {
  1393.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "crushingBlow", displayName = "Q (Crushing Blow)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1394.             }      
  1395.         elseif myHero.charName == "Poppy" then
  1396.             spellArray = {
  1397.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "devastatingBlow", displayName = "Q (Devastating Blow)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1398.             }  
  1399.         elseif myHero.charName == "Talon" then
  1400.             spellArray = {
  1401.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "noxianDiplomacy", displayName = "Q (Noxian Diplomacy)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1402.             }          
  1403.         elseif myHero.charName == "Nautilus" then
  1404.             spellArray = {
  1405.             { spellKey = _W, range = 300, speed = 2, delay = 0, width = 200, configName = "titansWrath", displayName = "W (Titans Wrath)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1406.             }      
  1407.         elseif myHero.charName == "Gangplank" then
  1408.             spellArray = {
  1409.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "parlay", displayName = "Q (Parlay)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = true },
  1410.             }      
  1411.         elseif myHero.charName == "Vi" then
  1412.             spellArray = {
  1413.             { spellKey = _E, range = 300, speed = 2, delay = 0, width = 200, configName = "excessiveForce", displayName = "E (Excessive Force)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1414.             }          
  1415.         elseif myHero.charName == "Rengar" then
  1416.             spellArray = {
  1417.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "savagery", displayName = "Q (Savagery)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1418.             }          
  1419.         elseif myHero.charName == "Trundle" then
  1420.             spellArray = {
  1421.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "chomp", displayName = "Q (Chomp)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1422.             }                  
  1423.         elseif myHero.charName == "Leona" then
  1424.             spellArray = {
  1425.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "shieldOfDaybreak", displayName = "Q (Shield Of Daybreak)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1426.             }          
  1427.         elseif myHero.charName == "Fiora" then
  1428.             spellArray = {
  1429.             { spellKey = _E, range = 300, speed = 2, delay = 0, width = 200, configName = "burstOfSpeed", displayName = "E (Burst Of Speed)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1430.             }      
  1431.         elseif myHero.charName == "Blitzcrank" then
  1432.             spellArray = {
  1433.             { spellKey = _E, range = 300, speed = 2, delay = 0, width = 200, configName = "powerFist", displayName = "E (Power Fist)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1434.             }          
  1435.         elseif myHero.charName == "Shyvana" then
  1436.             spellArray = {
  1437.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "twinBlade", displayName = "Q (Twin Blade)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1438.             }          
  1439.         elseif myHero.charName == "Renekton" then
  1440.             spellArray = {
  1441.             { spellKey = _W, range = 300, speed = 2, delay = 0, width = 200, configName = "ruthless Predator", displayName = "W (Ruthless Predator)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1442.             }          
  1443.         elseif myHero.charName == "Jax" then
  1444.             spellArray = {
  1445.             { spellKey = _W, range = 300, speed = 2, delay = 0, width = 200, configName = "empower", displayName = "W (Empower)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1446.             }      
  1447.         elseif myHero.charName == "XinZhao" then
  1448.             spellArray = {
  1449.             { spellKey = _Q, range = 300, speed = 2, delay = 0, width = 200, configName = "threeTalonStrike", displayName = "Q (Three Talon Strike)", enabled = true, skillShot = false, minions = true, reset = true, reqTarget = false },
  1450.             }      
  1451.         elseif myHero.charName == "Nunu" then
  1452.             spellArray = {
  1453.             { spellKey = _E, range = GetSpellData(_E).range, speed = 1.45, delay = 250, width = 200, configName = "showball", displayName = "E (Snowball)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = true},
  1454.             }
  1455.         elseif myHero.charName == "Khazix" then
  1456.             spellArray = {
  1457.             { spellKey = _Q, range = GetSpellData(_Q).range, speed = 1.45, delay = 250, width = 200, configName = "tasteTheirFear", displayName = "Q (Taste Their Fear)", enabled = true, skillShot = false, minions = false, reset = true, reqTarget = true},
  1458.             }
  1459.         elseif myHero.charName == "Shen" then
  1460.             spellArray = {
  1461.             { spellKey = _Q, range = GetSpellData(_Q).range, speed = 1.45, delay = 250, width = 200, configName = "vorpalBlade", displayName = "Q (Vorpal Blade)", enabled = true, skillShot = false, minions = false, reset = false, reqTarget = true},
  1462.             }
  1463.         end
  1464. return spellArray
  1465. end
  1466.  
  1467. local priorityTable = {
  1468.  
  1469.     AP = {
  1470.         "Annie", "Ahri", "Akali", "Anivia", "Annie", "Brand", "Cassiopeia", "Diana", "Evelynn", "FiddleSticks", "Fizz", "Gragas", "Heimerdinger", "Karthus",
  1471.         "Kassadin", "Katarina", "Kayle", "Kennen", "Leblanc", "Lissandra", "Lux", "Malzahar", "Mordekaiser", "Morgana", "Nidalee", "Orianna",
  1472.         "Rumble", "Ryze", "Sion", "Swain", "Syndra", "Teemo", "TwistedFate", "Veigar", "Viktor", "Vladimir", "Xerath", "Ziggs", "Zyra", "MasterYi",
  1473.     },
  1474.     Support = {
  1475.         "Alistar", "Blitzcrank", "Janna", "Karma", "Leona", "Lulu", "Nami", "Nunu", "Sona", "Soraka", "Taric", "Thresh", "Zilean",
  1476.     },
  1477.  
  1478.     Tank = {
  1479.         "Amumu", "Chogath", "DrMundo", "Galio", "Hecarim", "Malphite", "Maokai", "Nasus", "Rammus", "Sejuani", "Shen", "Singed", "Skarner", "Volibear",
  1480.         "Warwick", "Yorick", "Zac",
  1481.     },
  1482.  
  1483.     AD_Carry = {
  1484.         "Ashe", "Caitlyn", "Corki", "Draven", "Ezreal", "Graves", "Jayce", "KogMaw", "MissFortune", "Pantheon", "Quinn", "Shaco", "Sivir",
  1485.         "Talon", "Tristana", "Twitch", "Urgot", "Varus", "Vayne", "Zed",
  1486.  
  1487.     },
  1488.  
  1489.     Bruiser = {
  1490.         "Darius", "Elise", "Fiora", "Gangplank", "Garen", "Irelia", "JarvanIV", "Jax", "Khazix", "LeeSin", "Nautilus", "Nocturne", "Olaf", "Poppy",
  1491.         "Renekton", "Rengar", "Riven", "Shyvana", "Trundle", "Tryndamere", "Udyr", "Vi", "MonkeyKing", "XinZhao",
  1492.     },
  1493.  
  1494. }
  1495.  
  1496. function SetPriority(table, hero, priority)
  1497.         for i=1, #table, 1 do
  1498.                 if hero.charName:find(table[i]) ~= nil then
  1499.                         TS_SetHeroPriority(priority, hero.charName)
  1500.                 end
  1501.         end
  1502. end
  1503.  
  1504. function arrangePrioritys()
  1505.         for i, enemy in ipairs(AutoCarry.EnemyTable) do
  1506.                 SetPriority(priorityTable.AD_Carry, enemy, 1)
  1507.                 SetPriority(priorityTable.AP,       enemy, 2)
  1508.                 SetPriority(priorityTable.Support,  enemy, 3)
  1509.                 SetPriority(priorityTable.Bruiser,  enemy, 4)
  1510.                 SetPriority(priorityTable.Tank,     enemy, 5)
  1511.         end
  1512. end
  1513.  
  1514. function PriorityOnLoad()
  1515.         if heroManager.iCount < 10 then
  1516.                 PrintChat(" >> Too few champions to arrange priority")
  1517.         else
  1518.                 TargetSelector(TARGET_LOW_HP_PRIORITY, 0)
  1519.                 arrangePrioritys()
  1520.         end
  1521. end
  1522.  
  1523. function getJungleMobs()
  1524.         return {"Dragon6.1.1", "Worm12.1.1", "GiantWolf8.1.3", "wolf8.1.1", "wolf8.1.2", "AncientGolem7.1.1", "YoungLizard7.1.2", "YoungLizard7.1.3", "Wraith9.1.3", "LesserWraith9.1.1", "LesserWraith9.1.2",
  1525.         "LesserWraith9.1.4", "LizardElder10.1.1", "YoungLizard10.1.2", "YoungLizard10.1.3", "Golem11.1.2", "SmallGolem11.1.1", "GiantWolf2.1.3", "wolf2.1.1",
  1526.         "wolf2.1.2", "AncientGolem1.1.1", "YoungLizard1.1.2", "YoungLizard1.1.3", "Wraith3.1.3", "LesserWraith3.1.1", "LesserWraith3.1.2", "LesserWraith3.1.4",
  1527.         "LizardElder4.1.1", "YoungLizard4.1.2", "YoungLizard4.1.3", "Golem5.1.2", "SmallGolem5.1.1"}
  1528. end
  1529.  
  1530. --[[ Menus ]]--
  1531. function setMenus()
  1532.     mainMenu()
  1533.     skillsMenu()
  1534.     itemMenu()
  1535.     displayMenu()
  1536.     permaMenu()
  1537.     masteryMenu()
  1538.     farmMenu()
  1539.     summonerMenu()
  1540.     streamingMenu()
  1541.     performanceMenu()
  1542.     pluginMenu()
  1543. end
  1544.  
  1545. function itemMenu()
  1546.     ItemMenu = scriptConfig("Sida's Auto Carry: Items", "sidasacitems")
  1547.     ItemMenu:addParam("sep", "-- Settings --", SCRIPT_PARAM_INFO, "")
  1548.     ItemMenu:addParam("UseItemsAC", "Use Items With AutoCarry", SCRIPT_PARAM_ONOFF, true)
  1549.     ItemMenu:addParam("UseItemsLastHit", "Use Items With Harass", SCRIPT_PARAM_ONOFF, true)
  1550.     ItemMenu:addParam("UseItemsMixed", "Use Items With Mixed Mode", SCRIPT_PARAM_ONOFF, true)
  1551.     ItemMenu:addParam("sep2", "-- Items --", SCRIPT_PARAM_INFO, "")
  1552.     for _, item in ipairs(items) do
  1553.             ItemMenu:addParam(item.menu, "Use "..item.name, SCRIPT_PARAM_ONOFF, true)
  1554.     end
  1555.     ItemMenu:addParam("muraMana", "Use Muramana", SCRIPT_PARAM_ONOFF, true)
  1556. end
  1557.  
  1558. function mainMenu()
  1559.     AutoCarry.MainMenu = scriptConfig("Sida's Auto Carry: Settings", "sidasacmain")
  1560.     AutoCarry.MainMenu:addParam("AutoCarry", "Auto Carry", SCRIPT_PARAM_ONKEYDOWN, false, AutoCarryKey)
  1561.     AutoCarry.MainMenu:addParam("LastHit", "Last Hit", SCRIPT_PARAM_ONKEYDOWN, false, LastHitKey)
  1562.     AutoCarry.MainMenu:addParam("MixedMode", "Mixed Mode", SCRIPT_PARAM_ONKEYDOWN, false, MixedModeKey)
  1563.     AutoCarry.MainMenu:addParam("LaneClear", "Lane Clear", SCRIPT_PARAM_ONKEYDOWN, false, LaneClearKey)
  1564.     AutoCarry.MainMenu:addParam("Focused", "Prioritise Selected Target", SCRIPT_PARAM_ONOFF, false)
  1565.     AutoCarry.MainMenu:addParam("HoldZone", "Stand Still And Shoot Range", SCRIPT_PARAM_SLICE, 0, 0, getTrueRange(), 0)
  1566.     AutoCarry.MainMenu:addTS(AutoCarry.Orbwalker)
  1567. end
  1568.  
  1569. function skillsMenu()
  1570.     SkillsMenu = scriptConfig("Sida's Auto Carry: Skills", "sidasacskills")
  1571.     if Skills then
  1572.         SkillsMenu:addParam("sep", "-- Auto Carry Skills --", SCRIPT_PARAM_INFO, "")
  1573.         for _, skill in ipairs(Skills) do
  1574.             SkillsMenu:addParam(skill.configName.."AutoCarry", "Use "..skill.displayName, SCRIPT_PARAM_ONOFF, true)
  1575.         end
  1576.         SkillsMenu:addParam("sep2", "-- Mixed Mode Skills --", SCRIPT_PARAM_INFO, "")
  1577.         for _, skill in ipairs(Skills) do
  1578.             SkillsMenu:addParam(skill.configName.."MixedMode", "Use "..skill.displayName, SCRIPT_PARAM_ONOFF, true)
  1579.         end
  1580.     else
  1581.         SkillsMenu:addParam("sep", myHero.charName.." does not have any supported skills", SCRIPT_PARAM_INFO, "")
  1582.     end
  1583.     if VIP_USER then
  1584.         SkillsMenu:addParam("hitChance", "Ability Hitchance", SCRIPT_PARAM_SLICE, 60, 0, 100, 0)
  1585.     end
  1586. end
  1587.  
  1588. function displayMenu()
  1589.     DisplayMenu = scriptConfig("Sida's Auto Carry: Display", "sidasacdisplay")
  1590.     DisplayMenu:addParam("myRange", "Attack Range Circle", SCRIPT_PARAM_ONOFF, true)
  1591.     DisplayMenu:addParam("target", "Circle Around Target", SCRIPT_PARAM_ONOFF, true)
  1592.     DisplayMenu:addParam("minion", "Circle Next Minion To Last Hit", SCRIPT_PARAM_ONOFF, true)
  1593.     DisplayMenu:addParam("sep", "-- Always Display (Requires Reload) --", SCRIPT_PARAM_INFO, "")
  1594.     DisplayMenu:addParam("AutoCarry", "Auto Carry Hotkey Status", SCRIPT_PARAM_ONOFF, true)
  1595.     DisplayMenu:addParam("LastHit", "Last Hit Hotkey Status", SCRIPT_PARAM_ONOFF, true)
  1596.     DisplayMenu:addParam("MixedMode", "Mixed Mode Hotkey Status", SCRIPT_PARAM_ONOFF, true)
  1597.     DisplayMenu:addParam("LaneClear", "Lane Clear Hotkey Status", SCRIPT_PARAM_ONOFF, true)
  1598. end
  1599.  
  1600. function permaMenu()
  1601.     if DisplayMenu.AutoCarry then AutoCarry.MainMenu:permaShow("AutoCarry") end
  1602.     if DisplayMenu.LastHit then AutoCarry.MainMenu:permaShow("LastHit") end
  1603.     if DisplayMenu.MixedMode then AutoCarry.MainMenu:permaShow("MixedMode") end
  1604.     if DisplayMenu.LaneClear then AutoCarry.MainMenu:permaShow("LaneClear") end
  1605. end
  1606.  
  1607. function masteryMenu()
  1608.     MasteryMenu = scriptConfig("Sida's Auto Carry: Masteries", "sidasacmasteries")
  1609.     MasteryMenu:addParam("Butcher", "Butcher", SCRIPT_PARAM_SLICE, 0, 0, 2, 0)
  1610.     MasteryMenu:addParam("Spellblade", "Spellblade", SCRIPT_PARAM_ONOFF, false)
  1611.     MasteryMenu:addParam("Executioner", "Executioner", SCRIPT_PARAM_ONOFF, false)
  1612. end
  1613.  
  1614. function farmMenu()
  1615.     FarmMenu = scriptConfig("Sida's Auto Carry: Farming", "sidasacfarming")
  1616.     FarmMenu:addParam("Predict", "Predict Minion Damage", SCRIPT_PARAM_ONOFF, true)
  1617.     FarmMenu:addParam("moveLastHit", "Move To Mouse Last Hit Farming", SCRIPT_PARAM_ONOFF, true)
  1618.     FarmMenu:addParam("moveMixed", "Move To Mouse Mixed Mode Farming", SCRIPT_PARAM_ONOFF, true)
  1619.     FarmMenu:addParam("moveClear", "Move To Mouse Lane Clear Farming", SCRIPT_PARAM_ONOFF, true)
  1620. end
  1621.  
  1622. function summonerMenu()
  1623.     SummonerMenu = scriptConfig("Sida's Auto Carry: Summoner Spells", "sidasacsummoner")
  1624.     SummonerMenu:addParam("Ignite", "Ignite Killable Enemies", SCRIPT_PARAM_ONOFF, true)
  1625.     SummonerMenu:addParam("Barrier", "Auto Barrier Upon High Damage", SCRIPT_PARAM_ONOFF, true)
  1626. end
  1627.  
  1628. function streamingMenu()
  1629.     StreamingMenu = scriptConfig("Sida's Auto Carry: Streaming", "sidasacstreaming")
  1630.     StreamingMenu:addParam("ShowClick", "Show Click Marker", SCRIPT_PARAM_ONOFF, true)
  1631.     StreamingMenu:addParam("MinRand", "Minimum Time Between Clicks", SCRIPT_PARAM_SLICE, 150, 0, 1000, 0)
  1632.     StreamingMenu:addParam("MaxRand", "Maximum Time Between Clicks", SCRIPT_PARAM_SLICE, 650, 0, 1000, 0)
  1633.     StreamingMenu:addParam("Colour", "0 = Green, 1 = Red", SCRIPT_PARAM_SLICE, 0, 0, 1, 0)
  1634.     StreamingMenu:addParam("DisableDrawing", "Streaming Mode", SCRIPT_PARAM_ONOFF, true)
  1635. end
  1636.  
  1637. function performanceMenu()
  1638.     PerformanceMenu = scriptConfig("Sida's Auto Carry: Performance", "sidasacperformance")
  1639.     PerformanceMenu:addParam("sep", "-- Can Cause FPS Lag! --", SCRIPT_PARAM_INFO, "")
  1640.     PerformanceMenu:addParam("VipCol", "Use VIP Collision (Requires Reload!)", SCRIPT_PARAM_ONOFF, false)
  1641.     PerformanceMenu:addParam("JungleFarm", "Enable Jungle Clearing", SCRIPT_PARAM_ONOFF, false)
  1642. end
  1643.  
  1644. function pluginMenu()
  1645.     if hasPlugin then
  1646.         AutoCarry.PluginMenu = scriptConfig("Sida's Auto Carry: "..myHero.charName.." Plugin", "sidasacplugin"..myHero.charName)
  1647.         require("SidasAutoCarryPlugin - "..myHero.charName)
  1648.         PrintChat(">> Sida's Auto Carry: Loaded "..myHero.charName.." plugin!")
  1649.     end
  1650. end
Advertisement
Add Comment
Please, Sign In to add comment