Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.54 KB | None | 0 0
  1. local version = "0.1b"
  2.  
  3. --[[
  4. Ryze - the Kebap Maker
  5. Author: Pegas
  6. Version: 0.1b
  7. Copyright 2014
  8.  
  9. Dependency: Standalone
  10. --]]
  11.  
  12. if myHero.charName ~= "Ryze" then return end
  13.  
  14. _G.UseUpdater = true
  15.  
  16. local REQUIRED_LIBS = {
  17. ["SOW"] = "https://raw.githubusercontent.com/Hellsing/BoL/master/common/SOW.lua",
  18. ["VPrediction"] = "https://raw.githubusercontent.com/Hellsing/BoL/master/common/VPrediction.lua"
  19. }
  20.  
  21. local DOWNLOADING_LIBS, DOWNLOAD_COUNT = false, 0
  22.  
  23. function AfterDownload()
  24. DOWNLOAD_COUNT = DOWNLOAD_COUNT - 1
  25. if DOWNLOAD_COUNT == 0 then
  26. DOWNLOADING_LIBS = false
  27. print("<b><font color=\"#6699FF\">Ryze - the Kebap Maker:</font></b> <font color=\"#FFFFFF\">Required libraries downloaded successfully, please reload (double F9).</font>")
  28. end
  29. end
  30.  
  31. for DOWNLOAD_LIB_NAME, DOWNLOAD_LIB_URL in pairs(REQUIRED_LIBS) do
  32. if FileExist(LIB_PATH .. DOWNLOAD_LIB_NAME .. ".lua") then
  33. require(DOWNLOAD_LIB_NAME)
  34. else
  35. DOWNLOADING_LIBS = true
  36. DOWNLOAD_COUNT = DOWNLOAD_COUNT + 1
  37. DownloadFile(DOWNLOAD_LIB_URL, LIB_PATH .. DOWNLOAD_LIB_NAME..".lua", AfterDownload)
  38. end
  39. end
  40.  
  41. if DOWNLOADING_LIBS then return end
  42. ------------------------------------------------------
  43. -- Callbacks
  44. ------------------------------------------------------
  45.  
  46. function GetKill()
  47. else when.Kill(Target) then do(Kebap)
  48. end
  49.  
  50. function OnLoad()
  51. print("<b><font color=\"#6699FF\">Ryze - the Kebap Maker:</font></b> <font color=\"#FFFFFF\">Good luck and have fun!</font>")
  52. Variables()
  53. Menu()
  54. PriorityOnLoad()
  55. end
  56.  
  57. function OnTick()
  58. ComboKey = Settings.combo.comboKey
  59. HarassKey = Settings.harass.harassKey
  60. LaneClearKey = Settings.lane.laneKey
  61. JungleClearKey = Settings.jungle.jungleKey
  62. FarmKey = Settings.farm.farmKey
  63.  
  64. if ComboKey then
  65. if Settings.combo.comboMode == 1 then
  66. burstCombo(Target)
  67. else
  68. longCombo(Target)
  69. end
  70. end
  71.  
  72. if HarassKey then
  73. Harass(Target)
  74. end
  75.  
  76. if FarmKey then
  77. Farm()
  78. end
  79.  
  80. if JungleClearKey then
  81. JungleClear()
  82. end
  83.  
  84. if LaneClearKey then
  85. LaneClear()
  86. end
  87.  
  88. if Settings.ks.killSteal then
  89. KillSteal()
  90. end
  91.  
  92. Checks()
  93. end
  94.  
  95. function OnDraw()
  96. if not myHero.dead and not Settings.drawing.mDraw then
  97. if SkillQ.ready and Settings.drawing.qDraw then
  98. DrawCircle(myHero.x, myHero.y, myHero.z, SkillQ.range, RGB(Settings.drawing.qColor[2], Settings.drawing.qColor[3], Settings.drawing.qColor[4]))
  99. end
  100. if SkillW.ready and Settings.drawing.wDraw then
  101. DrawCircle(myHero.x, myHero.y, myHero.z, SkillW.range, RGB(Settings.drawing.wColor[2], Settings.drawing.wColor[3], Settings.drawing.wColor[4]))
  102. end
  103. if SkillE.ready and Settings.drawing.eDraw then
  104. DrawCircle(myHero.x, myHero.y, myHero.z, SkillE.range, RGB(Settings.drawing.eColor[2], Settings.drawing.eColor[3], Settings.drawing.eColor[4]))
  105. end
  106.  
  107. if Settings.drawing.Target and Target ~= nil then
  108. DrawCircle(Target.x, Target.y, Target.z, 70, 0xCE00FF)
  109. end
  110.  
  111. if Settings.drawing.myHero then
  112. DrawCircle(myHero.x, myHero.y, myHero.z, myHero.range + GetDistance(myHero, myHero.minBBox), RGB(Settings.drawing.myColor[2], Settings.drawing.myColor[3], Settings.drawing.myColor[4]))
  113. end
  114. end
  115. end
  116.  
  117. ------------------------------------------------------
  118. -- Functions
  119. ------------------------------------------------------
  120.  
  121. function burstCombo(unit)
  122. if ValidTarget(unit) and unit ~= nil and unit.type == myHero.type then
  123. if isFacing(myHero, unit) then
  124. if Settings.combo.comboItems then
  125. UseItems(unit)
  126. end
  127.  
  128. CastQ(unit)
  129. if Settings.combo.useR then CastR() end
  130. CastW(unit)
  131. CastE(unit)
  132. elseif not isFacing(unit, myHero) then
  133. if Settings.combo.comboItems then
  134. UseItems(unit)
  135. end
  136.  
  137. CastW(unit)
  138. if Settings.combo.useR then CastR() end
  139. CastQ(unit)
  140. CastE(unit)
  141. end
  142. end
  143.  
  144. if not Settings.combo.useAA then
  145. SOWi:DisableAttacks()
  146. elseif Settings.combo.useAA then
  147. SOWi:EnableAttacks()
  148. end
  149. end
  150.  
  151. function longCombo(unit)
  152. if ValidTarget(unit) and unit ~= nil and unit.type == myHero.type then
  153. if Settings.combo.comboItems then
  154. UseItems(unit)
  155. end
  156.  
  157. CastQ(unit)
  158. if Settings.combo.useR then CastR() end
  159. CastQ(unit)
  160. CastW(unit)
  161. CastQ(unit)
  162. CastE(unit)
  163. CastQ(unit)
  164. CastW(unit)
  165. CastQ(unit)
  166. CastE(unit)
  167. CastQ(unit)
  168. end
  169.  
  170. if not Settings.combo.useAA then
  171. SOWi:DisableAttacks()
  172. elseif Settings.combo.useAA then
  173. SOWi:EnableAttacks()
  174. end
  175. end
  176.  
  177. function Harass(unit)
  178. if ValidTarget(unit) and unit ~= nil and unit.type == myHero.type and not IsMyManaLow("Harass") then
  179. if Settings.harass.useW then CastW(unit) end
  180. if Settings.harass.useE then CastE(unit) end
  181. if Settings.harass.useQ then CastQ(unit) end
  182. end
  183. end
  184.  
  185. function JungleClear()
  186. if Settings.jungle.jungleKey then
  187. local JungleMob = GetJungleMob()
  188.  
  189. if JungleMob ~= nil then
  190. if Settings.jungle.jungleE and GetDistance(JungleMob) <= SkillE.range then
  191. CastSpell(_E, JungleMob)
  192. end
  193. if Settings.jungle.jungleQ and GetDistance(JungleMob) <= SkillQ.range then
  194. CastSpell(_Q, JungleMob)
  195. end
  196. if Settings.jungle.jungleW and GetDistance(JungleMob) <= SkillW.range then
  197. CastSpell(_W, JungleMob)
  198. end
  199. end
  200. end
  201. end
  202.  
  203. function Farm()
  204. enemyMinions:update()
  205. for i, minion in pairs(enemyMinions.objects) do
  206. qDmg = getDmg("Q", minion, myHero)
  207. wDmg = getDmg("W", minion, myHero)
  208. eDmg = getDmg("E", minion, myHero)
  209.  
  210. if ValidTarget(minion) and minion ~= nil and not IsMyManaLow("Farm") then
  211. if minion.health <= qDmg and Settings.farm.farmQ then
  212. CastQ(minion)
  213. elseif minion.health <= wDmg and Settings.farm.farmW then
  214. CastW(minion)
  215. elseif minion.health <= eDmg and Settings.farm.farmE then
  216. CastE(minion)
  217. end
  218. end
  219. end
  220. end
  221.  
  222. function LaneClear()
  223. enemyMinions:update()
  224. if LaneClearKey then
  225. for i, minion in pairs(enemyMinions.objects) do
  226. if ValidTarget(minion) and minion ~= nil then
  227. if Settings.lane.laneR and GetDistance(minion) <= SkillQ.range and SkillR.ready then CastSpell(_R) end
  228. if Settings.lane.laneQ and GetDistance(minion) <= SkillQ.range and SkillQ.ready then CastSpell(_Q, minion) end
  229. if Settings.lane.laneW and GetDistance(minion) <= SkillW.range and SkillW.ready then CastSpell(_W, minion) end
  230. if Settings.lane.laneE and GetDistance(minion) <= SkillE.range and SkillE.ready then CastSpell(_E, minion) end
  231. end
  232. end
  233. end
  234. end
  235.  
  236. function CastQ(unit)
  237. if unit ~= nil and GetDistance(unit) <= SkillQ.range and SkillQ.ready then
  238. if VIP_USER and Settings.misc.packets then Packet("S_CAST", {spellId = _Q, targetNetworkId = unit.networkID}):send() end
  239. CastSpell(_Q, unit)
  240. end
  241. end
  242.  
  243. function CastE(unit)
  244. if unit ~= nil and GetDistance(unit) <= SkillE.range and SkillE.ready then
  245. if VIP_USER and Settings.misc.packets then Packet("S_CAST", {spellId = _E, targetNetworkId = unit.networkID}):send() end
  246. CastSpell(_E, unit)
  247. end
  248. end
  249.  
  250. function CastW(unit)
  251. if unit ~= nil and SkillW.ready and GetDistance(unit) <= SkillW.range then
  252. if VIP_USER and Settings.misc.packets then Packet("S_CAST", {spellId = _W, targetNetworkId = unit.networkID}):send() end
  253. CastSpell(_W, unit)
  254. end
  255. end
  256.  
  257. function CastR()
  258. if SkillR.ready then
  259. if Settings.combo.useR == 1 then
  260. return
  261. elseif Settings.combo.useR == 2 and CountEnemyHeroInRange(SkillQ.range, myHero) >= 1 then
  262. if VIP_USER and Settings.misc.packets then Packet("S_CAST", {spellId = _R}):send() end
  263. CastSpell(_R)
  264. elseif Settings.combo.useR == 3 and CountEnemyHeroInRange(SkillQ.range, myHero) >= 2 then
  265. if VIP_USER and Settings.misc.packets then Packet("S_CAST", {spellId = _R}):send() end
  266. CastSpell(_R)
  267. elseif Settings.combo.useR == 4 and CountEnemyHeroInRange(SkillQ.range, myHero) >= 3 then
  268. if VIP_USER and Settings.misc.packets then Packet("S_CAST", {spellId = _R}):send() end
  269. CastSpell(_R)
  270. elseif Settings.combo.useR == 5 and CountEnemyHeroInRange(SkillQ.range, myHero) >= 4 then
  271. if VIP_USER and Settings.misc.packets then Packet("S_CAST", {spellId = _R}):send() end
  272. CastSpell(_R)
  273. end
  274. end
  275. end
  276.  
  277. function KillSteal()
  278. for _, enemy in ipairs(GetEnemyHeroes()) do
  279. qDmg = getDmg("Q", enemy, myHero)
  280. wDmg = getDmg("W", enemy, myHero)
  281.  
  282. if ValidTarget(enemy) and enemy.visible then
  283. if enemy.health <= qDmg then
  284. CastQ(enemy)
  285. elseif enemy.health <= wDmg then
  286. CastW(enemy)
  287. elseif enemy.health <= qDmg + wDmg then
  288. CastW(enemy)
  289. CastQ(enemy)
  290. end
  291.  
  292. if Settings.ks.autoIgnite then
  293. AutoIgnite(enemy)
  294. end
  295. end
  296. end
  297. end
  298.  
  299. function AutoIgnite(unit)
  300. if ValidTarget(unit, Ignite.range) and unit.health <= 50 + (20 * myHero.level) then
  301. if Ignite.ready then
  302. CastSpell(Ignite.slot, unit)
  303. end
  304. end
  305. end
  306.  
  307. ------------------------------------------------------
  308. -- Checks, menu & stuff
  309. ------------------------------------------------------
  310.  
  311. function Checks()
  312. SkillQ.ready = (myHero:CanUseSpell(_Q) == READY)
  313. SkillW.ready = (myHero:CanUseSpell(_W) == READY)
  314. SkillE.ready = (myHero:CanUseSpell(_E) == READY)
  315. SkillR.ready = (myHero:CanUseSpell(_R) == READY)
  316.  
  317. if myHero:GetSpellData(SUMMONER_1).name:find(Ignite.name) then
  318. Ignite.slot = SUMMONER_1
  319. elseif myHero:GetSpellData(SUMMONER_2).name:find(Ignite.name) then
  320. Ignite.slot = SUMMONER_2
  321. end
  322.  
  323. Ignite.ready = (Ignite.slot ~= nil and myHero:CanUseSpell(Ignite.slot) == READY)
  324.  
  325. TargetSelector:update()
  326. enemyMinions:update()
  327.  
  328. Target = GetCustomTarget()
  329. SOWi:ForceTarget(Target)
  330.  
  331. if VIP_USER and Settings.misc.skinList then ChooseSkin() end
  332. if Settings.drawing.lfc.lfc then _G.DrawCircle = DrawCircle2 else _G.DrawCircle = _G.oldDrawCircle end
  333. end
  334.  
  335. function IsMyManaLow(mode)
  336. if mode == "Harass" then
  337. if myHero.mana < (myHero.maxMana * ( Settings.harass.harassMana / 100)) then
  338. return true
  339. else
  340. return false
  341. end
  342. elseif mode == "Farm" then
  343. if myHero.mana < (myHero.maxMana * ( Settings.farm.farmMana / 100)) then
  344. return true
  345. else
  346. return false
  347. end
  348. end
  349. end
  350.  
  351. function Menu()
  352. Settings = scriptConfig("Ryze - the Rogue Mage "..version.."", "DraconisRyze")
  353.  
  354. Settings:addSubMenu("["..myHero.charName.."] - Combo Settings", "combo")
  355. Settings.combo:addParam("comboKey", "Combo Key", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  356. Settings.combo:addParam("comboMode", "Combo Mode", SCRIPT_PARAM_LIST, 1, { "Burst", "Long" })
  357. Settings.combo:addParam("useR", "Use "..SkillR.name.." (R) in Combo", SCRIPT_PARAM_LIST, 1, { "No", ">1 targets", ">2 targets", ">3 targets", ">4 targets" })
  358. Settings.combo:addParam("comboItems", "Use Items in Combo", SCRIPT_PARAM_ONOFF, true)
  359. Settings.combo:addParam("useAA", "Use AAs in Combo", SCRIPT_PARAM_ONOFF, false)
  360. Settings.combo:permaShow("comboKey")
  361.  
  362. Settings:addSubMenu("["..myHero.charName.."] - Harass Settings", "harass")
  363. Settings.harass:addParam("harassKey", "Harass Key", SCRIPT_PARAM_ONKEYDOWN, false, GetKey("C"))
  364. Settings.harass:addParam("useQ", "Use "..SkillQ.name.." (Q) in Harass", SCRIPT_PARAM_ONOFF, true)
  365. Settings.harass:addParam("useW", "Use "..SkillW.name.." (W) in Harass", SCRIPT_PARAM_ONOFF, true)
  366. Settings.harass:addParam("useE", "Use "..SkillE.name.." (E) in Harass", SCRIPT_PARAM_ONOFF, true)
  367. Settings.harass:addParam("harassMana", "Min. Mana Percent: ", SCRIPT_PARAM_SLICE, 50, 0, 100, 0)
  368. Settings.harass:permaShow("harassKey")
  369.  
  370. Settings:addSubMenu("["..myHero.charName.."] - Farm Settings", "farm")
  371. Settings.farm:addParam("farmKey", "Farm Key", SCRIPT_PARAM_ONKEYDOWN, false, GetKey("X"))
  372. Settings.farm:addParam("farmQ", "Farm with "..SkillQ.name.." (Q)", SCRIPT_PARAM_ONOFF, true)
  373. Settings.farm:addParam("farmW", "Farm with "..SkillW.name.." (W)", SCRIPT_PARAM_ONOFF, false)
  374. Settings.farm:addParam("farmE", "Farm with "..SkillE.name.." (E)", SCRIPT_PARAM_ONOFF, false)
  375. Settings.farm:addParam("farmMana", "Min. Mana Percent: ", SCRIPT_PARAM_SLICE, 50, 0, 100, 0)
  376. Settings.farm:permaShow("farmKey")
  377.  
  378. Settings:addSubMenu("["..myHero.charName.."] - Lane Clear Settings", "lane")
  379. Settings.lane:addParam("laneKey", "Lane Clear Key", SCRIPT_PARAM_ONKEYDOWN, false, GetKey("V"))
  380. Settings.lane:addParam("laneQ", "Clear with "..SkillQ.name.." (Q)", SCRIPT_PARAM_ONOFF, true)
  381. Settings.lane:addParam("laneW", "Clear with "..SkillW.name.." (W)", SCRIPT_PARAM_ONOFF, true)
  382. Settings.lane:addParam("laneE", "Clear with "..SkillE.name.." (E)", SCRIPT_PARAM_ONOFF, true)
  383. Settings.lane:addParam("laneR", "Clear with "..SkillR.name.." (R)", SCRIPT_PARAM_ONOFF, false)
  384. Settings.lane:permaShow("laneKey")
  385.  
  386. Settings:addSubMenu("["..myHero.charName.."] - Jungle Clear Settings", "jungle")
  387. Settings.jungle:addParam("jungleKey", "Jungle Clear Key", SCRIPT_PARAM_ONKEYDOWN, false, GetKey("V"))
  388. Settings.jungle:addParam("jungleQ", "Clear with "..SkillQ.name.." (Q)", SCRIPT_PARAM_ONOFF, true)
  389. Settings.jungle:addParam("jungleW", "Clear with "..SkillW.name.." (W)", SCRIPT_PARAM_ONOFF, true)
  390. Settings.jungle:addParam("jungleE", "Clear with "..SkillE.name.." (E)", SCRIPT_PARAM_ONOFF, true)
  391. Settings.jungle:permaShow("jungleKey")
  392.  
  393. Settings:addSubMenu("["..myHero.charName.."] - KillSteal Settings", "ks")
  394. Settings.ks:addParam("killSteal", "Use Smart Kill Steal", SCRIPT_PARAM_ONOFF, true)
  395. Settings.ks:addParam("autoIgnite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
  396. Settings.ks:permaShow("killSteal")
  397.  
  398. Settings:addSubMenu("["..myHero.charName.."] - Draw Settings", "drawing")
  399. Settings.drawing:addParam("mDraw", "Disable All Range Draws", SCRIPT_PARAM_ONOFF, false)
  400. Settings.drawing:addParam("Target", "Draw Circle on Target", SCRIPT_PARAM_ONOFF, true)
  401. Settings.drawing:addParam("myHero", "Draw My Range", SCRIPT_PARAM_ONOFF, true)
  402. Settings.drawing:addParam("myColor", "Draw My Range Color", SCRIPT_PARAM_COLOR, {255, 74, 26, 255})
  403. Settings.drawing:addParam("qDraw", "Draw "..SkillQ.name.." (Q) Range", SCRIPT_PARAM_ONOFF, true)
  404. Settings.drawing:addParam("qColor", "Draw "..SkillQ.name.." (Q) Color", SCRIPT_PARAM_COLOR, {255, 74, 26, 255})
  405. Settings.drawing:addParam("wDraw", "Draw "..SkillW.name.." (W) Range", SCRIPT_PARAM_ONOFF, true)
  406. Settings.drawing:addParam("wColor", "Draw "..SkillW.name.." (W) Color", SCRIPT_PARAM_COLOR, {255, 74, 26, 255})
  407. Settings.drawing:addParam("eDraw", "Draw "..SkillE.name.." (E) Range", SCRIPT_PARAM_ONOFF, true)
  408. Settings.drawing:addParam("eColor", "Draw "..SkillE.name.." (E) Color", SCRIPT_PARAM_COLOR, {255, 74, 26, 255})
  409.  
  410. Settings.drawing:addSubMenu("Lag Free Circles", "lfc")
  411. Settings.drawing.lfc:addParam("lfc", "Lag Free Circles", SCRIPT_PARAM_ONOFF, false)
  412. Settings.drawing.lfc:addParam("CL", "Quality", 4, 1500, 75, 2000, 0)
  413. Settings.drawing.lfc:addParam("Width", "Width", 4, 1, 1, 10, 0)
  414.  
  415. Settings:addSubMenu("["..myHero.charName.."] - Misc Settings", "misc")
  416. Settings.misc:addParam("packets", "Cast spells using Packets", SCRIPT_PARAM_ONOFF, true)
  417. if VIP_USER then
  418. Settings.misc:addParam("skinList", "Choose your skin", SCRIPT_PARAM_LIST, 9, { "Human Ryze", "Tribal Ryze", "Uncle Ryze", "Triumphant Ryze", "Professor Ryze", "Zombie Ryze", "Dark Crystal Ryze", "Pirate Ryze", "Classic" })
  419. end
  420.  
  421. Settings:addSubMenu("["..myHero.charName.."] - Orbwalking Settings", "Orbwalking")
  422. SOWi:LoadToMenu(Settings.Orbwalking)
  423.  
  424. TargetSelector = TargetSelector(TARGET_LESS_CAST, SkillQ.range, DAMAGE_MAGIC, true)
  425. TargetSelector.name = "Ryze"
  426. Settings:addTS(TargetSelector)
  427. end
  428.  
  429. function Variables()
  430. SkillQ = { name = "Overload", range = 625, delay = nil, speed = nil, width = nil, ready = false }
  431. SkillW = { name = "Rune Prison", range = 600, delay = nil, speed = nil, width = nil, ready = false }
  432. SkillE = { name = "Spell Flux", range = 600, delay = nil, speed = nil, width = nil, ready = false }
  433. SkillR = { name = "Desperate Power", range = nil, delay = nil, speed = nil, width = nil, ready = false }
  434. Ignite = { name = "SummonerDot", range = 600, slot = nil }
  435.  
  436. enemyMinions = minionManager(MINION_ENEMY, SkillQ.range, myHero, MINION_SORT_HEALTH_ASC)
  437.  
  438. VP = VPrediction()
  439. SOWi = SOW(VP)
  440.  
  441. JungleMobs = {}
  442. JungleFocusMobs = {}
  443.  
  444. lastSkin = 0
  445.  
  446. if GetGame().map.shortName == "twistedTreeline" then
  447. TwistedTreeline = true
  448. else
  449. TwistedTreeline = false
  450. end
  451.  
  452. _G.oldDrawCircle = rawget(_G, 'DrawCircle')
  453. _G.DrawCircle = DrawCircle2
  454.  
  455. priorityTable = {
  456. AP = {
  457. "Annie", "Ahri", "Akali", "Anivia", "Annie", "Brand", "Cassiopeia", "Diana", "Evelynn", "FiddleSticks", "Fizz", "Gragas", "Heimerdinger", "Karthus",
  458. "Kassadin", "Katarina", "Kayle", "Kennen", "Leblanc", "Lissandra", "Lux", "Malzahar", "Mordekaiser", "Morgana", "Nidalee", "Orianna",
  459. "Ryze", "Sion", "Swain", "Syndra", "Teemo", "TwistedFate", "Veigar", "Viktor", "Vladimir", "Xerath", "Ziggs", "Zyra", "Velkoz"
  460. },
  461.  
  462. Support = {
  463. "Alistar", "Blitzcrank", "Janna", "Karma", "Leona", "Lulu", "Nami", "Nunu", "Sona", "Soraka", "Taric", "Thresh", "Zilean", "Braum"
  464. },
  465.  
  466. Tank = {
  467. "Amumu", "Chogath", "DrMundo", "Galio", "Hecarim", "Malphite", "Maokai", "Nasus", "Rammus", "Sejuani", "Nautilus", "Shen", "Singed", "Skarner", "Volibear",
  468. "Warwick", "Yorick", "Zac"
  469. },
  470.  
  471. AD_Carry = {
  472. "Ashe", "Caitlyn", "Corki", "Draven", "Ezreal", "Graves", "Jayce", "Jinx", "KogMaw", "Lucian", "MasterYi", "MissFortune", "Pantheon", "Quinn", "Shaco", "Sivir",
  473. "Talon","Tryndamere", "Tristana", "Twitch", "Urgot", "Varus", "Vayne", "Yasuo", "Zed"
  474. },
  475.  
  476. Bruiser = {
  477. "Aatrox", "Darius", "Elise", "Fiora", "Gangplank", "Garen", "Irelia", "JarvanIV", "Jax", "Khazix", "LeeSin", "Nocturne", "Olaf", "Poppy",
  478. "Renekton", "Rengar", "Riven", "Rumble", "Shyvana", "Trundle", "Udyr", "Vi", "MonkeyKing", "XinZhao"
  479. }
  480. }
  481.  
  482. Items = {
  483. BRK = { id = 3153, range = 450, reqTarget = true, slot = nil },
  484. BWC = { id = 3144, range = 400, reqTarget = true, slot = nil },
  485. DFG = { id = 3128, range = 750, reqTarget = true, slot = nil },
  486. HGB = { id = 3146, range = 400, reqTarget = true, slot = nil },
  487. RSH = { id = 3074, range = 350, reqTarget = false, slot = nil },
  488. STD = { id = 3131, range = 350, reqTarget = false, slot = nil },
  489. TMT = { id = 3077, range = 350, reqTarget = false, slot = nil },
  490. YGB = { id = 3142, range = 350, reqTarget = false, slot = nil },
  491. BFT = { id = 3188, range = 750, reqTarget = true, slot = nil },
  492. RND = { id = 3143, range = 275, reqTarget = false, slot = nil }
  493. }
  494.  
  495. if not TwistedTreeline then
  496. JungleMobNames = {
  497. ["Wolf8.1.2"] = true,
  498. ["Wolf8.1.3"] = true,
  499. ["YoungLizard7.1.2"] = true,
  500. ["YoungLizard7.1.3"] = true,
  501. ["LesserWraith9.1.3"] = true,
  502. ["LesserWraith9.1.2"] = true,
  503. ["LesserWraith9.1.4"] = true,
  504. ["YoungLizard10.1.2"] = true,
  505. ["YoungLizard10.1.3"] = true,
  506. ["SmallGolem11.1.1"] = true,
  507. ["Wolf2.1.2"] = true,
  508. ["Wolf2.1.3"] = true,
  509. ["YoungLizard1.1.2"] = true,
  510. ["YoungLizard1.1.3"] = true,
  511. ["LesserWraith3.1.3"] = true,
  512. ["LesserWraith3.1.2"] = true,
  513. ["LesserWraith3.1.4"] = true,
  514. ["YoungLizard4.1.2"] = true,
  515. ["YoungLizard4.1.3"] = true,
  516. ["SmallGolem5.1.1"] = true
  517. }
  518.  
  519. FocusJungleNames = {
  520. ["Dragon6.1.1"] = true,
  521. ["Worm12.1.1"] = true,
  522. ["GiantWolf8.1.1"] = true,
  523. ["AncientGolem7.1.1"] = true,
  524. ["Wraith9.1.1"] = true,
  525. ["LizardElder10.1.1"] = true,
  526. ["Golem11.1.2"] = true,
  527. ["GiantWolf2.1.1"] = true,
  528. ["AncientGolem1.1.1"] = true,
  529. ["Wraith3.1.1"] = true,
  530. ["LizardElder4.1.1"] = true,
  531. ["Golem5.1.2"] = true,
  532. ["GreatWraith13.1.1"] = true,
  533. ["GreatWraith14.1.1"] = true
  534. }
  535. else
  536. FocusJungleNames = {
  537. ["TT_NWraith1.1.1"] = true,
  538. ["TT_NGolem2.1.1"] = true,
  539. ["TT_NWolf3.1.1"] = true,
  540. ["TT_NWraith4.1.1"] = true,
  541. ["TT_NGolem5.1.1"] = true,
  542. ["TT_NWolf6.1.1"] = true,
  543. ["TT_Spiderboss8.1.1"] = true
  544. }
  545. JungleMobNames = {
  546. ["TT_NWraith21.1.2"] = true,
  547. ["TT_NWraith21.1.3"] = true,
  548. ["TT_NGolem22.1.2"] = true,
  549. ["TT_NWolf23.1.2"] = true,
  550. ["TT_NWolf23.1.3"] = true,
  551. ["TT_NWraith24.1.2"] = true,
  552. ["TT_NWraith24.1.3"] = true,
  553. ["TT_NGolem25.1.1"] = true,
  554. ["TT_NWolf26.1.2"] = true,
  555. ["TT_NWolf26.1.3"] = true
  556. }
  557. end
  558.  
  559. for i = 0, objManager.maxObjects do
  560. local object = objManager:getObject(i)
  561. if object and object.valid and not object.dead then
  562. if FocusJungleNames[object.name] then
  563. JungleFocusMobs[#JungleFocusMobs+1] = object
  564. elseif JungleMobNames[object.name] then
  565. JungleMobs[#JungleMobs+1] = object
  566. end
  567. end
  568. end
  569. end
  570.  
  571. function SetPriority(table, hero, priority)
  572. for i=1, #table, 1 do
  573. if hero.charName:find(table[i]) ~= nil then
  574. TS_SetHeroPriority(priority, hero.charName)
  575. end
  576. end
  577. end
  578.  
  579. function arrangePrioritys()
  580. for i, enemy in ipairs(GetEnemyHeroes()) do
  581. SetPriority(priorityTable.AD_Carry, enemy, 1)
  582. SetPriority(priorityTable.AP, enemy, 2)
  583. SetPriority(priorityTable.Support, enemy, 3)
  584. SetPriority(priorityTable.Bruiser, enemy, 4)
  585. SetPriority(priorityTable.Tank, enemy, 5)
  586. end
  587. end
  588.  
  589. function arrangePrioritysTT()
  590. for i, enemy in ipairs(GetEnemyHeroes()) do
  591. SetPriority(priorityTable.AD_Carry, enemy, 1)
  592. SetPriority(priorityTable.AP, enemy, 1)
  593. SetPriority(priorityTable.Support, enemy, 2)
  594. SetPriority(priorityTable.Bruiser, enemy, 2)
  595. SetPriority(priorityTable.Tank, enemy, 3)
  596. end
  597. end
  598.  
  599. function UseItems(unit)
  600. if unit ~= nil then
  601. for _, item in pairs(Items) do
  602. item.slot = GetInventorySlotItem(item.id)
  603. if item.slot ~= nil then
  604. if item.reqTarget and GetDistance(unit) < item.range then
  605. CastSpell(item.slot, unit)
  606. elseif not item.reqTarget then
  607. if (GetDistance(unit) - getHitBoxRadius(myHero) - getHitBoxRadius(unit)) < 50 then
  608. CastSpell(item.slot)
  609. end
  610. end
  611. end
  612. end
  613. end
  614. end
  615.  
  616. function getHitBoxRadius(target)
  617. return GetDistance(target.minBBox, target.maxBBox)/2
  618. end
  619.  
  620. function PriorityOnLoad()
  621. if heroManager.iCount < 10 or (TwistedTreeline and heroManager.iCount < 6) then
  622. print("<b><font color=\"#6699FF\">Ryze - the Rogue Mage:</font></b> <font color=\"#FFFFFF\">Too few champions to arrange priority.</font>")
  623. elseif heroManager.iCount == 6 then
  624. arrangePrioritysTT()
  625. else
  626. arrangePrioritys()
  627. end
  628. end
  629.  
  630. function GetJungleMob()
  631. for _, Mob in pairs(JungleFocusMobs) do
  632. if ValidTarget(Mob, SkillQ.range) then return Mob end
  633. end
  634. for _, Mob in pairs(JungleMobs) do
  635. if ValidTarget(Mob, SkillQ.range) then return Mob end
  636. end
  637. end
  638.  
  639. function OnCreateObj(obj)
  640. if obj.valid then
  641. if FocusJungleNames[obj.name] then
  642. JungleFocusMobs[#JungleFocusMobs+1] = obj
  643. elseif JungleMobNames[obj.name] then
  644. JungleMobs[#JungleMobs+1] = obj
  645. end
  646. end
  647. end
  648.  
  649. function OnDeleteObj(obj)
  650. for i, Mob in pairs(JungleMobs) do
  651. if obj.name == Mob.name then
  652. table.remove(JungleMobs, i)
  653. end
  654. end
  655. for i, Mob in pairs(JungleFocusMobs) do
  656. if obj.name == Mob.name then
  657. table.remove(JungleFocusMobs, i)
  658. end
  659. end
  660. end
  661.  
  662. -- Trees
  663. function GetCustomTarget()
  664. TargetSelector:update()
  665. if _G.MMA_Target and _G.MMA_Target.type == myHero.type then return _G.MMA_Target end
  666. if _G.AutoCarry and _G.AutoCarry.Crosshair and _G.AutoCarry.Attack_Crosshair and _G.AutoCarry.Attack_Crosshair.target and _G.AutoCarry.Attack_Crosshair.target.type == myHero.type then return _G.AutoCarry.Attack_Crosshair.target end
  667. return TargetSelector.target
  668. end
  669.  
  670. -- shalzuth
  671. function GenModelPacket(champ, skinId)
  672. p = CLoLPacket(0x97)
  673. p:EncodeF(myHero.networkID)
  674. p.pos = 1
  675. t1 = p:Decode1()
  676. t2 = p:Decode1()
  677. t3 = p:Decode1()
  678. t4 = p:Decode1()
  679. p:Encode1(t1)
  680. p:Encode1(t2)
  681. p:Encode1(t3)
  682. p:Encode1(bit32.band(t4,0xB))
  683. p:Encode1(1)--hardcode 1 bitfield
  684. p:Encode4(skinId)
  685. for i = 1, #champ do
  686. p:Encode1(string.byte(champ:sub(i,i)))
  687. end
  688. for i = #champ + 1, 64 do
  689. p:Encode1(0)
  690. end
  691. p:Hide()
  692. RecvPacket(p)
  693. end
  694.  
  695. function ChooseSkin()
  696. if Settings.misc.skinList ~= lastSkin then
  697. lastSkin = Settings.misc.skinList
  698. GenModelPacket("Ryze", Settings.misc.skinList)
  699. end
  700. end
  701.  
  702. -- Feez
  703. function isFacing(source, target, lineLength)
  704. local sourceVector = Vector(source.visionPos.x, source.visionPos.z)
  705. local sourcePos = Vector(source.x, source.z)
  706. sourceVector = (sourceVector-sourcePos):normalized()
  707. sourceVector = sourcePos + (sourceVector*(GetDistance(target, source)))
  708. return GetDistanceSqr(target, {x = sourceVector.x, z = sourceVector.y}) <= (lineLength and lineLength^2 or 90000)
  709. end
  710.  
  711. function isBothFacing(source, target, lineLength)
  712. return isFacing(source, target, lineLength) and isFacing(target, source, lineLength)
  713. end
  714.  
  715. -- Barasia, vadash, viseversa
  716. function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
  717. radius = radius or 300
  718. quality = math.max(8,round(180/math.deg((math.asin((chordlength/(2*radius)))))))
  719. quality = 2 * math.pi / quality
  720. radius = radius*.92
  721.  
  722. local points = {}
  723. for theta = 0, 2 * math.pi + quality, quality do
  724. local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
  725. points[#points + 1] = D3DXVECTOR2(c.x, c.y)
  726. end
  727.  
  728. DrawLines2(points, width or 1, color or 4294967295)
  729. end
  730.  
  731. function round(num)
  732. if num >= 0 then return math.floor(num+.5) else return math.ceil(num-.5) end
  733. end
  734.  
  735. function DrawCircle2(x, y, z, radius, color)
  736. local vPos1 = Vector(x, y, z)
  737. local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
  738. local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
  739. local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
  740.  
  741. if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y }) then
  742. DrawCircleNextLvl(x, y, z, radius, Settings.drawing.lfc.Width, color, Settings.drawing.lfc.CL)
  743. end
  744. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement