Advertisement
Guest User

Ryze

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