-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathLightningRyze.lua
More file actions
530 lines (474 loc) · 18.5 KB
/
LightningRyze.lua
File metadata and controls
530 lines (474 loc) · 18.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
--[[ Lightning Ryze - Let's go let's go
Changelog:
0.002:
-Fixed CastSpell error cause by ignite
-Fixed bug with long combo
0.001: Initial release
--]]
local ryze_autoupdate = false
local silentUpdate = false
local version = 0.002
local scriptName = "LightningRyze"
myHero = GetMyHero()
if myHero.charName ~= 'Ryze' then return end
--{ Sourcelib check
local sourceLibFound = true
if FileExist(LIB_PATH .. "SourceLib.lua") then
require "SourceLib"
else
sourceLibFound = false
DownloadFile("https://raw.github.com/TheRealSource/public/master/common/SourceLib.lua", LIB_PATH .. "SourceLib.lua", function() print("<font color=\"#6699ff\"><b>" .. scriptName .. ":</b></font> <font color=\"#FFFFFF\">SourceLib downloaded! Please reload!</font>") end)
end
if not sourceLibFound then print("Can't find sourcelib") return end
--}
--{ Auto update
if ryze_autoupdate then
SourceUpdater(scriptName, version, "raw.github.com", "/LazerBoL/BoL/master/" .. scriptName .. ".lua", SCRIPT_PATH .. GetCurrentEnv().FILE_NAME, "/LazerBoL/BoL/master/version/" .. scriptName .. ".version"):SetSilent(silentUpdate):CheckUpdate()
end
--}
--{ Lib downloader
local libDownloader = Require(scriptName)
libDownloader:Add("VPrediction", "https://raw.github.com/Hellsing/BoL/master/common/VPrediction.lua")
libDownloader:Add("SOW", "https://raw.github.com/Hellsing/BoL/master/common/SOW.lua")
libDownloader:Add("Selector", "https://raw.githubusercontent.com/pqmailer/BoL_Scripts/master/Paid/Selector.lua")
libDownloader:Check()
if libDownloader.downloadNeeded then return end
--}
function RyzeData()
SpellData = {
Q = {range = 625 ,delay = 0.25 ,speed = 1400},
W = {range = 600 ,delay = 0.25 ,speed = math.huge},
E = {range = 600 ,delay = 0.25 ,speed = 1000},
R = {range = -1 ,delay = 0.25 ,speed = math.huge}
}
MainCombo = {ItemManager:GetItem("DFG"):GetId(), _Q , _E , _W, _IGNITE, _AA}
maxQRWE = {1,2,3,1,1,4,1,2,1,2,4,2,2,3,3,4,3,3}
LastFlashTime = 0
end
function OnLoad()
--{ Variables
RyzeData()
VP = VPrediction()
OW = SOW(VP)
STS = SimpleTS()
DM = DrawManager()
DLib = DamageLib()
--}
Selector.Instance()
--{ Spell data
Q = Spell(_Q, SpellData.Q.range)
W = Spell(_W, SpellData.W.range)
E = Spell(_E, SpellData.E.range)
R = Spell(_R, SpellData.R.range)
DLib:RegisterDamageSource(_Q, _MAGIC, 35, 25, {_MAGIC,_MAGIC}, {_AP,_MAXMANA}, {0.4, 0.065}, function() return (player:CanUseSpell(_Q) == READY) end)
DLib:RegisterDamageSource(_W, _MAGIC, 25, 35, {_MAGIC,_MAGIC}, {_AP,_MAXMANA}, {0.6, 0.045} , function() return (player:CanUseSpell(_W) == READY) end)
DLib:RegisterDamageSource(_E, _MAGIC, 30, 20, {_MAGIC,_MAGIC}, {_AP,_MAXMANA}, {0.35, 0.01} , function() return (player:CanUseSpell(_E) == READY) end)
__Q = 1234
__W = 1235
__E = 1236
DLib:RegisterDamageSource(__Q, _MAGIC, 35, 25, {_MAGIC,_MAGIC}, {_AP,_MAXMANA}, {0.4, 0.065})
DLib:RegisterDamageSource(__W, _MAGIC, 25, 35, {_MAGIC,_MAGIC}, {_AP,_MAXMANA}, {0.6, 0.045})
DLib:RegisterDamageSource(__E, _MAGIC, 30, 20, {_MAGIC,_MAGIC}, {_AP,_MAXMANA}, {0.35, 0.01})
--}
--{ Menu
Menu = scriptConfig("Lightning Ryze","LightningRyze")
--Author
Menu:addSubMenu("[ Ryze : Script Information ]","Script")
Menu.Script:addParam("Author","Author: Lazer",SCRIPT_PARAM_INFO,"")
Menu.Script:addParam("Credits","Credits: Pain,ViceVersa,turtlebot,",SCRIPT_PARAM_INFO,"")
Menu.Script:addParam("Credits1","Honda7,Hellsing,shagratt,Feez",SCRIPT_PARAM_INFO,"")
Menu.Script:addParam("Version","Version: " .. version,SCRIPT_PARAM_INFO,"")
--General
Menu:addSubMenu("[ Ryze : General ]","General")
Menu.General:addParam("Combo","Combo",SCRIPT_PARAM_ONKEYDOWN,false,32)
Menu.General:addParam("Harass","Harass",SCRIPT_PARAM_ONKEYDOWN,false,string.byte("C"))
Menu.General:addParam("Farm","Farm/Jungle press",SCRIPT_PARAM_ONKEYDOWN,false,string.byte("V"))
--Target Selector
Menu:addSubMenu("[ Ryze : Target Selector ]","TS")
Menu.TS:addParam("TS","Target Selector",SCRIPT_PARAM_LIST,2,{"AllClass","STS","SAC: Reborn","MMA","Selector"})
ts = TargetSelector(TARGET_LESS_CAST,625,DAMAGE_MAGIC,false)
ts.name = "AllClass TS"
Menu.TS:addTS(ts)
--Orbwalking
Menu:addSubMenu("[ Ryze : Orbwalking ]","Orbwalking")
OW:LoadToMenu(Menu.Orbwalking)
--Combo
Menu:addSubMenu("[ Ryze : Combo ]","Combo")
Menu.Combo:addParam("Mode","Combo mode",SCRIPT_PARAM_LIST,1,{"Mixed mode","Burst combo","Long combo"})
Menu.Combo:addParam("R","Use R in combo",SCRIPT_PARAM_ONOFF,true)
Menu.Combo:addParam("Item","Use item in combo",SCRIPT_PARAM_ONOFF,true)
Menu.Combo:addParam("Ignite","Use ignite in combo",SCRIPT_PARAM_ONOFF,true)
--Harass
Menu:addSubMenu("[ Ryze : Harass ]","Harass")
Menu.Harass:addParam("Q","Use Q to harass",SCRIPT_PARAM_ONOFF,true)
Menu.Harass:addParam("W","Use W to harass",SCRIPT_PARAM_ONOFF,false)
Menu.Harass:addParam("E","Use E to harass",SCRIPT_PARAM_ONOFF,true)
--Jungle/Farm Settings
Menu:addSubMenu("[ Ryze : Farm/Jungle Settings ]","Farm")
Menu.Farm:addParam("LInfo","--------Farm Lane settings--------",SCRIPT_PARAM_INFO,"")
Menu.Farm:addParam("LQ","Use Q to 'Farm/Jungle'",SCRIPT_PARAM_ONOFF,true)
Menu.Farm:addParam("LW","Use W to 'Farm/Jungle'",SCRIPT_PARAM_ONOFF,false)
Menu.Farm:addParam("LE","Use E to 'Farm/Jungle'",SCRIPT_PARAM_ONOFF,false)
Menu.Farm:addParam("LR","Use R to 'Farm/Jungle'",SCRIPT_PARAM_ONOFF,false)
Menu.Farm:addParam("Mana","Don't farm if mana < %",SCRIPT_PARAM_SLICE,20,0,100)
Menu.Farm:addParam("JInfo","--------Farm jungle settings--------",SCRIPT_PARAM_INFO,"")
Menu.Farm:addParam("JQ","Use Q to 'Farm/Jungle'",SCRIPT_PARAM_ONOFF,true)
Menu.Farm:addParam("JW","Use W to 'Farm/Jungle'",SCRIPT_PARAM_ONOFF,true)
Menu.Farm:addParam("JE","Use E to 'Farm/Jungle'",SCRIPT_PARAM_ONOFF,true)
Menu.Farm:addParam("JR","Use R to 'Farm/Jungle'",SCRIPT_PARAM_ONOFF,true)
--Interrupt Settings
Menu:addSubMenu("[ Ryze : Auto interrupt settings ]","Interrupt")
Interrupter(Menu.Interrupt, OnTargetInterruptable)
--Extra Settings
Menu:addSubMenu("[ Ryze: Extra Settings ]","Extra")
if VIP_USER then
Menu.Extra:addParam("Packet","Use Packet cast",SCRIPT_PARAM_ONOFF,false)
end
Menu.Extra:addParam("AutoIgnite","Auto ignite if killable",SCRIPT_PARAM_ONOFF,true)
Menu.Extra:addParam("AutoLevel","Auto level sequence",SCRIPT_PARAM_LIST,1,{"None","QRWE"})
--Draw Settings
Menu:addSubMenu("[ Ryze : Draw ]","Draw")
DM:CreateCircle(myHero, SpellData.Q.range, 1, {255, 100, 0, 255}):AddToMenu(Menu.Draw, "Q Range", true, true, true)
DM:CreateCircle(myHero, SpellData.W.range, 1, {255, 0, 100, 255}):AddToMenu(Menu.Draw, "W,E Range", true, true, true)
-- Predicted damage tick on health bar
DLib:AddToMenu(Menu.Draw, MainCombo)
-- Minion & Jungle Mob
EnemyMinion = minionManager(MINION_ENEMY,625,myHero,MINION_SORT_HEALTH_ASC)
JungMinion = minionManager(MINION_JUNGLE,625,myHero,MINION_SORT_MAXHEALTH_DEC)
--}
TickLimiter(OnTick10, 10)
TickLimiter(OnTick1, 1)
--{ Perma show
Menu.Script:permaShow("Author")
Menu.General:permaShow("Combo")
Menu.General:permaShow("Harass")
Menu.General:permaShow("Farm")
Menu.Combo:permaShow("Mode")
Menu.Combo:permaShow("Ignite")
--}
--{ All loaded
print("<font color='#FFBF00'>Lightning </font><font color='#0064FF'>Ryze</font><font color='#00FFFF'> v" .. version .."</font>")
--}
end
--{ Target Selector
function GrabTarget()
if _G.Selector_Enabled and Menu.TS.TS == 5 then
return Selector.GetTarget(SelectorMenu.Get().mode, nil, {distance = MaxRange()})
elseif _G.MMA_Loaded and Menu.TS.TS == 4 then
return _G.MMA_ConsideredTarget(MaxRange())
elseif _G.AutoCarry and Menu.TS.TS == 3 then
return _G.AutoCarry.Crosshair:GetTarget()
elseif Menu.TS.TS == 2 then
return STS:GetTarget(MaxRange())
else
ts.range = MaxRange()
ts:update()
return ts.target
end
end
function GrabTargetInRange(rangeT)
if _G.Selector_Enabled and Menu.TS.TS == 5 then
return Selector.GetTarget(SelectorMenu.Get().mode, nil, {distance = rangeT})
elseif _G.MMA_Loaded and Menu.TS.TS == 4 then
return _G.MMA_ConsideredTarget(rangeT)
elseif _G.AutoCarry and Menu.TS.TS == 3 then
return _G.AutoCarry.Crosshair:GetTarget()
elseif Menu.TS.TS == 2 then
return STS:GetTarget(rangeT)
else
ts.range = rangeT
ts:update()
return ts.target
end
end
function MaxRange()
if Q:IsReady() then
return SpellData.Q.range
elseif W:IsReady() then
return SpellData.W.range
elseif E:IsReady() then
return SpellData.E.range
else
return myHero.range + 50
end
end
--}
--{Interrupt
function OnTargetInterruptable(unit,spell)
if W:IsReady() and unit then
SpellCast(_W,unit)
end
end
--}
--{ Combo
assert(load(Base64Decode("G0x1YVIAAQQEBAgAGZMNChoKAAAAAAAAAAAAAQIDAAAAJQAAAAgAAIAfAIAAAQAAAAQKAAAAU3BlbGxDYXN0AAEAAAACAAAABQAAAAIACBkAAACBAAAAwUAAAAaBQAAbAQAAF4ADgAbBQAAHAUECB0FBAhsBAAAXQAKABkFBAEGBAQCLgQAAigGAg8dBwgCKwQGEHYGAAQyBQgIdQQABF8AAgAbBQgBAAQAAgAGAAB1BgAEfAIAADAAAAAQUAAAARW5jcnlwdGVkIGJ5IGJpbGJhbwAEEwAAAEFwcHJvdmVkIGJ5IEtsb2tqZQAECQAAAFZJUF9VU0VSAAQFAAAATWVudQAEBgAAAEV4dHJhAAQHAAAAUGFja2V0AAQHAAAAU19DQVNUAAQIAAAAc3BlbGxJZAAEEAAAAHRhcmdldE5ldHdvcmtJZAAECgAAAG5ldHdvcmtJRAAEBQAAAHNlbmQABAoAAABDYXN0U3BlbGwAAAAAAAEAAAAAABAAAABAb2JmdXNjYXRlZC5sdWEAGQAAAAIAAAACAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAFAAAABQAAAAUAAAAFAAAABQAAAAUAAAAFAAAABQAAAAUAAAAFAAAABQAAAAUAAAAFAAAABQAAAAUAAAAEAAAAAgAAAGEAAAAAABkAAAACAAAAYgAAAAAAGQAAAAIAAABjAAEAAAAZAAAAAgAAAGQAAgAAABkAAAABAAAABQAAAF9FTlYAAQAAAAEAEAAAAEBvYmZ1c2NhdGVkLmx1YQADAAAABQAAAAIAAAAFAAAAAAAAAAEAAAAFAAAAX0VOVgA="), nil, "bt", _ENV))()
-- Enemy in range of myHero
function CountEnemyInRange(target,range)
local count = 0
for i = 1, heroManager.iCount do
local hero = heroManager:GetHero(i)
if hero.team ~= myHero.team and hero.visible and not hero.dead and GetDistanceSqr(target,hero) <= range*range then
count = count + 1
end
end
return count
end
-- Credits: Feez
function isFacing(source, target, lineLength)
local sourceVector = Vector(source.visionPos.x, source.visionPos.z)
local sourcePos = Vector(source.x, source.z)
sourceVector = (sourceVector-sourcePos):normalized()
sourceVector = sourcePos + (sourceVector*(GetDistance(target, source)))
return GetDistanceSqr(target, {x = sourceVector.x, z = sourceVector.y}) <= (lineLength and lineLength^2 or 90000)
end
-- End credits
function ComboMixed(UseR,target)
if target == nil then return end
local enemyPos = VP:GetPredictedPos(target,SpellData.W.delay)
if os.clock() - LastFlashTime < 1 and W:IsReady() then
SpellCast(_W,target)
else
if DLib:IsKillable(target, {_Q}) and Q:IsReady() then
SpellCast(_Q,target)
elseif DLib:IsKillable(target, {_E}) and E:IsReady() then
SpellCast(_E,target)
elseif DLib:IsKillable(target, {_W}) and W:IsReady() then
SpellCast(_W,target)
elseif enemyPos ~= nil and GetDistanceSqr(myHero,enemyPos) >= SpellData.W.range * SpellData.W.range and not isFacing(target,myHero) then
SpellCast(_W,target)
else
local comboDmg = DLib:CalcSpellDamage(target,__Q) * 2 + DLib:CalcSpellDamage(target,__W) + DLib:CalcSpellDamage(target,__E)
if (Q:IsReady() and W:IsReady() and E:IsReady() and comboDmg > target.health) or (comboDmg > target.maxHealth) then
if Q:IsReady() then SpellCast(_Q,target)
else if R:IsReady() and UseR then R:Cast()
else if W:IsReady() then SpellCast(_W,target)
else if E:IsReady() then SpellCast(_E,target)
end end end end
elseif math.abs(myHero.cdr) >= 0.2 then
if CountEnemyInRange(target,300) > 1 then
--Combo QRQEQWQ when 2 enemy near
if LastCast == "Q" then
if Q:IsReady() then SpellCast(_Q,target) end
if R:IsReady() and UseR then R:Cast() end
if not (R:IsReady() and UseR) then SpellCast(_W,target) end
if not (R:IsReady() and UseR) and not W:IsReady() then SpellCast(_E,target) end
else
SpellCast(_Q,target)
end
else
--Combo QWQEQRQ when only one target
if LastCast == "Q" then
if Q:IsReady() then SpellCast(_Q,target) end
if W:IsReady() then SpellCast(_W,target) end
if not W:IsReady() then SpellCast(_E,target) end
if not W:IsReady() and not E:IsReady() and UseR and R:IsReady() then R:Cast() end
else
if Q:IsReady() then SpellCast(_Q,target) end
end
end
else
--Combo QRWQEQ
if Q:IsReady() then SpellCast(_Q,target)
else if R:IsReady() and UseR then R:Cast()
else if E:IsReady() then SpellCast(_E,target)
else if W:IsReady() then SpellCast(_W,target)
end end end end
end
end
end
end
function ComboBurst(UseR,target)
if target == nil then return end
local enemyPos = VP:GetPredictedPos(target,SpellData.W.delay)
if os.clock() - LastFlashTime < 1 and W:IsReady() then
SpellCast(_W,target)
else
if DLib:IsKillable(target, {_Q}) and Q:IsReady() then
SpellCast(_Q,target)
elseif DLib:IsKillable(target, {_E}) and E:IsReady() then
SpellCast(_E,target)
elseif DLib:IsKillable(target, {_W}) and W:IsReady() then
SpellCast(_W,target)
elseif enemyPos ~= nil and GetDistanceSqr(myHero,enemyPos) >= SpellData.W.range * SpellData.W.range and not isFacing(target,myHero) then
SpellCast(_W,target)
else
--Combo QRWQEQ
if Q:IsReady() then SpellCast(_Q,target)
else if R:IsReady() and UseR then R:Cast()
else if E:IsReady() then SpellCast(_E,target)
else if W:IsReady() then SpellCast(_W,target)
end end end end
end
end
end
function ComboLong(UseR,target)
if target == nil then return end
local enemyPos = VP:GetPredictedPos(target,SpellData.W.delay)
if os.clock() - LastFlashTime < 1 and W:IsReady() then
SpellCast(_W,target)
else
if DLib:IsKillable(target, {_Q}) and Q:IsReady() then
SpellCast(_Q,target)
elseif DLib:IsKillable(target, {_E}) and E:IsReady() then
SpellCast(_E,target)
elseif DLib:IsKillable(target, {_W}) and W:IsReady() then
SpellCast(_W,target)
elseif enemyPos ~= nil and GetDistanceSqr(myHero,enemyPos) >= SpellData.W.range * SpellData.W.range and not isFacing(target,myHero) then
SpellCast(_W,target)
else
if CountEnemyInRange(target,300) > 1 then
--Combo QRQEQWQ when 2 enemy near
if LastCast == "Q" then
if Q:IsReady() then SpellCast(_Q,target) end
if R:IsReady() and UseR then R:Cast() end
if not (R:IsReady() and UseR) then SpellCast(_W,target) end
if not (R:IsReady() and UseR) and not W:IsReady() then SpellCast(_E,target) end
else
SpellCast(_Q,target)
end
else
--Combo QWQEQRQ when only one target
if LastCast == "Q" then
if Q:IsReady() then SpellCast(_Q,target) end
if W:IsReady() then SpellCast(_W,target) end
if not W:IsReady() then SpellCast(_E,target) end
if not W:IsReady() and not E:IsReady() and UseR and R:IsReady() then R:Cast() end
else
if Q:IsReady() then SpellCast(_Q,target) end
end
end
end
end
end
--}
function OnTick10()
local TARGET = GrabTarget()
OW:DisableAttacks()
if IsKeyDown(string.byte("X")) then
OW:EnableAttacks()
end
--{ Combo
if Menu.General.Combo and ValidTarget(TARGET) then
if Menu.Combo.Item then
ItemManager:CastOffensiveItems(TARGET)
end
if Menu.Combo.Ignite and _IGNITE ~= nil then
if DLib:IsKillable(TARGET, MainCombo) then
CastSpell(_IGNITE, TARGET)
end
end
if Menu.Combo.Mode == 1 then
ComboMixed(Menu.Combo.R,TARGET)
elseif Menu.Combo.Mode == 2 then
ComboBurst(Menu.Combo.R,TARGET)
elseif Menu.Combo.Mode == 3 then
ComboLong(Menu.Combo.R,TARGET)
end
if not Q:IsReady() and not W:IsReady() then
OW:EnableAttacks()
end
end
--}
--{ Harass
if Menu.General.Harass then
OW:EnableAttacks()
if ValidTarget(TARGET) then
if Menu.Harass.Q then
SpellCast(_Q,TARGET)
end
if Menu.Harass.W then
SpellCast(_W,TARGET)
end
if Menu.Harass.E then
SpellCast(_E,TARGET)
end
end
end
--}
--{ Farm/Jungle
--Lane
if Menu.General.Farm then
OW:EnableAttacks()
if Menu.General.Combo or Menu.General.Harass then return end
--Lane
EnemyMinion:update()
if myHero.mana/myHero.maxMana * 100 > Menu.Farm.Mana and ValidTarget(EnemyMinion.objects[1],SpellData.Q.range) then
if Menu.Farm.LQ and Q:IsReady() then
local delay = SpellData.Q.delay + GetDistance(EnemyMinion.objects[1].visionPos, myHero.visionPos) / SpellData.Q.speed - 0.07
local predictedHealth = VP:GetPredictedHealth(EnemyMinion.objects[1], delay)
if predictedHealth <= DLib:CalcSpellDamage(EnemyMinion.objects[1],_Q) and predictedHealth > 0 then
SpellCast(_Q,EnemyMinion.objects[1])
end
end
if Menu.Farm.LE and E:IsReady() then
if DLib:IsKillable(EnemyMinion.objects[1], {_E,_AA}) then
SpellCast(_E,EnemyMinion.objects[1])
end
end
if Menu.Farm.LR and R:IsReady() then
R:Cast()
end
if Menu.Farm.LW and W:IsReady() then
if DLib:IsKillable(EnemyMinion.objects[1], {_W}) then
SpellCast(_W,EnemyMinion.objects[1])
end
end
end
end
if Menu.General.Farm then
--Jungle
JungMinion:update()
OW:EnableAttacks()
if ValidTarget(JungMinion.objects[1],SpellData.Q.range) then
if math.abs(myHero.cdr) >= 0.2 then
if LastCast == "Q" then
if Menu.Farm.JQ and Q:IsReady() then SpellCast(_Q,JungMinion.objects[1]) end
if R:IsReady() and Menu.Farm.JR then R:Cast() end
if not (R:IsReady() and Menu.Farm.JR) and Menu.Farm.JW then SpellCast(_W,JungMinion.objects[1]) end
if not (R:IsReady() and Menu.Farm.JR) and not (W:IsReady() and Menu.Farm.JW) and Menu.Farm.JE then SpellCast(_E,JungMinion.objects[1]) end
else
SpellCast(_Q,JungMinion.objects[1])
end
else
if Menu.Farm.JQ and Q:IsReady() then SpellCast(_Q,JungMinion.objects[1])
else if Menu.Farm.JR and R:IsReady() then R:Cast()
else if Menu.Farm.JE and E:IsReady() then SpellCast(_E,JungMinion.objects[1])
else if Menu.Farm.JW and W:IsReady() then SpellCast(_W,JungMinion.objects[1])
end end end end
end
end
if OW:CanAttack() and OW:InRange(JungMinion.objects[1]) then
myHero:Attack(JungMinion.objects[1])
end
end
--}
--{ Extra
if Menu.Extra.AutoIgnite and ValidTarget(TARGET) then
if _IGNITE ~= nil and DLib:IsKillable(TARGET, {_IGNITE}) then
CastSpell(_IGNITE, TARGET)
end
end
--}
end
function OnTick1()
--{ Auto level
if Menu.Extra.AutoLevel == 2 then
autoLevelSetSequence(maxQRWE)
end
--}
end
function OnProcessSpell(unit,spell)
if unit.isMe then
if spell.name:lower() == "overload" then
LastCast = "Q"
elseif spell.name:lower() == "runeprison" then
LastCast = "W"
elseif spell.name:lower() == "spellflux" then
LastCast = "E"
elseif spell.name:lower() == "desperatepower" then
LastCast = "R"
elseif spell.name:lower() == "summonerflash" then
LastFlashTime = os.clock()
end
end
end