Advertisement
Morness

rivelina

Jul 11th, 2014
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.13 KB | None | 0 0
  1. --[[
  2. Rivelina [Riven] By
  3. _____ _____ __ .__ ____ .____ .__.__ .__ .__ .__
  4. / \_______ / _ \________/ |_|__| ____ __ __ ____ ____ / _ \ | | |__| | | | ____ _________ | | |__| ____
  5. / \ / \_ __ \ / /_\ \_ __ \ __\ |/ ___\| | \/ \ / _ \ > _ </\ | | | | | | | / ___\ / _ \__ \ | | | |/ __ \
  6. / Y \ | \/ / | \ | \/| | | \ \___| | / | ( <_> ) / <_\ \/ | |___| | |_| |__/ /_/ > <_> ) __ \| |_| \ ___/
  7. \____|__ /__| \____|__ /__| |__| |__|\___ >____/|___| /\____/ \_____\ \ |_______ \__|____/____/\___ / \____(____ /____/__|\___ >
  8. \/ \/ \/ \/ \/ \/ /_____/ \/ \/
  9.  
  10. ]]
  11.  
  12. if myHero.charName ~= "Riven" then return end
  13.  
  14.  
  15. local version = 0.83
  16. local AUTOUPDATE = true
  17.  
  18.  
  19. local SCRIPT_NAME = "Rivelina"
  20. local SOURCELIB_URL = "https://raw.github.com/TheRealSource/public/master/common/SourceLib.lua"
  21. local SOURCELIB_PATH = LIB_PATH.."SourceLib.lua"
  22. if FileExist(SOURCELIB_PATH) then
  23. require("SourceLib")
  24. else
  25. DOWNLOADING_SOURCELIB = true
  26. DownloadFile(SOURCELIB_URL, SOURCELIB_PATH, function() print("Required libraries downloaded successfully, please reload") end)
  27. end
  28.  
  29. if DOWNLOADING_SOURCELIB then print("Downloading required libraries, please wait...") return end
  30.  
  31. if AUTOUPDATE then
  32. SourceUpdater(SCRIPT_NAME, version, "raw.github.com", "/gmlyra/BolScripts/master/"..SCRIPT_NAME..".lua", SCRIPT_PATH .. GetCurrentEnv().FILE_NAME, "/gmlyra/BolScripts/master/VersionFiles/"..SCRIPT_NAME..".version"):CheckUpdate()
  33. end
  34.  
  35. local RequireI = Require("SourceLib")
  36. RequireI:Add("vPrediction", "https://raw.github.com/Hellsing/BoL/master/common/VPrediction.lua")
  37. RequireI:Add("SOW", "https://raw.github.com/Hellsing/BoL/master/common/SOW.lua")
  38. --RequireI:Add("mrLib", "https://raw.githubusercontent.com/gmlyra/BolScripts/master/common/mrLib.lua")
  39.  
  40. RequireI:Check()
  41.  
  42. if RequireI.downloadNeeded == true then return end
  43.  
  44.  
  45. require 'VPrediction'
  46. require 'SOW'
  47.  
  48. -- Constants --
  49. local QREADY, WREADY, EREADY, RREADY = false, false, false, false
  50. local ignite, igniteReady = nil, nil
  51. local ts = nil
  52. local VP = nil
  53. local qOff, wOff, eOff, rOff = 0,0,0,0
  54. local abilitySequence = {1, 2, 3, 1, 1, 4, 1, 3, 1, 3, 4, 3, 3, 2, 2, 4, 2, 2}
  55. local Ranges = { Q = 260 + 100, W = 250, E = 325, R = 880 , AA = 250}
  56. local AnimationCancel =
  57. {
  58. [1]=function() myHero:MoveTo(mousePos.x,mousePos.z) end, --"Move"
  59. [2]=function() SendChat('/l') end, --"Laugh"
  60. [3]=function() SendChat('/d') end, --"Dance"
  61. [4]=function() SendChat('/t') end, --"Taunt"
  62. [5]=function() SendChat('/j') end, --"joke"
  63. [6]=function() end,
  64. }
  65.  
  66. local QREADY, WREADY, EREADY, RREADY= false, false, false, false
  67. local BRKSlot, DFGSlot, HXGSlot, BWCSlot, TMTSlot, RAHSlot, RNDSlot, YGBSlot = nil, nil, nil, nil, nil, nil, nil, nil
  68. local BRKREADY, DFGREADY, HXGREADY, BWCREADY, TMTREADY, RAHREADY, RNDREADY, YGBREADY = false, false, false, false, false, false, false, false
  69.  
  70. --[[Auto Attacks]]--
  71. local lastBasicAttack = 0
  72. local swingDelay = 0.45
  73. local swing = false
  74.  
  75. --[[Global Vars]]--
  76. ToInterrupt = {}
  77. InteruptionSpells = {
  78. { charName = "FiddleSticks", spellName = "Crowstorm"},
  79. { charName = "MissFortune", spellName = "MissFortuneBulletTime"},
  80. { charName = "Nunu", spellName = "AbsoluteZero"},
  81. { charName = "Caitlyn", spellName = "CaitlynAceintheHole"},
  82. { charName = "Katarina", spellName = "KatarinaR"},
  83. { charName = "Karthus", spellName = "FallenOne"},
  84. { charName = "Malzahar", spellName = "AlZaharNetherGrasp"},
  85. { charName = "Galio", spellName = "GalioIdolOfDurand"},
  86. { charName = "Darius", spellName = "DariusExecute"},
  87. { charName = "MonkeyKing", spellName = "MonkeyKingSpinToWin"},
  88. { charName = "Vi", spellName = "ViR"},
  89. { charName = "Shen", spellName = "ShenStandUnited"},
  90. { charName = "Urgot", spellName = "UrgotSwap2"},
  91. { charName = "Pantheon", spellName = "Pantheon_GrandSkyfall_Jump"},
  92. { charName = "Lucian", spellName = "LucianR"},
  93. { charName = "Braum", spellName = "BraumR"},
  94. }
  95. --[[/Global Vars]]--
  96.  
  97. function OnLoad()
  98. initComponents()
  99. AddInteruptMenu()
  100. end
  101.  
  102. function initComponents()
  103. -- VPrediction Start
  104. VP = VPrediction()
  105. -- SOW Declare
  106. Orbwalker = SOW(VP)
  107. -- Target Selector
  108. ts = TargetSelector(TARGET_NEAR_MOUSE, 900)
  109.  
  110. Menu = scriptConfig("Rivelina by Lillgoalie & Mr Articuno", "RivenBLMA")
  111.  
  112. Menu:addSubMenu("["..myHero.charName.." - Orbwalker]", "SOWorb")
  113. --Menu.Orbwalk:addParam("orbwalking", "Use Own Orbwalk", SCRIPT_PARAM_ONOFF, true)
  114. Orbwalker:LoadToMenu(Menu.SOWorb)
  115.  
  116. Menu:addSubMenu("["..myHero.charName.." - Combo]", "RivenCombo")
  117. Menu.RivenCombo:addParam("combo", "Combo mode", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  118. -- Menu.RivenCombo:addParam("useF", "Use Flash in Combo ", SCRIPT_PARAM_ONOFF, false)
  119. Menu.RivenCombo:addSubMenu("Q Settings", "qSet")
  120. Menu.RivenCombo.qSet:addParam("useQ", "Use Q in combo", SCRIPT_PARAM_ONOFF, true)
  121. Menu.RivenCombo:addSubMenu("W Settings", "wSet")
  122. Menu.RivenCombo.wSet:addParam("useW", "Use W in combo", SCRIPT_PARAM_ONOFF, true)
  123. Menu.RivenCombo:addSubMenu("E Settings", "eSet")
  124. Menu.RivenCombo.eSet:addParam("useE", "Use E in combo", SCRIPT_PARAM_ONOFF, true)
  125. Menu.RivenCombo:addSubMenu("R Settings", "rSet")
  126. Menu.RivenCombo.rSet:addParam("useWeaving", "Use R on Q>AA", SCRIPT_PARAM_ONOFF, true)
  127. Menu.RivenCombo.rSet:addParam("useR", "Use R in Combo", SCRIPT_PARAM_LIST, 1, { "ALWAYS", "KILLABLE", "NEVER"})
  128. Menu.RivenCombo.rSet:addParam("rRange", "Maximum range to cast R", SCRIPT_PARAM_SLICE, 850, 400, 900, 0)
  129.  
  130. Menu:addSubMenu("["..myHero.charName.." - Harass]", "Harass")
  131. Menu.Harass:addParam("harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("G"))
  132. Menu.Harass:addParam("useQ", "Use Q in Harass", SCRIPT_PARAM_ONOFF, true)
  133. Menu.Harass:addParam("useW", "Use W in Harass", SCRIPT_PARAM_ONOFF, true)
  134. Menu.Harass:addParam("useE", "Use E in Harass", SCRIPT_PARAM_ONOFF, true)
  135.  
  136. Menu:addSubMenu("["..myHero.charName.." - Laneclear]", "Laneclear")
  137. Menu.Laneclear:addParam("lclr", "Laneclear Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  138. Menu.Laneclear:addParam("useClearQ", "Use Q in Laneclear", SCRIPT_PARAM_ONOFF, true)
  139. Menu.Laneclear:addParam("useClearW", "Use W in Laneclear", SCRIPT_PARAM_ONOFF, true)
  140. Menu.Laneclear:addParam("useClearE", "Use E in Laneclear", SCRIPT_PARAM_ONOFF, true)
  141.  
  142. Menu:addSubMenu("["..myHero.charName.." - Jungleclear]", "Jungleclear")
  143. Menu.Jungleclear:addParam("jclr", "Jungleclear Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  144. Menu.Jungleclear:addParam("useClearQ", "Use Q in Jungleclear", SCRIPT_PARAM_ONOFF, true)
  145. Menu.Jungleclear:addParam("useClearW", "Use W in Jungleclear", SCRIPT_PARAM_ONOFF, true)
  146. Menu.Jungleclear:addParam("useClearE", "Use E in Jungleclear", SCRIPT_PARAM_ONOFF, true)
  147.  
  148. Menu:addSubMenu("["..myHero.charName.." - Additionals]", "Ads")
  149. Menu.Ads:addParam("cancel", "Animation Cancel", SCRIPT_PARAM_LIST, 1, { "Move","Laugh","Dance","Taunt","joke","Nothing" })
  150. AddProcessSpellCallback(function(unit, spell)
  151. animationCancel(unit,spell)
  152. end)
  153. Menu.Ads:addParam("autoLevel", "Auto-Level Spells", SCRIPT_PARAM_ONOFF, false)
  154. Menu.Ads:addSubMenu("Escape", "escapeMenu")
  155. Menu.Ads.escapeMenu:addParam("escapeKey", "Escape Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
  156. Menu.Ads:addParam("weaving", "Q>AA", SCRIPT_PARAM_ONOFF, true)
  157. Menu.Ads:addParam("qDelay", "Q Delay", SCRIPT_PARAM_SLICE, 40, 0, 100, 0)
  158. Menu.Ads:addParam("hitOnly", "Only Q if hits", SCRIPT_PARAM_ONOFF, true)
  159. Menu.Ads:addSubMenu("Killsteal", "KS")
  160. Menu.Ads.KS:addParam("useR", "Use Ultimate", SCRIPT_PARAM_ONOFF, true)
  161. Menu.Ads.KS:addParam("ignite", "Use Ignite", SCRIPT_PARAM_ONOFF, false)
  162. Menu.Ads.KS:addParam("igniteRange", "Minimum range to cast Ignite", SCRIPT_PARAM_SLICE, 470, 0, 600, 0)
  163. Menu.Ads:addSubMenu("VIP", "VIP")
  164. Menu.Ads.VIP:addParam("spellCast", "Spell by Packet", SCRIPT_PARAM_ONOFF, true)
  165. Menu.Ads.VIP:addParam("skin", "Use custom skin (Requires Reload)", SCRIPT_PARAM_ONOFF, false)
  166. Menu.Ads.VIP:addParam("skin1", "Skin changer", SCRIPT_PARAM_SLICE, 1, 1, 5)
  167.  
  168. Menu:addSubMenu("["..myHero.charName.." - Target Selector]", "targetSelector")
  169. Menu.targetSelector:addTS(ts)
  170. ts.name = "Focus"
  171.  
  172. Menu:addSubMenu("["..myHero.charName.." - Drawings]", "drawings")
  173. local DManager = DrawManager()
  174. DManager:CreateCircle(myHero, Ranges.AA, 1, {255, 0, 255, 0}):AddToMenu(Menu.drawings,"AA range", true, true, true)
  175. DManager:CreateCircle(myHero, Ranges.Q, 1, {255, 0, 255, 0}):AddToMenu(Menu.drawings,"Q range", true, true, true)
  176. DManager:CreateCircle(myHero, Ranges.W, 1, {255, 0, 255, 0}):AddToMenu(Menu.drawings,"W range", true, true, true)
  177. DManager:CreateCircle(myHero, Ranges.E, 1, {255, 0, 255, 0}):AddToMenu(Menu.drawings,"E range", true, true, true)
  178. DManager:CreateCircle(myHero, Ranges.R, 1, {255, 0, 255, 0}):AddToMenu(Menu.drawings,"R range", true, true, true)
  179.  
  180. enemyMinions = minionManager(MINION_ENEMY, 360, myHero, MINION_SORT_MAXHEALTH_DEC)
  181. allyMinions = minionManager(MINION_ALLY, 360, myHero, MINION_SORT_MAXHEALTH_DEC)
  182. jungleMinions = minionManager(MINION_JUNGLE, 360, myHero, MINION_SORT_MAXHEALTH_DEC)
  183.  
  184. if Menu.Ads.VIP.skin and VIP_USER then
  185. GenModelPacket("Riven", Menu.Ads.VIP.skin1)
  186. end
  187.  
  188. PrintChat("<font color = \"#33CCCC\">Rivelina by</font> <font color = \"#fff8e7\">Lillgoalie</font> <font color = \"#33CCCC\">&</font> <font color = \"#fff8e7\">Mr Articuno</font>")
  189. end
  190.  
  191. function OnTick()
  192. ts:update()
  193. enemyMinions:update()
  194. allyMinions:update()
  195. jungleMinions:update()
  196. CDHandler()
  197. KillSteal()
  198.  
  199. DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot, BRKSlot, TMTSlot, RAHSlot, RNDSlot, STDSlot = GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100), GetInventorySlotItem(3153), GetInventorySlotItem(3077), GetInventorySlotItem(3074), GetInventorySlotItem(3143), GetInventorySlotItem(3131)
  200. QREADY = (myHero:CanUseSpell(_Q) == READY)
  201. WREADY = (myHero:CanUseSpell(_W) == READY)
  202. EREADY = (myHero:CanUseSpell(_E) == READY)
  203. RREADY = (myHero:CanUseSpell(_R) == READY)
  204. DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  205. HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
  206. BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
  207. BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
  208. TMTREADY = (TMTSlot ~= nil and myHero:CanUseSpell(TMTSlot) == READY)
  209. RAHREADY = (RAHSlot ~= nil and myHero:CanUseSpell(RAHSlot) == READY)
  210. RNDREADY = (RNDSlot ~= nil and myHero:CanUseSpell(RNDSlot) == READY)
  211. STDREADY = (STDSlot ~= nil and myHero:CanUseSpell(STDSlot) == READY)
  212. IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  213.  
  214.  
  215. if Menu.Ads.autoLevel then
  216. AutoLevel()
  217. end
  218.  
  219. if Menu.Ads.escapeMenu.escapeKey then
  220. EscapeMode()
  221. end
  222.  
  223. if Menu.RivenCombo.combo then
  224. Combo()
  225. end
  226.  
  227. if Menu.Harass.harass then
  228. Harass()
  229. end
  230.  
  231. if Menu.Laneclear.lclr then
  232. LaneClear()
  233. end
  234.  
  235. if Menu.Jungleclear.jclr then
  236. JungleClear()
  237. end
  238.  
  239. end
  240.  
  241. function CDHandler()
  242. -- Spells
  243. QREADY = (myHero:CanUseSpell(_Q) == READY)
  244. WREADY = (myHero:CanUseSpell(_W) == READY)
  245. EREADY = (myHero:CanUseSpell(_E) == READY)
  246. RREADY = (myHero:CanUseSpell(_R) == READY)
  247. -- Items
  248. tiamatSlot = GetInventorySlotItem(3077)
  249. hydraSlot = GetInventorySlotItem(3074)
  250. youmuuSlot = GetInventorySlotItem(3142)
  251. bilgeSlot = GetInventorySlotItem(3144)
  252. bladeSlot = GetInventorySlotItem(3153)
  253.  
  254. tiamatReady = (tiamatSlot ~= nil and myHero:CanUseSpell(tiamatSlot) == READY)
  255. hydraReady = (hydraSlot ~= nil and myHero:CanUseSpell(hydraSlot) == READY)
  256. youmuuReady = (youmuuSlot ~= nil and myHero:CanUseSpell(youmuuSlot) == READY)
  257. bilgeReady = (bilgeSlot ~= nil and myHero:CanUseSpell(bilgeSlot) == READY)
  258. bladeReady = (bladeSlot ~= nil and myHero:CanUseSpell(bladeSlot) == READY)
  259. -- Summoners
  260. if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then
  261. ignite = SUMMONER_1
  262. elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then
  263. ignite = SUMMONER_2
  264. end
  265. igniteReady = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  266. end
  267.  
  268. -- Harass --
  269.  
  270. function Harass()
  271. local target = ts.target
  272.  
  273. if target ~= nil and ValidTarget(target) then
  274. if Menu.Harass.useE and EREADY then
  275. CastSpell(_E, target.x, target.z)
  276. end
  277.  
  278. if Menu.Harass.useQ and QREADY then
  279. if Menu.Ads.weaving and GetDistance(target) <= Ranges.Q + Ranges.AA then
  280. if not swing then
  281. CastSpell(_Q, target.x, target.z)
  282. swing = true
  283. else
  284. Orbwalker:Attack(target)
  285. end
  286. end
  287. end
  288.  
  289. if Menu.Harass.useW and ValidTarget(target, Ranges.W) and GetDistance(target.visionPos, myHero.visionPos) < Ranges.W and WREADY then
  290. CastSpell(_W)
  291. ItemUsage(target)
  292. end
  293. end
  294.  
  295. end
  296.  
  297. -- End Harass --
  298.  
  299.  
  300. -- Combo Selector --
  301.  
  302. function Combo()
  303. local typeCombo = 0
  304. if ts.target ~= nil then
  305. AllInCombo(ts.target, 0)
  306. end
  307.  
  308. --SmartCombo(ts.target)
  309. end
  310.  
  311. -- Combo Selector --
  312.  
  313. -- All In Combo --
  314.  
  315. function AllInCombo(target, typeCombo)
  316. if target ~= nil and typeCombo == 0 then
  317. -- Secured stun
  318. if ValidTarget(target, Ranges.W - 20) and GetDistance(target.visionPos, myHero.visionPos) < Ranges.W and WREADY then
  319. CastSpell(_W)
  320. if ValidTarget(target, Ranges.W) then
  321. ItemUsage(target)
  322. end
  323. end
  324.  
  325. if QREADY and Menu.RivenCombo.qSet.useQ then
  326. if not Menu.Ads.hitOnly and GetDistance(target) >= Ranges.Q then
  327. CastSpell(_Q, target.x, target.z)
  328. end
  329.  
  330. if Menu.Ads.weaving and GetDistance(target) <= Ranges.Q + Ranges.AA then
  331. if not swing then
  332. CastSpell(_Q, target.x, target.z)
  333. swing = true
  334. end
  335. end
  336. end
  337.  
  338. -- E+W(+Q) Range Combo --
  339. -- Initiate part
  340. if ValidTarget(target, 900) and Menu.RivenCombo.eSet.useE and EREADY then
  341. CastSpell(_E, target.x, target.z)
  342. end
  343. -- Ultimate passive cast part
  344. if RREADY and myHero:GetSpellData(_R).name == 'RivenFengShuiEngine' and ValidTarget(target, 360) then
  345. if Menu.RivenCombo.rSet.useR == 1 then
  346. CastSpell(_R)
  347. end
  348. if Menu.RivenCombo.rSet.useR == 2 then
  349. CastSpell(_R)
  350. end
  351. end
  352. -- W casting part with range checks
  353. if ValidTarget(target, Ranges.W) and GetDistance(target.visionPos, myHero.visionPos) < Ranges.W and WREADY and Menu.RivenCombo.wSet.useW then
  354. CastSpell(_W)
  355. if ValidTarget(target, Ranges.W) then
  356. ItemUsage(target)
  357. end
  358. elseif ValidTarget(target, Ranges.E + Ranges.W) and GetDistance(target.visionPos, myHero.visionPos) < Ranges.W + Ranges.E and EREADY and Menu.RivenCombo.eSet.useE then
  359. CastSpell(_E, target.x, target.z)
  360. if ValidTarget(target, Ranges.W) then
  361. ItemUsage(target)
  362. end
  363. CastSpell(_W)
  364. end
  365. -- Ultimate active cast part
  366. if ValidTarget(target, Menu.RivenCombo.rSet.rRange) and RREADY and myHero:GetSpellData(_R).name == 'rivenizunablade' then
  367. if Menu.RivenCombo.rSet.useR == 1 and target ~= nil and ValidTarget(target, Menu.RivenCombo.rSet.rRange) then
  368. CastSpell(_R, target.x, target.z)
  369. end
  370. if Menu.RivenCombo.rSet.useR == 2 then
  371. for i, enemy in ipairs(GetEnemyHeroes()) do
  372. rDmg = getDmg("R", enemy, myHero)
  373. if enemy ~= nil and ValidTarget(enemy, Menu.RivenCombo.rSet.rRange) and enemy.health < rDmg then
  374. CastSpell(_R, enemy.x, enemy.z)
  375. end
  376. end
  377. end
  378. end
  379.  
  380. -- E+W+Q Range Combo --
  381.  
  382. -- E+Q+Q+Q+W Range Combo --
  383. end
  384. end
  385.  
  386. -- All In Combo --
  387.  
  388. function LaneClear()
  389. for i, target in pairs(enemyMinions.objects) do
  390. if Menu.Laneclear.useClearE and EREADY and ValidTarget(target, Ranges.E) then
  391. ItemUsage(target)
  392. CastSpell(_E, target.x, target.z)
  393. end
  394.  
  395. if QREADY and Menu.Laneclear.useClearQ then
  396. if not Menu.Ads.hitOnly and GetDistance(target) >= Ranges.Q then
  397. CastSpell(_Q, target.x, target.z)
  398. end
  399.  
  400. if Menu.Ads.weaving and GetDistance(target) <= Ranges.Q + Ranges.AA then
  401. if not swing then
  402. CastSpell(_Q, target.x, target.z)
  403. swing = true
  404. end
  405. end
  406. end
  407.  
  408. if Menu.Laneclear.useClearW and WREADY and ValidTarget(target, Ranges.W) and GetDistance(target.visionPos, myHero.visionPos) < Ranges.W then
  409. ItemUsage(target)
  410. CastSpell(_W)
  411. end
  412. end
  413. end
  414.  
  415. function JungleClear()
  416. for i, target in pairs(jungleMinions.objects) do
  417. if target ~= nil then
  418. if Menu.Jungleclear.useClearE and EREADY then
  419. CastSpell(_E, target.x, target.z)
  420. end
  421.  
  422. if QREADY and Menu.Jungleclear.useClearQ then
  423. if not Menu.Ads.hitOnly and GetDistance(target) >= Ranges.Q then
  424. CastSpell(_Q, target.x, target.z)
  425. end
  426.  
  427. if Menu.Ads.weaving and GetDistance(target) <= Ranges.Q + Ranges.AA then
  428. if not swing then
  429. CastSpell(_Q, target.x, target.z)
  430. swing = true
  431. end
  432. end
  433. end
  434.  
  435. if Menu.Jungleclear.useClearW and WREADY and ValidTarget(target, Ranges.W) and GetDistance(target) <= Ranges.W then
  436. ItemUsage(target)
  437. CastSpell(_W)
  438. end
  439.  
  440. end
  441. end
  442. end
  443.  
  444. function AutoLevel()
  445. local qL, wL, eL, rL = player:GetSpellData(_Q).level + qOff, player:GetSpellData(_W).level + wOff, player:GetSpellData(_E).level + eOff, player:GetSpellData(_R).level + rOff
  446. if qL + wL + eL + rL < player.level then
  447. local spellSlot = { SPELL_1, SPELL_2, SPELL_3, SPELL_4, }
  448. local level = { 0, 0, 0, 0 }
  449. for i = 1, player.level, 1 do
  450. level[abilitySequence[i]] = level[abilitySequence[i]] + 1
  451. end
  452. for i, v in ipairs({ qL, wL, eL, rL }) do
  453. if v < level[i] then LevelSpell(spellSlot[i]) end
  454. end
  455. end
  456. end
  457.  
  458. function KillSteal()
  459. if Menu.Ads.KS.useR then
  460. KSR()
  461. end
  462. if Menu.Ads.KS.ignite then
  463. IgniteKS()
  464. end
  465. end
  466.  
  467. -- Use Ultimate to KS --
  468.  
  469. function KSR()
  470. for i, enemy in ipairs(GetEnemyHeroes()) do
  471. rDmg = getDmg("R", enemy, myHero)
  472.  
  473.  
  474. if RREADY and enemy ~= nil and ValidTarget(enemy, Menu.RivenCombo.rSet.rRange) and enemy.health < rDmg then
  475. if myHero:GetSpellData(_R).name == 'RivenFengShuiEngine' then
  476. CastSpell(_R)
  477. end
  478. if myHero:GetSpellData(_R).name == 'rivenizunablade' then
  479. CastSpell(_R, enemy.x, enemy.z)
  480. end
  481. end
  482. end
  483. end
  484.  
  485. -- Use Ultimate to KS --
  486.  
  487. -- Auto Ignite get the maximum range to avoid over kill --
  488.  
  489. function IgniteKS()
  490. if igniteReady then
  491. local Enemies = GetEnemyHeroes()
  492. for i, val in ipairs(Enemies) do
  493. if ValidTarget(val, 600) then
  494. if getDmg("IGNITE", val, myHero) > val.health and RReady ~= true and GetDistance(val) >= Menu.Ads.KS.igniteRange then
  495. CastSpell(ignite, val)
  496. end
  497. end
  498. end
  499. end
  500. end
  501.  
  502. -- Auto Ignite --
  503.  
  504. function EscapeMode()
  505. myHero:MoveTo(mousePos.x, mousePos.z)
  506. for i, enemy in ipairs(GetEnemyHeroes()) do
  507. if enemy ~= nil and ValidTarget(enemy, Ranges.W) and GetDistance(enemy.visionPos, myHero.visionPos) < Ranges.W and WREADY then
  508. CastSpell(_W)
  509. end
  510. end
  511.  
  512. if EREADY and QREADY then
  513. DelayAction(function() CastSpell(_Q, mousePos.x, mousePos.z) end, 8 - GetLatency())
  514. elseif EREADY and not QREADY then
  515. DelayAction(function() CastSpell(_E, mousePos.x, mousePos.z) end, 15 - GetLatency())
  516. elseif not EREADY and QREADY then
  517. DelayAction(function() CastSpell(_Q, mousePos.x, mousePos.z) end, 8 - GetLatency())
  518. end
  519.  
  520. end
  521.  
  522. function HealthCheck(unit, HealthValue)
  523. if unit.health > (unit.maxHealth * (HealthValue/100)) then
  524. return true
  525. else
  526. return false
  527. end
  528. end
  529.  
  530. function animationCancel(unit, spell)
  531. if not unit.isMe then return end
  532.  
  533. if spell.name == 'RivenTriCleave' then -- _Q
  534. DelayAction(function() Orbwalker:resetAA() end, 0.25)
  535. AnimationCancel[Menu.Ads.cancel]()
  536. else
  537. if spell.name == 'RivenMartyr' then -- _W
  538. AnimationCancel[Menu.Ads.cancel]()
  539. else
  540. if spell.name == 'RivenFeint' then -- _E
  541. AnimationCancel[Menu.Ads.cancel]()
  542. else
  543. if spell.name == 'RivenFengShuiEngine' then -- _R first cast
  544. AnimationCancel[Menu.Ads.cancel]()
  545. else
  546. if spell.name == 'rivenizunablade' then -- _R Second cast
  547. AnimationCancel[Menu.Ads.cancel]()
  548. end
  549. end
  550. end
  551. end
  552. end
  553. end
  554.  
  555. function ItemUsage(target)
  556.  
  557. if DFGREADY then CastSpell(DFGSlot, target) end
  558. if HXGREADY then CastSpell(HXGSlot, target) end
  559. if BWCREADY then CastSpell(BWCSlot, target) end
  560. if BRKREADY then CastSpell(BRKSlot, target) end
  561. if TMTREADY and GetDistance(target) < 385 then CastSpell(TMTSlot) end
  562. if RAHREADY and GetDistance(target) < 385 then CastSpell(RAHSlot) end
  563. if RNDREADY and GetDistance(target) < 385 then CastSpell(RNDSlot) end
  564.  
  565. end
  566.  
  567. -- By Bilbao & Mr Articuno --
  568.  
  569. function AddInteruptMenu()
  570. Menu:addSubMenu('Interuptions', 'inter')
  571. Menu.inter:addParam("inter1", "Interupt skills", SCRIPT_PARAM_ONOFF, false)
  572. Menu.inter:addParam("inter2", "------------------------------", SCRIPT_PARAM_INFO, "")
  573. for i, enemy in ipairs(GetEnemyHeroes()) do
  574. for _, champ in pairs(InteruptionSpells) do
  575. if enemy.charName == champ.charName then
  576. table.insert(ToInterrupt, {charName = champ.charName, spellName = champ.spellName})
  577. end
  578. end
  579. end
  580. if #ToInterrupt > 0 then
  581. for _, Inter in pairs(ToInterrupt) do
  582. Menu.inter:addParam(Inter.spellName, "Stop "..Inter.charName.." "..Inter.spellName, SCRIPT_PARAM_ONOFF, true)
  583. end
  584. else
  585. Menu.inter:addParam("bilbao", "No supported skills to interupt.", SCRIPT_PARAM_INFO, "")
  586. end
  587. end
  588.  
  589. function OnProcessSpell(unit, spell)
  590. if Menu.inter.inter1 and myHero:CanUseSpell(_W) == READY then
  591. if #ToInterrupt > 0 then
  592. for _, Inter in pairs(ToInterrupt) do
  593. if spell.name == Inter.spellName and unit.team ~= myHero.team then
  594. if Menu.inter[Inter.spellName] then
  595. if ValidTarget(unit, Ranges.W) and GetDistance(unit.visionPos, myHero.visionPos) < Ranges.W then
  596. CastSpell(_W)
  597. end
  598. end
  599. end
  600. end
  601. end
  602. end
  603.  
  604. if Menu.Laneclear.lclr or Menu.Jungleclear.jclr or Menu.Harass.harass or Menu.RivenCombo.combo then
  605. if Menu.Ads.weaving then
  606. if unit.isMe and spell and spell.target and ValidTarget(spell.target, 400) and spell.name:lower():find("attack") then
  607. DelayAction(function()
  608. if ValidTarget(spell.target, 400) and (TMTREADY or RAHREADY) then
  609. if TMTREADY then
  610. CastSpell(TMTSlot)
  611. elseif RAHREADY then
  612. CastSpell(RAHSlot)
  613. end
  614. elseif myHero:CanUseSpell(_Q) == READY and ValidTarget(spell.target, (myHero.range + GetDistance(myHero.minBBox))) then
  615. swing = false
  616. end
  617. end, (spell.windUpTime - (GetLatency() / 2000)))
  618. end
  619. else
  620. if ValidTarget(spell.target, (myHero.range + GetDistance(myHero.minBBox))) then
  621. CastSpell(_Q, spell.target.x, spell.target.z)
  622. end
  623. end
  624. end
  625. end
  626.  
  627. -- By Bilbao & Mr Articuno --
  628.  
  629.  
  630. --Start Manciuszz orbwalker credit
  631. function OrbWalking(target)
  632. if TimeToAttack() and GetDistance(target) <= Ranges.AA then
  633. myHero:Attack(target)
  634. elseif heroCanMove() then
  635. moveToCursor()
  636. end
  637. end
  638.  
  639. function TimeToAttack()
  640. return (GetTickCount() + GetLatency()/2 > lastAttack + lastAttackCD)
  641. end
  642.  
  643. function heroCanMove()
  644. return (GetTickCount() + GetLatency()/2 > lastAttack + lastWindUpTime + 20)
  645. end
  646.  
  647. function moveToCursor()
  648. if GetDistance(mousePos) then
  649. local moveToPos = myHero + (Vector(mousePos) - myHero):normalized()*300
  650. myHero:MoveTo(moveToPos.x, moveToPos.z)
  651. end
  652. end
  653.  
  654. function OnAnimation(unit,animationName)
  655. if unit.isMe and lastAnimation ~= animationName then lastAnimation = animationName end
  656. end
  657. --End Manciuszz orbwalker credit
  658.  
  659.  
  660. -- Change skin function, made by Shalzuth
  661. function GenModelPacket(champ, skinId)
  662. p = CLoLPacket(0x97)
  663. p:EncodeF(myHero.networkID)
  664. p.pos = 1
  665. t1 = p:Decode1()
  666. t2 = p:Decode1()
  667. t3 = p:Decode1()
  668. t4 = p:Decode1()
  669. p:Encode1(t1)
  670. p:Encode1(t2)
  671. p:Encode1(t3)
  672. p:Encode1(bit32.band(t4,0xB))
  673. p:Encode1(1)--hardcode 1 bitfield
  674. p:Encode4(skinId)
  675. for i = 1, #champ do
  676. p:Encode1(string.byte(champ:sub(i,i)))
  677. end
  678. for i = #champ + 1, 64 do
  679. p:Encode1(0)
  680. end
  681. p:Hide()
  682. RecvPacket(p)
  683. end
  684.  
  685. function OnDraw()
  686.  
  687. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement