forked from Maxxxel/GoS-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GoS-U External.lua
4057 lines (3676 loc) · 155 KB
/
GoS-U External.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
-- ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄
-- ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░▌ ▐░▌
-- ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌
-- ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌
-- ▐░▌ ▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌
-- ▐░▌▐░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌
-- ▐░▌ ▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌
-- ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
-- ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▐░█▄▄▄▄▄▄▄█░▌
-- ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌
-- ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀
-- ...###.########.##.....##.########.########.########..##....##....###....##.......###..
-- ..##...##........##...##.....##....##.......##.....##.###...##...##.##...##.........##.
-- .##....##.........##.##......##....##.......##.....##.####..##..##...##..##..........##
-- .##....######......###.......##....######...########..##.##.##.##.....##.##..........##
-- .##....##.........##.##......##....##.......##...##...##..####.#########.##..........##
-- ..##...##........##...##.....##....##.......##....##..##...###.##.....##.##.........##.
-- ...###.########.##.....##....##....########.##.....##.##....##.##.....##.########.###..
-- ==================
-- == Introduction ==
-- ==================
-- Current version: 1.0.5.4
-- Intermediate GoS script which supports only ADC champions.
-- Features:
-- + Supports Ashe, Caitlyn, Ezreal, Jinx, Kalista, Vayne
-- + 2 choosable predictions (HPrediction, TPrediction),
-- + 3 managers (Enemies-around, Mana, HP),
-- + Configurable casting settings (Auto, Combo, Harass),
-- + Different types of making combat,
-- + Advanced farm logic (LastHit & LaneClear).
-- + Additional Anti-Gapcloser,
-- + Spell range drawings (circular),
-- + Special damage indicator over HP bar of enemy,
-- + Offensive items usage & stacking tear,
-- + Includes GoS-U Utility
-- (Summoner spells & items usage, Auto-LevelUp, killable AA drawings)
-- ==================
-- == Requirements ==
-- ==================
-- + Orbwalker: GoS, IC
-- + Predictions: HPred, TPred
-- ===============
-- == Changelog ==
-- ===============
-- 1.0.5.4
-- + Fixed error related to GetEnemyHeroes function
-- 1.0.5.3
-- + Added BaseUlt modes
-- + Fixed HPred callback
-- 1.0.5.2
-- + Added GSO support
-- 1.0.5.1
-- + Fixed Harass with Caitlyn W
-- 1.0.5
-- + Added Kaisa
-- 1.0.4.1
-- + Fixed R Cast
-- 1.0.4 BETA
-- + Added Caitlyn
-- 1.0.3 BETA
-- + Added Kalista
-- 1.0.2.3 BETA
-- + Updated calc damage for Patch 8.13
-- + Improved R spell casting
-- + Minor changes
-- 1.0.2.2 BETA
-- + Fixed menu value check
-- 1.0.2.1 BETA
-- + Improved Jinx's spells logic
-- 1.0.2 BETA
-- + Added Vayne
-- 1.0.1 BETA
-- + Added Ezreal
-- + Fixed spell casting
-- 1.0 BETA
-- + Initial release
if FileExist(COMMON_PATH .. "MapPositionGOS.lua") then
require 'MapPositionGOS'
else
PrintChat("MapPositionGOS.lua missing!")
end
if FileExist(COMMON_PATH .. "TPred.lua") then
require 'TPred'
else
PrintChat("TPred.lua missing!")
end
---------------
-- Functions --
---------------
function CalcMagicalDamage(source, target, amount)
local mr = target.magicResist
local value = 100 / (100 + (mr * source.magicPenPercent) - source.magicPen)
if mr < 0 then
value = 2 - 100 / (100 - mr)
elseif (mr * source.magicPenPercent) - source.magicPen < 0 then
value = 1
end
return math.max(0, math.floor(value * amount))
end
function CalcPhysicalDamage(source, target, amount)
local ArmorPenPercent = source.armorPenPercent
local ArmorPenFlat = source.armorPen * (0.6 + (0.4 * (target.levelData.lvl / 18)))
local BonusArmorPen = source.bonusArmorPenPercent
if source.type == Obj_AI_Minion then
ArmorPenPercent = 1
ArmorPenFlat = 0
BonusArmorPen = 1
elseif source.type == Obj_AI_Turret then
ArmorPenFlat = 0
BonusArmorPen = 1
if source.charName:find("3") or source.charName:find("4") then
ArmorPenPercent = 0.25
else
ArmorPenPercent = 0.7
end
if target.type == Obj_AI_Minion then
amount = amount * 1.25
if target.charName:find("MinionSiege") then
amount = amount * 0.7
end
return amount
end
end
local armor = target.armor
local bonusArmor = target.bonusArmor
local value = 100 / (100 + (armor * ArmorPenPercent) - (bonusArmor * (1 - BonusArmorPen)) - ArmorPenFlat)
if armor < 0 then
value = 2 - 100 / (100 - armor)
elseif (armor * ArmorPenPercent) - (bonusArmor * (1 - BonusArmorPen)) - ArmorPenFlat < 0 then
value = 1
end
return math.max(0, math.floor(value * amount))
end
-- <--
castSpell = {state = 0, tick = GetTickCount(), casting = GetTickCount() - 1000, mouse = mousePos}
function CastSpell(spell, pos, range, delay)
range = range or math.huge
delay = delay or 250
ticker = GetTickCount()
if castSpell.state == 0 and GetDistance(myHero.pos,pos) < range and ticker - castSpell.casting > delay + Game.Latency() and pos:ToScreen().onScreen then
castSpell.state = 1
castSpell.mouse = mousePos
castSpell.tick = ticker
end
if castSpell.state == 1 then
if ticker - castSpell.tick < Game.Latency() then
Control.SetCursorPos(pos)
Control.KeyDown(spell)
Control.KeyUp(spell)
castSpell.casting = ticker + delay
DelayAction(function()
if castSpell.state == 1 then
Control.SetCursorPos(castSpell.mouse)
castSpell.state = 0
end
end, Game.Latency()/1000)
end
if ticker - castSpell.casting > Game.Latency() then
Control.SetCursorPos(castSpell.mouse)
castSpell.state = 0
end
end
end
-- --> #Noddy
function EnemiesAround(pos, range)
local N = 0
for i = 1,Game.HeroCount() do
local hero = Game.Hero(i)
if ValidTarget(hero,range + hero.boundingRadius) and hero.isEnemy and not hero.dead then
N = N + 1
end
end
return N
end
function GetAllyHeroes()
AllyHeroes = {}
for i = 1, Game.HeroCount() do
local Hero = Game.Hero(i)
if Hero.isAlly and not Hero.isMe then
table.insert(AllyHeroes, Hero)
end
end
return AllyHeroes
end
function GetBestCircularFarmPos(range, radius)
local BestPos = nil
local MostHit = 0
for i = 1, Game.MinionCount() do
local m = Game.Minion(i)
if m and m.isEnemy and not m.dead then
local Count = MinionsAround(m.pos, radius, 300-myHero.team)
if Count > MostHit then
MostHit = Count
BestPos = m.pos
end
end
end
return BestPos, MostHit
end
function GetBestLinearFarmPos(range, width)
local BestPos = nil
local MostHit = 0
for i = 1, Game.MinionCount() do
local m = Game.Minion(i)
if m and m.isEnemy and not m.dead then
local EndPos = myHero.pos + (m.pos - myHero.pos):Normalized() * range
local Count = MinionsOnLine(myHero.pos, EndPos, width, 300-myHero.team)
if Count > MostHit then
MostHit = Count
BestPos = m.pos
end
end
end
return BestPos, MostHit
end
function GetDistanceSqr(Pos1, Pos2)
local Pos2 = Pos2 or myHero.pos
local dx = Pos1.x - Pos2.x
local dz = (Pos1.z or Pos1.y) - (Pos2.z or Pos2.y)
return dx^2 + dz^2
end
function GetDistance(Pos1, Pos2)
return math.sqrt(GetDistanceSqr(Pos1, Pos2))
end
function GetEnemyHeroes(range)
local range = range or math.huge
EnemyHeroes = {}
for i = 1, Game.HeroCount() do
local Hero = Game.Hero(i)
if Hero.isEnemy and GetDistance(Hero.pos) <= range then
table.insert(EnemyHeroes, Hero)
end
end
return EnemyHeroes
end
function GetItemSlot(unit, id)
for i = ITEM_1, ITEM_7 do
if unit:GetItemData(i).itemID == id then
return i
end
end
return 0
end
function GetPercentHP(unit)
return 100*unit.health/unit.maxHealth
end
function GetPercentMana(unit)
return 100*unit.mana/unit.maxMana
end
function GetTarget(range)
if _G.SDK then
return _G.SDK.TargetSelector:GetTarget(range, _G.SDK.DAMAGE_TYPE_PHYSICAL);
elseif _G.gsoSDK then
return _G.gsoSDK.TargetSelector:GetTarget(GetEnemyHeroes(5000), false)
else
return _G.GOS:GetTarget(range,"AD")
end
end
function GotBuff(unit, buffname)
for i = 0, unit.buffCount do
local buff = unit:GetBuff(i)
if buff.name == buffname and buff.count > 0 then
return buff.count
end
end
return 0
end
function IsImmobile(unit)
for i = 0, unit.buffCount do
local buff = unit:GetBuff(i)
if buff and (buff.type == 5 or buff.type == 11 or buff.type == 18 or buff.type == 22 or buff.type == 24 or buff.type == 28 or buff.type == 29 or buff.name == "recall") and buff.count > 0 then
return true
end
end
return false
end
function IsReady(spell)
return Game.CanUseSpell(spell) == 0
end
function MinionsAround(pos, range, team)
local Count = 0
for i = 1, Game.MinionCount() do
local m = Game.Minion(i)
if m and m.team == team and not m.dead and GetDistance(pos, m.pos) <= range then
Count = Count + 1
end
end
return Count
end
function MinionsOnLine(startpos, endpos, width, team)
local Count = 0
for i = 1, Game.MinionCount() do
local m = Game.Minion(i)
if m and m.team == team and not m.dead then
local w = width + m.boundingRadius
local pointSegment, pointLine, isOnSegment = VectorPointProjectionOnLineSegment(startpos, endpos, m.pos)
if isOnSegment and GetDistanceSqr(pointSegment, m.pos) < w^2 and GetDistanceSqr(startpos, endpos) > GetDistanceSqr(startpos, m.pos) then
Count = Count + 1
end
end
end
return Count
end
function Mode()
if _G.SDK then
if _G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_COMBO] then
return "Combo"
elseif _G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_HARASS] then
return "Harass"
elseif _G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_LANECLEAR] then
return "Clear"
end
elseif _G.gsoSDK then
return _G.gsoSDK.Orbwalker:GetMode()
else
return GOS.GetMode()
end
end
function ValidTarget(target, range)
range = range and range or math.huge
return target ~= nil and target.valid and target.visible and not target.dead and target.distance <= range
end
function VectorPointProjectionOnLineSegment(v1, v2, v)
local cx, cy, ax, ay, bx, by = v.x, (v.z or v.y), v1.x, (v1.z or v1.y), v2.x, (v2.z or v2.y)
local rL = ((cx - ax) * (bx - ax) + (cy - ay) * (by - ay)) / ((bx - ax) ^ 2 + (by - ay) ^ 2)
local pointLine = { x = ax + rL * (bx - ax), y = ay + rL * (by - ay) }
local rS = rL < 0 and 0 or (rL > 1 and 1 or rL)
local isOnSegment = rS == rL
local pointSegment = isOnSegment and pointLine or {x = ax + rS * (bx - ax), y = ay + rS * (by - ay)}
return pointSegment, pointLine, isOnSegment
end
-------------
-- Utility --
-------------
class "GoSuUtility"
function GoSuUtility:__init()
Callback.Add("Tick", function() self:UtilityTick() end)
Callback.Add("Draw", function() self:UtilityDraw() end)
Callback.Add("ProcessRecall", function(unit, recall) self:ProcessRecall(unit, recall) end)
self:UtilityMenu()
self.HitTime = 0
Enemies = {}
EnemiesData = {}
Recalling = {}
Item_HK = {}
for i = 1, Game.HeroCount() do
local unit = Game.Hero(i)
if unit.isMe then
goto A
end
if unit.isEnemy then
EnemiesData[unit.networkID] = 0
table.insert(Enemies, unit)
end
::A::
end
for i = 1, Game.ObjectCount() do
local object = Game.Object(i)
if object.isAlly or object.type ~= Obj_AI_SpawnPoint then
goto A
end
EnemySpawnPos = object
break
::A::
end
end
function GoSuUtility:UtilityMenu()
self.UMenu = MenuElement({type = MENU, id = "GoSuUtility", name = "[GoS-U] Utility"})
self.UMenu:MenuElement({id = "BaseUlt", name = "BaseUlt", type = MENU})
self.UMenu.BaseUlt:MenuElement({id = "BU", name = "Enable BaseUlt", value = true})
self.UMenu.BaseUlt:MenuElement({id = "BUM", name = "BaseUlt Mode", drop = {"Cast Spell", "Draw Info"}, value = 2})
self.UMenu:MenuElement({id = "Draws", name = "Draws", type = MENU})
self.UMenu.Draws:MenuElement({id = "DrawAA", name = "Draw Killable AAs", value = true})
self.UMenu.Draws:MenuElement({id = "DrawJng", name = "Draw Jungler Info", value = true})
self.UMenu:MenuElement({id = "Items", name = "Items", type = MENU})
self.UMenu.Items:MenuElement({id = "UseBC", name = "Use Bilgewater Cutlass", value = true})
self.UMenu.Items:MenuElement({id = "UseBOTRK", name = "Use BOTRK", value = true})
self.UMenu.Items:MenuElement({id = "UseHG", name = "Use Hextech Gunblade", value = true})
self.UMenu.Items:MenuElement({id = "UseMS", name = "Use Mercurial Scimitar", value = true})
self.UMenu.Items:MenuElement({id = "UseQS", name = "Use Quicksilver Sash", value = true})
self.UMenu.Items:MenuElement({id = "OI", name = "%HP To Use Offensive Items", value = 35, min = 0, max = 100, step = 5})
self.UMenu:MenuElement({id = "SS", name = "Summoner Spells", type = MENU})
self.UMenu.SS:MenuElement({id = "UseHeal", name = "Use Heal", value = true})
self.UMenu.SS:MenuElement({id = "UseSave", name = "Save Ally Using Heal", value = true})
self.UMenu.SS:MenuElement({id = "UseBarrier", name = "Use Barrier", value = true})
self.UMenu.SS:MenuElement({id = "HealMe", name = "%HP To Use Heal: MyHero", value = 15, min = 0, max = 100, step = 5})
self.UMenu.SS:MenuElement({id = "HealAlly", name = "%HP To Use Heal: Ally", value = 15, min = 0, max = 100, step = 5})
self.UMenu.SS:MenuElement({id = "BarrierMe", name = "%HP To Use Barrier", value = 15, min = 0, max = 100, step = 5})
end
function GoSuUtility:UtilityTick()
target = GetTarget(5000)
Item_HK[ITEM_1] = HK_ITEM_1
Item_HK[ITEM_2] = HK_ITEM_2
Item_HK[ITEM_3] = HK_ITEM_3
Item_HK[ITEM_4] = HK_ITEM_4
Item_HK[ITEM_5] = HK_ITEM_5
Item_HK[ITEM_6] = HK_ITEM_6
Item_HK[ITEM_7] = HK_ITEM_7
self:BaseUlt()
self:Items()
self:SS()
end
function GoSuUtility:ProcessRecall(unit, recall)
if not unit.isEnemy then return end
if recall.isStart then
table.insert(Recalling, {object = unit, start = Game.Timer(), duration = (recall.totalTime/1000)})
else
for i, recallunits in pairs(Recalling) do
if recallunits.object.networkID == unit.networkID then
table.remove(Recalling, i)
end
end
end
end
function GetRecallData(unit)
for i, recall in pairs(Recalling) do
if recall.object.networkID == unit.networkID then
return {isRecalling = true, RecallTime = recall.start+recall.duration-Game.Timer()}
end
end
return {isRecalling = false, RecallTime = 0}
end
function GoSuUtility:BaseUlt()
for i, enemy in pairs(Enemies) do
if enemy.visible then
EnemiesData[enemy.networkID] = Game.Timer()
end
end
if not self.UMenu.BaseUlt.BU:Value() or myHero.dead or not IsReady(_R) then return end
for i, enemy in pairs(Enemies) do
if enemy.valid and not enemy.dead and GetRecallData(enemy).isRecalling then
if myHero.charName == "Ashe" then
local AsheRDmg = CalcMagicalDamage(myHero, enemy, (({200, 400, 600})[myHero:GetSpellData(_R).level] + myHero.ap))
if AsheRDmg >= (enemy.health + enemy.hpRegen * 20) then
if self.UMenu.BaseUlt.BUM:Value() == 2 then
Draw.Text("Recalling "..tostring(enemy.charName).." with "..tostring(math.ceil(enemy.health)).." HP", 19, myHero.pos2D.x-100, myHero.pos2D.y+60, Draw.Color(0xFFFFA500))
end
local Distance = enemy.pos:DistanceTo(EnemySpawnPos.pos)
local Delay = 0.25
local Speed = 1600
local HitTime = Distance / Speed + Delay
local RecallTime = GetRecallData(enemy).RecallTime
self.HitTime = HitTime
if RecallTime - HitTime > 0.1 then return end
if self.UMenu.BaseUlt.BUM:Value() == 1 then
local CastPos = myHero.pos-(myHero.pos-EnemySpawnPos.pos):Normalized()*300
CastSpell(HK_R, CastPos, 300, Delay*1000)
elseif self.UMenu.BaseUlt.BUM:Value() == 2 then
Draw.Text("Press R on enemy base now!", 19, myHero.pos2D.x-100, myHero.pos2D.y+85, Draw.Color(0xFFFF4500))
end
self.HitTime = 0
end
elseif myHero.charName == "Ezreal" then
local EzrealRDmg = CalcMagicalDamage(myHero, enemy, (0.3*(({350, 500, 650})[myHero:GetSpellData(_R).level] + myHero.bonusDamage + 0.9 * myHero.ap)))
if EzrealRDmg >= (enemy.health + enemy.hpRegen * 20) then
if self.UMenu.BaseUlt.BUM:Value() == 2 then
Draw.Text("Recalling "..tostring(enemy.charName).." with "..tostring(math.ceil(enemy.health)).." HP", 19, myHero.pos2D.x-100, myHero.pos2D.y+60, Draw.Color(0xFFFFA500))
end
local Distance = enemy.pos:DistanceTo(EnemySpawnPos.pos)
local Delay = 1
local Speed = 2000
local HitTime = Distance / Speed + Delay
local RecallTime = GetRecallData(enemy).RecallTime
self.HitTime = HitTime
if RecallTime - HitTime > 0.1 then return end
if self.UMenu.BaseUlt.BUM:Value() == 1 then
local CastPos = myHero.pos-(myHero.pos-EnemySpawnPos.pos):Normalized()*300
CastSpell(HK_R, CastPos, 300, Delay*1000)
elseif self.UMenu.BaseUlt.BUM:Value() == 2 then
Draw.Text("Press R on enemy base now!", 19, myHero.pos2D.x-100, myHero.pos2D.y+85, Draw.Color(0xFFFF4500))
end
self.HitTime = 0
end
elseif myHero.charName == "Jinx" then
local JinxRDmg = CalcPhysicalDamage(myHero, enemy, (({250, 350, 450})[myHero:GetSpellData(_R).level] + ({25, 30, 35})[myHero:GetSpellData(_R).level] / 100 * (enemy.maxHealth - enemy.health) + 1.5 * myHero.totalDamage))
if JinxRDmg >= (enemy.health + enemy.hpRegen * 20) then
if self.UMenu.BaseUlt.BUM:Value() == 2 then
Draw.Text("Recalling "..tostring(enemy.charName).." with "..tostring(math.ceil(enemy.health)).." HP", 19, myHero.pos2D.x-100, myHero.pos2D.y+60, Draw.Color(0xFFFFA500))
end
local Distance = enemy.pos:DistanceTo(EnemySpawnPos.pos)
local Delay = 0.6
local Speed = Distance > 1350 and (2295000 + (Distance - 1350) * 2200) / Distance or 1700
local HitTime = Distance / Speed + Delay
local RecallTime = GetRecallData(enemy).RecallTime
self.HitTime = HitTime
if RecallTime - HitTime > 0.1 then return end
if self.UMenu.BaseUlt.BUM:Value() == 1 then
local CastPos = myHero.pos-(myHero.pos-EnemySpawnPos.pos):Normalized()*300
CastSpell(HK_R, CastPos, 300, Delay*1000)
elseif self.UMenu.BaseUlt.BUM:Value() == 2 then
Draw.Text("Press R on enemy base now!", 19, myHero.pos2D.x-100, myHero.pos2D.y+85, Draw.Color(0xFFFF4500))
end
self.HitTime = 0
end
end
end
end
end
function GoSuUtility:UtilityDraw()
for i, enemy in pairs(GetEnemyHeroes(25000)) do
if self.UMenu.Draws.DrawJng:Value() then
SmiteSlot = (enemy:GetSpellData(SUMMONER_1).name:lower():find("smite") and SUMMONER_1 or (enemy:GetSpellData(SUMMONER_2).name:lower():find("smite") and SUMMONER_2 or nil))
if SmiteSlot then
Smite = true
else
Smite = false
end
if Smite then
if enemy.alive then
if ValidTarget(enemy) then
if GetDistance(myHero.pos, enemy.pos) > 3000 then
Draw.Text("Jungler: Visible", 17, myHero.pos2D.x-45, myHero.pos2D.y+10, Draw.Color(0xFF32CD32))
else
Draw.Text("Jungler: Near", 17, myHero.pos2D.x-43, myHero.pos2D.y+10, Draw.Color(0xFFFF0000))
end
else
Draw.Text("Jungler: Invisible", 17, myHero.pos2D.x-55, myHero.pos2D.y+10, Draw.Color(0xFFFFD700))
end
else
Draw.Text("Jungler: Dead", 17, myHero.pos2D.x-45, myHero.pos2D.y+10, Draw.Color(0xFF32CD32))
end
end
end
if self.UMenu.Draws.DrawAA:Value() then
if ValidTarget(enemy) then
AALeft = enemy.health / myHero.totalDamage
Draw.Text("AA Left: "..tostring(math.ceil(AALeft)), 17, enemy.pos2D.x-38, enemy.pos2D.y+10, Draw.Color(0xFF00BFFF))
end
end
end
end
function GoSuUtility:Items()
if target == nil then return end
if EnemiesAround(myHero, 1000) >= 1 then
if (target.health / target.maxHealth)*100 <= self.UMenu.Items.OI:Value() then
if self.UMenu.Items.UseBC:Value() then
if GetItemSlot(myHero, 3144) > 0 and ValidTarget(target, 550) then
if myHero:GetSpellData(GetItemSlot(myHero, 3144)).currentCd == 0 then
Control.CastSpell(Item_HK[GetItemSlot(myHero, 3144)], target)
end
end
end
if self.UMenu.Items.UseBOTRK:Value() then
if GetItemSlot(myHero, 3153) > 0 and ValidTarget(target, 550) then
if myHero:GetSpellData(GetItemSlot(myHero, 3153)).currentCd == 0 then
Control.CastSpell(Item_HK[GetItemSlot(myHero, 3153)], target)
end
end
end
if self.UMenu.Items.UseHG:Value() then
if GetItemSlot(myHero, 3146) > 0 and ValidTarget(target, 700) then
if myHero:GetSpellData(GetItemSlot(myHero, 3146)).currentCd == 0 then
Control.CastSpell(Item_HK[GetItemSlot(myHero, 3146)], target)
end
end
end
end
end
if self.UMenu.Items.UseMS:Value() then
if GetItemSlot(myHero, 3139) > 0 then
if myHero:GetSpellData(GetItemSlot(myHero, 3139)).currentCd == 0 then
if IsImmobile(myHero) then
Control.CastSpell(Item_HK[GetItemSlot(myHero, 3139)], myHero)
end
end
end
end
if self.UMenu.Items.UseQS:Value() then
if GetItemSlot(myHero, 3140) > 0 then
if myHero:GetSpellData(GetItemSlot(myHero, 3140)).currentCd == 0 then
if IsImmobile(myHero) then
Control.CastSpell(Item_HK[GetItemSlot(myHero, 3140)], myHero)
end
end
end
end
end
function GoSuUtility:SS()
if EnemiesAround(myHero, 2500) >= 1 then
if self.UMenu.SS.UseHeal:Value() then
if myHero.alive and myHero.health > 0 and GetPercentHP(myHero) <= self.UMenu.SS.HealMe:Value() then
if myHero:GetSpellData(SUMMONER_1).name == "SummonerHeal" and IsReady(SUMMONER_1) then
Control.CastSpell(HK_SUMMONER_1)
elseif myHero:GetSpellData(SUMMONER_2).name == "SummonerHeal" and IsReady(SUMMONER_2) then
Control.CastSpell(HK_SUMMONER_2)
end
for _, ally in pairs(GetAllyHeroes()) do
if ValidTarget(ally, 850) then
if ally.alive and ally.health > 0 and GetPercentHP(ally) <= self.UMenu.SS.HealAlly:Value() then
if myHero:GetSpellData(SUMMONER_1).name == "SummonerHeal" and IsReady(SUMMONER_1) then
Control.CastSpell(HK_SUMMONER_1, ally.pos)
elseif myHero:GetSpellData(SUMMONER_2).name == "SummonerHeal" and IsReady(SUMMONER_2) then
Control.CastSpell(HK_SUMMONER_2, ally.pos)
end
end
end
end
end
end
if self.UMenu.SS.UseBarrier:Value() then
if myHero.alive and myHero.health > 0 and GetPercentHP(myHero) <= self.UMenu.SS.BarrierMe:Value() then
if myHero:GetSpellData(SUMMONER_1).name == "SummonerBarrier" and IsReady(SUMMONER_1) then
Control.CastSpell(HK_SUMMONER_2)
elseif myHero:GetSpellData(SUMMONER_2).name == "SummonerBarrier" and IsReady(SUMMONER_2) then
Control.CastSpell(HK_SUMMONER_1)
end
end
end
end
end
class "Ashe"
local HeroIcon = "https://d1u5p3l4wpay3k.cloudfront.net/lolesports_gamepedia_en/4/4a/AsheSquare.png"
local QIcon = "https://vignette.wikia.nocookie.net/leagueoflegends/images/2/2a/Ranger%27s_Focus_2.png"
local WIcon = "https://vignette.wikia.nocookie.net/leagueoflegends/images/5/5d/Volley.png"
local RIcon = "https://vignette.wikia.nocookie.net/leagueoflegends/images/2/28/Enchanted_Crystal_Arrow.png"
function Ashe:Menu()
self.AsheMenu = MenuElement({type = MENU, id = "Ashe", name = "[GoS-U] Ashe", leftIcon = HeroIcon})
self.AsheMenu:MenuElement({id = "Auto", name = "Auto", type = MENU})
self.AsheMenu.Auto:MenuElement({id = "UseW", name = "Use W [Volley]", value = true, leftIcon = WIcon})
self.AsheMenu.Auto:MenuElement({id = "MP", name = "Mana-Manager", value = 40, min = 0, max = 100, step = 5})
self.AsheMenu:MenuElement({id = "Combo", name = "Combo", type = MENU})
self.AsheMenu.Combo:MenuElement({id = "UseQ", name = "Use Q [Ranger's Focus]", value = true, leftIcon = QIcon})
self.AsheMenu.Combo:MenuElement({id = "UseW", name = "Use W [Volley]", value = true, leftIcon = WIcon})
self.AsheMenu.Combo:MenuElement({id = "UseR", name = "Use R [Enchanted Crystal Arrow]", value = true, leftIcon = RIcon})
self.AsheMenu.Combo:MenuElement({id = "Distance", name = "Distance: R", value = 2000, min = 100, max = 5000, step = 50})
self.AsheMenu.Combo:MenuElement({id = "X", name = "Minimum Enemies: R", value = 1, min = 0, max = 5, step = 1})
self.AsheMenu.Combo:MenuElement({id = "HP", name = "HP-Manager: R", value = 40, min = 0, max = 100, step = 5})
self.AsheMenu:MenuElement({id = "Harass", name = "Harass", type = MENU})
self.AsheMenu.Harass:MenuElement({id = "UseQ", name = "Use Q [Ranger's Focus]", value = true, leftIcon = QIcon})
self.AsheMenu.Harass:MenuElement({id = "UseW", name = "Use W [Volley]", value = true, leftIcon = WIcon})
self.AsheMenu.Harass:MenuElement({id = "MP", name = "Mana-Manager", value = 40, min = 0, max = 100, step = 5})
self.AsheMenu:MenuElement({id = "KillSteal", name = "KillSteal", type = MENU})
self.AsheMenu.KillSteal:MenuElement({id = "UseW", name = "Use W [Volley]", value = true, leftIcon = WIcon})
self.AsheMenu.KillSteal:MenuElement({id = "UseR", name = "Use R [Enchanted Crystal Arrow]", value = true, leftIcon = RIcon})
self.AsheMenu.KillSteal:MenuElement({id = "Distance", name = "Distance: R", value = 2000, min = 100, max = 5000, step = 50})
self.AsheMenu:MenuElement({id = "LaneClear", name = "LaneClear", type = MENU})
self.AsheMenu.LaneClear:MenuElement({id = "UseQ", name = "Use Q [Ranger's Focus]", value = true, leftIcon = QIcon})
self.AsheMenu.LaneClear:MenuElement({id = "UseW", name = "Use W [Volley]", value = true, leftIcon = WIcon})
self.AsheMenu.LaneClear:MenuElement({id = "MP", name = "Mana-Manager", value = 40, min = 0, max = 100, step = 5})
self.AsheMenu:MenuElement({id = "AntiGapcloser", name = "Anti-Gapcloser", type = MENU})
self.AsheMenu.AntiGapcloser:MenuElement({id = "UseW", name = "Use W [Volley]", value = true, leftIcon = WIcon})
self.AsheMenu.AntiGapcloser:MenuElement({id = "DistanceW", name = "Distance: W", value = 400, min = 25, max = 500, step = 25})
self.AsheMenu:MenuElement({id = "HitChance", name = "HitChance", type = MENU})
self.AsheMenu.HitChance:MenuElement({id = "HPredHit", name = "HitChance: HPrediction", value = 1, min = 1, max = 5, step = 1})
self.AsheMenu.HitChance:MenuElement({id = "TPredHit", name = "HitChance: TPrediction", value = 1, min = 0, max = 5, step = 1})
self.AsheMenu:MenuElement({id = "Prediction", name = "Prediction", type = MENU})
self.AsheMenu.Prediction:MenuElement({id = "PredictionW", name = "Prediction: W", drop = {"HPrediction", "TPrediction"}, value = 2})
self.AsheMenu.Prediction:MenuElement({id = "PredictionR", name = "Prediction: R", drop = {"HPrediction", "TPrediction"}, value = 2})
self.AsheMenu:MenuElement({id = "Drawings", name = "Drawings", type = MENU})
self.AsheMenu.Drawings:MenuElement({id = "DrawW", name = "Draw W Range", value = true})
self.AsheMenu.Drawings:MenuElement({id = "DrawR", name = "Draw R Range", value = true})
end
function Ashe:Spells()
AsheW = {speed = 1500, range = 1200, delay = 0.25, width = 20, collision = true, aoe = true, type = "line"}
AsheR = {speed = 1600, range = 25000, delay = 0.25, width = 130, collision = false, aoe = false, type = "line"}
end
function Ashe:__init()
self:Menu()
self:Spells()
Callback.Add("Tick", function() self:Tick() end)
Callback.Add("Draw", function() self:Draw() end)
end
function Ashe:Tick()
if myHero.dead or Game.IsChatOpen() == true then return end
self:Auto()
self:KillSteal()
self:AntiGapcloser()
if Mode() == "Combo" then
self:Combo()
elseif Mode() == "Harass" then
self:Harass()
elseif Mode() == "Clear" then
self:LaneClear()
end
end
function Ashe:Draw()
if myHero.dead then return end
if self.AsheMenu.Drawings.DrawW:Value() then Draw.Circle(myHero.pos, AsheW.range, 1, Draw.Color(255, 65, 105, 225)) end
if self.AsheMenu.Drawings.DrawR:Value() then Draw.Circle(myHero.pos, self.AsheMenu.Combo.Distance:Value(), 1, Draw.Color(255, 0, 0, 255)) end
end
function Ashe:UseW(target)
if self.AsheMenu.Prediction.PredictionW:Value() == 1 then
local target, aimPosition = HPred:GetReliableTarget(myHero.pos, AsheW.range, AsheW.delay, AsheW.speed, AsheW.width, self.AsheMenu.HitChance.HPredHit:Value(), AsheW.collision)
if target and HPred:IsInRange(myHero.pos, aimPosition, AsheW.range) then
Control.CastSpell(HK_W, aimPosition)
else
local hitChance, aimPosition = HPred:GetUnreliableTarget(myHero.pos, AsheW.range, AsheW.delay, AsheW.speed, AsheW.width, AsheW.collision, self.AsheMenu.HitChance.HPredHit:Value(), nil)
if hitChance and HPred:IsInRange(myHero.pos, aimPosition, AsheW.range) then
Control.CastSpell(HK_W, aimPosition)
end
end
elseif self.AsheMenu.Prediction.PredictionW:Value() == 2 then
local castpos,HitChance, pos = TPred:GetBestCastPosition(target, AsheW.delay, AsheW.width, AsheW.range, AsheW.speed, myHero.pos, AsheW.collision, AsheW.type)
if (HitChance >= self.AsheMenu.HitChance.TPredHit:Value() ) then
Control.CastSpell(HK_W, castpos)
end
end
end
function Ashe:UseR(target)
if self.AsheMenu.Prediction.PredictionR:Value() == 1 then
local target, aimPosition = HPred:GetReliableTarget(myHero.pos, AsheR.range, AsheR.delay, AsheR.speed, AsheR.width, self.AsheMenu.HitChance.HPredHit:Value(), AsheR.collision)
if target and HPred:IsInRange(myHero.pos, aimPosition, AsheR.range) then
local RCastPos = myHero.pos-(myHero.pos-aimPosition):Normalized()*300
CastSpell(HK_R, RCastPos, 300, AsheR.delay*1000)
else
local hitChance, aimPosition = HPred:GetUnreliableTarget(myHero.pos, AsheR.range, AsheR.delay, AsheR.speed, AsheR.width, AsheR.collision, self.AsheMenu.HitChance.HPredHit:Value(), nil)
if hitChance and HPred:IsInRange(myHero.pos, aimPosition, AsheR.range) then
local RCastPos = myHero.pos-(myHero.pos-aimPosition):Normalized()*300
CastSpell(HK_R, RCastPos, 300, AsheR.delay*1000)
end
end
elseif self.AsheMenu.Prediction.PredictionR:Value() == 2 then
local castpos,HitChance, pos = TPred:GetBestCastPosition(target, AsheR.delay, AsheR.width, AsheR.range, AsheR.speed, myHero.pos, AsheR.collision, AsheR.type)
if (HitChance >= self.AsheMenu.HitChance.TPredHit:Value() ) then
local RCastPos = myHero.pos-(myHero.pos-castpos):Normalized()*300
CastSpell(HK_R, RCastPos, 300, AsheR.delay*1000)
end
end
end
function Ashe:Auto()
if target == nil then return end
if self.AsheMenu.Auto.UseW:Value() then
if GetPercentMana(myHero) > self.AsheMenu.Auto.MP:Value() then
if IsReady(_W) then
if ValidTarget(target, AsheW.range) then
self:UseW(target)
end
end
end
end
end
function Ashe:Combo()
if target == nil then return end
if self.AsheMenu.Combo.UseQ:Value() then
if IsReady(_Q) then
if ValidTarget(target, myHero.range+100) then
if GotBuff(myHero, "asheqcastready") == 4 then
Control.CastSpell(HK_Q)
end
end
end
end
if self.AsheMenu.Combo.UseW:Value() then
if IsReady(_W) and myHero.attackData.state ~= STATE_WINDUP then
if ValidTarget(target, AsheW.range) then
self:UseW(target)
end
end
end
if self.AsheMenu.Combo.UseR:Value() then
if IsReady(_R) then
if ValidTarget(target, self.AsheMenu.Combo.Distance:Value()) then
if GetPercentHP(target) < self.AsheMenu.Combo.HP:Value() then
if EnemiesAround(myHero, self.AsheMenu.Combo.Distance:Value()+myHero.range) >= self.AsheMenu.Combo.X:Value() then
self:UseR(target)
end
end
end
end
end
end
function Ashe:Harass()
if target == nil then return end
if self.AsheMenu.Harass.UseQ:Value() then
if IsReady(_Q) then
if ValidTarget(target, myHero.range+100) then
if GotBuff(myHero, "asheqcastready") == 4 then
Control.CastSpell(HK_Q)
end
end
end
end
if self.AsheMenu.Harass.UseW:Value() then
if GetPercentMana(myHero) > self.AsheMenu.Harass.MP:Value() then
if IsReady(_W) and myHero.attackData.state ~= STATE_WINDUP then
if ValidTarget(target, AsheW.range) then
self:UseW(target)
end
end
end
end
end
function Ashe:KillSteal()
for i,enemy in pairs(GetEnemyHeroes(5000)) do
if IsReady(_R) then
if self.AsheMenu.KillSteal.UseR:Value() then
if ValidTarget(enemy, self.AsheMenu.KillSteal.Distance:Value()) then
local AsheRDmg = CalcMagicalDamage(myHero, enemy, (({200, 400, 600})[myHero:GetSpellData(_R).level] + myHero.ap))
if (enemy.health + enemy.hpRegen * 6) < AsheRDmg then
self:UseR(enemy)
end
end
end
elseif IsReady(_W) then
if self.AsheMenu.KillSteal.UseW:Value() then
if ValidTarget(enemy, AsheW.range) then
local AsheWDmg = CalcPhysicalDamage(myHero, enemy, (({20, 35, 50, 65, 80})[myHero:GetSpellData(_W).level] + myHero.totalDamage))
if (enemy.health + enemy.hpRegen * 4) < AsheWDmg then
self:UseW(enemy)
end
end
end
end
end
end
function Ashe:LaneClear()
if self.AsheMenu.LaneClear.UseW:Value() then
if GetPercentMana(myHero) > self.AsheMenu.LaneClear.MP:Value() then
if IsReady(_W) then
local BestPos, BestHit = GetBestLinearFarmPos(AsheW.range, AsheW.width*9)
if BestPos and BestHit >= 3 then
Control.SetCursorPos(BestPos)
Control.CastSpell(HK_W, BestPos)
end
end
end
end
if self.AsheMenu.LaneClear.UseQ:Value() then
for i = 1, Game.MinionCount() do
local minion = Game.Minion(i)
if minion and minion.isEnemy then
if ValidTarget(minion, myHero.range) then
if GotBuff(myHero, "asheqcastready") == 4 then
Control.CastSpell(HK_Q)
end
end
end
end
end
end
function Ashe:AntiGapcloser()
for i,antigap in pairs(GetEnemyHeroes(AsheW.range)) do
if IsReady(_W) then
if self.AsheMenu.AntiGapcloser.UseW:Value() then
if ValidTarget(antigap, self.AsheMenu.AntiGapcloser.DistanceW:Value()) then
self:UseW(antigap)
end
end
end
end
end
class "Caitlyn"
local HeroIcon = "https://www.mobafire.com/images/champion/square/caitlyn.png"
local QIcon = "https://vignette.wikia.nocookie.net/leagueoflegends/images/f/fd/Piltover_Peacemaker.png"
local WIcon = "https://vignette.wikia.nocookie.net/leagueoflegends/images/0/03/Yordle_Snap_Trap.png"
local EIcon = "https://vignette.wikia.nocookie.net/leagueoflegends/images/0/0b/90_Caliber_Net.png"
local RIcon = "https://vignette.wikia.nocookie.net/leagueoflegends/images/a/aa/Ace_in_the_Hole.png"
function Caitlyn:Menu()
self.CaitlynMenu = MenuElement({type = MENU, id = "Caitlyn", name = "[GoS-U] Caitlyn", leftIcon = HeroIcon})
self.CaitlynMenu:MenuElement({id = "Auto", name = "Auto", type = MENU})
self.CaitlynMenu.Auto:MenuElement({id = "UseQ", name = "Use Q [Piltover Peacemaker]", value = true, leftIcon = QIcon})
self.CaitlynMenu.Auto:MenuElement({id = "UseW", name = "Use W [Yordle Snap Trap]", value = true, leftIcon = WIcon})
self.CaitlynMenu.Auto:MenuElement({id = "ModeQ", name = "Cast Mode: Q", drop = {"Standard", "On Immobile"}, value = 2})
self.CaitlynMenu.Auto:MenuElement({id = "ModeW", name = "Cast Mode: W", drop = {"Standard", "On Immobile"}, value = 2})
self.CaitlynMenu.Auto:MenuElement({id = "MP", name = "Mana-Manager", value = 40, min = 0, max = 100, step = 5})
self.CaitlynMenu:MenuElement({id = "Combo", name = "Combo", type = MENU})
self.CaitlynMenu.Combo:MenuElement({id = "UseQ", name = "Use Q [Piltover Peacemaker]", value = true, leftIcon = QIcon})
self.CaitlynMenu.Combo:MenuElement({id = "UseW", name = "Use W [Yordle Snap Trap]", value = true, leftIcon = WIcon})
self.CaitlynMenu.Combo:MenuElement({id = "UseE", name = "Use E [90 Caliber Net]", value = true, leftIcon = EIcon})
self.CaitlynMenu.Combo:MenuElement({id = "ModeQ", name = "Cast Mode: Q", drop = {"Standard", "On Immobile"}, value = 1})
self.CaitlynMenu.Combo:MenuElement({id = "ModeW", name = "Cast Mode: W", drop = {"Standard", "On Immobile"}, value = 1})
self.CaitlynMenu:MenuElement({id = "Harass", name = "Harass", type = MENU})
self.CaitlynMenu.Harass:MenuElement({id = "UseQ", name = "Use Q [Piltover Peacemaker]", value = true, leftIcon = QIcon})
self.CaitlynMenu.Harass:MenuElement({id = "UseW", name = "Use W [Yordle Snap Trap]", value = true, leftIcon = WIcon})
self.CaitlynMenu.Harass:MenuElement({id = "UseE", name = "Use E [90 Caliber Net]", value = true, leftIcon = EIcon})
self.CaitlynMenu.Harass:MenuElement({id = "ModeQ", name = "Cast Mode: Q", drop = {"Standard", "On Immobile"}, value = 1})
self.CaitlynMenu.Harass:MenuElement({id = "ModeW", name = "Cast Mode: W", drop = {"Standard", "On Immobile"}, value = 2})
self.CaitlynMenu.Harass:MenuElement({id = "MP", name = "Mana-Manager", value = 40, min = 0, max = 100, step = 5})
self.CaitlynMenu:MenuElement({id = "KillSteal", name = "KillSteal", type = MENU})
self.CaitlynMenu.KillSteal:MenuElement({id = "UseQ", name = "Use Q [Piltover Peacemaker]", value = true, leftIcon = QIcon})
self.CaitlynMenu.KillSteal:MenuElement({id = "UseR", name = "Draw Killable With R", value = true, leftIcon = RIcon})
self.CaitlynMenu:MenuElement({id = "LaneClear", name = "LaneClear", type = MENU})
self.CaitlynMenu.LaneClear:MenuElement({id = "UseQ", name = "Use Q [Piltover Peacemaker]", value = false, leftIcon = QIcon})
self.CaitlynMenu.LaneClear:MenuElement({id = "MP", name = "Mana-Manager", value = 40, min = 0, max = 100, step = 5})
self.CaitlynMenu:MenuElement({id = "AntiGapcloser", name = "Anti-Gapcloser", type = MENU})
self.CaitlynMenu.AntiGapcloser:MenuElement({id = "UseW", name = "Use W [Yordle Snap Trap]", value = true, leftIcon = WIcon})
self.CaitlynMenu.AntiGapcloser:MenuElement({id = "UseE", name = "Use E [90 Caliber Net]", value = true, leftIcon = EIcon})
self.CaitlynMenu.AntiGapcloser:MenuElement({id = "DistanceW", name = "Distance: W", value = 300, min = 25, max = 500, step = 25})
self.CaitlynMenu.AntiGapcloser:MenuElement({id = "DistanceE", name = "Distance: E", value = 300, min = 25, max = 500, step = 25})
self.CaitlynMenu:MenuElement({id = "HitChance", name = "HitChance", type = MENU})
self.CaitlynMenu.HitChance:MenuElement({id = "HPredHit", name = "HitChance: HPrediction", value = 1, min = 1, max = 5, step = 1})
self.CaitlynMenu.HitChance:MenuElement({id = "TPredHit", name = "HitChance: TPrediction", value = 1, min = 0, max = 5, step = 1})
self.CaitlynMenu:MenuElement({id = "Prediction", name = "Prediction", type = MENU})
self.CaitlynMenu.Prediction:MenuElement({id = "PredictionQ", name = "Prediction: Q", drop = {"HPrediction", "TPrediction"}, value = 2})
self.CaitlynMenu.Prediction:MenuElement({id = "PredictionW", name = "Prediction: W", drop = {"HPrediction", "TPrediction"}, value = 2})
self.CaitlynMenu.Prediction:MenuElement({id = "PredictionE", name = "Prediction: E", drop = {"HPrediction", "TPrediction"}, value = 2})
self.CaitlynMenu:MenuElement({id = "Drawings", name = "Drawings", type = MENU})
self.CaitlynMenu.Drawings:MenuElement({id = "DrawQ", name = "Draw Q Range", value = true})
self.CaitlynMenu.Drawings:MenuElement({id = "DrawW", name = "Draw W Range", value = true})
self.CaitlynMenu.Drawings:MenuElement({id = "DrawE", name = "Draw E Range", value = true})
self.CaitlynMenu.Drawings:MenuElement({id = "DrawR", name = "Draw R Range", value = true})
end
function Caitlyn:Spells()
CaitlynQ = {speed = 2200, range = 1250, delay = 0.625, width = 60, collision = false, aoe = true, type = "line"}
CaitlynW = {speed = math.huge, range = 800, delay = 0.25, width = 75, collision = false, aoe = false, type = "circular"}
CaitlynE = {speed = 1600, range = 750, delay = 0.25, width = 70, collision = true, aoe = false, type = "linear"}
CaitlynR = {range = myHero:GetSpellData(_R).range}
end
function Caitlyn:__init()
self:Menu()
self:Spells()
Callback.Add("Tick", function() self:Tick() end)
Callback.Add("Draw", function() self:Draw() end)
end
function Caitlyn:Tick()
if myHero.dead or Game.IsChatOpen() == true then return end
self:Auto()
self:KillSteal()
self:AntiGapcloser()
if Mode() == "Combo" then
self:Combo()
elseif Mode() == "Harass" then
self:Harass()
elseif Mode() == "Clear" then
self:LaneClear()
end
end
function Caitlyn:Draw()
if myHero.dead then return end
if self.CaitlynMenu.Drawings.DrawQ:Value() then Draw.Circle(myHero.pos, CaitlynQ.range, 1, Draw.Color(255, 0, 191, 255)) end
if self.CaitlynMenu.Drawings.DrawW:Value() then Draw.Circle(myHero.pos, CaitlynW.range, 1, Draw.Color(255, 65, 105, 225)) end
if self.CaitlynMenu.Drawings.DrawE:Value() then Draw.Circle(myHero.pos, CaitlynE.range, 1, Draw.Color(255, 30, 144, 255)) end
if self.CaitlynMenu.Drawings.DrawR:Value() then Draw.Circle(myHero.pos, CaitlynR.range, 1, Draw.Color(255, 0, 0, 255)) end
end