Kain2030

Sida's Auto Carry - Revamped - 4.4 - VIP Collision Edition

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