forked from kungur77/BoL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTalon - The Blade's Shadow.lua
1156 lines (1122 loc) · 34.6 KB
/
Talon - The Blade's Shadow.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
--[[
Script - Talon - The Blade's Shadow
]] --
--- Required Libraries for VIPs ---
if VIP_USER then
require "Prodiction"
end
-- / Hero Name Check / --
if myHero.charName ~= "Talon" then return end
-- / Hero Name Check / --
-- / Loading Function / --
function OnLoad()
--->
Variables()
TalonMenu()
PrintChat("<font color='#660066'> >> Talon - The Blade's Shadow Loaded!! <<</font>")
---<
end
-- / Loading Function / --
-- / Tick Function / --
function OnTick()
--->
Checks()
DamageCalculation()
UseConsumables()
---<
-- Menu Variables --
--->
ComboKey = TalonMenu.combo.comboKey
HarassKey = TalonMenu.harass.harassKey
ClearKey = TalonMenu.clear.clearKey
---<
-- Menu Variables --
--->
if ComboKey then
FullCombo()
end
if HarassKey then
HarassCombo()
end
if ClearKey then
MixedClear()
end
if TalonMenu.killsteal.smartKS then KillSteal() end
if TalonMenu.misc.AutoLevelSkills then autoLevelSetSequence(levelSequence) end
---<
end
-- / Tick Function / --
-- / Variables Function / --
function Variables()
--- Skills Vars --
--->
SkillQ = {range = 125, name = "Noxian Diplomacy", ready = false, color = ARGB(255,178, 0 , 0 ), toggle = false}
SkillW = {range = 700, name = "Rake", ready = false, color = ARGB(255, 32,178,170), speed = 900, delay = .7, width = 400}
SkillE = {range = 700, name = "Cutthroat", ready = false, color = ARGB(255,128, 0 ,128)}
SkillR = {range = 650, name = "Shadow Assault", ready = false }
---<
--- Skills Vars ---
--- Items Vars ---
--->
Items =
{
HealthPot = {ready = false},
ManaPot = {ready = false},
FlaskPot = {ready = false}
}
---<
--- Items Vars ---
--- Orbwalking Vars ---
--->
lastAnimation = "Run"
lastAttack = 0
lastAttackCD = 0
lastWindUpTime = 0
---<
--- Orbwalking Vars ---
--- TickManager Vars ---
--->
TManager =
{
onTick = TickManager(20),
onDraw = TickManager(80),
onSpell = TickManager(15)
}
---<
--- TickManager Vars ---
if VIP_USER then
--- LFC Vars ---
--->
_G.oldDrawCircle = rawget(_G, 'DrawCircle')
_G.DrawCircle = DrawCircle2
---<
--- LFC Vars ---
end
--- Drawing Vars ---
--->
TextList = {"Harass him", "Q = Kill", "W = Kill", "E = Kill!", "Q+W = Kill", "Q+E = Kill", "E+W = Kill", "Q+E+W = Kill", "Q+W+E+R: ", "Need CDs"}
KillText = {}
colorText = ARGB(255,255,204,0)
---<
--- Drawing Vars ---
--- Misc Vars ---
--->
wPos = nil
if VIP_USER then
Prodict = ProdictManager.GetInstance()
ProdictW = Prodict:AddProdictionObject(_W, SkillW.range, SkillW.speed, SkillW.delay, SkillW.width, myHero)
end
levelSequence = { 2,3,2,1,2,4,2,1,2,1,4,1,1,3,3,4,3,3 }
UsingHPot, UsingMPot = false, false
gameState = GetGame()
if gameState.map.shortName == "twistedTreeline" then
TTMAP = true
else
TTMAP = false
end
---<
--- Misc Vars ---
--- Tables ---
--->
allyHeroes = GetAllyHeroes()
enemyHeroes = GetEnemyHeroes()
enemyMinions = minionManager(MINION_ENEMY, SkillE.range, player, MINION_SORT_HEALTH_ASC)
JungleMobs = {}
JungleFocusMobs = {}
priorityTable = {
AP = {
"Annie", "Ahri", "Akali", "Anivia", "Annie", "Brand", "Cassiopeia", "Diana", "Evelynn", "FiddleSticks", "Fizz", "Gragas", "Heimerdinger", "Karthus",
"Kassadin", "Talon", "Kayle", "Kennen", "Leblanc", "Lissandra", "Lux", "Malzahar", "Mordekaiser", "Morgana", "Nidalee", "Orianna",
"Ryze", "Sion", "Swain", "Syndra", "Teemo", "TwistedFate", "Veigar", "Viktor", "Vladimir", "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", "Irelia", "JarvanIV", "Jax", "Khazix", "LeeSin", "Nocturne", "Olaf", "Poppy",
"Renekton", "Rengar", "Riven", "Rumble", "Shyvana", "Trundle", "Udyr", "Vi", "MonkeyKing", "XinZhao",
},
}
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
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
table.insert(JungleFocusMobs, object)
elseif JungleMobNames[object.name] then
table.insert(JungleMobs, object)
end
end
end
---<
--- Tables ---
end
-- / Variables Function / --
-- / Menu Function / --
function TalonMenu()
--- Main Menu ---
--->
TalonMenu = scriptConfig("Talon - The Blade's Shadow", "Talon")
---> Combo Menu
TalonMenu:addSubMenu("["..myHero.charName.." - Combo Settings]", "combo")
TalonMenu.combo:addParam("comboKey", "Full Combo Key (X)", SCRIPT_PARAM_ONKEYDOWN, false, 88)
TalonMenu.combo:addParam("comboERange", ""..SkillE.name.." Min Range", SCRIPT_PARAM_SLICE, 400, 0, SkillE.range, -2)
TalonMenu.combo:addParam("comboItems", "Use Items with Burst", SCRIPT_PARAM_ONOFF, true)
TalonMenu.combo:addParam("ult2Kill", "Ult to Kill Only", SCRIPT_PARAM_ONOFF, true)
TalonMenu.combo:addParam("comboOrbwalk", "Orbwalk in Combo", SCRIPT_PARAM_ONOFF, true)
TalonMenu.combo:permaShow("comboKey")
---<
---> Harass Menu
TalonMenu:addSubMenu("["..myHero.charName.." - Harass Settings]", "harass")
TalonMenu.harass:addParam("hMode", "Harass Mode",SCRIPT_PARAM_SLICE, 1, 1, 2, 0)
TalonMenu.harass:addParam("harassKey", "Harass Hotkey (C)", SCRIPT_PARAM_ONKEYDOWN, false, 67)
TalonMenu.harass:addParam("harassERange", ""..SkillE.name.." Min Range", SCRIPT_PARAM_SLICE, 400, 0, SkillE.range, -2)
TalonMenu.harass:addParam("harassOrbwalk", "Orbwalk in Harass", SCRIPT_PARAM_ONOFF, true)
TalonMenu.harass:addParam("info1","Harass Mode 1 = W", SCRIPT_PARAM_INFO, "")
TalonMenu.harass:addParam("info2","Harass Mode 2 = W + E + Q", SCRIPT_PARAM_INFO, "")
TalonMenu.harass:permaShow("harassKey")
---<
---> Clear Menu
TalonMenu:addSubMenu("["..myHero.charName.." - Clear Settings]", "clear")
TalonMenu.clear:addParam("clearKey", "Jungle/Lane Clear Key", SCRIPT_PARAM_ONKEYDOWN, false, 86)
TalonMenu.clear:addParam("JungleFarm", "Use Skills to Farm Jungle", SCRIPT_PARAM_ONOFF, true)
TalonMenu.clear:addParam("ClearLane", "Use Skills to Clear Lane", SCRIPT_PARAM_ONOFF, true)
TalonMenu.clear:addParam("clearQ", "Clear with "..SkillQ.name.." (Q)", SCRIPT_PARAM_ONOFF, true)
TalonMenu.clear:addParam("clearW", "Clear with "..SkillW.name.." (W)", SCRIPT_PARAM_ONOFF, true)
TalonMenu.clear:addParam("clearE", "Clear with "..SkillE.name.." (E)", SCRIPT_PARAM_ONOFF, true)
TalonMenu.clear:addParam("clearOrbM", "OrbWalk Minions", SCRIPT_PARAM_ONOFF, true)
TalonMenu.clear:addParam("clearOrbJ", "OrbWalk Jungle", SCRIPT_PARAM_ONOFF, true)
---<
---> KillSteal Menu
TalonMenu:addSubMenu("["..myHero.charName.." - KillSteal Settings]", "killsteal")
TalonMenu.killsteal:addParam("smartKS", "Use Smart Kill Steal", SCRIPT_PARAM_ONOFF, true)
TalonMenu.killsteal:addParam("ultKS", "Use "..SkillR.name.." (R) to KS", SCRIPT_PARAM_ONOFF, true)
TalonMenu.killsteal:addParam("itemsKS", "Use Items to KS", SCRIPT_PARAM_ONOFF, true)
TalonMenu.killsteal:addParam("Ignite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
TalonMenu.killsteal:permaShow("smartKS")
---<
---> Drawing Menu
TalonMenu:addSubMenu("["..myHero.charName.." - Drawing Settings]", "drawing")
if VIP_USER then
TalonMenu.drawing:addSubMenu("["..myHero.charName.." - LFC Settings]", "lfc")
TalonMenu.drawing.lfc:addParam("LagFree", "Activate Lag Free Circles", SCRIPT_PARAM_ONOFF, false)
TalonMenu.drawing.lfc:addParam("CL", "Length before Snapping", SCRIPT_PARAM_SLICE, 300, 75, 2000, 0)
TalonMenu.drawing.lfc:addParam("CLinfo", "Higher length = Lower FPS Drops", SCRIPT_PARAM_INFO, "")
end
TalonMenu.drawing:addParam("disableAll", "Disable All Ranges Drawing", SCRIPT_PARAM_ONOFF, false)
TalonMenu.drawing:addParam("drawText", "Draw Enemy Text", SCRIPT_PARAM_ONOFF, true)
TalonMenu.drawing:addParam("drawTargetText", "Draw Who I'm Targetting", SCRIPT_PARAM_ONOFF, true)
TalonMenu.drawing:addParam("drawQ", "Draw "..SkillQ.name.."(Q) Range", SCRIPT_PARAM_ONOFF, false)
TalonMenu.drawing:addParam("drawW", "Draw "..SkillW.name.."(W) Range", SCRIPT_PARAM_ONOFF, true)
TalonMenu.drawing:addParam("drawE", "Draw "..SkillE.name.."(E) Range", SCRIPT_PARAM_ONOFF, false)
---<
---> Misc Menu
TalonMenu:addSubMenu("["..myHero.charName.." - Misc Settings]", "misc")
TalonMenu.misc:addParam("aHP", "Auto Health Pots", SCRIPT_PARAM_ONOFF, true)
TalonMenu.misc:addParam("HPHealth", "Min % for Health Pots", SCRIPT_PARAM_SLICE, 50, 0, 100, -1)
TalonMenu.misc:addParam("aMP", "Auto Mana Pots", SCRIPT_PARAM_ONOFF, true)
TalonMenu.misc:addParam("MPMana", "Min % for Mana Pots", SCRIPT_PARAM_SLICE, 50, 0, 100, -1)
TalonMenu.misc:addParam("uTM", "Use Tick Manager/FPS Improver",SCRIPT_PARAM_ONOFF, false)
TalonMenu.misc:addParam("AutoLevelSkills", "Auto Level Skills (Requires Reload)", SCRIPT_PARAM_ONOFF, false)
---<
---> Target Selector
TargetSelector = TargetSelector(TARGET_LESS_CAST, SkillE.range, DAMAGE_PHYSICAL)
TargetSelector.name = "Talon"
TalonMenu:addTS(TargetSelector)
---<
---> Arrange Priorities
if heroManager.iCount < 10 then -- borrowed from Sidas Auto Carry, modified to 3v3
PrintChat(" >> Too few champions to arrange priority")
elseif heroManager.iCount == 6 and TTMAP then
ArrangeTTPrioritys()
else
ArrangePrioritys()
end
---<
---<
--- Main Menu ---
end
-- / Menu Function / --
-- / Full Combo Function / --
function FullCombo()
--- Combo While Not Channeling --
--->
if Target then
if TalonMenu.combo.comboOrbwalk then
OrbWalking(Target)
end
if TalonMenu.combo.comboItems then
UseItems(Target)
end
CastW(Target)
if GetDistance(Target) >= TalonMenu.combo.comboERange and not SkillW.ready then
DelayAction(function()CastE(Target) end, 0.5)
end
CastQ(Target)
if TalonMenu.combo.ult2Kill then
if Target.health < rDmg then
CastR(Target)
end
else
CastR(Target)
end
else
if TalonMenu.combo.comboOrbwalk then
moveToCursor()
end
end
---<
--- Combo While Not Channeling --
end
-- / Full Combo Function / --
-- / Harass Combo Function / --
function HarassCombo()
--- Smart Harass --
--->
if Target then
if TalonMenu.harass.harassOrbwalk then
OrbWalking(Target)
end
--- Harass Mode 1 W ---
if TalonMenu.harass.hMode == 1 then
CastW(Target)
--- Harass Mode 1 ---
--- Harass Mode 2 W+E+Q ---
else
CastW(Target)
if GetDistance(Target) >= TalonMenu.harass.harassERange and not SkillW.ready then
DelayAction(function()CastE(Target) end, 0.5)
end
CastQ(Target)
end
--- Harass Mode 2 ---
else
if TalonMenu.harass.harassOrbwalk then
moveToCursor()
end
end
---<
--- Smart Harass ---
end
-- / Harass Combo Function / --
-- / Clear Function / --
function MixedClear()
--- Jungle Clear ---
--->
if TalonMenu.clear.JungleFarm then
local JungleMob = GetJungleMob()
if JungleMob ~= nil then
if TalonMenu.clear.clearOrbJ then
OrbWalking(JungleMob)
end
if TalonMenu.clear.clearQ and SkillQ.ready and GetDistance(JungleMob) <= SkillQ.range then
CastSpell(_Q)
end
if TalonMenu.clear.clearW and SkillW.ready and GetDistance(JungleMob) <= SkillW.range then
CastSpell(_W, JungleMob.x, JungleMob.z)
end
if TalonMenu.clear.clearE and SkillE.ready and GetDistance(JungleMob) <= SkillE.range then
CastSpell(_E, JungleMob)
end
else
if TalonMenu.clear.clearOrbJ then
moveToCursor()
end
end
end
---<
--- Jungle Clear ---
--- Lane Clear ---
--->
if TalonMenu.clear.ClearLane then
for _, minion in pairs(enemyMinions.objects) do
if ValidTarget(minion) then
if TalonMenu.clear.clearOrbM then
OrbWalking(minion)
end
if TalonMenu.clear.clearQ and SkillQ.ready and GetDistance(minion) <= SkillQ.range then
CastSpell(_Q)
end
if TalonMenu.clear.clearW and SkillW.ready and GetDistance(minion) <= SkillW.range then
CastSpell(_W, minion.x, minion.z)
end
if TalonMenu.clear.clearE and SkillE.ready and GetDistance(minion) <= SkillE.range then
CastSpell(_E, minion)
end
else
if TalonMenu.clear.clearOrbM then
moveToCursor()
end
end
end
end
---<
--- Lane Clear ---
end
-- / Clear Function / --
-- / OnGainBuff Function / --
function OnGainBuff(unit, buff)
--->
if unit == myHero then
if buff.name == "talonnoxiandiplomacybuff" then
SkillQ.toggle = true
end
end
---<
end
-- / OnGainBuff Function / --
-- / OnLoseBuff Function / --
function OnLoseBuff(unit, buff)
--->
if unit == myHero then
if buff.name == "talonnoxiandiplomacybuff" then
SkillQ.toggle = false
end
end
---<
end
-- / OnLoseBuff Function / --
-- / Casting Q Function / --
function CastQ(enemy)
--- Dynamic Q Cast ---
--->
if not (SkillQ.ready or SkillQ.toggle) or (GetDistance(enemy) > SkillQ.range) then
return false
end
if ValidTarget(enemy) then
if not SkillQ.toggle then
if TimeToAttack() then
if VIP_USER then
Packet('S_MOVE', {type = 3, x = enemy.x, y = enemy.z, sourceNetworkId = myHero.networkID, targetNetworkId = enemy.networkID}):send()
return true
else
myHero:Attack(enemy)
return true
end
else
CastSpell(_Q)
return true
end
else
if VIP_USER then
Packet('S_MOVE', {type = 3, x = enemy.x, y = enemy.z, sourceNetworkId = myHero.networkID, targetNetworkId = enemy.networkID}):send()
return true
else
myHero:Attack(enemy)
return true
end
end
end
return false
---<
--- Dynamic Q Cast ---
end
-- / Casting Q Function / --
-- / Casting E Function / --
function CastE(enemy)
--- Dynamic E Cast ---
--->
if not SkillE.ready or (GetDistance(enemy) > SkillE.range) then
return false
end
if ValidTarget(enemy) then
if VIP_USER then
Packet("S_CAST", {spellId = _E, targetNetworkId = enemy.networkID}):send()
return true
else
CastSpell(_E, enemy)
return true
end
end
return false
---<
--- Dynamic E Cast ---
end
-- / Casting E Function / --
-- / Casting W Function / --
function CastW(enemy)
--- Dynamic W Cast ---
--->
if not SkillW.ready or (GetDistance(enemy) > SkillW.range) then
return false
end
if ValidTarget(enemy) then
if VIP_USER then
local wPos = ProdictW:GetPrediction(enemy)
if wPos then
CastSpell(_W, wPos.x, wPos.z)
return true
end
else
local wPred = TargetPrediction(SkillW.range, SkillW.speed, SkillW.delay, SkillW.width)
local wPrediction = wPred:GetPrediction(enemy)
if wPrediction then
CastSpell(_W, wPrediction.x, wPrediction.z)
return true
end
end
end
return false
---<
--- Dynamic W Cast ---
end
-- / Casting W Function / --
-- / Casting R Function / --
function CastR(enemy)
--- Dynamic R Cast ---
--->
if not SkillR.ready or (GetDistance(enemy) > SkillR.range) then
return false
end
if ValidTarget(enemy) then
CastSpell(_R)
end
---<
--- Dymanic R Cast --
end
-- / Casting R Function / --
-- / Use Items Function / --
function UseItems(enemy)
--- Use Items (Will Improve Soon) ---
--->
function UseItems(enemy)
if not enemy then
enemy = Target
end
if ValidTarget(enemy) then
if hxgReady and GetDistance(enemy) <= 600 then CastSpell(hxgSlot, enemy) end
if bwcReady and GetDistance(enemy) <= 450 then CastSpell(bwcSlot, enemy) end
if brkReady and GetDistance(enemy) <= 450 then CastSpell(brkSlot, enemy) end
if tmtReady and GetDistance(enemy) <= 185 then CastSpell(tmtSlot) end
if hdrReady and GetDistance(enemy) <= 185 then CastSpell(hdrSlot) end
end
end
---<
--- Use Items ---
end
-- / Use Items Function / --
function UseConsumables()
--- Check if Potions Needed --
--->
if TalonMenu.misc.aHP and isLow('Health') and not (UsingHPot or UsingFlask) and (Items.HealthPot.ready or Items.FlaskPot.ready) then
CastSpell((hpSlot or fskSlot))
end
---<
--- Check if Potions Needed --
end
-- / Auto Ignite Function / --
function AutoIgnite(enemy)
--- Simple Auto Ignite ---
--->
if enemy.health <= iDmg and GetDistance(enemy) <= 600 then
if iReady then CastSpell(ignite, enemy) end
end
---<
--- Simple Auto Ignite ---
end
-- / Auto Ignite Function / --
-- / Damage Calculation Function / --
function DamageCalculation()
--- Calculate our Damage On Enemies ---
--->
for i=1, heroManager.iCount do
local enemy = heroManager:GetHero(i)
if ValidTarget(enemy) then
aDmg = getDmg("AD", enemy, myHero)
dfgDmg, hxgDmg, bwcDmg, iDmg, bftDmg = 0, 0, 0, 0, 0
qDmg = (SkillQ.ready and getDmg("Q",enemy,myHero) or 0) + aDmg
wDmg = (SkillW.ready and getDmg("W",enemy,myHero) or 0)
eDmg = (SkillE.ready and getDmg("E",enemy,myHero) or 0)
rDmg = (SkillR.ready and getDmg("R",enemy,myHero,3) or 0)
hxgDmg = (hxgReady and getDmg("HXG", enemy, myHero) or 0)
bwcDmg = (bwcReady and getDmg("BWC", enemy, myHero) or 0)
bftdmg = (bftReady and getDmg("BLACKFIRE", enemy, myHero) or 0)
iDmg = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
onspellDmg = (liandrysSlot and getDmg("LIANDRYS",enemy,myHero) or 0)+(blackfireSlot and getDmg("BLACKFIRE",enemy,myHero) or 0)
itemsDmg = dfgDmg + bftDmg + hxgDmg + bwcDmg + iDmg + onspellDmg
if enemy.health > (qDmg + eDmg + wDmg + rDmg + itemsDmg) then
KillText[i] = 1
elseif enemy.health <= qDmg then
if SkillQ.ready then
KillText[i] = 2
else
KillText[i] = 10
end
elseif enemy.health <= wDmg then
if SkillW.ready then
KillText[i] = 3
else
KillText[i] = 10
end
elseif enemy.health <= eDmg then
if SkillE.ready then
KillText[i] = 4
else
KillText[i] = 10
end
elseif enemy.health <= (qDmg + wDmg) and SkillQ.ready and SkillW.ready then
if SkillQ.ready and SkillW.ready then
KillText[i] = 5
else
KillText[i] = 10
end
elseif enemy.health <= (qDmg + eDmg) and SkillQ.ready and SkillE.ready then
if SkillQ.ready and SkillE.ready then
KillText[i] = 6
else
KillText[i] = 10
end
elseif enemy.health <= (wDmg + eDmg) and SkillW.ready and SkillE.ready then
if SkillW.ready and SkillE.ready then
KillText[i] = 7
else
KillText[i] = 10
end
elseif enemy.health <= (qDmg + wDmg + eDmg) and SkillQ.ready and SkillW.ready and SkillE.ready then
if SkillQ.ready and SkillW.ready and SkillE.ready then
KillText[i] = 8
else
KillText[i] = 10
end
elseif enemy.health <= (qDmg + wDmg + eDmg + rDmg + itemsDmg) then
if SkillQ.ready and SkillW.ready and SkillE.ready then
KillText[i] = 9
else
KillText[i] = 10
end
end
---<
--- Calculate our Damage On Enemies ---
--- Setting KillText Color & Text ---
--->
end
end
---<
--- Setting KillText Color & Text ---
end
-- / Damage Calculation Function / --
-- / KillSteal Function / --
function KillSteal()
--- KillSteal No Wards ---
--->
if Target then
local distance = GetDistance(Target)
local health = Target.health
if health <= qDmg and SkillQ.ready and (distance < SkillQ.range) then
CastQ(Target)
elseif health <= wDmg and SkillW.ready and (distance < SkillW.range) then
CastW(Target)
elseif health <= eDmg and SkillE.ready and (distance < SkillE.range) then
CastE(Target)
elseif health <= (wDmg + eDmg) and SkillW.ready and SkillE.ready and (distance < SkillW.range) then
CastW(Target)
elseif health <= (qDmg + wDmg + eDmg) and SkillQ.ready and SkillW.ready and SkillE.ready and (distance < SkillE.range) then
CastE(Target)
elseif TalonMenu.killsteal.ultKS then
if health <= (qDmg + wDmg + eDmg + rDmg) and SkillQ.ready and SkillW.ready and SkillE.ready and SkillR.ready and (distance < SkillE.range) then
CastE(Target)
CastQ(Target)
CastW(Target)
CastR(Target)
end
if health <= rDmg and distance < (SkillR.range - 100) then
CastR(Target)
end
elseif TalonMenu.killsteal.itemsKS then
if health <= (qDmg + wDmg + eDmg + rDmg + itemsDmg) then
if SkillQ.ready and SkillW.ready and SkillE.ready and SkillR.ready then
UseItems(Target)
end
elseif health <= (qDmg + wDmg + eDmg + itemsDmg) and health > (qDmg + wDmg + eDmg) then
if SkillQ.ready and SkillW.ready and SkillE.ready then
UseItems(Target)
end
end
end
end
---<
--- KillSteal No Wards ---
end
-- / KillSteal Function / --
-- / Misc Functions / --
--- On Animation (Setting our last Animation) ---
--->
function OnAnimation(unit, animationName)
if unit.isMe and lastAnimation ~= animationName then lastAnimation = animationName end
end
---<
--- Checking if Hero in Danger ---
--->
function isInDanger(hero)
nEnemiesClose, nEnemiesFar = 0, 0
hpPercent = hero.health / hero.maxHealth
for _, enemy in pairs(enemyHeroes) do
if not enemy.dead and hero:GetDistance(enemy) <= 200 then
nEnemiesClose = nEnemiesClose + 1
if hpPercent < 0.5 and hpPercent < enemy.health / enemy.maxHealth then return true end
elseif not enemy.dead and hero:GetDistance(enemy) <= 1000 then
nEnemiesFar = nEnemiesFar + 1
end
end
if nEnemiesClose > 1 then return true end
if nEnemiesClose == 1 and nEnemiesFar > 1 then return true end
return false
end
---<
--- Checking if Hero in Danger ---
--- Get Jungle Mob Function by Apple ---
--->
function GetJungleMob()
for _, Mob in pairs(JungleFocusMobs) do
if ValidTarget(Mob, q1Range) then return Mob end
end
for _, Mob in pairs(JungleMobs) do
if ValidTarget(Mob, q1Range) then return Mob end
end
end
---<
--- Get Jungle Mob Function by Apple ---
--- Arrange Priorities 5v5 ---
--->
function ArrangePrioritys()
for i, enemy in pairs(enemyHeroes) do
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
---<
--- Arrange Priorities 5v5 ---
--- Arrange Priorities 3v3 ---
--->
function ArrangeTTPrioritys()
for i, enemy in pairs(enemyHeroes) do
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
---<
--- Arrange Priorities 3v3 ---
--- Set Priorities ---
--->
function SetPriority(table, hero, priority)
for i=1, #table, 1 do
if hero.charName:find(table[i]) ~= nil then
TS_SetHeroPriority(priority, hero.charName)
end
end
end
---<
--- Set Priorities ---
-- / Misc Functions / --
-- / On Create Obj Function / --
function OnCreateObj(obj)
--- All of Our Objects (CREATE) --
-->
if obj ~= nil then
if obj.name:find("Global_Item_HealthPotion.troy") then
if GetDistance(obj, myHero) <= 70 then
UsingHPot = true
end
end
if FocusJungleNames[obj.name] then
table.insert(JungleFocusMobs, obj)
elseif JungleMobNames[obj.name] then
table.insert(JungleMobs, obj)
end
end
---<
--- All of Our Objects (CREATE) --
end
-- / On Create Obj Function / --
-- / On Delete Obj Function / --
function OnDeleteObj(obj)
--- All of Our Objects (CLEAR) --
--->
if obj ~= nil then
if obj.name:find("Global_Item_HealthPotion.troy") then
UsingHPot = 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
--- All of Our Objects (CLEAR) --
---<
end
--- All The Objects in The World Literally ---
-- / On Delete Obj Function / --
-- / Plugin On Draw / --
function OnDraw()
--- Tick Manager Check ---
--->
if not TManager.onDraw:isReady() and TalonMenu.misc.uTM then return end
---<
--->
--- Drawing Our Ranges ---
--->
if not myHero.dead then
if not TalonMenu.drawing.disableAll then
if SkillQ.ready and TalonMenu.drawing.drawQ then
DrawCircle(myHero.x, myHero.y, myHero.z, SkillQ.range, SkillQ.color)
end
if SkillW.ready and TalonMenu.drawing.drawW then
DrawCircle(myHero.x, myHero.y, myHero.z, SkillW.range, SkillW.color)
end
if SkillE.ready and TalonMenu.drawing.drawE then
DrawCircle(myHero.x, myHero.y, myHero.z, SkillE.range, SkillE.color)
end
end
end
---<
--- Drawing Our Ranges ---
--- Draw Enemy Damage Text ---
--->
if TalonMenu.drawing.drawText then
for i = 1, heroManager.iCount do
local enemy = heroManager:GetHero(i)
if ValidTarget(enemy) then
local barPos = WorldToScreen(D3DXVECTOR3(enemy.x, enemy.y, enemy.z)) --(Credit to Zikkah)
local PosX = barPos.x - 35
local PosY = barPos.y - 10
DrawText(TextList[KillText[i]], 16, PosX, PosY, colorText)
end
end
end
---<
--- Draw Enemy Damage Text ---
--- Draw Enemy Target ---
--->
if Target then
if TalonMenu.drawing.drawTargetText then
DrawText("Targeting: " .. Target.charName, 12, 100, 100, colorText)
end
end
---<
--- Draw Enemy Target ---
end
-- / Plugin On Draw / --
-- / OrbWalking Functions / --
--- Orbwalking Target ---
--->
function OrbWalking(Target)
if TimeToAttack() and GetDistance(Target) <= myHero.range + GetDistance(myHero.minBBox) then
myHero:Attack(Target)
elseif heroCanMove() then
moveToCursor()
end
end
---<
--- Orbwalking Target ---
--- Check When Its Time To Attack ---
--->
function TimeToAttack()
return (GetTickCount() + GetLatency()/2 > lastAttack + lastAttackCD)
end
---<
--- Check When Its Time To Attack ---
--- Prevent AA Canceling ---
--->
function heroCanMove()
return (GetTickCount() + GetLatency()/2 > lastAttack + lastWindUpTime + 20)
end
---<
--- Prevent AA Canceling ---
--- Move to Mouse ---
--->
function moveToCursor()
if GetDistance(mousePos) then
local moveToPos = myHero + (Vector(mousePos) - myHero):normalized()*300
myHero:MoveTo(moveToPos.x, moveToPos.z)
end
end
---<
--- Move to Mouse ---
--- On Process Spell ---
--->
function OnProcessSpell(object,spell)
--- Tick Manager Check ---
--->
if not TManager.onSpell:isReady() and TalonMenu.misc.uTM then return end
---<
--->
if object == myHero then
if spell.name:lower():find("attack") then
lastAttack = GetTickCount() - GetLatency()/2
lastWindUpTime = spell.windUpTime*1000
lastAttackCD = spell.animationTime*1000
end
end
---<
end
---<
--- On Process Spell ---
-- / OrbWalking Functions / --
-- / FPS Manager Functions / --
class 'TickManager'
--- TM Init Function ---
--->
function TickManager:__init(ticksPerSecond)
self.TPS = ticksPerSecond
self.lastClock = 0
self.currentClock = 0
end
---<
--- TM Init Function ---
--- TM Type Function ---
--->
function TickManager:__type()
return "TickManager"
end
---<
--- TM Init Function ---
--- Set TPS Function ---
--->
function TickManager:setTPS(ticksPerSecond)
self.TPS = ticksPerSecond
end
---<
--- Set TPS Function ---
--- Get TPS Function ---
--->
function TickManager:getTPS(ticksPerSecond)
return self.TPS
end
---<
--- Get TPS Function ---
--- TM Ready Function ---
--->
function TickManager:isReady()
self.currentClock = os.clock()