forked from zupah/BoLScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nidalee - The Beauty and the Beast.lua
1722 lines (1692 loc) · 67 KB
/
Nidalee - The Beauty and the Beast.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 Version = "1.14"
local Author = "QQQ"
if myHero.charName ~= "Nidalee" then return end
local IsLoaded = "The Beauty and the Beast"
local AUTOUPDATE = true
---------------------------------------------------------------------
--- AutoUpdate for the script ---------------------------------------
---------------------------------------------------------------------
local UPDATE_FILE_PATH = SCRIPT_PATH..GetCurrentEnv().FILE_NAME
local UPDATE_NAME = "Nidalee - The Beauty and the Beast"
local UPDATE_HOST = "raw.github.com"
local UPDATE_PATH = "/bolqqq/BoLScripts/master/Nidalee%20-%20The%20Beauty%20and%20the%20Beast.lua?chunk="..math.random(1, 1000)
local UPDATE_FILE_PATH = SCRIPT_PATH..GetCurrentEnv().FILE_NAME
local UPDATE_URL = "https://"..UPDATE_HOST..UPDATE_PATH
function AutoupdaterMsg(msg) print("<font color=\"#FF99CC\">["..IsLoaded.."]:</font> <font color=\"#FFDFBF\">"..msg..".</font>") end
if AUTOUPDATE then
local ServerData = GetWebResult(UPDATE_HOST, UPDATE_PATH)
if ServerData then
local ServerVersion = string.match(ServerData, "local Version = \"%d+.%d+\"")
ServerVersion = string.match(ServerVersion and ServerVersion or "", "%d+.%d+")
if ServerVersion then
ServerVersion = tonumber(ServerVersion)
if tonumber(Version) < ServerVersion then
AutoupdaterMsg("A new version is available: ["..ServerVersion.."]")
AutoupdaterMsg("The script is updating... please don't press [F9]!")
DelayAction(function() DownloadFile(UPDATE_URL, UPDATE_FILE_PATH, function ()
AutoupdaterMsg("Successfully updated! ("..Version.." -> "..ServerVersion.."), Please reload (double [F9]) for the updated version!") end) end, 3)
else
AutoupdaterMsg("Your script is already the latest version: ["..ServerVersion.."]")
end
end
else
AutoupdaterMsg("Error downloading version info!")
end
end
---------------------------------------------------------------------
--- AutoDownload the required libraries -----------------------------
---------------------------------------------------------------------
local REQUIRED_LIBS =
{
["VPrediction"] = "https://raw.github.com/honda7/BoL/master/Common/VPrediction.lua",
["Collision"] = "https://bitbucket.org/Klokje/public-klokjes-bol-scripts/raw/master/Common/Collision.lua",
["Prodiction"] = "https://bitbucket.org/Klokje/public-klokjes-bol-scripts/raw/master/Common/Prodiction.lua",
["SOW"] = "https://raw.github.com/honda7/BoL/master/Common/SOW.lua"
}
local DOWNLOADING_LIBS = false
local DOWNLOAD_COUNT = 0
local SELF_NAME = GetCurrentEnv() and GetCurrentEnv().FILE_NAME or ""
function AfterDownload()
DOWNLOAD_COUNT = DOWNLOAD_COUNT - 1
if DOWNLOAD_COUNT == 0 then
DOWNLOADING_LIBS = false
print("<font color=\"#FF99CC\">["..IsLoaded.."]:</font><font color=\"#FFDFBF\"> Required libraries downloaded successfully, please reload (double [F9]).</font>")
end
end
for DOWNLOAD_LIB_NAME, DOWNLOAD_LIB_URL in pairs(REQUIRED_LIBS) do
if FileExist(LIB_PATH .. DOWNLOAD_LIB_NAME .. ".lua") then
require(DOWNLOAD_LIB_NAME)
else
DOWNLOADING_LIBS = true
DOWNLOAD_COUNT = DOWNLOAD_COUNT + 1
print("<font color=\"#FF99CC\">["..IsLoaded.."]:</font><font color=\"#FFDFBF\"> Not all required libraries are installed. Downloading: <b><u><font color=\"#73B9FF\">"..DOWNLOAD_LIB_NAME.."</font></u></b> now! Please don't press [F9]!</font>")
DownloadFile(DOWNLOAD_LIB_URL, LIB_PATH .. DOWNLOAD_LIB_NAME..".lua", AfterDownload)
end
end
if DOWNLOADING_LIBS then return end
---------------------------------------------------------------------
--- Vars ------------------------------------------------------------
---------------------------------------------------------------------
-- Vars for Ranges --
local qRange, wRange, eRange = 1500, 900, 600
local qSpeed, qDelay, qWidth = 1300, 0.0, 70 -- changed from 60 to 70 for testing - 0.250 from 0.125
local wSpeed, wDelay, wWidth = 1450, 0.500, 80
local wCRange, eCRange = 375, 350 -- E Range = 400-50 for testing
local qCRange = myHero.range + GetDistance(myHero.minBBox)
-- Vars for Abilitys --
local qHname, wHname, eHname, rName = "Javelin Toss", "Bushwhack", "Primal Surge", "Aspect of the Cougar"
local qCname, wCname, eCname = "Takedown", "Pounce", "Swipe"
local QREADY, WREADY, EREADY, RREADY
local ignite = nil
local qColor = ARGB(100,217,0,163)
local wColor = ARGB(100,76,255,76)
local eColor = ARGB(100,153,229,255)
-- Vars for VPrediction --
local VP = nil
-- Vars for PROdiction --
local qPos = nil
local OnDashPos = nil
local AfterDashPos = nil
local AfterImmobilePos = nil
local OnImmobilePos = nil
-- Vars for PredictionMode --
local PredictionMode = nil
-- Vars for TargetSelector --
local ts
ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 1500, DAMAGE_MAGIC, true)
ts.name = "Nidalee: Target"
local Target = nil
-- Vars for Jump Assistant --
local minRange = 100
local displayRange = 1000
local rotateMultiplier = 12
local closest = minRange+1
local startPoint = {}
local endPoint = {}
local directionVector = {}
local directionPos = {}
local lastUsedStart = {}
local lastUsedEnd = {}
local busy = false
local functionDelay = 0;
local functionToExecute = nil
-- Vars for JungleClear --
local JungleMobs = {}
local JungleFocusMobs = {}
local JungleMode
-- Vars for LaneClear --
local LaneClearModeVar
local enemyMinions = minionManager(MINION_ENEMY, 1000, player, MINION_SORT_HEALTH_ASC)
-- Vars for Autolevel --
levelSequence = {
startQ = { 1,3,1,2,1,4,1,3,1,3,4,3,3,2,2,4,2,2 },
startW = { 2,3,1,1,1,4,1,3,1,3,4,3,3,2,2,4,2,2 },
startE = { 3,1,1,2,1,4,1,3,1,3,4,3,3,2,2,4,2,2 },
hardLane = { 3,1,3,2,3,4,1,1,1,1,4,3,3,2,2,4,2,2 }
}
-- Vars for Damage Calculations and KilltextDrawing --
local iDmg = 0
local qHDmg = 0
local qCDmg = 0
local wCDmg = 0
local eCDmg = 0
local dfgDmg = 0
local hxgDmg = 0
local bwcDmg = 0
local botrkDmg = 0
local sheenDmg = 0
local lichbaneDmg = 0
local trinityDmg = 0
local liandrysDmg = 0
local KillText = {}
local KillTextColor = ARGB(250, 255, 38, 1)
local KillTextList = {
"Harass your enemy!", -- 01
"Wait for your CD's!", -- 02
"Kill! - Ignite", -- 03
"Kill! - Human (Q)", -- 04
"Kill! - Cougar (Q)", -- 05
"Kill! - Cougar (W)", -- 06
"Kill! - Cougar (E)", -- 07
"Kill! - Cougar (Q)+(W)", -- 08
"Kill! - Cougar (Q)+(E)", -- 09
"Kill! - Cougar (W)+(E)", -- 10
"Kill! - Cougar (Q)+(W)+(E)", -- 11
"Kill! - Human (Q) + Cougar (Q)+(W)+(E)"-- 12
}
-- Misc Vars --
local JumpSpotColor = ARGB(250, 255, 38, 1)
local Recalling = false
local Menu
local enemyHeroes = GetEnemyHeroes()
-- Vars for Healmanager --
local TeamChamps = GetAllyHeroes()
local myPlayer = GetMyHero()
local needSelfHeal = false
---------------------------------------------------------------------
--- Onload Function -------------------------------------------------
---------------------------------------------------------------------
function OnLoad()
IgniteCheck()
JungleNames()
VP = VPrediction()
nSOW = SOW(VP)
AddMenu()
-- LFC --
_G.oldDrawCircle = rawget(_G, 'DrawCircle')
_G.DrawCircle = DrawCircle2
-- PROdiction --
Prod = ProdictManager.GetInstance()
ProdQ = Prod:AddProdictionObject(_Q, qRange, qSpeed, qDelay, qWidth)
-- VIP Prediction --
qp = TargetPredictionVIP(qRange, qSpeed, qDelay, qWidth)
-- Collision --
QCol = Collision(qRange, qSpeed, qDelay, qWidth)
-- CallBacks --
for i = 1, heroManager.iCount do
local hero = heroManager:GetHero(i)
if hero.team ~= myHero.team then
ProdQ:GetPredictionOnDash(hero, OnDashFunc)
ProdQ:GetPredictionAfterDash(hero, AfterDashFunc)
ProdQ:GetPredictionOnImmobile(hero, OnImmobileFunc)
ProdQ:GetPredictionAfterImmobile(hero, AfterImmobileFunc)
end
end
PrintChat("<font color=\"#eFF99CC\">["..IsLoaded.."]:</font><font color=\"#FFDFBF\"> Sucessfully loaded! Version: [<u><b>"..Version.."</b></u>]</font>")
end
---------------------------------------------------------------------
--- Menu ------------------------------------------------------------
---------------------------------------------------------------------
function AddMenu()
-- Script Menu --
Menu = scriptConfig("Nidalee - The Beauty and the Beast", "Nidalee")
-- Target Selector --
Menu:addTS(ts)
-- Create SubMenu --
Menu:addSubMenu(""..myHero.charName..": Key Bindings", "KeyBind")
Menu:addSubMenu(""..myHero.charName..": Orbwalk", "Orbwalk")
Menu:addSubMenu(""..myHero.charName..": Extra", "Extra")
Menu:addSubMenu(""..myHero.charName..": HealManager", "HealManager")
Menu:addSubMenu(""..myHero.charName..": SBTW-Combo", "SBTW")
Menu:addSubMenu(""..myHero.charName..": KillSteal", "KS")
Menu:addSubMenu(""..myHero.charName..": LaneClear", "Farm")
Menu:addSubMenu(""..myHero.charName..": JungleClear", "Jungle")
Menu:addSubMenu(""..myHero.charName..": Escape and JumpManager", "Jump")
Menu:addSubMenu(""..myHero.charName..": Prediction", "Prediction")
Menu:addSubMenu(""..myHero.charName..": Drawings", "Draw")
-- Key Bindings --
Menu.KeyBind:addParam("SpearKey", "Throw a predicted Spear: ", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
Menu.KeyBind:addParam("SpearToggle", "Auto throw a predicted Spear: ", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("U"))
Menu.KeyBind:addParam("TrapKey", "Throw a trap: ", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("X"))
Menu.KeyBind:addParam("HealManager", "Enable/Disable the HealManager: ", SCRIPT_PARAM_ONKEYTOGGLE, true, string.byte("N"))
Menu.KeyBind:addParam("SBTWKey", "Combo Key: ", SCRIPT_PARAM_ONKEYDOWN, false, 32)
Menu.KeyBind:addParam("LaneClearKey", "LaneClear Key: ", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("G"))
Menu.KeyBind:addParam("JungleClearKey", "JungleClear Key: ", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
Menu.KeyBind:addParam("JumpAssistantKey", "Jump Assistant Key: ", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("Z"))
Menu.KeyBind:addParam("EscapeKey", "Escape Key: ", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("Y"))
-- SOW-Orbwalking --
nSOW:LoadToMenu(Menu.Orbwalk)
-- Extra --
Menu.Extra:addParam("TrapDistance", "Distance traps are casted behind: ", SCRIPT_PARAM_SLICE, 100, 0, 250, -1)
Menu.Extra:addParam("AutoLevelSkills", "Auto Level Skills (Reload Script!)", SCRIPT_PARAM_LIST, 1, { "No Autolevel", "QEQW - R>Q>E>W", "WEQQ - R>Q>E>W", "EQQW - R>Q>E>W", "EQEWE- R>Q>E>W"})
Menu.Extra:addParam("switchAfterRecall", "Switch to cougar after recall: ", SCRIPT_PARAM_ONOFF, true)
Menu.Extra:addParam("switchAfterRecallRange", "Switch only if no enemys in Range: ", SCRIPT_PARAM_SLICE, 2000, 0, 2500, 3)
-- HealManager --
Menu.HealManager:addParam("info", "", SCRIPT_PARAM_INFO, "")
Menu.HealManager:addParam("healPriority", "HealPriority for the HealManager: ", SCRIPT_PARAM_LIST, 1, {"You", "Team"})
Menu.HealManager:addSubMenu("Your Settings:", "Self")
Menu.HealManager:addParam("healSelf", "Use the HealManager for yourself: ", SCRIPT_PARAM_ONOFF, true)
Menu.HealManager.Self:addParam("autoHealSlider", "Auto Heal if your Health below %: ", SCRIPT_PARAM_SLICE, 50, 0, 100, -1)
Menu.HealManager:addSubMenu("Team Settings: ", "Team")
Menu.HealManager:addParam("healTeam", "Use the HealManager for the team: ", SCRIPT_PARAM_ONOFF, false)
for _, Team in ipairs(TeamChamps) do
Menu.HealManager.Team:addParam(Team.charName, "Heal: " .. Team.charName, SCRIPT_PARAM_ONOFF, false)
Menu.HealManager.Team:addParam(Team.charName.."slider", "Auto Heal if Health below %: ", SCRIPT_PARAM_SLICE, 20, 10, 100, -1)
end
-- SBTW Combo --
Menu.SBTW:addParam("sbtwItems", "Use Items in Combo: ", SCRIPT_PARAM_ONOFF, true)
Menu.SBTW:addParam("sbtwHealSlider", "Auto Heal if Health below %: ", SCRIPT_PARAM_SLICE, 50, 0, 100, -1)
Menu.SBTW:addParam("info", "", SCRIPT_PARAM_INFO, "")
Menu.SBTW:addParam("info", "--- Choose your abilitys for SBTW ---", SCRIPT_PARAM_INFO, "")
Menu.SBTW:addParam("sbtwHQ", "Use "..qHname.." (Q) in Combo: ", SCRIPT_PARAM_ONOFF, true)
Menu.SBTW:addParam("sbtwHW", "Use "..wHname.." (W) in Combo: ", SCRIPT_PARAM_ONOFF, true)
Menu.SBTW:addParam("sbtwHE", "Use "..eHname.." (E) in Combo: ", SCRIPT_PARAM_ONOFF, true)
Menu.SBTW:addParam("sbtwCQ", "Use "..qCname.." (Q) in Combo: ", SCRIPT_PARAM_ONOFF, true)
Menu.SBTW:addParam("sbtwCW", "Use "..wCname.." (W) in Combo: ", SCRIPT_PARAM_ONOFF, true)
Menu.SBTW:addParam("sbtwCE", "Use "..eCname.." (E) in Combo: ", SCRIPT_PARAM_ONOFF, true)
Menu.SBTW:addParam("sbtwR", "Switch forms (R) in Combo: ", SCRIPT_PARAM_ONOFF, true)
-- KillSteal --
Menu.KS:addParam("Ignite", "Use Auto Ignite: ", SCRIPT_PARAM_ONOFF, true)
Menu.KS:addParam("smartKS", "Enable smart KS: ", SCRIPT_PARAM_ONOFF, true)
Menu.KS:addParam("smartKShuman", "Use smart KS as Human: ", SCRIPT_PARAM_ONOFF, true)
Menu.KS:addParam("smartKScougar", "Use smart KS as Cougar: ", SCRIPT_PARAM_ONOFF, true)
Menu.KS:addParam("KSuseR", "Switch forms (R) for KS: ", SCRIPT_PARAM_ONOFF, false)
-- Lane Clear --
Menu.Farm:addParam("laneClearTyp", "Form in LaneClear: ", SCRIPT_PARAM_LIST, 3, {"Human", "Cougar", "Mixed"})
Menu.Farm:addParam("info", "", SCRIPT_PARAM_INFO, "")
Menu.Farm:addParam("info", "--- Choose your abilitys for LaneClear ---", SCRIPT_PARAM_INFO, "")
Menu.Farm:addParam("clearHQ", "Clear with "..qHname.." (Q): ", SCRIPT_PARAM_ONOFF, true)
Menu.Farm:addParam("clearHW", "Clear with "..wHname.." (W): ", SCRIPT_PARAM_ONOFF, false)
Menu.Farm:addParam("clearHE", "Clear with "..eHname.." (E): ", SCRIPT_PARAM_ONOFF, false)
Menu.Farm:addParam("clearCQ", "Clear with "..qCname.." (Q): ", SCRIPT_PARAM_ONOFF, true)
Menu.Farm:addParam("clearCW", "Clear with "..wCname.." (W): ", SCRIPT_PARAM_ONOFF, true)
Menu.Farm:addParam("clearCE", "Clear with "..eCname.." (E): ", SCRIPT_PARAM_ONOFF, true)
-- Jungle Clear --
Menu.Jungle:addParam("jungleTyp", "Form in JungleClear: ", SCRIPT_PARAM_LIST, 3, {"Human", "Cougar", "Mixed"})
Menu.Jungle:addParam("info", "", SCRIPT_PARAM_INFO, "")
Menu.Jungle:addParam("info", "--- Choose your abilitys for JungleClear ---", SCRIPT_PARAM_INFO, "")
Menu.Jungle:addParam("jungleHQ", "Clear with "..qHname.." (Q): ", SCRIPT_PARAM_ONOFF, true)
Menu.Jungle:addParam("jungleHW", "Clear with "..wHname.." (W): ", SCRIPT_PARAM_ONOFF, false)
Menu.Jungle:addParam("jungleHE", "Clear with "..eHname.." (E): ", SCRIPT_PARAM_ONOFF, false)
Menu.Jungle:addParam("jungleCQ", "Clear with "..qCname.." (Q): ", SCRIPT_PARAM_ONOFF, true)
Menu.Jungle:addParam("jungleCW", "Clear with "..wCname.." (W): ", SCRIPT_PARAM_ONOFF, true)
Menu.Jungle:addParam("jungleCE", "Clear with "..eCname.." (E): ", SCRIPT_PARAM_ONOFF, true)
-- Jump/Escape --
Menu.Jump:addParam("movetomouse", "Move to Mouse while Jump Assistant: ", SCRIPT_PARAM_ONOFF, true)
Menu.Jump:addParam("EscapeUseW", "Use "..wCname.." (W) while escape", SCRIPT_PARAM_ONOFF, true)
Menu.Jump:addParam("EscapeUseE", "Auto "..eHname.." (E) before escape", SCRIPT_PARAM_ONOFF, true)
Menu.Jump:addParam("EscapeHealSlider", "Auto Heal if Health below %: ", SCRIPT_PARAM_SLICE, 50, 0, 100, -1)
Menu.Jump:addParam("JumpSlider", "Jump Accuracy 1:slow - 15:fast", SCRIPT_PARAM_SLICE, 12, 1, 15, 0)
-- Prediction --
Menu.Prediction:addParam("PredictionMode", "Choose your Spear Prediction: ", SCRIPT_PARAM_LIST, 1, {"VPrediction", "PROdiction", "BoL-Prediction"})
-- VPrediction --
Menu.Prediction:addSubMenu("VPrediction", "VPrediction")
Menu.Prediction.VPrediction:addParam("HitChance", "HitChance in VPrediction: ", SCRIPT_PARAM_LIST, 2, {"Low Hitchance", "High Hitchance", "Target slow/close", "Target immobile", "Target dashing/blinking"})
Menu.Prediction.VPrediction:addParam("Hitbox", "Use HitBox in VPrediction: ", SCRIPT_PARAM_ONOFF, false)
-- PROdiction --
Menu.Prediction:addSubMenu("PROdiction", "PROdiction")
Menu.Prediction.PROdiction:addParam("Hitbox", "Use HitBox in PROdiction: ", SCRIPT_PARAM_ONOFF, false)
-- BoL-Prediction --
Menu.Prediction:addSubMenu("BoL-Prediction", "BoLPrediction")
Menu.Prediction.BoLPrediction:addParam("HitChance", "HitChance in BoL-Prediction: ", SCRIPT_PARAM_SLICE, 0.7, 0.1, 1, 2)
-- Drawings --
Menu.Draw:addParam("info", "", SCRIPT_PARAM_INFO, "")
Menu.Draw:addParam("drawQ", "Draw Human Q Range: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw:addParam("drawW", "Draw Human W Range: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw:addParam("drawE", "Draw Human E Range: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw:addParam("info", "", SCRIPT_PARAM_INFO, "")
Menu.Draw:addParam("drawJumpspots", "Draw Jumpspots while pressing Key: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw:addParam("drawPerJumpspots", "Draw Jumpspots always: ", SCRIPT_PARAM_ONOFF, false)
Menu.Draw:addParam("info", "", SCRIPT_PARAM_INFO, "")
Menu.Draw:addParam("drawTargetLine", "Draw line to enemy: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw:addParam("drawKillText", "Draw killtext on enemy: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw:addParam("drawCol", "Draw Collision: ", SCRIPT_PARAM_ONOFF, false)
-- LFC --
Menu.Draw:addSubMenu("LagFreeCircles: ", "LFC")
Menu.Draw.LFC:addParam("LagFree", "Activate Lag Free Circles", SCRIPT_PARAM_ONOFF, false)
Menu.Draw.LFC:addParam("CL", "Length before Snapping", SCRIPT_PARAM_SLICE, 350, 75, 2000, 0)
Menu.Draw.LFC:addParam("CLinfo", "Higher length = Lower FPS Drops", SCRIPT_PARAM_INFO, "")
-- Permashow --
Menu.Draw:addSubMenu("PermaShow: ", "PermaShow")
Menu.Draw.PermaShow:addParam("info", "--- Reload (Double F9) if you change the settings ---", SCRIPT_PARAM_INFO, "")
Menu.Draw.PermaShow:addParam("aimQtoggle", "Show Auto Spear: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw.PermaShow:addParam("laneClearTyp", "Show LaneClearTyp: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw.PermaShow:addParam("jungleTyp", "Show JungleTyp: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw.PermaShow:addParam("PredictionMode", "Show PredictionMode: ", SCRIPT_PARAM_ONOFF, true)
Menu.Draw.PermaShow:addParam("HealManager", "Show HealManager: ", SCRIPT_PARAM_ONOFF, true)
-- Other --
Menu:addParam("Version", "Version", SCRIPT_PARAM_INFO, Version)
Menu:addParam("Author", "Author", SCRIPT_PARAM_INFO, Author)
-- PermaShow --
if Menu.Draw.PermaShow.aimQtoggle
then Menu.KeyBind:permaShow("SpearToggle")
end
if Menu.Draw.PermaShow.laneClearTyp
then Menu.Farm:permaShow("laneClearTyp")
end
if Menu.Draw.PermaShow.jungleTyp
then Menu.Jungle:permaShow("jungleTyp")
end
if Menu.Draw.PermaShow.PredictionMode
then Menu.Prediction:permaShow("PredictionMode")
end
if Menu.Draw.PermaShow.HealManager
then Menu.KeyBind:permaShow("HealManager")
end
end
---------------------------------------------------------------------
--- On Tick ---------------------------------------------------------
---------------------------------------------------------------------
function OnTick()
if myHero.dead then return end
ts:update()
Target = ts.target
Check()
DamageCalculation()
LFCfunc()
AutoLevelMySkills()
MyAccurateDelay()
KeyBindings()
if Target then
-- Auto Ignite
if Menu.KS.AutoIgnite then AutoIgnite(Target) end
-- Toggle Auto Predicted Q Harass --
if SpearToggleKey and not Recalling then AimTheQ() end
-- Aim Predicted Q --
if SpearKey then AimTheQ()end
-- Aim W behind Target --
if TrapKey then AimTheWbehind() end
end
-- HealManager --
if HealManagerKey then HealManager() end
-- KillSteal--
if Menu.KS.smartKS then smartKS() end
-- Lane Clear --
if LaneClearKey then LaneClear() end
-- Last Hit --
if LastHitKey then lastHit() end
-- Jungle Clear --
if JungleClearKey then JungleClear() end
-- Escape --
if EscapeKey then Escape() end
-- Jump Assistant --
if JumpAssistantKey then JumpAssistant() end
-- SBTW Combo --
if SBTWKey then SBTW() end
end
---------------------------------------------------------------------
--- Function KeyBindings for easier KeyManagement -------------------
---------------------------------------------------------------------
function KeyBindings()
SpearKey = Menu.KeyBind.SpearKey
SpearToggleKey = Menu.KeyBind.SpearToggle
TrapKey = Menu.KeyBind.TrapKey
HealManagerKey = Menu.KeyBind.HealManager
SBTWKey = Menu.KeyBind.SBTWKey
LastHitKey = Menu.KeyBind.LastHitKey
LaneClearKey = Menu.KeyBind.LaneClearKey
JungleClearKey = Menu.KeyBind.JungleClearKey
JumpAssistantKey = Menu.KeyBind.JumpAssistantKey
EscapeKey = Menu.KeyBind.EscapeKey
end
---------------------------------------------------------------------
--- Function Checks for Spells and Forms ----------------------------
---------------------------------------------------------------------
function Check()
-- Cooldownchecks for Abilitys and Summoners --
QREADY = (myHero:CanUseSpell(_Q) == READY)
WREADY = (myHero:CanUseSpell(_W) == READY)
EREADY = (myHero:CanUseSpell(_E) == READY)
RREADY = (myHero:CanUseSpell(_R) == READY)
IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
-- Checks the PredictionMode --
setPredictionMode()
-- Checks for PROdiction Target --
if PredictionMode == 2
then
if ValidTarget(Target)
then ProdQ:GetPredictionCallBack(Target, GetQPos)
else
qPos = nil
end
end
-- Check for VIP-Prediction --
if PredictionMode == 3
then
if Target ~= nil
then VipPredTarget = qp:GetPrediction(Target)
end
end
-- Form checks for Cougar/Human --
if myHero:GetSpellData(_Q).name == "JavelinToss"
or myHero:GetSpellData(_W).name == "Bushwhack"
or myHero:GetSpellData(_E).name == "PrimalSurge"
then HUMAN = true COUGAR = false
end
if myHero:GetSpellData(_Q).name == "Takedown"
or myHero:GetSpellData(_W).name == "Pounce"
or myHero:GetSpellData(_E).name == "Swipe"
then COUGAR = true HUMAN = false
end
-- Check if items are ready --
dfgReady = (dfgSlot ~= nil and myHero:CanUseSpell(dfgSlot) == READY) -- Deathfire Grasp
hxgReady = (hxgSlot ~= nil and myHero:CanUseSpell(hxgSlot) == READY) -- Hextech Gunblade
bwcReady = (bwcSlot ~= nil and myHero:CanUseSpell(bwcSlot) == READY) -- Bilgewater Cutlass
botrkReady = (botrkSlot ~= nil and myHero:CanUseSpell(botrkSlot) == READY) -- Blade of the Ruined King
sheenReady = (sheenSlot ~= nil and myHero:CanUseSpell(sheenSlot) == READY) -- Sheen
lichbaneReady = (lichbaneSlot ~= nil and myHero:CanUseSpell(lichbaneSlot) == READY) -- Lichbane
trinityReady = (trinitySlot ~= nil and myHero:CanUseSpell(trinitySlot) == READY) -- Trinity Force
lyandrisReady = (liandrysSlot ~= nil and myHero:CanUseSpell(liandrysSlot) == READY) -- Liandrys
tmtReady = (tmtSlot ~= nil and myHero:CanUseSpell(tmtSlot) == READY) -- Tiamat
hdrReady = (hdrSlot ~= nil and myHero:CanUseSpell(hdrSlot) == READY) -- Hydra
youReady = (youSlot ~= nil and myHero:CanUseSpell(youSlot) == READY) -- Youmuus Ghostblade
-- Set the slots for item --
dfgSlot = GetInventorySlotItem(3128)
hxgSlot = GetInventorySlotItem(3146)
bwcSlot = GetInventorySlotItem(3144)
botrkSlot = GetInventorySlotItem(3153)
sheenSlot = GetInventorySlotItem(3057)
lichbaneSlot = GetInventorySlotItem(3100)
trinitySlot = GetInventorySlotItem(3078)
liandrysSlot = GetInventorySlotItem(3151)
tmtSlot = GetInventorySlotItem(3077)
hdrSlot = GetInventorySlotItem(3074)
youSlot = GetInventorySlotItem(3142)
end
---------------------------------------------------------------------
--- ItemUsage -------------------------------------------------------
---------------------------------------------------------------------
function UseItems()
if not enemy then enemy = Target end
if ValidTarget(enemy) then
if dfgReady and GetDistance(enemy) <= 750 then CastSpell(dfgSlot, enemy) end
if hxgReady and GetDistance(enemy) <= 700 then CastSpell(hxgSlot, enemy) end
if bwcReady and GetDistance(enemy) <= 450 then CastSpell(bwcSlot, enemy) end
if botrkReady and GetDistance(enemy) <= 450 then CastSpell(botrkSlot, enemy) end
if tmtReady and GetDistance(enemy) <= 185 then CastSpell(tmtSlot) end
if hdrReady and GetDistance(enemy) <= 185 then CastSpell(hdrSlot) end
if youReady and GetDistance(enemy) <= 185 then CastSpell(youSlot) end
end
end
---------------------------------------------------------------------
--- Draw Function ---------------------------------------------------
---------------------------------------------------------------------
function OnDraw()
if myHero.dead then return end
-- Draw SpellRanges only when our champ is alive and the spell is ready --
-- Draw Q --
if QREADY and Menu.Draw.drawQ then DrawCircle(myHero.x, myHero.y, myHero.z, qRange, qColor) end
-- Draw W --
if WREADY and Menu.Draw.drawW then DrawCircle(myHero.x, myHero.y, myHero.z, wRange, wColor) end
-- Draw E --
if EREADY and Menu.Draw.drawE then DrawCircle(myHero.x, myHero.y, myHero.z, eRange, eColor) end
-- Draw Collission --
if Target and Menu.Draw.drawCol then QCol:DrawCollision(myHero, Target) end
-- Draw Jump Spots --
if JumpAssistantKey and COUGAR and Menu.Draw.drawJumpspots
or Menu.Draw.drawPerJumpspots
then
for i,group in pairs(pouncePosition) do
if (GetDistance(group.pA) < displayRange or GetDistance(group.pB) < displayRange) then
DrawCircle(group.pA.x, group.pA.y, group.pA.z, minRange, JumpSpotColor)
DrawCircle(group.pB.x, group.pB.y, group.pB.z, minRange, JumpSpotColor)
end
end
end
-- Draw KillText --
if Menu.Draw.drawKillText then
for i = 1, heroManager.iCount do
local enemy = heroManager:GetHero(i)
if ValidTarget(enemy) and enemy ~= nil then
local barPos = WorldToScreen(D3DXVECTOR3(enemy.x, enemy.y, enemy.z))
local PosX = barPos.x - 60
local PosY = barPos.y - 10
DrawText(KillTextList[KillText[i]], 16, PosX, PosY, KillTextColor)
end
end
end
-- Line to Target --
if Menu.Draw.drawTargetLine and Target ~= nil then
local Point1 = WorldToScreen(D3DXVECTOR3(myHero.x, myHero.y, myHero.z))
local Point2 = WorldToScreen(D3DXVECTOR3(Target.x, Target.y, Target.z))
DrawLine(Point1.x, Point1.y, Point2.x, Point2.y, 7, ARGB(92,191,255,0))
end
end
---------------------------------------------------------------------
-- Checks Prediction Mode and set ModeVar ---------------------------
-- 1 = VPrediction, 2 = PROdiction, 3 = VIP-Prediction --------------
---------------------------------------------------------------------
function setPredictionMode()
PredictionMode = Menu.Prediction.PredictionMode
end
---------------------------------------------------------------------
-- Gets the Hitbox of our Target ------------------------------------
-- Call this function to return the Hitbox of our Target for better
-- calculations e.g. to hit targets further away
---------------------------------------------------------------------
function getHitBoxRadius(target)
return GetDistance(target, target.minBBox)
end
---------------------------------------------------------------------
--- Cast Functions for Spells with and without Prediciton -----------
---------------------------------------------------------------------
function AimTheQ()
-- VP --
if PredictionMode == 1 and HUMAN and QREADY
then AimTheQVP()
end
-- Pro --
if PredictionMode == 2 and HUMAN and QREADY
then
if ValidTarget(Target)
then ProdQ:GetPredictionCallBack(Target, AimTheQPRO)
end
end
-- VIP-Pre --
if PredictionMode == 3 and HUMAN and QREADY
then AimTheQVIP()
end
end
-- VPrediction of the Q --
function AimTheQVP()
if Menu.Prediction.VPrediction.Hitbox
then
local CastPosition, HitChance, Position = VP:GetLineCastPosition(Target, qDelay, qWidth, qRange, qSpeed, myHero, true)
if HitChance >= Menu.Prediction.VPrediction.HitChance and (GetDistance(Target) - getHitBoxRadius(Target)/2) <= qRange and QREADY
then CastSpell(_Q,CastPosition.x,CastPosition.z)
end
else
local CastPosition, HitChance, Position = VP:GetLineCastPosition(Target, qDelay, qWidth, qRange, qSpeed, myHero, true)
if HitChance >= Menu.Prediction.VPrediction.HitChance and GetDistance(Target) <= qRange and QREADY
then CastSpell(_Q,CastPosition.x,CastPosition.z)
end
end
end
-- BoLVip-Prediction of the Q --
function AimTheQVIP()
if VipPredTarget and qp:GetHitChance(Target) > Menu.Prediction.BoLPrediction.HitChance
then
local coll = Collision(qRange, qSpeed, qDelay, qWidth)
if not coll:GetMinionCollision(Target, myHero)
then CastSpell(_Q, VipPredTarget.x, VipPredTarget.z)
end
end
end
-- Prodiction of the Q with CallBacks--
-- Sets our Q-Pos of the Target --
function GetQPos(unit, pos)
qPos = pos
end
-- Aims the PROdicted Q --
function AimTheQPRO(unit, pos, spell)
if Menu.Prediction.PROdiction.Hitbox
then
if (GetDistance(pos) - getHitBoxRadius(unit)/2 < qRange)
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
else
if GetDistance(pos) < qRange
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
end
end
-- Calls the function when an enemy starts to dash (Dash, jump, getting knockbacked) --
function OnDashFunc(unit, pos, spell)
if Menu.Prediction.PROdiction.Hitbox
then
if (GetDistance(pos) - getHitBoxRadius(unit)/2 < qRange)
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
else
if GetDistance(pos) < qRange
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
end
end
-- Calls the function to hit when an enemy is about to land from a dash (e.g. Tristana W) --
function AfterDashFunc(unit, pos, spell)
if Menu.Prediction.PROdiction.Hitbox
then
if (GetDistance(pos) - getHitBoxRadius(unit)/2 < qRange)
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
else
if GetDistance(pos) < qRange
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
end
end
-- Calls the function when an enemy is immobile (stunned/surpressed) --
function OnImmobileFunc(unit, pos, spell)
if Menu.Prediction.PROdiction.Hitbox
then
if (GetDistance(pos) - getHitBoxRadius(unit)/2 < qRange)
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
else
if GetDistance(pos) < qRange
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
end
end
-- Calls the function right when an enemys immobile ends --
function AfterImmobileFunc(unit, pos, spell)
if Menu.Prediction.PROdiction.Hitbox
then
if (GetDistance(pos) - getHitBoxRadius(unit)/2 < qRange)
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
else
if GetDistance(pos) < qRange
then
local MinionCol = QCol:GetMinionCollision(myHero, Target)
if not MinionCol
then CastSpell(_Q, pos.x, pos.z)
end
end
end
end
-- Aims W (Trap) at the VPredicted Target --
function AimtheW()
if HUMAN == true then
local CastPosition, HitChance, Position = VP:GetCircularCastPosition(Target, wDelay, wWidth, wRange)
if HitChance >= Menu.Prediction.VPrediction.HitChance and GetDistance(CastPosition) <= 1200 and WREADY
then CastSpell(_W, CastPosition.x, CastPosition.z)
end
end
end
-- Aims W (Trap) behind the VPredicted Target --
function AimTheWbehind()
if HUMAN == true and GetDistance(Target) <= 900 then
local CastPosition, HitChance, Position = VP:GetCircularCastPosition(Target, 0.500, 80, 900)
if HitChance >= Menu.Prediction.VPrediction.HitChance and GetDistance(CastPosition) <= 900 and WREADY
then local CastBehind = myHero + Vector(CastPosition.x-myHero.x, myHero.y, CastPosition.z-myHero.z):normalized()*(GetDistance(myHero,CastPosition)+Menu.Extra.TrapDistance)
if GetDistance(myHero,CastBehind) <= 900 then CastSpell(_W,CastBehind.x,CastBehind.z) end
end
end
end
-- Cougar Q --
function CastTheCQ(enemy)
if not enemy then enemy = Target end
if (not QREADY or (GetDistance(enemy) > qCRange))
then return false
end
if not nSOW:CanAttack() then
if ValidTarget(enemy) then
CastSpell(_Q)
return true
end
end
return false
end
-- Cougar W --
function CastTheCW(enemy)
if not enemy then enemy = Target end
if not WREADY or (GetDistance(enemy) > wCRange) or (GetDistance(enemy) < 150) or UnitAtTower(enemy)
then return false
end
if not nSOW:CanAttack() then
if ValidTarget(enemy) and isFacing(myHero, enemy, 100)
then CastSpell(_W)
return true
end
end
return false
end
-- Cougar E --
function CastTheCE(enemy)
if not enemy then enemy = Target end
if (not EREADY or (GetDistance(enemy) > eCRange) or HUMAN)
then return false
end
if not nSOW:CanAttack() then
if ValidTarget(enemy) and isFacing(myHero, enemy, 200) then
CastSpell(_E)
return true
end
end
return false
end
---------------------------------------------------------------------
--- SBTW Combos -----------------------------------------------------
---------------------------------------------------------------------
function SBTW()
if ValidTarget(Target)
then
if Menu.SBTW.sbtwItems
then UseItems(Target)
end
if HUMAN and GetDistance(Target) >= wRange
then sbtwHumanPokeMode()
end
if HUMAN and GetDistance(Target) < wRange
then sbtwHumanPokeAndTrapMode()
end
if HUMAN and Menu.SBTW.sbtwR and GetDistance(Target) < 675
then sbtwCougar()
end
if COUGAR and GetDistance(Target) < 675
then sbtwCougar()
end
if COUGAR and Menu.SBTW.sbtwR and GetDistance(Target) > wRange
then CastSpell(_R)
end
end
end
function sbtwHumanPokeMode()
if Menu.SBTW.sbtwHQ then AimTheQ() end
if Menu.SBTW.sbtwHE then UseSelfHeal() end
end
function sbtwHumanPokeAndTrapMode()
if Menu.SBTW.sbtwHQ then AimTheQ() end
if Menu.SBTW.sbtwHW then AimTheWbehind() end
if Menu.SBTW.sbtwHE then UseSelfHeal() end
end
function sbtwCougar()
if HUMAN == true then CastSpell(_R) end
if COUGAR == true then
if Menu.SBTW.sbtwCW and GetDistance(Target) <= 400 then CastTheCW(Target) end
if Menu.SBTW.sbtwCE and GetDistance(Target) <= 300 then CastTheCE(Target) end
if Menu.SBTW.sbtwCQ and Target.health < (Target.maxHealth*0.50) then CastTheCQ(Target) end
end
end
function UseSelfHeal()
if myHero.health < (myHero.maxHealth *(Menu.SBTW.sbtwHealSlider/100)) and EREADY then
CastSpell(_E, myHero)
end
end
-----------------------------------------------------------------
--- KillSteal Functions ---------------------------------------------
---------------------------------------------------------------------
function AutoIgnite(enemy)
if enemy.health <= iDmg and GetDistance(enemy) <= 600 and ignite ~= nil
then
if IREADY then CastSpell(ignite, enemy) end
end
end
-- Checks the Summonerspells for ignite (OnLoad) --
function IgniteCheck()
if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then
ignite = SUMMONER_1
elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then
ignite = SUMMONER_2
end
end
function smartKS()
for _, enemy in pairs(enemyHeroes) do
if enemy ~= nil and ValidTarget(enemy) then
local distance = GetDistance(enemy)
local hp = enemy.health
-- smartKillSteal as Human --
if Menu.KS.smartKShuman
then
-- KillSteal with HQ --
if hp <= qHDmg and QREADY and (distance <= qRange)
then AimTheQ()
end
end
-- smartKillSteal as Cougar --
if Menu.KS.smartKScougar
then
-- KillSteal with CQ --
if hp <= qCDmg and QREADY and (distance <= qCRange)
then
if HUMAN
then if Menu.KS.KSuseR then CastSpell(_R) end
else CastTheCQ(enemy)
end
-- KillSteal with CW --
elseif hp <= wCDmg and WREADY and (distance <= wCRange)
then
-- KillSteal with CE --
elseif hp <= eCDmg and EREADY and (distance <= eCRange)
then
if HUMAN
then if Menu.KS.KSuseR then CastSpell(_R) end
else CastTheCE(enemy)
end
-- KillSteal with CQ + CW --
elseif hp <= (qCDmg + wCDmg) and QREADY and WREADY and (distance <= wCRange)
then
if HUMAN
then if Menu.KS.KSuseR then CastSpell(_R) end
else CastSpell(_W, enemy.x, enemy.z)
end
-- KillSteal with CQ + CE --
elseif hp <= (qCDmg + eCDmg) and QREADY and EREADY and (distance <= qCRange)
then
if HUMAN
then if Menu.KS.KSuseR then CastSpell(_R) end
else CastTheCE(enemy)
end
-- KillSteal with CW + CE --
elseif hp <= (wCDmg + eCDmg) and WREADY and EREADY and (distance <= wCRange)
then
if HUMAN
then if Menu.KS.KSuseR then CastSpell(_R) end
else CastSpell(_W, enemy.x, enemy.z)
end
-- KillSteal with CQ + CW + CE --
elseif hp <= (qCDmg + wCDmg + eCDmg) and QREADY and WREADY and EREADY and (distance <= wCRange)
then
if HUMAN
then if Menu.KS.KSuseR then CastSpell(_R) end
else CastSpell(_W, enemy.x, enemy.z)
end
end
end
end
end
end
---------------------------------------------------------------------
--- Function for Misc Movement --------------------------------------
---------------------------------------------------------------------
function Escape()
moveToCursor()
if Menu.Jump.EscapeUseE
then
if myHero.health < (myHero.maxHealth *(Menu.Jump.EscapeHealSlider/100)) and HUMAN
then CastSpell(_E)
CastSpell(_R)
end
if myHero.health > (myHero.maxHealth *(Menu.Jump.EscapeHealSlider/100)) and HUMAN
then CastSpell(_R)
end
end
if HUMAN and Menu.Jump.EscapeUseE == false
then CastSpell(_R)
end
if COUGAR and Menu.Jump.EscapeUseW
then CastSpell(_W)
end
end
---------------------------------------------------------------------
--- Functions for Jump Assistant ------------------------------------
---------------------------------------------------------------------
function JumpAssistant()
-- Move to Mouse while Jump Assistant--
if (JumpAssistantKey and Menu.Jump.movetomouse and busy == false)
then moveToCursor()
end
-- Jump Assistant --
if busy == false and COUGAR and WREADY
then closest = minRange+1 rotateMultiplier = Menu.Jump.JumpSlider
for i,group in pairs(pouncePosition)
do
if (GetDistance(group.pA) < closest or GetDistance(group.pB) < closest )
then busy = true
if (GetDistance(group.pA) < GetDistance(group.pB))
then
closest = GetDistance(group.pA)
startPoint = group.pA
endPoint = group.pB
else
closest = GetDistance(group.pB)
startPoint = group.pB
endPoint = group.pA
end
end
end
if (busy == true)
then
directionVector = Vector(startPoint):__sub(endPoint)
myHero:HoldPosition()
Packet('S_MOVE', {x = startPoint.x, y = startPoint.z}):send()
delay = 0.19
MyDelayAction(changeDirection1,delay)
end
end
end
function changeDirection1()
myHero:HoldPosition()
Packet('S_MOVE', {x = startPoint.x+directionVector.x/rotateMultiplier, y = startPoint.z+directionVector.z/rotateMultiplier}):send()
directionPos = Vector(startPoint)
directionPos.x = startPoint.x+directionVector.x/rotateMultiplier
directionPos.y = startPoint.y+directionVector.y/rotateMultiplier
directionPos.z = startPoint.z+directionVector.z/rotateMultiplier
delay = 0.06
MyDelayAction(changeDirection2,delay)
end
function changeDirection2()
Packet('S_MOVE', {x = startPoint.x, y = startPoint.z}):send()
delay = 0.070
MyDelayAction(CastJump,delay)
end
function CastJump()
CastSpell((_W),endPoint.x, endPoint.z)
myHero:HoldPosition()
MyDelayAction(freeFunction,1)
end
function freeFunction()
busy = false
end
function MyAccurateDelay()
if (functionToExecute ~= nil and (functionDelay <= os.clock()))
then
functionDelay = nil
functionToExecute()
if (functionDelay == nil)
then functionToExecute = nil