Guest User

Whoop Whoop Ultimate Glory Ryze back with 3.71 :)

a guest
Mar 28th, 2013
1,229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- #################################################################################################
  2. -- ##                                                                                             ##
  3. -- ##                     Glory Ryze Script                                                       ##
  4. -- ##                                Version 3.71 final                                           ##
  5. -- ##                                         based of Ultimate Ryze by bnsfg                     ##
  6. -- ##                                                                                             ##
  7. -- ##                            Completely Rewritten by Wursti                                   ##
  8. -- ##                                                                                             ##
  9. -- #################################################################################################
  10.  
  11. -- #################################################################################################
  12. -- ##                               Main Features & Changelog                                     ##
  13. -- #################################################################################################
  14. -- ## 2.0 - First Rewritten Release                                                               ##
  15. -- ## 2.1 - New Long Combo                                                                        ##
  16. -- ##     - Cage fleeing Enemies                                                                  ##
  17. -- ## 2.2 - New Harass (Auto Q Enemy in Range)                                                    ##
  18. -- ##     - Combo Switcher (Burst > Long                                                          ##
  19. -- ## 2.3 - Auto AA Farm                                                                          ##
  20. -- ## 2.4 - Fixed Bugs + Siege and Super Minion W and Q Farm if Q Framing Enabled                 ##
  21. -- ## 2.41- Fixed Critical Typo                                                                   ##
  22. -- ## 2.42- AA Farm was Toggle should be Hotkey so fixed as Hotkey                                ##
  23. -- ## 2.43- Fixed Bug that Siege Minion caused Auto Q stop working for smaller Minions            ##
  24. -- ## 2.44- Mouse Follow Toggle                                                                   ##
  25. -- ## 2.5 - Auto Cage if Enemy under Tower Harass (Many Thx at vadash)                            ##
  26. -- ## 2.6 - W Cage Only Nearest Champion  (Thx at Trus for findClosestEnemy)                      ##
  27. -- ## 2.7 - Improved OnDraw (Show Killable-Text even with Circles Disabled)                       ##
  28. -- ##     - New Menu "Ryze Combo Config" En- and Disable all PermaShow Info (Need Reload F9)      ##
  29. -- ## 3.0 - Power Farmer:                                                                         ##
  30. -- ##     - Combo Jungle Creeps if no Target is around (Thx at AutoSmite by eXtragoZ)             ##
  31. -- ##       Q - R(if Activated in Settings) - Q - W - Q - E - Q and so on...                      ##
  32. -- ##     - Fixed a possible Bug in Long Combo                                                    ##
  33. -- ##     - Redesigned Settings Menu for some Cleanup                                             ##
  34. -- ## 3.1 - New Item Support (DFG,HXG,BWC) and Ignite Support (Thx at Burn)                       ##
  35. -- ## 3.2 - Improved Tower Caging (Cage if Enemy casts against you in Tower Range -> No flee)     ##
  36. -- ## 3.3 - New Steal Objectives Mode                                                             ##
  37. -- ## 3.4 - Multiple Changes at Combos                                                            ##
  38. -- ## 3.5 - Jungle Creeps Combo now a Hotkey                                                      ##
  39. -- ##     - Added small Camps to Combo                                                            ##
  40. -- ##     - New Follow Cursor Modes:                                                              ##
  41. -- ##                                - Follow Cursor if Combo Key pressed                         ##
  42. -- ##                                - Follow Cursor if Spell is Casted                           ##
  43. -- ## 3.6 - Auto Muramana Toggle :)                                                               ##
  44. -- ## 3.61- Bugfixed!                                                                             ##
  45. -- ## 3.7 - I hope this Relese fixed the non Save of Settings                                     ##
  46. -- ## 3.71- Use Ultimate in Jungle Combo is a Key Toggle again (L by default)                     ##
  47. -- #################################################################################################
  48.  
  49. -- #################################################################################################
  50. -- ## TODO:                                                                                       ##
  51. -- #################################################################################################
  52.  
  53. -- #################################################################################################
  54. -- ## Please Send me your Feedback so I can improve this Script further :)                        ##
  55. -- #################################################################################################
  56.  
  57.  
  58. if GetMyHero().charName ~= "Ryze" then return end
  59.  
  60. qRange = 650
  61. wRange = 625
  62. eRange = 675 -- Real range is 675
  63. rRange = 200 -- Range of your ulti AOE
  64. AARange = 550
  65. JungleRange = 1000
  66. turretRange = 950
  67. local waittxt = {}
  68. local calculationenemy = 1
  69. local tick = nil
  70. killable = {}
  71. turrets = {}
  72. qcasted = true
  73. waitDelay = 400
  74. nextTick = 0
  75. CageTurret = nil
  76. Switch = false
  77. targeting = false
  78. local ignite = nil
  79. local DFGSlot, HXGSlot, BWCSlot = nil, nil, nil
  80. local DFGREADY, HXGREADY, BWCREADY, IREADY = false, false, false, false
  81. local floattext = {"Cooldown!","Murder him!"}
  82.  
  83. function OnLoad()
  84.     lastcast = _R
  85.     RyzeConfig = scriptConfig("Ryze Combo", "Ryze_Config")
  86.     RyzeConfigConfig = scriptConfig("Ryze Combo Visual Config", "Ryze_Config_Config")
  87.     RyzeSettings = scriptConfig("Ryze Combo Settings", "Ryze_Settings")
  88.     RyzeConfig:addParam("BurstActive", "Burst Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  89.     RyzeConfig:addParam("LongActive", "Long Combo", SCRIPT_PARAM_ONKEYDOWN, false, 88)
  90.     RyzeConfig:addParam("Ignite", "Ignite if Killable", SCRIPT_PARAM_ONKEYTOGGLE, true, 79)
  91.     RyzeConfig:addParam("JungleActive", "Jungle Creeps Combo", SCRIPT_PARAM_ONKEYDOWN, false, 66)
  92.     RyzeConfig:addParam("useUlti", "Use ultimate in combos", SCRIPT_PARAM_ONOFF, true)
  93.     RyzeConfig:addParam("useUltiJungle", "Use ultimate in Jungle combos", SCRIPT_PARAM_ONKEYDOWN, true, 76)
  94.     RyzeConfig:addParam("useMura", "Auto use Muramana if Champs around", SCRIPT_PARAM_ONOFF, true)
  95.     RyzeSettings:addParam("minMuraMana", "Min Mana Muramana", SCRIPT_PARAM_SLICE, 25, 0, 100, 2)
  96.     RyzeConfig:addParam("cageW", "Cage Enemy unter Tower Harass", SCRIPT_PARAM_ONKEYTOGGLE, true, 85)
  97.     RyzeConfig:addParam("autoQFarm", "Auto Q Farm", SCRIPT_PARAM_ONKEYTOGGLE, false, 84)
  98.     RyzeConfig:addParam("PowerFarm", "Power Farm", SCRIPT_PARAM_ONKEYTOGGLE, false, 73)
  99.     RyzeConfig:addParam("autoAAFarm", "Auto AA Farm", SCRIPT_PARAM_ONKEYDOWN, false, 220)
  100.     RyzeSettings:addParam("autoAAFollow", "Auto AA Follow Cursor Toggle", SCRIPT_PARAM_ONOFF, true)
  101.     RyzeSettings:addParam("autoMouseFollow", "Go to Cursor at Spell Cast", SCRIPT_PARAM_ONOFF, false)
  102.     RyzeSettings:addParam("autoComboFollow", "Auto Follow Cursor if Combo Key pressed", SCRIPT_PARAM_ONOFF, true)
  103.     RyzeConfig:addParam("autoQToggle", "Auto Q Harass (Toggle)", SCRIPT_PARAM_ONKEYTOGGLE, false, 90)
  104.     RyzeConfig:addParam("autoQHarass", "Auto Q Harass (Hotkey)", SCRIPT_PARAM_ONKEYDOWN, false, 65)
  105.     RyzeSettings:addParam("qMinMana", "Auto Q Farm min mana %",  SCRIPT_PARAM_SLICE, 50, 0, 100, 2)
  106.     RyzeSettings:addParam("qMinManaHarass", "Auto Q Harass min mana %", SCRIPT_PARAM_SLICE, 50, 0, 100, 2)
  107.     RyzeSettings:addParam("PowerMinMana", "Power Farm min mana %", SCRIPT_PARAM_SLICE, 50, 0, 100, 2)
  108.     RyzeConfig:addParam("CageHunter", "Cage nearest Enemy Champion", SCRIPT_PARAM_ONKEYDOWN, false, 67)
  109.     RyzeSettings:addParam("whunt", "First cage with W range", SCRIPT_PARAM_SLICE, 550, 0, 625, 0)
  110.     RyzeSettings:addParam("wflee", "First cage in Long Combo if fleeing", SCRIPT_PARAM_SLICE, 550, 0, 625, 0)
  111.     RyzeSettings:addParam("winsta", "Cage without waiting on Q if fleeing", SCRIPT_PARAM_ONKEYTOGGLE, true, 77)
  112.     RyzeSettings:addParam("ComboSwitch", "Switch Combo",    SCRIPT_PARAM_ONKEYTOGGLE, true, 78)
  113.     RyzeSettings:addParam("minCDRnew", "CDR % to switch Combo", SCRIPT_PARAM_SLICE, 35, 0, 40, 0)
  114.     RyzeConfigConfig:addParam("BurstActiveshow", "Show: Burst Combo", SCRIPT_PARAM_ONOFF, true)
  115.     RyzeConfigConfig:addParam("LongActiveshow", "Show: Long Combo", SCRIPT_PARAM_ONOFF, true)
  116.     RyzeConfigConfig:addParam("useUltishow", "Show: Use ultimate in combos", SCRIPT_PARAM_ONOFF, true)
  117.     RyzeConfigConfig:addParam("cageWshow", "Show: Cage Enemy unter Tower Harass", SCRIPT_PARAM_ONOFF, true)
  118.     RyzeConfigConfig:addParam("CageHuntershow", "Show: Cage nearest Enemy Champion", SCRIPT_PARAM_ONOFF, true)
  119.     RyzeConfigConfig:addParam("winstashow", "Show: Cage without waiting on Q if fleeing", SCRIPT_PARAM_ONOFF, true)
  120.     RyzeConfigConfig:addParam("autoQFarmshow", "Show: Auto Q Farm", SCRIPT_PARAM_ONOFF, true)
  121.     RyzeConfigConfig:addParam("PowerFarmshow", "Show: Power Farm", SCRIPT_PARAM_ONOFF, true)
  122.     RyzeConfigConfig:addParam("autoAAFarmshow", "Show: autoAAFarm", SCRIPT_PARAM_ONOFF, true)
  123.     RyzeConfigConfig:addParam("autoQToggleshow", "Show: Auto Q Harass (Toggle)", SCRIPT_PARAM_ONOFF, true)
  124.     RyzeConfigConfig:addParam("autoQHarassshow", "Show: Auto Q Harass (Hotkey)", SCRIPT_PARAM_ONOFF, true)
  125.     RyzeConfigConfig:addParam("ComboSwitchshow", "Show: Switch Combo", SCRIPT_PARAM_ONOFF, true)
  126.     RyzeConfigConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
  127.     if RyzeConfigConfig.BurstActiveshow then RyzeConfig:permaShow("BurstActive") end
  128.     if RyzeConfigConfig.LongActiveshow then RyzeConfig:permaShow("LongActive") end
  129.     if RyzeConfigConfig.useUltishow then RyzeConfig:permaShow("useUlti") end
  130.     if RyzeConfigConfig.cageWshow then RyzeConfig:permaShow("cageW") end
  131.     if RyzeConfigConfig.CageHuntershow then RyzeConfig:permaShow("CageHunter") end
  132.     if RyzeConfigConfig.winstashow then RyzeSettings:permaShow("winsta") end
  133.     if RyzeConfigConfig.autoQFarmshow then RyzeConfig:permaShow("autoQFarm") end
  134.     if RyzeConfigConfig.PowerFarmshow then RyzeConfig:permaShow("PowerFarm") end
  135.     if RyzeConfigConfig.autoAAFarmshow then RyzeConfig:permaShow("autoAAFarm") end
  136.     if RyzeConfigConfig.autoQToggleshow then RyzeConfig:permaShow("autoQToggle") end
  137.     if RyzeConfigConfig.autoQHarassshow then RyzeConfig:permaShow("autoQHarass") end
  138.     if RyzeConfigConfig.ComboSwitchshow then RyzeSettings:permaShow("ComboSwitch") end
  139.     PrintChat ("Glory Ryze 3.71 final by Wursti loaded! Original scripts by bnsfg and TRUS.")
  140.     PrintChat ("Report Bugs and give Feedback Please :) THX!!")
  141.     ts = TargetSelector(TARGET_LOW_HP,qRange,DAMAGE_MAGIC,false)
  142.     ts.name = "Ryze"
  143.     ASLoadMinions()
  144.     RyzeConfig:addTS(ts)
  145.     for i=1, heroManager.iCount do waittxt[i] = i*3 end
  146.     enemyMinions = minionManager(MINION_ENEMY, qRange, player, MINION_SORT_HEALTH_ASC)
  147.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then
  148.         ignite = SUMMONER_1
  149.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then
  150.         ignite = SUMMONER_2
  151.     end
  152.     for i = 1, objManager.maxObjects do
  153.         local object = objManager:getObject(i)
  154.         if object ~= nil and object.type == "obj_AI_Turret" then
  155.             local turretName = object.name
  156.             turrets[turretName] =
  157.             {
  158.                 object = object,
  159.                 team = object.team,
  160.                 range = turretRange,
  161.                 x = object.x,
  162.                 y = object.y,
  163.                 z = object.z,
  164.                 active = false,
  165.             }
  166.         end
  167.     end
  168. end
  169.  
  170.  
  171. function doSpell(ts, spell, range)
  172.     if ts.target ~= nil and GetMyHero():CanUseSpell(spell) == READY and GetDistance(ts.target)<=range then
  173.         CastSpell(spell, ts.target)
  174.     end
  175. end
  176.  
  177. function findClosestEnemy()
  178. local closestEnemy = nil
  179. local currentEnemy = nil
  180. for i=1, heroManager.iCount do
  181.     currentEnemy = heroManager:GetHero(i)
  182.     if currentEnemy.team ~= myHero.team and not currentEnemy.dead and currentEnemy.visible then
  183.         if closestEnemy == nil then
  184.             closestEnemy = currentEnemy
  185.         elseif GetDistance(currentEnemy) < GetDistance(closestEnemy) then
  186.             closestEnemy = currentEnemy
  187.         end
  188.     end
  189. end
  190. return closestEnemy
  191. end
  192.  
  193. function OnDraw()
  194.     if myHero.dead then return end  
  195.     if RyzeConfig.LongActive then DrawCircle(myHero.x, myHero.y, myHero.z, RyzeSettings.wflee, 0xFFFF0000) end
  196.     if RyzeConfigConfig.drawcircles and not myHero.dead then
  197.         if QREADY then DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x19A712)
  198.         else DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x992D3D) end
  199.         if WREADY then DrawCircle(myHero.x, myHero.y, myHero.z, wRange, 0x19A712)
  200.         else DrawCircle(myHero.x, myHero.y, myHero.z, wRange, 0x992D3D) end
  201.         if EREADY then DrawCircle(myHero.x, myHero.y, myHero.z, eRange, 0x19A712)
  202.         else DrawCircle(myHero.x, myHero.y, myHero.z, eRange, 0x992D3D) end
  203.     end
  204.     for i=1, heroManager.iCount do
  205.         local enemydraw = heroManager:GetHero(i)
  206.         if ValidTarget(enemydraw) then
  207.             if RyzeConfigConfig.drawcircles then
  208.                 if killable[i] == 1 then
  209.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80, 0x0000FF)
  210.                 elseif killable[i] == 2 then
  211.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80, 0xFF0000)
  212.                 end
  213.                 if waittxt[i] == 1 and killable[i] ~= 0 then
  214.                     PrintFloatText(enemydraw,0,floattext[killable[i]])
  215.                 end
  216.                 if waittxt[i] == 1 then
  217.                     waittxt[i] = 30
  218.                 else waittxt[i] = waittxt[i]-1
  219.                 end
  220.             end
  221.         end
  222.     end
  223.     if RyzeConfigConfig.drawcircles and ValidTarget(ts.target) then
  224.         DrawCircle(ts.target.x, ts.target.y, ts.target.z, 100, 0xFF80FF00)
  225.     end
  226.     if MonsterTarget ~= nil and ValidTarget(MonsterTarget) then
  227.         if RyzeConfigConfig.drawcircles then DrawCircle(MonsterTarget.x, MonsterTarget.y, MonsterTarget.z, 100, 0xFF80FF00) end
  228.         if MonsterKillable == true and RyzeConfigConfig.drawcircles then
  229.             DrawCircle(MonsterTarget.x, MonsterTarget.y, MonsterTarget.z, 150, 0xFF0000)
  230.             DrawCircle(MonsterTarget.x, MonsterTarget.y, MonsterTarget.z, 160, 0xFF0000)
  231.             DrawCircle(MonsterTarget.x, MonsterTarget.y, MonsterTarget.z, 170, 0xFF0000)
  232.         end
  233.     end
  234. end
  235.  
  236.  
  237. function RyzeDmg()
  238.     local enemy = heroManager:GetHero(calculationenemy)
  239.     if ValidTarget(enemy) then
  240.         local qdamage = getDmg("Q",enemy,myHero) --Normal
  241.         local wdamage = getDmg("W",enemy,myHero)
  242.         local edamage = getDmg("E",enemy,myHero)
  243.         local hitdamage = getDmg("AD",enemy,myHero)
  244.         local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0)
  245.         local hxgdamage = (HXGSlot and getDmg("HXG",enemy,myHero) or 0)
  246.         local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0)
  247.         local brkdamage = (BRKREADY and getDmg("RUINEDKING",enemy,myHero,2) or 0)
  248.         local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
  249.         local onhitdmg = (SheenSlot and getDmg("SHEEN",enemy,myHero) or 0)+(TrinitySlot and getDmg("TRINITY",enemy,myHero) or 0)+(LBSlot and getDmg("LICHBANE",enemy,myHero) or 0)+(IcebornSlot and getDmg("ICEBORN",enemy,myHero) or 0)
  250.         local onspelldamage = (LTSlot and getDmg("LIANDRYS",enemy,myHero) or 0)+(BTSlot and getDmg("BLACKFIRE",enemy,myHero) or 0)
  251.         local combo1 = qdamage + qdamage + wdamage + edamage + onhitdmg + onspelldamage
  252.         local combo2 = 0
  253.         if myHero:CanUseSpell(_Q) == READY then
  254.             combo2 = qdamage + combo2
  255.         end
  256.         if myHero:CanUseSpell(_E) == READY then
  257.             combo2 = edamage + combo2
  258.         end
  259.         if myHero:CanUseSpell(_W) then
  260.             combo2 = wdamage + combo2
  261.         end
  262.         if myHero:CanUseSpell(_Q) and myHero:CanUseSpell(_E) and myHero:CanUseSpell(_W) == READY then
  263.             combo2 = qdamage + combo2
  264.         end
  265.         if myHero:CanUseSpell(_Q) or myHero:CanUseSpell(_E) or myHero:CanUseSpell(_W) == READY then
  266.             combo2 = combo2 + onhitdmg + onspelldamage
  267.         end
  268.         if DFGREADY then
  269.             combo1 = combo1 + dfgdamage
  270.             combo2 = combo2 + dfgdamage
  271.         end
  272.         if HXGREADY then              
  273.             combo1 = combo1 + hxgdamage*(DFGREADY and 1.2 or 1)
  274.             combo2 = combo2 + hxgdamage*(DFGREADY and 1.2 or 1)
  275.         end
  276.         if BWCREADY then
  277.             combo1 = combo1 + bwcdamage*(DFGREADY and 1.2 or 1)
  278.             combo2 = combo2 + bwcdamage*(DFGREADY and 1.2 or 1)
  279.         end
  280.         if BRKREADY then
  281.             combo1 = combo1 + brkdamage
  282.             combo2 = combo2 + brkdamage
  283.         end
  284.         if IREADY then
  285.             combo1 = combo1 + ignitedamage
  286.             combo2 = combo2 + ignitedamage
  287.         end
  288.         if combo2 >= enemy.health then killable[calculationenemy] = 2
  289.         elseif combo1 >= enemy.health then killable[calculationenemy] = 1
  290.         else killable[calculationenemy] = 0
  291.         end
  292.     end
  293.     if calculationenemy == 1 then
  294.         calculationenemy = heroManager.iCount
  295.     else
  296.         calculationenemy = calculationenemy-1
  297.     end
  298. end
  299.  
  300. function OnTick()
  301. checkTurretState()
  302. ts:update()
  303. enemyMinions:update()
  304. if tick == nil or GetTickCount()-tick >= 100 then
  305.     tick = GetTickCount()
  306.     RyzeDmg()
  307.     RyzeItem()
  308. end
  309. if math.abs(myHero.cdr*100) >= RyzeSettings.minCDRnew and RyzeSettings.ComboSwitch then
  310.     Switch = true
  311. else
  312.     Switch = false
  313. end
  314. CageTurret = findClosestTurret()
  315. if myHero:GetDistance(CageTurret.object) <= 1250 and CageTurret.team == player.team then
  316.     InTurretRange = true
  317. else
  318.     InTurretRange = false
  319. end
  320. if not myHero.dead then
  321.     if RyzeConfig.useMura then
  322.         MuramanaToggle(1000, ((player.mana / player.maxMana) > (RyzeSettings.minMuraMana / 100)))
  323.     end
  324.     if RyzeConfig.BurstActive and ValidTarget(ts.target) and Switch == false then
  325.         if DFGREADY then
  326.             CastSpell(DFGSlot, ts.target)
  327.         end
  328.         if HXGREADY then
  329.             CastSpell(HXGSlot, ts.target)
  330.         end
  331.         if BWCREADY then
  332.             CastSpell(BWCSlot, ts.target)
  333.         end
  334.         if myHero:CanUseSpell(_W) == READY and myHero:GetDistance(ts.target) > RyzeSettings.whunt then
  335.             doSpell(ts, _W, wRange)
  336.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  337.         elseif myHero:CanUseSpell(_Q) == READY and myHero:GetDistance(ts.target) <= RyzeSettings.whunt then
  338.             doSpell(ts, _Q, qRange)
  339.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  340.             if RyzeConfig.useUlti and myHero:CanUseSpell(_R) == READY then
  341.                 CastSpell(_R)
  342.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  343.             end
  344.         elseif myHero:CanUseSpell(_Q) == READY then
  345.             doSpell(ts, _Q, qRange)
  346.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  347.         elseif RyzeConfig.useUlti and myHero:CanUseSpell(_R) == READY then
  348.             CastSpell(_R)
  349.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  350.         elseif myHero:CanUseSpell(_E) == READY then
  351.             doSpell(ts, _E, wRange)
  352.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  353.         elseif myHero:CanUseSpell(_W) == READY then
  354.             doSpell(ts, _W, eRange)
  355.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  356.         end
  357.     elseif (RyzeConfig.LongActive or (Switch and RyzeConfig.BurstActive)) and ValidTarget(ts.target) then
  358.         if DFGREADY then
  359.             CastSpell(DFGSlot, ts.target)
  360.         end
  361.         if HXGREADY then
  362.             CastSpell(HXGSlot, ts.target)
  363.         end
  364.         if BWCREADY then
  365.             CastSpell(BWCSlot, ts.target)
  366.         end
  367.         if myHero:CanUseSpell(_Q) == READY and myHero:GetDistance(ts.target) <= RyzeSettings.whunt then
  368.             doSpell(ts, _Q, qRange)
  369.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  370.             qcasted = true
  371.             if RyzeConfig.useUlti and myHero:CanUseSpell(_R) == READY and qcasted == true and myHero:CanUseSpell(_Q) == COOLDOWN then
  372.                 CastSpell(_R)
  373.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  374.                 qcasted = false
  375.             end
  376.         elseif myHero:CanUseSpell(_W) == READY and myHero:GetDistance(ts.target) > RyzeSettings.whunt then
  377.             doSpell(ts, _W, wRange)
  378.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  379.             qcasted = false
  380.             if myHero:CanUseSpell(_Q) == READY then
  381.                 doSpell(ts, _Q, qRange)
  382.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  383.                 qcasted = true
  384.             end
  385.         elseif myHero:CanUseSpell(_Q) == READY then
  386.             doSpell(ts, _Q, qRange)
  387.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  388.             qcasted = true
  389.         elseif RyzeConfig.useUlti and myHero:CanUseSpell(_R) == READY and qcasted == true and myHero:CanUseSpell(_Q) == COOLDOWN then
  390.             CastSpell(_R)
  391.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  392.             qcasted = false
  393.         elseif myHero:CanUseSpell(_W) == READY and ((qcasted == true and myHero:CanUseSpell(_Q) == COOLDOWN and myHero:GetDistance(ts.target) >= RyzeSettings.wflee) or (RyzeSettings.winsta == true and myHero:GetDistance(ts.target) >= RyzeSettings.wflee)) then
  394.             doSpell(ts, _W, wRange)
  395.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  396.             qcasted = false
  397.         elseif myHero:CanUseSpell(_E) == READY and qcasted == true and myHero:CanUseSpell(_Q) == COOLDOWN then
  398.             doSpell(ts, _E, wRange)
  399.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  400.             qcasted = false
  401.         elseif myHero:CanUseSpell(_W) == READY and qcasted == true and myHero:CanUseSpell(_Q) == COOLDOWN then
  402.             doSpell(ts, _W, wRange)
  403.             if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  404.             qcasted = false
  405.         end
  406.     elseif RyzeConfig.JungleActive then
  407.         closest = findClosestEnemy()
  408.         if ValidTarget(closest) then
  409.             if myHero:GetDistance(closest) > JungleRange then
  410.                 SaveJungle = true
  411.             end
  412.         elseif closest == nil then
  413.             SaveJungle = true
  414.         else
  415.             SaveJungle = false
  416.         end
  417.         if ValidTarget(MonsterTarget) then
  418.             if myHero:GetDistance(MonsterTarget) > eRange then
  419.                 MiniMonster = false
  420.                 CheckMonster(Vilemaw)
  421.                 CheckMonster(Nashor)
  422.                 CheckMonster(Dragon)
  423.                 CheckMonster(Golem1)
  424.                 CheckMonster(Golem2)
  425.                 CheckMonster(Lizard1)
  426.                 CheckMonster(Lizard2)
  427.             end
  428.         else
  429.             MiniMonster = false
  430.             CheckMonster(Vilemaw)
  431.             CheckMonster(Nashor)
  432.             CheckMonster(Dragon)
  433.             CheckMonster(Golem1)
  434.             CheckMonster(Golem2)
  435.             CheckMonster(Lizard1)
  436.             CheckMonster(Lizard2)
  437.         end
  438.         if SaveJungle == true and MiniMonster == false and targeting == true then
  439.             if myHero:CanUseSpell(_Q) == READY and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=qRange then
  440.                 CastSpell(_Q, MonsterTarget)
  441.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  442.                 qcasted = true
  443.             elseif RyzeConfig.useUltiJungle and myHero:CanUseSpell(_R) == READY and qcasted == true and myHero:CanUseSpell(_Q) == COOLDOWN and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=qRange then
  444.                 CastSpell(_R)
  445.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  446.                 qcasted = false
  447.             elseif myHero:CanUseSpell(_E) == READY and qcasted == true and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=eRange then
  448.                 CastSpell(_E, MonsterTarget)
  449.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  450.                 qcasted = false
  451.             elseif myHero:CanUseSpell(_W) == READY and qcasted == true and myHero:CanUseSpell(_Q) == COOLDOWN and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=wRange then
  452.                 CastSpell(_W, MonsterTarget)
  453.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  454.                 qcasted = false
  455.             end
  456.         if ValidTarget(MonsterTarget) then
  457.             if ((MonsterDMG("Q",_Q,MonsterTarget,qRange) + MonsterDMG("W",_W,MonsterTarget,wRange)) >= MonsterTarget.health) then
  458.                 MonsterKillable = true
  459.                 if myHero:CanUseSpell(_Q) == READY and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=qRange then
  460.                     CastSpell(_Q, MonsterTarget)
  461.                 end
  462.                 if myHero:CanUseSpell(_W) == READY and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=wRange then
  463.                     CastSpell(_W, MonsterTarget)
  464.                 end
  465.                 if myHero:CanUseSpell(_E) == READY and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=eRange then
  466.                     CastSpell(_E, MonsterTarget)
  467.                 end
  468.             else
  469.                 MonsterKillable = false
  470.             end
  471.         end
  472.         end
  473.         if SaveJungle == true and (not ValidTarget(MonsterTarget) or (MiniMonster == true and targeting == true)) then
  474.             MiniMonster = true
  475.             CheckMonster(Wolf1)
  476.             CheckMonster(Wolf2)
  477.             CheckMonster(Golem1)
  478.             CheckMonster(Golem2)
  479.             CheckMonster(Wraith1)
  480.             CheckMonster(Wraith2)
  481.             if myHero:CanUseSpell(_R) == READY and RyzeConfig.useUltiJungle and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=eRange then
  482.                 CastSpell(_R)
  483.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  484.             elseif myHero:CanUseSpell(_E) == READY and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=eRange then
  485.                 CastSpell(_E, MonsterTarget)
  486.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  487.             elseif myHero:CanUseSpell(_Q) == READY and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=qRange then
  488.                 CastSpell(_Q, MonsterTarget)
  489.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  490.             elseif myHero:CanUseSpell(_W) == READY and ValidTarget(MonsterTarget) and GetDistance(MonsterTarget)<=wRange then
  491.                 CastSpell(_W, MonsterTarget)
  492.                 if RyzeSettings.autoMouseFollow then player:MoveTo(mousePos.x, mousePos.z) end
  493.             end
  494.         end
  495.     elseif RyzeConfig.autoQFarm and RyzeSettings.qMinMana<=((myHero.mana/myHero.maxMana)*100) and RyzeConfig.BurstActive == false and RyzeConfig.LongActive == false and RyzeConfig.autoQHarass == false and RyzeConfig.autoQToggle == false then
  496.         MinionSelect = {}
  497.         for index, minion in pairs(enemyMinions.objects) do
  498.             local myQ = getDmg("Q",minion,myHero)
  499.             local myW = getDmg("W",minion,myHero)
  500.             if (minion.maxHealth >= 700+27*math.floor(GetGameTimer()/180000)) then
  501.                 local ProMinion = minion
  502.                 if myHero:CanUseSpell(_Q) == READY and myHero:GetDistance(ProMinion) ~= nil and myHero:GetDistance(ProMinion) <= qRange and ProMinion.health ~= nil and ProMinion.health <= player:CalcDamage(ProMinion, myQ) and ProMinion.visible ~= nil and ProMinion.visible == true and  RyzeConfig.BurstActive == false and RyzeConfig.LongActive == false then
  503.                     CastSpell(_Q, ProMinion)
  504.                 elseif myHero:CanUseSpell(_W) == READY and myHero:GetDistance(ProMinion) ~= nil and myHero:GetDistance(ProMinion) <= wRange and ProMinion.health ~= nil and ProMinion.health <= player:CalcDamage(ProMinion, myW) and ProMinion.visible ~= nil and ProMinion.visible == true and  RyzeConfig.BurstActive == false and RyzeConfig.LongActive == false then
  505.                     CastSpell(_W, ProMinion)
  506.                 end
  507.             end
  508.             if myHero:CanUseSpell(_Q) == READY and myHero:GetDistance(minion) ~= nil and myHero:GetDistance(minion) <= qRange and minion.health ~= nil and minion.health <= player:CalcDamage(minion, myQ) and minion.visible ~= nil and minion.visible == true and  RyzeConfig.BurstActive == false and RyzeConfig.LongActive == false then
  509.                 CastSpell(_Q, minion)
  510.             end
  511.         end
  512.     elseif RyzeConfig.PowerFarm and RyzeSettings.PowerMinMana<=((myHero.mana/myHero.maxMana)*100) and RyzeConfig.BurstActive == false and RyzeConfig.LongActive == false and RyzeConfig.autoQHarass == false and RyzeConfig.autoQToggle == false then
  513.         MinionSelect = {}
  514.         for index, minion in pairs(enemyMinions.objects) do
  515.             local myQ = getDmg("Q",minion,myHero)
  516.             local myW = getDmg("W",minion,myHero)
  517.             local myE = getDmg("E",minion,myHero)
  518.             if etarget ~= minion and wtarget ~= minion and myHero:CanUseSpell(_Q) == READY and myHero:GetDistance(minion) ~= nil and myHero:GetDistance(minion) <= qRange and minion.health ~= nil and minion.health <= player:CalcDamage(minion, myQ) and minion.visible ~= nil and minion.visible == true and  RyzeConfig.BurstActive == false and RyzeConfig.LongActive == false then
  519.                 CastSpell(_Q, minion)
  520.                 qtarget = minion
  521.             end
  522.             if etarget ~= minion and qtarget ~= minion and myHero:CanUseSpell(_W) == READY and myHero:GetDistance(minion) ~= nil and myHero:GetDistance(minion) <= wRange and minion.health ~= nil and minion.health <= player:CalcDamage(minion, myW) and minion.visible ~= nil and minion.visible == true and  RyzeConfig.BurstActive == false and RyzeConfig.LongActive == false then
  523.                 CastSpell(_W, minion)
  524.                 wtarget = minion
  525.             end
  526.             if qtarget ~= minion and wtarget ~= minion and myHero:CanUseSpell(_E) == READY and myHero:GetDistance(minion) ~= nil and myHero:GetDistance(minion) <= eRange and minion.health ~= nil and minion.health <= player:CalcDamage(minion, myE) and minion.visible ~= nil and minion.visible == true and  RyzeConfig.BurstActive == false and RyzeConfig.LongActive == false then
  527.                 CastSpell(_E, minion)
  528.                 etarget = minion
  529.             end
  530.         end
  531.     end
  532.     if RyzeConfig.autoAAFarm and GetTickCount() > nextTick then
  533.         if RyzeSettings.autoAAFollow then
  534.             player:MoveTo(mousePos.x, mousePos.z)
  535.         end
  536.         for index, minion in pairs(enemyMinions.objects) do
  537.             local myAA = getDmg("AD",minion,myHero)
  538.             if myHero:GetDistance(minion) ~= nil and  myHero:GetDistance(minion) <= AARange and minion.health ~= nil and minion.health <= myAA and minion.visible ~= nil and minion.visible == true then
  539.                 player:Attack(minion)
  540.             end
  541.          nextTick = GetTickCount() + waitDelay
  542.         end
  543.     end
  544.     if (RyzeConfig.autoQHarass or RyzeConfig.autoQToggle) and RyzeSettings.qMinManaHarass<=((myHero.mana/myHero.maxMana)*100) and RyzeConfig.BurstActive == false and RyzeConfig.LongActive == false and ValidTarget(ts.target) then
  545.         if myHero:CanUseSpell(_Q) == READY then
  546.             doSpell(ts, _Q, qRange)
  547.         end
  548.     end
  549.     if RyzeConfig.CageHunter and myHero:CanUseSpell(_W) == READY then
  550.         closest = findClosestEnemy()
  551.         if ValidTarget(closest) then
  552.             if myHero:GetDistance(closest) < wRange and ValidTarget(closest) then
  553.                 CastSpell(_W, closest)
  554.             end
  555.         end
  556.     end
  557.     if RyzeConfig.Ignite then      
  558.         if IREADY then
  559.             local ignitedmg = 0    
  560.             for j = 1, heroManager.iCount, 1 do
  561.                 local enemyhero = heroManager:getHero(j)
  562.                 if ValidTarget(enemyhero,600) then
  563.                     ignitedmg = 50 + 20 * myHero.level
  564.                     if enemyhero.health <= ignitedmg then
  565.                         CastSpell(ignite, enemyhero)
  566.                     end
  567.                 end
  568.             end
  569.         end
  570.     end
  571.     if RyzeSettings.autoComboFollow and (RyzeConfig.BurstActive == true or RyzeConfig.LongActive == true) then
  572.         player:MoveTo(mousePos.x, mousePos.z)
  573.     end
  574. end
  575. end
  576.  
  577. function OnProcessSpell(unit, spell)
  578. --[[    if (spell.name:find("ChaosTurret") and myHero.team == TEAM_RED) or (spell.name:find("OrderTurret") and myHero.team == TEAM_BLUE) and RyzeConfig.cageW then
  579.         for i=1, heroManager.iCount do
  580.             local enemy = heroManager:GetHero(i)
  581.             if ValidTarget(enemy) then
  582.                 if GetDistance(spell.endPos, enemy)<80 and GetDistance(enemy)<=wRange and myHero:CanUseSpell(_W) == READY then
  583.                     CastSpell(_W, enemy)
  584.                 end
  585.             end
  586.         end            
  587.     end
  588. -- ]]
  589. if InTurretRange == true then
  590.     if unit.team == TEAM_ENEMY and GetDistance(unit) < wRange and GetDistance(spell.endPos, myHero)<10 then
  591.         for i=1, heroManager.iCount do
  592.             local enemy = heroManager:GetHero(i)
  593.             if ValidTarget(enemy) then
  594.                 if enemy.name == unit.name then
  595.                     if GetDistance(enemy)<=wRange and myHero:CanUseSpell(_W) == READY then
  596.                         if enemy:GetDistance(CageTurret.object) < 800 then
  597.                             CastSpell(_W, enemy)
  598.                         end
  599.                     end
  600.                 end
  601.             end
  602.         end
  603.     end
  604. end
  605. end
  606.  
  607. function findClosestTurret()
  608. local closestTurret = nil
  609. local currentTurret = nil
  610. for name, turret in pairs(turrets) do
  611.     if turret.object.valid ~= false then
  612.         currentTurret = turret
  613.     end
  614.     if turret.team == myHero.team then
  615.         if closestTurret == nil then
  616.             closestTurret = currentTurret
  617.         elseif GetDistance(currentTurret) < GetDistance(closestTurret) then
  618.             closestTurret = currentTurret
  619.         end
  620.     end
  621. end
  622. return closestTurret
  623. end
  624.  
  625.  
  626. function OnCreateObj(obj)
  627.     if obj ~= nil and obj.type == "obj_AI_Minion" and obj.name ~= nil then
  628.         if obj.name == "TT_Spiderboss7.1.1" then Vilemaw = obj
  629.         elseif obj.name == "Worm12.1.1" then Nashor = obj
  630.         elseif obj.name == "Dragon6.1.1" then Dragon = obj
  631.         elseif obj.name == "AncientGolem1.1.1" then Golem1 = obj
  632.         elseif obj.name == "AncientGolem7.1.1" then Golem2 = obj
  633.         elseif obj.name == "LizardElder4.1.1" then Lizard1 = obj
  634.         elseif obj.name == "LizardElder10.1.1" then Lizard2 = obj
  635.         elseif obj.name == "GiantWolf2.1.3" then Wolf1 = obj
  636.         elseif obj.name == "GiantWolf8.1.3" then Wolf2 = obj
  637.         elseif obj.name == "Wraith3.1.3" then Wraith1 = obj
  638.         elseif obj.name == "Wraith9.1.3" then Wraith2 = obj
  639.         elseif obj.name == "Golem5.1.2" then Golem1 = obj
  640.         elseif obj.name == "Golem11.1.2" then Golem2 = obj
  641.         end
  642.     end
  643. end
  644.  
  645. function OnDeleteObj(object)
  646.     if object ~= nil and object.type == "obj_AI_Turret" then
  647.         for name, turret in pairs(turrets) do
  648.             if name == object.name then
  649.                 turrets[name] = nil
  650.                 return
  651.             end
  652.         end
  653.     end
  654. end
  655.  
  656. function ASLoadMinions()
  657.     for i = 1, objManager.maxObjects do
  658.         local obj = objManager:getObject(i)
  659.         if obj ~= nil and obj.type == "obj_AI_Minion" and obj.name ~= nil then
  660.             if obj.name == "TT_Spiderboss7.1.1" then Vilemaw = obj
  661.             elseif obj.name == "Worm12.1.1" then Nashor = obj
  662.             elseif obj.name == "Dragon6.1.1" then Dragon = obj
  663.             elseif obj.name == "AncientGolem1.1.1" then Golem1 = obj
  664.             elseif obj.name == "AncientGolem7.1.1" then Golem2 = obj
  665.             elseif obj.name == "LizardElder4.1.1" then Lizard1 = obj
  666.             elseif obj.name == "LizardElder10.1.1" then Lizard2 = obj
  667.             elseif obj.name == "GiantWolf2.1.3" then Wolf1 = obj
  668.             elseif obj.name == "GiantWolf8.1.3" then Wolf2 = obj
  669.             elseif obj.name == "Wraith3.1.3" then Wraith1 = obj
  670.             elseif obj.name == "Wraith9.1.3" then Wraith2 = obj
  671.             elseif obj.name == "Golem5.1.2" then Golem1 = obj
  672.             elseif obj.name == "Golem11.1.2" then Golem2 = obj
  673.             end
  674.         end
  675.     end
  676. end
  677.  
  678.  
  679. function CheckMonster(minion)
  680. if minion ~= nil and ValidTarget(minion) then
  681.     if myHero:GetDistance(minion) < eRange then
  682.         MonsterTarget = minion
  683.         targeting = true
  684.     elseif not ValidTarget(MonsterTarget) then
  685.         targeting = false
  686.     end
  687. end
  688. end
  689.  
  690. function MonsterDMG(dmgspell,spell,monster,range)
  691.     if monster ~= nil and GetMyHero():CanUseSpell(spell) == READY and GetDistance(monster)<=range then
  692.         return getDmg(dmgspell,monster,myHero)
  693.     else
  694.         return 0
  695.     end
  696. end
  697.  
  698. function RyzeItem()
  699. DFGSlot, HXGSlot, BWCSlot = GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144)
  700. SheenSlot, TrinitySlot, LBSlot = GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100)
  701. IGSlot, LTSlot, BTSlot = GetInventorySlotItem(3025), GetInventorySlotItem(3151), GetInventorySlotItem(3188)
  702. STISlot, ROSlot, BRKSlot = GetInventorySlotItem(3092),GetInventorySlotItem(3143),GetInventorySlotItem(3153)
  703. QREADY = (myHero:CanUseSpell(_Q) == READY)
  704. WREADY = (myHero:CanUseSpell(_W) == READY)
  705. EREADY = (myHero:CanUseSpell(_E) == READY)
  706. RREADY = (myHero:CanUseSpell(_R) == READY)
  707. DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  708. HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
  709. BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
  710. STIREADY = (STISlot ~= nil and myHero:CanUseSpell(STISlot) == READY)
  711. ROREADY = (ROSlot ~= nil and myHero:CanUseSpell(ROSlot) == READY)
  712. BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
  713. IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  714. end
  715.  
  716. function checkTurretState()
  717.     for name, turret in pairs(turrets) do
  718.         if turret.object.valid == false then
  719.             turrets[name] = nil
  720.         end
  721.     end
  722. end
  723.  
  724.  quotes = { 'Let\'s go, let\'s go!',
  725.  'Unpleasant? I\'ll show you unpleasant!',
  726.  'Take this scroll and stick it... somewhere safe.',
  727.  'I got these tattoos in rune prison!',
  728.  'Right back at you!'}
  729. PrintFloatText(myHero, 10, quotes[math.random(5)])
Advertisement
Add Comment
Please, Sign In to add comment