Kain2030

Sida's Auto Carry-Rev-4.4: VIP Collision Edition + Jungle

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