naturus

Untitled

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