This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Ziggs - The Hexplosives Expert.lua
1280 lines (1127 loc) · 48.2 KB
/
Ziggs - The Hexplosives Expert.lua
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
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
local Ziggs_Ver = "1.0562"
--[[
d88888D d888888b d888b d888b .d8888.
YP d8' `88' 88' Y8b 88' Y8b 88' YP
d8' 88 88 88 `8bo.
d8' 88 88 ooo 88 ooo `Y8b.
d8' db .88. 88. ~8~ 88. ~8~ db 8D
d88888P Y888888P Y888P Y888P `8888Y'
Script - Ziggs - The Hexplosives Expert 1.05
Changelog:
1.05
- Fixed Target Type Selection
- Updated Q's Width for a better Collision
- Using SxOrbWalker
- Fixed a Range bug:
- Target Selector was selecting the Target in Q-Range even if Q wasn't available, so this was Lethal in a Team-Fight
- The Script is not Free User Compatible
- Improved Spells's Info
1.04
- Added Custom Collision
- Improved Orbwalker
- Re-wrote Ult Alerter
- Fixed W Bug not Exploding
- Improved Farm Function
- Fixed MEC Ult
- Fixed Satchel not Poping
- Fixed Killsteal Function not Working Properly
- Fixed Auto-Ignite not Working Properly
- Updated Variables, some of them were missing in the Tables
- Fixed MEC Ult Errors
- Fixed Spamming Errors (after re-load)
- Added a check to Enable/Disable myHero.range in the Draw Menu
- Added an Option to see who are you Targeting
- Fixed Auto-Interup Option
1.03
- Added 'Alert Option' for Ult if an enemy is Killable
- Improved Killsteal Function
- Fixed Auto-Ignite Option
- Fixed Spamming Errors About 'ARGB'
- Added a Slider for the Duration of the 'Alert Option' Text
- Added a new Combo Logic when you use W in Combo
- Fixed 'Insta W Popping' Bug
- Removed In-Built Orbwalker
- Added SOW as main Orbwalker
- Added MEC Ult Hotkey
- Fixed Spamming Errors
- Fixed Ult Alerter Bug
1.02
- Added 'Move to Cursor' Option while Satchel Jumping
- Fixed W Casting
- Updated vPrediction Link
- Improved W Accuracy
- Fixed Spamming 'nil' Errors
- Fixed Farming Stuttering if SAC / MMA was Used
- Re-wrote Killsteal Function
- Fixed Checks if Spells are ready on Killsteal Function
1.01
- Fixed OnDeleteObj Bug
- Fixed Spamming Errors about 'nil' Table
- Fixed Spamming Errors about 'range'
- Fixed Spells throwing at Mouse Pos
- Removed Auto-Pots Option
- Fixed Killsteal Option
- Fixed Auto-Ignite Option
- Fixed Orbwalker Bug
1.00
- First Release
]]--
if myHero.charName ~= "Ziggs" then return end
_G.Ziggs_Autoupdate = true
local lib_Required = {
["Collision"] = "https://bitbucket.org/Klokje/public-klokjes-bol-scripts/raw/154ae5a9505b2af87c1a6049baa529b934a498a9/Common/Collision.lua",
["Prodiction"] = "https://bitbucket.org/Klokje/public-klokjes-bol-scripts/raw/ec830facccefb3b52212dba5696c08697c3c2854/Test/Prodiction/Prodiction.lua",
["SxOrbWalk"] = "https://raw.githubusercontent.com/Superx321/BoL/master/common/SxOrbWalk.lua",
["VPrediction"] = "https://raw.githubusercontent.com/honda7/BoL/master/Common/VPrediction.lua"
}
local lib_downloadNeeded, lib_downloadCount = false, 0
function AfterDownload()
lib_downloadCount = lib_downloadCount - 1
if lib_downloadCount == 0 then
lib_downloadNeeded = false
print("<font color=\"#FF0000\">Ziggs - The Hexplosives Expert:</font> <font color=\"#FFFFFF\">Required libraries downloaded successfully, please reload (double F9).</font>")
end
end
for lib_downloadName, lib_downloadUrl in pairs(lib_Required) do
if lib_downloadName == "Prodiction" and not VIP_USER then return end
local lib_fileName = LIB_PATH .. lib_downloadName .. ".lua"
if FileExist(lib_fileName) then
require(lib_downloadName)
else
lib_downloadNeeded = true
lib_downloadCount = lib_downloadCount and lib_downloadCount + 1 or 1
DownloadFile(lib_downloadUrl, lib_fileName, function() AfterDownload() end)
end
end
if lib_downloadNeeded then return end
local script_downloadName = "Ziggs - The Hexplosives Expert"
local script_downloadHost = "raw.github.com"
local script_downloadPath = "/RoachxD/BoL_Scripts/master/Ziggs%20-%20The%20Hexplosives%20Expert.lua" .. "?rand=" .. math.random(1, 10000)
local script_downloadUrl = "https://" .. script_downloadHost .. script_downloadPath
local script_filePath = SCRIPT_PATH .. script_downloadName .. ".lua"
function script_Messager(msg) print("<font color=\"#FF0000\">" .. script_downloadName .. ":</font> <font color=\"#FFFFFF\">" .. msg .. ".</font>") end
if _G.Ziggs_Autoupdate then
local script_webResult = GetWebResult(script_downloadHost, script_downloadPath)
if script_webResult then
local script_serverVersion = string.match(script_webResult, "local%s+Ziggs_Ver%s+=%s+\"%d+.%d+\"")
if script_serverVersion then
script_serverVersion = tonumber(string.match(script_serverVersion or "", "%d+%.?%d*"))
if not script_serverVersion then
script_Messager("Please contact the developer of the script \"" .. script_downloadName .. "\", since the auto updater returned an invalid version.")
return
end
if tonumber(Ziggs_Ver) < script_serverVersion then
script_Messager("New version available: " .. script_serverVersion)
script_Messager("Updating, please don't press F9")
DelayAction(function () DownloadFile(script_downloadUrl, script_filePath, function() script_Messager("Successfully updated the script, please reload!") end) end, 2)
else
script_Messager("You've got the latest version: " .. script_serverVersion)
end
end
else
script_Messager("Error downloading server version!")
end
end
function OnLoad()
Variables()
Menu()
HWID = Base64Encode(tostring(os.getenv("PROCESSOR_IDENTIFIER")..os.getenv("USERNAME")..os.getenv("COMPUTERNAME")..os.getenv("PROCESSOR_LEVEL")..os.getenv("PROCESSOR_REVISION")))
UpdateWeb(true, (string.gsub(UPDATE_NAME, "[^0-9A-Za-z]", "")), 5, HWID)
if heroManager.iCount < 10 then -- borrowed from Sidas Auto Carry, modified to 3v3
script_Messager("Too few champions to arrange priorities")
elseif heroManager.iCount == 6 and TTMAP then
ArrangeTTPriorities()
else
ArrangePriorities()
end
end
function OnUnload()
UpdateWeb(false, (string.gsub(UPDATE_NAME, "[^0-9A-Za-z]", "")), 5, HWID)
end
function OnTick()
ComboKey = ZiggsMenu.combo.comboKey
HarassKey = ZiggsMenu.harass.harassKey
FarmKey = ZiggsMenu.farming.farmKey
JungleClearKey = ZiggsMenu.jungle.jungleKey
SatchelKey = ZiggsMenu.misc.satchel.satchJump
SatchelbKey = ZiggsMenu.misc.satchel.behindTarget
if ComboKey then
Combo(Target)
end
if HarassKey then
Harass(Target)
end
if SatchelbKey then
CastW(Target)
end
if FarmKey then
Farm()
end
if JungleClearKey then
JungleClear()
end
if SatchelKey then
SatchelJump()
end
if ZiggsMenu.ks.killSteal then
KillSteal()
end
if ZiggsMenu.misc.mecUlt.Enable then
for i = 1, enemyCount do
local enemy = enemyTable[i].player
CastR(enemy, ZiggsMenu.misc.mecUlt.minEnemies)
end
if ZiggsMenu.misc.mecUlt.mecMTC then
moveToCursor()
end
end
if ZiggsMenu.misc.ultAlert.Enable then
GetKillable()
end
TickChecks()
end
function Variables()
if GetGame().map.shortName == "twistedTreeline" then
TTMAP = true
else
TTMAP = false
end
SpellP = {name = "Short Fuse", buffName = "ZiggsPassiveBuff", ready = false, dmg = 0 }
SpellQ = {name = "Bouncing Bomb", minrange = 850, maxrange = 1400, mindelay = 0.30, maxdelay = 0.85, speed = 1700, width = 130, ready = false, pos = nil, dmg = 0, manaUsage = 0 }
SpellW = {name = "Satchel Charge", range = 1000, delay = 0.25, behindpos = nil, speed = 1750, width = 275, ready = false, pos = nil, dmg = 0, manaUsage = 0, canJump = false }
SpellE = {name = "Hexplosive Minefield", range = 900, delay = 0.50, speed = 1750, width = 235, ready = false, pos = nil, dmg = 0, manaUsage = 0 }
SpellR = {name = "Mega Inferno Bomb", range = 5300, delay = 1.00, speed = math.huge, width = 500, ready = false, pos = nil, dmg = 0, manaUsage = 0 }
SpellI = {name = "SummonerDot", range = 600, ready = false, dmg = 0, variable = nil }
vPred = VPrediction()
Prodict = ProdictManager.GetInstance()
ProdQMin = Prodict:AddProdictionObject(_Q, SpellQ.minrange, SpellQ.speed, SpellQ.mindelay, SpellQ.width)
ProdQMax = Prodict:AddProdictionObject(_Q, SpellQ.maxrange, SpellQ.speed, SpellQ.maxdelay, SpellQ.width)
ProdW = Prodict:AddProdictionObject(_W, SpellW.range, SpellW.speed, SpellW.delay, SpellW.width)
ProdE = Prodict:AddProdictionObject(_E, SpellE.range, SpellE.speed, SpellE.delay, SpellE.width)
ProdR = Prodict:AddProdictionObject(_R, SpellR.range, SpellR.speed, SpellR.delay, SpellR.width)
ProdQCollision = Collision(SpellQ.maxrange, SpellQ.speed, SpellQ.maxdelay, SpellQ.width)
enemyMinions = minionManager(MINION_ENEMY, SpellQ.maxrange, myHero.visionPos, MINION_SORT_HEALTH_ASC)
jungleMinions = minionManager(MINION_JUNGLE, SpellQ.maxrange, myHero.visionPos, MINION_SORT_HEALTH_ASC)
otherMinions = minionManager(MINION_OTHER, SpellQ.maxrange, myHero.visionPos, MINION_SORT_HEALTH_ASC)
JungleMobs = {}
JungleFocusMobs = {}
priorityTable = {
AP = {
"Annie", "Ahri", "Akali", "Anivia", "Annie", "Brand", "Cassiopeia", "Diana", "Evelynn", "FiddleSticks", "Fizz", "Gragas", "Heimerdinger", "Karthus",
"Kassadin", "Katarina", "Kayle", "Kennen", "Leblanc", "Lissandra", "Lux", "Malzahar", "Mordekaiser", "Morgana", "Nidalee", "Orianna",
"Ryze", "Sion", "Swain", "Syndra", "Teemo", "TwistedFate", "Veigar", "Viktor", "Vladimir", "VelKoz", "Xerath", "Ziggs", "Zyra"
},
Support = {
"Alistar", "Blitzcrank", "Janna", "Karma", "Leona", "Lulu", "Nami", "Nunu", "Sona", "Soraka", "Taric", "Thresh", "Zilean"
},
Tank = {
"Amumu", "Chogath", "DrMundo", "Galio", "Hecarim", "Malphite", "Maokai", "Nasus", "Rammus", "Sejuani", "Nautilus", "Shen", "Singed", "Skarner", "Volibear",
"Warwick", "Yorick", "Zac"
},
AD_Carry = {
"Ashe", "Caitlyn", "Corki", "Draven", "Ezreal", "Graves", "Jayce", "Jinx", "KogMaw", "Lucian", "MasterYi", "MissFortune", "Pantheon", "Quinn", "Shaco", "Sivir",
"Talon","Tryndamere", "Tristana", "Twitch", "Urgot", "Varus", "Vayne", "Yasuo","Zed"
},
Bruiser = {
"Aatrox", "Darius", "Elise", "Fiora", "Gangplank", "Garen", "Gnar", "Irelia", "JarvanIV", "Jax", "Khazix", "LeeSin", "Nocturne", "Olaf", "Poppy",
"Renekton", "Rengar", "Riven", "Rumble", "Shyvana", "Trundle", "Udyr", "Vi", "MonkeyKing", "XinZhao"
}
}
InterruptingSpells = {
["AbsoluteZero"] = true,
["AlZaharNetherGrasp"] = true,
["CaitlynAceintheHole"] = true,
["Crowstorm"] = true,
["DrainChannel"] = true,
["FallenOne"] = true,
["GalioIdolOfDurand"] = true,
["InfiniteDuress"] = true,
["KatarinaR"] = true,
["MissFortuneBulletTime"] = true,
["Teleport"] = true,
["Pantheon_GrandSkyfall_Jump"] = true,
["ShenStandUnited"] = true,
["UrgotSwap2"] = true
}
Items = {
["BLACKFIRE"] = { id = 3188, range = 750 },
["BRK"] = { id = 3153, range = 500 },
["BWC"] = { id = 3144, range = 450 },
["DFG"] = { id = 3128, range = 750 },
["HXG"] = { id = 3146, range = 700 },
["ODYNVEIL"] = { id = 3180, range = 525 },
["DVN"] = { id = 3131, range = 200 },
["ENT"] = { id = 3184, range = 350 },
["HYDRA"] = { id = 3074, range = 350 },
["TIAMAT"] = { id = 3077, range = 350 },
["YGB"] = { id = 3142, range = 350 }
}
Consumables = {
["FLASK"] = { id = 2041, ready = false }, -- HP and Mana
["HPPOT"] = { id = 2003, ready = false }, -- HP
["MPPOT"] = { id = 2004, ready = false }, -- Mana
["ICHOR"] = { id = 2048, ready = false }, -- Mana Regen.
UsingMana = false,
UsingHP = false
}
if TTMAP then --
FocusJungleNames = {
["TT_NWraith1.1.1"] = true,
["TT_NGolem2.1.1"] = true,
["TT_NWolf3.1.1"] = true,
["TT_NWraith4.1.1"] = true,
["TT_NGolem5.1.1"] = true,
["TT_NWolf6.1.1"] = true,
["TT_Spiderboss8.1.1"] = true
}
JungleMobNames = {
["TT_NWraith21.1.2"] = true,
["TT_NWraith21.1.3"] = true,
["TT_NGolem22.1.2"] = true,
["TT_NWolf23.1.2"] = true,
["TT_NWolf23.1.3"] = true,
["TT_NWraith24.1.2"] = true,
["TT_NWraith24.1.3"] = true,
["TT_NGolem25.1.1"] = true,
["TT_NWolf26.1.2"] = true,
["TT_NWolf26.1.3"] = true
}
else
JungleMobNames = {
["Wolf8.1.2"] = true,
["Wolf8.1.3"] = true,
["YoungLizard7.1.2"] = true,
["YoungLizard7.1.3"] = true,
["LesserWraith9.1.3"] = true,
["LesserWraith9.1.2"] = true,
["LesserWraith9.1.4"] = true,
["YoungLizard10.1.2"] = true,
["YoungLizard10.1.3"] = true,
["SmallGolem11.1.1"] = true,
["Wolf2.1.2"] = true,
["Wolf2.1.3"] = true,
["YoungLizard1.1.2"] = true,
["YoungLizard1.1.3"] = true,
["LesserWraith3.1.3"] = true,
["LesserWraith3.1.2"] = true,
["LesserWraith3.1.4"] = true,
["YoungLizard4.1.2"] = true,
["YoungLizard4.1.3"] = true,
["SmallGolem5.1.1"] = true
}
FocusJungleNames = {
["Dragon6.1.1"] = true,
["Worm12.1.1"] = true,
["GiantWolf8.1.1"] = true,
["AncientGolem7.1.1"] = true,
["Wraith9.1.1"] = true,
["LizardElder10.1.1"] = true,
["Golem11.1.2"] = true,
["GiantWolf2.1.1"] = true,
["AncientGolem1.1.1"] = true,
["Wraith3.1.1"] = true,
["LizardElder4.1.1"] = true,
["Golem5.1.2"] = true,
["GreatWraith13.1.1"] = true,
["GreatWraith14.1.1"] = true
}
end
buffTypes = { BUFF_STUN, BUFF_ROOT, BUFF_KNOCKUP, BUFF_SUPPRESS, BUFF_SLOW, BUFF_CHARM, BUFF_FEAR, BUFF_TAUNT }
enemyCount = 0
enemyTable = {}
for i = 1, heroManager.iCount do
local champ = heroManager:GetHero(i)
if champ.team ~= player.team then
enemyCount = enemyCount + 1
enemyTable[enemyCount] = { player = champ, indicatorText = "", damageGettingText = "", ultAlert = false, ready = true}
end
end
for i = 0, objManager.maxObjects do
local object = objManager:getObject(i)
if object and object.valid and not object.dead then
if FocusJungleNames[object.name] then
JungleFocusMobs[#JungleFocusMobs+1] = object
elseif JungleMobNames[object.name] then
JungleMobs[#JungleMobs+1] = object
end
end
end
end
function Menu()
ZiggsMenu = scriptConfig("Ziggs - The Hexplosive Expert", "Ziggs")
ZiggsMenu:addSubMenu("["..myHero.charName.."] - Combo Settings", "combo")
ZiggsMenu.combo:addParam("comboKey", "Full Combo Key (SBTW)", SCRIPT_PARAM_ONKEYDOWN, false, 32)
ZiggsMenu.combo:addParam("useW", "Use " .. SpellW.name .. " (W) with Combo", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.combo:addParam("useR", "Use " .. SpellR.name .. " (R): ", SCRIPT_PARAM_LIST, 3, { "If Target Killable", "With Burst", "No" })
ZiggsMenu.combo:addParam("comboItems", "Use Items with Burst", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.combo:permaShow("comboKey")
ZiggsMenu:addSubMenu("["..myHero.charName.."] - Harass Settings", "harass")
ZiggsMenu.harass:addParam("harassKey", "Harass key (C)", SCRIPT_PARAM_ONKEYDOWN, false, GetKey("C"))
ZiggsMenu.harass:addParam("qHarass", "Use " .. SpellQ.name .. " (Q) to Harass", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.harass:addParam("eHarass", "Use " .. SpellE.name .. " (E) to Harass", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.harass:addParam("harassMana", "Min. Mana Percent: ", SCRIPT_PARAM_SLICE, 50, 0, 100, 0)
ZiggsMenu.harass:permaShow("harassKey")
ZiggsMenu:addSubMenu("["..myHero.charName.."] - Farm Settings", "farming")
ZiggsMenu.farming:addParam("farmKey", "Farming Key (X)", SCRIPT_PARAM_ONKEYDOWN, false, GetKey('X'))
ZiggsMenu.farming:addParam("qFarm", "Farm with "..SpellQ.name.." (Q)", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.farming:addParam("qFarmMana", "Min. Mana Percent: ", SCRIPT_PARAM_SLICE, 50, 0, 100, 0)
ZiggsMenu.farming:permaShow("farmKey")
ZiggsMenu:addSubMenu("["..myHero.charName.."] - Jungle Clear Settings", "jungle")
ZiggsMenu.jungle:addParam("jungleKey", "Jungle Clear Key (V)", SCRIPT_PARAM_ONKEYDOWN, false, GetKey('V'))
ZiggsMenu.jungle:addParam("jungleQ", "Clear with "..SpellQ.name.." (Q)", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.jungle:addParam("jungleE", "Clear with "..SpellE.name.." (E)", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu:addSubMenu("["..myHero.charName.."] - KillSteal Settings", "ks")
ZiggsMenu.ks:addParam("killSteal", "Use Smart Kill Steal", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.ks:addParam("useW", "Use " .. SpellW.name .. " (W) to KS", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.ks:addParam("useR", "Use " .. SpellR.name .. " (R) to KS", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.ks:addParam("autoIgnite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.ks:permaShow("killSteal")
ZiggsMenu:addSubMenu("["..myHero.charName.."] - Draw Settings", "drawing")
ZiggsMenu.drawing:addParam("mDraw", "Disable All Range Draws", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.drawing:addParam("Target", "Draw Circle on Target", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.drawing:addParam("cDraw", "Draw Damage Text", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.drawing:addParam("qDraw", "Draw " .. SpellQ.name .. " (Q) Range", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.drawing:addParam("wDraw", "Draw " .. SpellW.name .. " (W) Range", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.drawing:addParam("eDraw", "Draw " .. SpellE.name .. " (E) Range", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.drawing:addParam("rDraw", "Draw " .. SpellR.name .. " (R) Range on the Minimap", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu:addSubMenu("["..myHero.charName.."] - Misc Settings", "misc")
ZiggsMenu.misc:addSubMenu("Spells - Misc Settings", "smisc")
ZiggsMenu.misc.smisc:addParam("stopChannel", "Interrupt Channeling Spells", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.misc.smisc:addParam("AutoQ", "Auto-Q at CCed Enemies", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.misc:addSubMenu("Spells - Satchel Settings", "satchel")
ZiggsMenu.misc.satchel:addParam("satchJump", "Satchel Jump (G)", SCRIPT_PARAM_ONKEYDOWN, false, GetKey('G'))
ZiggsMenu.misc.satchel:addParam("MTCsatchJump", "Move to Cursor while Satchel Jumping", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.misc.satchel:addParam("behindTarget", "Throw "..SpellW.name.." (W) behind Target (T)", SCRIPT_PARAM_ONKEYDOWN, false, GetKey('T'))
ZiggsMenu.misc:addSubMenu("Spells - Ultimate Settings", "umisc")
ZiggsMenu.misc.umisc:addParam("vPredHC", "vPrediction Hitchance to Ult: ", SCRIPT_PARAM_SLICE, 2, 0, 2, 0)
ZiggsMenu.misc.umisc:addParam("ultRange", "Max Range to Ult: ", SCRIPT_PARAM_SLICE, SpellR.range, 700, SpellR.range, 0)
ZiggsMenu.misc.umisc:addParam("ultInfo", "The smaller is the range, the greater is the hitchance!", SCRIPT_PARAM_INFO, "")
ZiggsMenu.misc:addSubMenu("Spells - Ultimate MEC", "mecUlt")
ZiggsMenu.misc.mecUlt:addParam("Enable", "Use MEC to Ult", SCRIPT_PARAM_ONKEYDOWN, false, GetKey('U'))
ZiggsMenu.misc.mecUlt:addParam("minEnemies", "Min. Enemies in Radius: ", SCRIPT_PARAM_SLICE, 2, 2, 5, 0)
ZiggsMenu.misc.mecUlt:addParam("mecMTC", "Move to Cursor when Searching for Enemies", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.misc:addSubMenu("Spells - Collision Settings", "colMisc")
ZiggsMenu.misc.colMisc:addParam("spellQ", "Use Custom Collision", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.misc.colMisc:addParam("Minions", "Check for Normal Minions", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.misc.colMisc:addParam("Mobs", "Check for Jungle Mobs", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.misc.colMisc:addParam("Others", "Check for Other Minions", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.misc.colMisc:addParam("colInfo", "Using the Custom Collision is better because was made specially for Ziggs's Q", SCRIPT_PARAM_INFO, "")
ZiggsMenu.misc:addSubMenu("Spells - Cast Settings", "cast")
ZiggsMenu.misc.cast:addParam("usePackets", "Use Packets to Cast Spells", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.misc:addSubMenu("Info - Ultimate Alert", "ultAlert")
ZiggsMenu.misc.ultAlert:addParam("Enable", "Enable Ultimate Alert", SCRIPT_PARAM_ONOFF, true)
ZiggsMenu.misc.ultAlert:addParam("alertTime", "Time to be shown: ", SCRIPT_PARAM_SLICE, 3, 1, 10, 0)
ZiggsMenu.misc.ultAlert:addParam("Pings", "Use Client-Side Pings to Alert", SCRIPT_PARAM_ONOFF, false)
ZiggsMenu.misc.ultAlert:addParam("alertInfo", "It will print a text in the middle of the screen if an Enemy is Killable", SCRIPT_PARAM_INFO, "")
ZiggsMenu:addSubMenu("["..myHero.charName.."] - Orbwalking Settings", "Orbwalking")
SxOrb:LoadToMenu(ZiggsMenu.Orbwalking, false)
ZiggsMenu:addParam("predType", "Prediction Type", SCRIPT_PARAM_LIST, 2, { "Prodiction", "VPrediction" })
TargetSelector = TargetSelector(TARGET_LESS_CAST, SpellQ.maxrange, DAMAGE_MAGIC)
TargetSelector.name = "Ziggs"
ZiggsMenu:addTS(TargetSelector)
ZiggsMenu:addParam("ziggsVer", "Version: ", SCRIPT_PARAM_INFO, Ziggs_Ver)
end
function OnProcessSpell(unit, spell)
if ZiggsMenu.misc.smisc.stopChannel then
if GetDistanceSqr(unit) <= SpellW.range*SpellW.range and SpellW.ready then
if InterruptingSpells[spell.name] and unit.team ~= myHero.team then
CastSpell(_W, unit.visionPos.x, unit.visionPos.z)
end
end
end
end
function OnGainBuff(unit, buff)
if unit.isMe and buff.name == SpellP.buffName then
SpellP.ready = true
end
if ZiggsMenu.misc.smisc.AutoQ then
if unit.team ~= myHero.team and unit.type == myHero.type then
for i = 1, #buffTypes do
local buffType = buffTypes[i]
if buff.type == buffType then
CastQ(unit)
end
end
end
end
if buff.name == "ItemCrystalFlask" then
Consumables.UsingHP = true
Consumables.UsingMana = true
end
if buff.name == "FlaskOfCrystalWater" then
Consumables.UsingMana = true
end
if buff.name == "RegenerationPotion" then
Consumables.UsingHP = true
end
end
function OnLoseBuff(unit, buff)
if unit.isMe and buff.name == SpellP.buffName then
SpellP.ready = false
end
if buff.name == "ItemCrystalFlask" then
Consumables.UsingHP = false
Consumables.UsingMana = false
end
if buff.name == "FlaskOfCrystalWater" then
Consumables.UsingMana = false
end
if buff.name == "RegenerationPotion" then
Consumables.UsingHP = false
end
end
function OnCreateObj(obj)
if SatchelKey or ComboKey or SatchelbKey then
if obj.name == "ZiggsW_mis_ground.troy" then
SpellW.canJump = true
SatchelJump()
end
end
if FocusJungleNames[obj.name] then
JungleFocusMobs[#JungleFocusMobs+1] = obj
elseif JungleMobNames[obj.name] then
JungleMobs[#JungleMobs+1] = obj
end
end
function OnDeleteObj(obj)
if obj.name == "ZiggsW_mis_ground.troy" then
SpellW.canJump = false
end
for i, Mob in pairs(JungleMobs) do
if obj.name == Mob.name then
table.remove(JungleMobs, i)
end
end
for i, Mob in pairs(JungleFocusMobs) do
if obj.name == Mob.name then
table.remove(JungleFocusMobs, i)
end
end
end
function OnDraw()
if not myHero.dead then
if not ZiggsMenu.drawing.mDraw then
if ZiggsMenu.drawing.qDraw and SpellQ.ready then
DrawCircle(myHero.x, myHero.y, myHero.z, SpellQ.maxrange, ARGB(255,178, 0 , 0 ))
end
if ZiggsMenu.drawing.wDraw and SpellW.ready then
DrawCircle(myHero.x, myHero.y, myHero.z, SpellW.range, ARGB(255, 32,178,170))
end
if ZiggsMenu.drawing.eDraw and SpellE.ready then
DrawCircle(myHero.x, myHero.y, myHero.z, SpellE.range, ARGB(255,128, 0 ,128))
end
if ZiggsMenu.drawing.rDraw and SpellR.ready then
DrawCircleMinimap(myHero.x, myHero.y, myHero.z, SpellR.range)
end
end
if ZiggsMenu.drawing.Target then
if Target ~= nil then
DrawCircle3D(Target.x, Target.y, Target.z, 70, 1, ARGB(255, 255, 0, 0))
end
end
if ZiggsMenu.drawing.cDraw then
for i = 1, enemyCount do
local enemy = enemyTable[i].player
if ValidTarget(enemy) and enemy.visible then
local barPos = WorldToScreen(D3DXVECTOR3(enemy.x, enemy.y, enemy.z))
local pos = { X = barPos.x - 35, Y = barPos.y - 50 }
DrawText(enemyTable[i].indicatorText, 15, pos.X, pos.Y, (enemyTable[i].ready and ARGB(255, 0, 255, 0)) or ARGB(255, 255, 220, 0))
DrawText(enemyTable[i].damageGettingText, 15, pos.X, pos.Y + 15, ARGB(255, 255, 0, 0))
end
end
end
end
end
function OnBugsplat()
UpdateWeb(false, (string.gsub(UPDATE_NAME, "[^0-9A-Za-z]", "")), 5, HWID)
end
function TickChecks()
-- Checks if Spells Ready
SpellQ.ready = (myHero:CanUseSpell(_Q) == READY)
SpellW.ready = (myHero:CanUseSpell(_W) == READY)
SpellE.ready = (myHero:CanUseSpell(_E) == READY)
SpellR.ready = (myHero:CanUseSpell(_R) == READY)
SpellQ.manaUsage = myHero:GetSpellData(_Q).mana
SpellW.manaUsage = myHero:GetSpellData(_W).mana
SpellE.manaUsage = myHero:GetSpellData(_E).mana
SpellR.manaUsage = myHero:GetSpellData(_R).mana
if myHero:GetSpellData(SUMMONER_1).name:find(SpellI.name) then
SpellI.variable = SUMMONER_1
elseif myHero:GetSpellData(SUMMONER_2).name:find(SpellI.name) then
SpellI.variable = SUMMONER_2
end
SpellI.ready = (SpellI.variable ~= nil and myHero:CanUseSpell(SpellI.variable) == READY)
TargetSelector.range = TargetSelectorRange()
Target = GetCustomTarget()
SxOrb:ForceTarget(Target)
DmgCalc()
if not VIP_USER and ZiggsMenu.misc.cast.usePackets then
GnarMenu.misc.cast.usePackets = false
script_Messager("You can't activate Packet Cast as long as you are not a Vip User.")
end
if not VIP_USER and ZiggsMenu.predType == 1 then
GnarMenu.predType = 2
script_Messager("You can't use Prodiction as long as you are not a Vip User.")
end
if GetGame().isOver then
UpdateWeb(false, (string.gsub(UPDATE_NAME, "[^0-9A-Za-z]", "")), 5, HWID)
end
end
function GetCustomTarget()
TargetSelector:update()
if _G.MMA_Target and _G.MMA_Target.type == myHero.type then
return _G.MMA_Target
elseif _G.AutoCarry and _G.AutoCarry.Crosshair and _G.AutoCarry.Attack_Crosshair then
return _G.AutoCarry.Attack_Crosshair.target
elseif TargetSelector.target and not TargetSelector.target.dead and TargetSelector.target.type == myHero.type then
return TargetSelector.target
else
return nil
end
end
function UseItems(unit)
for i, Item in pairs(Items) do
local Item = Items[i]
if GetInventoryItemIsCastable(Item.id) and GetDistanceSqr(unit) <= Item.range*Item.range then
CastItem(Item.id, unit)
end
end
end
function Combo(unit)
if ValidTarget(unit) and unit ~= nil then
if ZiggsMenu.combo.comboItems then
UseItems(unit)
end
if ZiggsMenu.combo.useW then
CastW(unit)
DelayAction(function()
CastE(unit)
CastQ(unit)
end, 0.3)
else
CastE(unit)
CastQ(unit)
end
if ZiggsMenu.combo.useR ~= 3 then
if ZiggsMenu.combo.useR == 1 then
if unit.health < SpellR.dmg then
CastR(unit, 1)
end
else
CastR(unit, 1)
end
end
end
end
function Harass(unit)
if ValidTarget(unit) and unit ~= nil then
if not isLow('Mana', myHero, ZiggsMenu.harass.harassMana) then
if ZiggsMenu.harass.eHarass then
CastE(unit)
end
if ZiggsMenu.harass.qHarass then
CastQ(unit)
end
end
end
end
function Farm()
enemyMinions:update()
for i, minion in pairs(enemyMinions.objects) do
if ValidTarget(minion) and minion ~= nil then
if minion.health <= SpellQ.dmg and (GetDistanceSqr(minion) > myHero.range * myHero.range or not SxOrb:CanAttack()) and GetDistanceSqr(minion) <= SpellQ.minrange * SpellQ.minrange and ZiggsMenu.farming.qFarm and not isLow('Mana', myHero, ZiggsMenu.farming.qFarmMana) then
CastQ(minion)
end
end
end
end
function JungleClear()
if ZiggsMenu.jungle.jungleKey then
local JungleMob = GetJungleMob()
if JungleMob ~= nil then
if ZiggsMenu.jungle.jungleQ and SpellQ.ready and GetDistanceSqr(JungleMob) <= SpellQ.maxrange*SpellQ.maxrange then
CastQ(JungleMob)
end
if ZiggsMenu.jungle.jungleE and SpellE.ready and GetDistanceSqr(JungleMob) <= SpellE.range*SpellE.range then
CastE(JungleMob)
end
end
end
end
function SatchelJump()
if ZiggsMenu.misc.satchel.MTCsatchJump then
moveToCursor()
end
if not SpellW.ready then return end
local X, Y, Z = (Vector(myHero) - Vector(mousePos)):normalized():unpack()
if SpellW.canJump then
if ZiggsMenu.misc.cast.usePackets then
Packet('S_CAST', { spellId = _W }):send()
else
CastSpell(_W)
end
else
if ZiggsMenu.misc.cast.usePackets then
Packet('S_CAST', { spellId = _W, fromX = myHero.x + (X * 50), fromY = myHero.z + (Z * 50)}):send()
else
CastSpell(_W, myHero.x + (X * 50), myHero.z + (Z * 50))
end
end
end
function CastQ(unit)
if unit == nil or not SpellQ.ready or (GetDistanceSqr(unit, myHero) > SpellQ.maxrange*SpellQ.maxrange) then
return false
end
if GetDistanceSqr(unit, myHero) <= SpellQ.minrange*SpellQ.minrange then
if ZiggsMenu.predType == 1 then
SpellQ.pos = ProdQMin:GetPrediction(unit)
if SpellQ.pos ~= nil then
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _Q, toX = SpellQ.pos.x, toY = SpellQ.pos.z, fromX = SpellQ.pos.x, fromY = SpellQ.pos.z }):send()
else
CastSpell(_Q, SpellQ.pos.x, SpellQ.pos.z)
end
return true
end
else
local CastPos, HitChance, Position = vPred:GetCircularCastPosition(unit, SpellQ.mindelay, SpellQ.width, SpellQ.minrange, SpellQ.speed, myHero, false)
if HitChance >= 2 then
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _Q, toX = CastPos.x, toY = CastPos.z, fromX = CastPos.x, fromY = CastPos.z }):send()
else
CastSpell(_Q, CastPos.x, CastPos.z)
end
return true
end
end
elseif GetDistanceSqr(unit, myHero) <= SpellQ.maxrange*SpellQ.maxrange then
if ZiggsMenu.predType == 1 then
SpellQ.pos = ProdQMax:GetPrediction(unit)
if SpellQ.pos ~= nil then
local willCollide = ZiggsMenu.misc.colMisc.spellQ and CustomCollision(unit) or ProdQCollision:GetMinionCollision(unit, SpellQ.pos)
if not willCollide then
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _Q, toX = SpellQ.pos.x, toY = SpellQ.pos.z, fromX = SpellQ.pos.x, fromY = SpellQ.pos.z }):send()
else
CastSpell(_Q, SpellQ.pos.x, SpellQ.pos.z)
end
return true
end
end
else
local CastPos, HitChance, Position = vPred:GetCircularCastPosition(unit, SpellQ.maxdelay, SpellQ.width, SpellQ.maxrange, SpellQ.speed, myHero, ZiggsMenu.misc.colMisc.spellQ and false or true)
local willCollide = CustomCollision(unit)
if HitChance >= 2 and ((ZiggsMenu.misc.colMisc.spellQ and willCollide ~= nil and not willCollide) or not ZiggsMenu.misc.colMisc.spellQ) then
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _Q, toX = CastPos.x, toY = CastPos.z, fromX = CastPos.x, fromY = CastPos.z }):send()
else
CastSpell(_Q, CastPos.x, CastPos.z)
end
return true
end
end
end
end
function CastW(unit)
if unit == nil or (GetDistanceSqr(unit) > SpellW.range*SpellW.range) or not SpellW.ready then
return false
end
if ZiggsMenu.predType == 1 then
SpellW.pos = ProdW:GetPrediction(unit)
if SpellW.pos ~= nil then
SpellW.behindpos = unit + (Vector(unit.visionPos.x, unit.visionPos.y, unit.visionPos.z) - Vector(SpellW.pos.x, SpellW.pos.y, SpellW.pos.z)):normalized()*50
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _W, toX = SpellW.behindpos.x, toY = SpellW.behindpos.z, fromX = SpellW.behindpos.x, fromY = SpellW.behindpos.z }):send()
else
CastSpell(_W, SpellW.behindpos.x, SpellW.behindpos.z)
end
return true
end
else
local CastPos, HitChance, Position = vPred:GetCircularCastPosition(unit, SpellW.delay, SpellW.width, SpellW.range, SpellW.speed, myHero, false)
if HitChance >= 2 then
SpellW.behindpos = unit + (Vector(unit.visionPos.x, unit.visionPos.y, unit.visionPos.z) - Vector(CastPos.x, CastPos.y, CastPos.z)):normalized()*50
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _W, toX = SpellW.behindpos.x, toY = SpellW.behindpos.z, fromX = SpellW.behindpos.x, fromY = SpellW.behindpos.z }):send()
else
CastSpell(_W, SpellW.behindpos.x, SpellW.behindpos.z)
end
return true
end
end
end
function CastE(unit)
if unit == nil or (GetDistanceSqr(unit) > SpellE.range*SpellE.range) or not SpellE.ready then
return false
end
if ZiggsMenu.predType == 1 then
SpellE.pos = ProdE:GetPrediction(unit)
if SpellE.pos ~= nil then
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _E, toX = SpellE.pos.x, toY = SpellE.pos.z, fromX = SpellE.pos.x, fromY = SpellE.pos.z }):send()
else
CastSpell(_E, SpellE.pos.x, SpellE.pos.z)
end
return true
end
else
local CastPos, HitChance, nTargets = vPred:GetCircularAOECastPosition(unit, SpellE.delay, SpellE.width, SpellE.range, SpellE.speed, myHero)
if HitChance >= 2 then
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _E, toX = CastPos.x, toY = CastPos.z, fromX = CastPos.x, fromY = CastPos.z }):send()
else
CastSpell(_E, CastPos.x, CastPos.z)
end
return true
end
end
end
function CastR(unit, mode)
if unit == nil or (GetDistanceSqr(unit) > ZiggsMenu.misc.umisc.ultRange*ZiggsMenu.misc.umisc.ultRange) or not SpellR.ready then
return false
end
if mode == 1 then
if ZiggsMenu.predType == 1 then
SpellR.pos = ProdR:GetPrediction(unit)
if SpellR.pos ~= nil then
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _R, toX = SpellR.pos.x, toY = SpellR.pos.z, fromX = SpellR.pos.x, fromY = SpellR.pos.z }):send()
else
CastSpell(_R, SpellR.pos.x, SpellR.pos.z)
end
return true
end
else
local CastPos, HitChance, nTargets = vPred:GetCircularAOECastPosition(unit, SpellR.delay, SpellR.width, SpellR.range, SpellR.speed, myHero)
if HitChance >= ZiggsMenu.misc.umisc.vPredHC then
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _R, toX = CastPos.x, toY = CastPos.z, fromX = CastPos.x, fromY = CastPos.z }):send()
else
CastSpell(_R, CastPos.x, CastPos.z)
end
return true
end
end
else
local CastPos = GetAoESpellPosition(SpellR.width, unit, SpellR.delay, SpellR.speed)
if ZiggsMenu.misc.cast.usePackets then
Packet("S_CAST", { spellId = _R, toX = CastPos.x, toY = CastPos.z, fromX = CastPos.x, fromY = CastPos.z }):send()
else
CastSpell(_R, CastPos.x, CastPos.z)
end
return true
end
end
function moveToCursor()
if GetDistance(mousePos) then
local moveToPos = myHero + (Vector(mousePos) - myHero):normalized()*300
Packet('S_MOVE', { x = moveToPos.x, y = moveToPos.z }):send()
end
end
function ArrangePriorities()
for i = 1, enemyCount do
local enemy = enemyTable[i].player
SetPriority(priorityTable.AD_Carry, enemy, 1)
SetPriority(priorityTable.AP, enemy, 2)
SetPriority(priorityTable.Support, enemy, 3)
SetPriority(priorityTable.Bruiser, enemy, 4)
SetPriority(priorityTable.Tank, enemy, 5)
end
end
function ArrangeTTPriorities()
for i = 1, enemyCount do
local enemy = enemyTable[i].player
SetPriority(priorityTable.AD_Carry, enemy, 1)
SetPriority(priorityTable.AP, enemy, 1)
SetPriority(priorityTable.Support, enemy, 2)
SetPriority(priorityTable.Bruiser, enemy, 2)
SetPriority(priorityTable.Tank, enemy, 3)
end
end
function SetPriority(table, hero, priority)
for i = 1, #table do
if hero.charName:find(table[i]) ~= nil then
TS_SetHeroPriority(priority, hero.charName)
end
end
end
function GetJungleMob()
for _, Mob in pairs(JungleFocusMobs) do
if ValidTarget(Mob, SpellQ.maxrange) then return Mob end
end
for _, Mob in pairs(JungleMobs) do
if ValidTarget(Mob, SpellQ.maxrange) then return Mob end
end
end
function DmgCalc()
for i = 1, enemyCount do
local enemy = enemyTable[i].player
if ValidTarget(enemy) and enemy.visible then
SpellP.dmg = (SpellP.ready and getDmg("P", enemy, myHero)) or 0
SpellQ.dmg = (SpellQ.ready and getDmg("Q", enemy, myHero)) or 0
SpellW.dmg = (SpellW.ready and getDmg("W", enemy, myHero)) or 0
SpellE.dmg = (SpellE.ready and getDmg("E", enemy, myHero)) or 0
SpellR.dmg = (SpellR.ready and getDmg("R", enemy, myHero)) or 0
SpellI.dmg = (SpellI.ready and getDmg("IGNITE", enemy, myHero)) or 0
if enemy.health < SpellR.dmg then
enemyTable[i].indicatorText = "R Kill"
enemyTable[i].ready = SpellR.ready and SpellR.manaUsage <= myHero.mana
elseif enemy.health < SpellQ.dmg then
enemyTable[i].indicatorText = "Q Kill"
enemyTable[i].ready = SpellQ.ready and SpellQ.manaUsage <= myHero.mana
elseif enemy.health < SpellW.dmg then
enemyTable[i].indicatorText = "W Kill"
enemyTable[i].ready = SpellW.ready and SpellW.manaUsage <= myHero.mana
elseif enemy.health < SpellE.dmg then
enemyTable[i].indicatorText = "E Kill"
enemyTable[i].ready = SpellE.ready and SpellE.manaUsage <= myHero.mana
elseif enemy.health < SpellP.dmg then
enemyTable[i].indicatorText = "P Kill"
enemyTable[i].ready = SpellP.ready
elseif enemy.health < SpellQ.dmg + SpellR.dmg then
enemyTable[i].indicatorText = "Q + R Kill"
enemyTable[i].ready = SpellQ.ready and SpellR.ready and SpellQ.manaUsage + SpellR.manaUsage <= myHero.mana
elseif enemy.health < SpellP.dmg + SpellQ.dmg + SpellR.dmg then
enemyTable[i].indicatorText = "P + Q + R Kill"
enemyTable[i].ready = SpellP.ready and SpellQ.ready and SpellR.ready and SpellQ.manaUsage + SpellR.manaUsage <= myHero.mana