forked from BlackChaplin/Apex-AimAssist-NoRecoil-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apexmaster.ahk
1136 lines (1052 loc) · 35.9 KB
/
apexmaster.ahk
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
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
#SingleInstance force
#MaxThreadsBuffer on
#Persistent
Process, Priority, , A
SetBatchLines, -1
ListLines Off
SetWorkingDir %A_ScriptDir%
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
RunAsAdmin()
; read settings.ini
GoSub, IniRead
global UUID := "a3546c6608644e42ad7d9b98858ac05e"
HideProcess()
; weapon type constant, mainly for debuging
global DEFAULT_WEAPON_TYPE := "DEFAULT"
global R99_WEAPON_TYPE := "R99"
global R301_WEAPON_TYPE := "R301"
global FLATLINE_WEAPON_TYPE := "FLATLINE"
global SPITFIRE_WEAPON_TYPE := "SPITFIRE"
global KRABER_WEAPON_TYPE := "KRABER"
global LSTAR_WEAPON_TYPE := "LSTAR"
global DEVOTION_WEAPON_TYPE := "DEVOTION"
global DEVOTION_TURBO_WEAPON_TYPE := "DEVOTION TURBO"
global VOLT_WEAPON_TYPE := "volt"
global HAVOC_WEAPON_TYPE := "HAVOC"
global HAVOC_TURBO_WEAPON_TYPE := "HAVOC TURBO"
global PROWLER_WEAPON_TYPE := "prowler"
global HEMLOK_WEAPON_TYPE := "HEMLOK"
global RE45_WEAPON_TYPE := "RE45"
global ALTERNATOR_WEAPON_TYPE := "alternator"
global P2020_WEAPON_TYPE := "P2020"
global RAMPAGE_WEAPON_TYPE := "RAMPAGE"
global WINGMAN_WEAPON_TYPE := "wingman"
global G7_WEAPON_TYPE := "G7"
global CAR_WEAPON_TYPE := "car"
global P3030_WEAPON_TYPE := "3030"
global SHOTGUN_WEAPON_TYPE := "shotgun"
global SNIPER_WEAPON_TYPE := "sniper"
global TRIPLETAKE_WEAPON_TYPE := "tripletake"
global BOCEK_WEAPON_TYPE := "bocek"
; x, y pos for weapon1 and weapon 2
global WEAPON_1_PIXELS = LoadPixel("weapon1")
global WEAPON_2_PIXELS = LoadPixel("weapon2")
; weapon color
global LIGHT_WEAPON_COLOR = 0x2D547D
global HEAVY_WEAPON_COLOR = 0x596B38
global ENERGY_WEAPON_COLOR = 0x286E5A
global SUPPY_DROP_COLOR = 0x3701B2
global SHOTGUN_WEAPON_COLOR = 0x07206B
global SNIPER_WEAPON_COLOR = 0x8f404b
global BOCEK_WEAPON_COLOR = 0x2f7c8e
; three x, y check point, true means 0xFFFFFFFF
; light weapon
global R99_PIXELS := LoadPixel("r99")
global R99_GS_PIXELS := LoadPixel("r99_gs")
global R301_PIXELS := LoadPixel("r301")
global RE45_PIXELS := LoadPixel("re45")
global RE45_GS_PIXELS := LoadPixel("re45_gs")
global P2020_PIXELS := LoadPixel("p2020")
global P2020_GS_PIXELS := LoadPixel("p2020_gs")
; heavy weapon
global FLATLINE_PIXELS := LoadPixel("flatline")
global PROWLER_PIXELS := LoadPixel("prowler")
global PROWLER_GS_PIXELS := LoadPixel("prowler_gs")
global HEMLOK_PIXELS := LoadPixel("hemlok")
global RAMPAGE_PIXELS := LoadPixel("rampage")
global WINGMAN_PIXELS := LoadPixel("wingman")
global WINGMAN_GS_PIXELS := LoadPixel("wingman_gs")
global P3030_PIXELS := LoadPixel("p3030")
; special
global CAR_PIXELS := LoadPixel("car")
global CAR_GS_PIXELS := LoadPixel("car_gs")
; energy weapon
global LSTAR_PIXELS := LoadPixel("lstar")
global DEVOTION_PIXELS := LoadPixel("devotion")
global VOLT_PIXELS := LoadPixel("volt")
global VOLT_GS_PIXELS := LoadPixel("volt_gs")
global HAVOC_PIXELS := LoadPixel("havoc")
; supply drop weapon
global G7_PIXELS := LoadPixel("g7")
global SPITFIRE_PIXELS := LoadPixel("spitfire")
global ALTERNATOR_PIXELS := LoadPixel("alternator")
global ALTERNATOR_GS_PIXELS := LoadPixel("alternator_gs")
; Turbocharger
global HAVOC_TURBOCHARGER_PIXELS := LoadPixel("havoc_turbocharger")
global DEVOTION_TURBOCHARGER_PIXELS := LoadPixel("devotion_turbocharger")
; Singlemode
global SINGLE_MODE_PIXELS := LoadPixel("single_mode")
;BloodHound
global BloodHound_Ultimate_TL := LoadPixel("BloodHoundUltimateTL")
global BloodHound_Ultimate_DR := LoadPixel("BloodHoundUltimateDR")
global LONGBOW_GS_PIXELS := LoadPixel("longbow_goldenscope")
global CHARGERIFLE_GS_PIXELS := LoadPixel("chargerifle_goldenscope")
global SENTINAL_GS_PIXELS := LoadPixel("sentinal_goldenscope")
EMColProta := 0xb85950
EMColDeute := 0xbda453 ,0xb07c40
; for gold optics
global EMCol := 0x3841AD,0x333DB1,0x51232c
global ColVn := 8
global AntiShakeX := (A_ScreenHeight // 80)
global AntiShakeY := (A_ScreenHeight // 64)
global ZeroX := (A_ScreenWidth // 2)
global ZeroY := (A_ScreenHeight // 2)
global CFovX := (A_ScreenWidth // 32+30)
global CFovY := (A_ScreenHeight // 32+25)
global ScanL := ZeroX - CFovX
global ScanT := ZeroY - CFovY
global ScanR := ZeroX + CFovX
global ScanB := ZeroY + CFovY
global NearAimScanL := ZeroX - AntiShakeX
global NearAimScanT := ZeroY - AntiShakeY
global NearAimScanR := ZeroX + AntiShakeX
global NearAimScanB := ZeroY + AntiShakeY
; for bloodh aimassist
global EMCol2 := 0x3841AD,0x333DB1
global ColVn2 := 8
global AntiShakeX2 := (A_ScreenHeight // 80)
global AntiShakeY2 := (A_ScreenHeight // 64)
global ZeroX2 := (A_ScreenWidth // 2)
global ZeroY2 := (A_ScreenHeight // 2)
global CFovX2 := ((A_ScreenWidth // 32)+250)
global CFovY2 := ((A_ScreenHeight // 32)+200)
global ScanL2 := ZeroX2 - CFovX2
global ScanT2 := ZeroY2 - CFovY2
global ScanR2 := ZeroX2 + CFovX2
global ScanB2 := ZeroY2 + CFovY2
global NearAimScanL2 := ZeroX2 - AntiShakeX2
global NearAimScanT2 := ZeroY2 - AntiShakeY2
global NearAimScanR2 := ZeroX2 + AntiShakeX2
global NearAimScanB2 := ZeroY2 + AntiShakeY2
;dmgColors := 0xce2edc ,0xce42e0
;EMCol3 := 0x3841AD,0x333DB1,0xab2a21
; for color aim assist
global EMCol3 := 0x3841AD,0x333DB1,0xab2a21
global ColVn3 := 8
global AntiShakeX3 := (A_ScreenHeight // 80)
global AntiShakeY3 := (A_ScreenHeight // 64)
global ZeroX3 := (A_ScreenWidth // 2)
global ZeroY3 := (A_ScreenHeight // 2)
global CFovX3 := (A_ScreenWidth // 32+250)
global CFovY3 := (A_ScreenHeight // 32+180)
global ScanL3 := ZeroX3 - CFovX3
global ScanT3 := ZeroY3 - CFovY3
global ScanR3 := ZeroX3 + CFovX3
global ScanB3 := ZeroY3 + CFovY3
global NearAimScanL3 := ZeroX3 - AntiShakeX3
global NearAimScanT3 := ZeroY3 - AntiShakeY3
global NearAimScanR3 := ZeroX3 + AntiShakeX3
global NearAimScanB3 := ZeroY3 + AntiShakeY3
;bloodhound
global bloodhound_ultimate_time := 31
global is_bloodhound_z := false
global last_bloodhound_ztime := 0
if(blind_mode =="Tritanopia")
{
SUPPY_DROP_COLOR = 0x312e90
}else if(blind_mode =="Deutranopia")
{
SUPPY_DROP_COLOR = 0x1920b2
EMCol := EMColDeute
EMCol2 := EMColDeute
}else if(blind_mode =="Protanopia")
{
SUPPY_DROP_COLOR = 0x714ab2
EMCol := EMColProta
EMCol2 := EMColProta
}else if(blind_mode =="off")
{
SUPPY_DROP_COLOR = 0x3701B2
}
MoveMouse2Red()
{
; reds := [0x3841AD,0x5764BC,0x6866C3]
; reds := [0x5054C8,0x3841AD,0x333DB1,0x5764BC]
reds := [0x5054C8,0x3841AD,0x5764BC]
; reds := [0x5054C8]
For key, value in reds {
aimPixelX := ZeroX
aimPixelY := ZeroY
DirX := -1
DirY := -1
PixelSearch, aimPixelX, aimPixelY, NearAimScanL, NearAimScanT, NearAimScanR, NearAimScanB, %value%, ColVn, Fast
if (!ErrorLevel) {
break
}
PixelSearch, aimPixelX, aimPixelY, ScanL, ScanT, ScanR, ScanB, %value%, ColVn, Fast
if (ErrorLevel) {
continue
}
AimX := (aimPixelX - ZeroX) / 2
AimY := (aimPixelY - ZeroY) / 2
If ( AimX > 0 ) {
DirX := 1
}
If (AimY > 0 ) {
DirY := 1
}
MoveX := Round((AimX + MoveALittleMore * DirX) * modifier)
MoveY := Round((AimY + MoveALittleMore * DirY) * modifier)
DllCall("mouse_event", uint, 1, int, MoveX, int, MoveY, uint, 0, int, 0)
}
}
; each player can hold 2 weapons
LoadPixel(name) {
global resolution
IniRead, weapon_pixel_str, %A_ScriptDir%\resolution\%resolution%.ini, pixels, %name%
weapon_num_pixels := []
Loop, Parse, weapon_pixel_str, `,
{
if StrLen(A_LoopField) == 0 {
Continue
}
weapon_num_pixels.Insert(A_LoopField)
}
return weapon_num_pixels
}
; load pattern from file
LoadPattern(filename) {
FileRead, pattern_str, %A_ScriptDir%\pattern\%filename%
pattern := []
Loop, Parse, pattern_str, `n, `, , `" ,`r
{
if StrLen(A_LoopField) == 0 {
Continue
}
pattern.Insert(A_LoopField)
}
return pattern
}
;"
; light weapon pattern
global SPITFIRE_PATTERN := LoadPattern("Spitfire.txt")
global R301_PATTERN := LoadPattern("R301.txt")
global R99_PATTERN := LoadPattern("R99.txt")
global ALTERNATOR_PATTERN := LoadPattern("Alternator.txt")
global RE45_PATTERN := LoadPattern("RE45.txt")
global P2020_PATTERN := LoadPattern("P2020.txt")
global G7_Pattern := LoadPattern("G7.txt")
; energy weapon pattern
global LSTAR_PATTERN := LoadPattern("Lstar.txt")
global DEVOTION_PATTERN := LoadPattern("Devotion.txt")
global TURBODEVOTION_PATTERN := LoadPattern("DevotionTurbo.txt")
global VOLT_PATTERN := LoadPattern("Volt.txt")
global HAVOC_PATTERN := LoadPattern("Havoc.txt")
global TURBOHAVOC_PATTERN := LoadPattern("HavocTurbo.txt")
global P3030_PATTERN := LoadPattern("3030.txt")
; special
global CAR_PATTERN := LoadPattern("CAR.txt")
; heavy weapon pattern
global FLATLINE_PATTERN := LoadPattern("Flatline.txt")
global RAMPAGE_PATTERN := LoadPattern("Rampage.txt")
global RAMPAGEAMP_PATTERN := LoadPattern("RampageAmp.txt")
global HEMLOK_PATTERN := LoadPattern("Hemlok.txt")
; supply drop weapon pattern
global PROWLER_PATTERN := LoadPattern("Prowler.txt")
global WINGMAN_PATTERN := LoadPattern("Wingman.txt")
global currentWeapon := 3
; tips setting
global hint_method := "Say"
; voice setting
SAPI.voice := SAPI.GetVoices().Item(1) ; uncomment this line to get female voice.
SAPI:=ComObjCreate("SAPI.SpVoice")
SAPI.rate:=rate
if(enable_voice)
SAPI.volume:=volume
else
SAPI.volume:= 0
%hint_method%("Enabled")
; weapon detection
global current_pattern := ["0,0,0"]
global current_weapon_type := DEFAULT_WEAPON_TYPE
global is_single_fire_weapon := false
global is_gold_scope_weapon := false
global is_single_mode := false
; mouse sensitivity setting
zoom := 1.0/zoom_sens
global modifier := 4/sens*zoom
; check whether the current weapon match the weapon pixels
CheckWeapon(weapon_pixels)
{
target_color := 0xFFFFFF
i := 1
loop, 3 {
PixelGetColor, check_point_color, weapon_pixels[i], weapon_pixels[i + 1]
if (weapon_pixels[i + 2] != (check_point_color == target_color)) {
return False
}
i := i + 3
}
return True
}
CheckSingleMode()
{
target_color := 0xFFFFFF
PixelGetColor, check_point_color, SINGLE_MODE_PIXELS[1], SINGLE_MODE_PIXELS[2]
if (check_point_color == target_color) {
return true
}
return false
}
Reset()
{
is_single_mode := false
peackkeeper_lock := false
is_gold_optics_weapon := false
current_weapon_type := DEFAULT_WEAPON_TYPE
check_point_color := 0
current_weapon_num := 0
}
CheckWeaponGS(weapon_gs_pixels)
{
target_color := 0xFFFFFF
PixelGetColor, check_point_color, weapon_gs_pixels[1], weapon_gs_pixels[2]
if (check_point_color == target_color) {
return True
}
return False
}
CheckTurbocharger(turbocharger_pixels)
{
target_color := 0xFFFFFF
PixelGetColor, check_point_color, turbocharger_pixels[1], turbocharger_pixels[2]
if (check_point_color == target_color) {
return true
}
return false
}
loop {
if(noADS_aimassist && !GetKeyState("RButton", "P"))
AimAssist()
}
Global is_in_chat := False
~*Enter::
if(IsMouseShown())
Return
is_in_chat := !is_in_chat
if(is_in_chat)
%hint_method%("Open chat")
Else
%hint_method%("Close chat")
return
~*Esc::
if(IsMouseShown())
Return
if(is_in_chat)
%hint_method%("Close chat")
is_in_chat := False
return
~*p::
if(is_in_chat)
return
%hint_method%("paused")
Suspend
Pause
return
#If (A_IsSuspended)
~*p::
Suspend, off
Pause, off
%hint_method%("unpaused")
return
#If
Global is_in_inventory := False
~*Tab::
if(is_in_chat)
Return
is_in_inventory :=!is_in_inventory
Sleep 150
if(!is_in_inventory)
DetectAndSetWeapon()
return
~*O::
if(is_in_chat)
Return
if(enable_voice)
{
%hint_method%("Disable voice")
SAPI.volume:= 0
Sleep 100
}else
{
SAPI.volume:= volume
%hint_method%("Enable voice")
}
enable_voice := !enable_voice
return
DetectAndSetWeapon()
{
sleep 100
; init
is_single_mode := CheckSingleMode()
is_single_fire_weapon := false
is_gold_scope_weapon := false
current_weapon_type := DEFAULT_WEAPON_TYPE
; first check which weapon is activate
check_point_color := 0
PixelGetColor, check_weapon1_color, WEAPON_1_PIXELS[1], WEAPON_1_PIXELS[2]
PixelGetColor, check_weapon2_color, WEAPON_2_PIXELS[1], WEAPON_2_PIXELS[2]
if (check_weapon1_color == LIGHT_WEAPON_COLOR || check_weapon1_color == HEAVY_WEAPON_COLOR || check_weapon1_color == ENERGY_WEAPON_COLOR
|| check_weapon1_color == SUPPY_DROP_COLOR || check_weapon1_color == SHOTGUN_WEAPON_COLOR|| check_weapon1_color == SNIPER_WEAPON_COLOR|| check_weapon1_color == BOCEK_WEAPON_COLOR) {
check_point_color := check_weapon1_color
currentWeapon :=1
} else if (check_weapon2_color == LIGHT_WEAPON_COLOR || check_weapon2_color == HEAVY_WEAPON_COLOR || check_weapon2_color == ENERGY_WEAPON_COLOR
|| check_weapon2_color == SUPPY_DROP_COLOR || check_weapon2_color == SHOTGUN_WEAPON_COLOR|| check_weapon2_color == SNIPER_WEAPON_COLOR|| check_weapon2_color == BOCEK_WEAPON_COLOR) {
check_point_color := check_weapon2_color
currentWeapon :=2
} else {
return
}
; then check the weapon type
if (check_point_color == LIGHT_WEAPON_COLOR) {
if (CheckWeapon(R301_PIXELS)) {
current_weapon_type := R301_WEAPON_TYPE
current_pattern := R301_PATTERN
} else if (CheckWeapon(R99_PIXELS)) {
current_weapon_type := R99_WEAPON_TYPE
current_pattern := R99_PATTERN
if(CheckWeaponGS(R99_GS_PIXELS))
is_gold_scope_weapon := true
} else if (CheckWeapon(RE45_PIXELS)) {
current_weapon_type := RE45_WEAPON_TYPE
current_pattern := RE45_PATTERN
if(CheckWeaponGS(RE45_GS_PIXELS))
is_gold_scope_weapon := true
} else if (CheckWeapon(P2020_PIXELS)) {
current_weapon_type := P2020_WEAPON_TYPE
current_pattern := P2020_PATTERN
is_single_fire_weapon := true
if(CheckWeaponGS(P2020_GS_PIXELS))
is_gold_scope_weapon := true
} else if (CheckWeapon(CAR_PIXELS)) {
current_weapon_type := CAR_WEAPON_TYPE
current_pattern := CAR_PATTERN
if(CheckWeaponGS(CAR_GS_PIXELS))
is_gold_scope_weapon := true
} else if (CheckWeapon(SPITFIRE_PIXELS)) {
current_weapon_type := SPITFIRE_WEAPON_TYPE
current_pattern := SPITFIRE_PATTERN
} else if (CheckWeapon(ALTERNATOR_PIXELS)) {
current_weapon_type := ALTERNATOR_WEAPON_TYPE
current_pattern := ALTERNATOR_PATTERN
if(CheckWeaponGS(ALTERNATOR_GS_PIXELS))
is_gold_scope_weapon := true
} else if (CheckWeapon(G7_PIXELS)) {
current_weapon_type := G7_WEAPON_TYPE
current_pattern := G7_Pattern
is_single_fire_weapon := true
}
} else if (check_point_color == HEAVY_WEAPON_COLOR) {
if (CheckWeapon(FLATLINE_PIXELS)) {
current_weapon_type := FLATLINE_WEAPON_TYPE
current_pattern := FLATLINE_PATTERN
} else if (CheckWeapon(HEMLOK_PIXELS)) {
current_weapon_type := HEMLOK_WEAPON_TYPE
current_pattern := HEMLOK_PATTERN
is_single_fire_weapon := true
} else if (CheckWeapon(RAMPAGE_PIXELS)) {
current_weapon_type := RAMPAGE_WEAPON_TYPE
current_pattern := RAMPAGE_PATTERN
} else if (CheckWeapon(CAR_PIXELS)) {
current_weapon_type := CAR_WEAPON_TYPE
current_pattern := CAR_PATTERN
if(CheckWeaponGS(CAR_GS_PIXELS))
is_gold_scope_weapon := true
} else if (CheckWeapon(P3030_PIXELS)) {
current_weapon_type := P3030_WEAPON_TYPE
current_pattern := P3030_PATTERN
is_single_fire_weapon := true
}
} else if (check_point_color == ENERGY_WEAPON_COLOR) {
if (CheckWeapon(LSTAR_PIXELS)) {
current_weapon_type := LSTAR_WEAPON_TYPE
current_pattern := LSTAR_PATTERN
} else if (CheckWeapon(DEVOTION_PIXELS)) {
current_weapon_type := DEVOTION_WEAPON_TYPE
current_pattern := DEVOTION_PATTERN
if (CheckTurbocharger(DEVOTION_TURBOCHARGER_PIXELS)) {
current_pattern := TURBODEVOTION_PATTERN
current_weapon_type := DEVOTION_TURBO_WEAPON_TYPE
}
} else if (CheckWeapon(VOLT_PIXELS)) {
current_weapon_type := VOLT_WEAPON_TYPE
current_pattern := VOLT_PATTERN
if(CheckWeaponGS(VOLT_GS_PIXELS))
is_gold_scope_weapon := true
} else if (CheckWeapon(HAVOC_PIXELS)) {
current_weapon_type := HAVOC_WEAPON_TYPE
current_pattern := HAVOC_PATTERN
if (CheckTurbocharger(HAVOC_TURBOCHARGER_PIXELS)) {
current_pattern := TURBOHAVOC_PATTERN
current_weapon_type := HAVOC_TURBO_WEAPON_TYPE
}
}else
{
current_weapon_type := TRIPLETAKE_WEAPON_TYPE
is_single_fire_weapon :=true
}
} else if (check_point_color == SUPPY_DROP_COLOR) {
if (CheckWeapon(PROWLER_PIXELS)) {
current_weapon_type := PROWLER_WEAPON_TYPE
current_pattern := PROWLER_PATTERN
;is_single_fire_weapon := true
if(CheckWeaponGS(PROWLER_GS_PIXELS))
is_gold_scope_weapon := true
} else if (CheckWeapon(WINGMAN_PIXELS)) {
current_weapon_type := WINGMAN_WEAPON_TYPE
current_pattern := WINGMAN_PATTERN
is_single_fire_weapon := true
if(CheckWeaponGS(WINGMAN_GS_PIXELS))
is_gold_scope_weapon := true
} else{
current_weapon_type := KRABER_WEAPON_TYPE
is_single_fire_weapon := true
AntiShakeX := (A_ScreenHeight // 80)
AntiShakeY := (A_ScreenHeight // 64)
ZeroX := (A_ScreenWidth // 2)
ZeroY := (A_ScreenHeight // 2)
CFovX := (A_ScreenWidth // 32+350)
CFovY := (A_ScreenHeight // 32+200)
ScanL := ZeroX - CFovX
ScanT := ZeroY - CFovY
ScanR := ZeroX + CFovX
ScanB := ZeroY + CFovY
NearAimScanL := ZeroX - AntiShakeX
NearAimScanT := ZeroY - AntiShakeY
NearAimScanR := ZeroX + AntiShakeX
NearAimScanB := ZeroY + AntiShakeY
gs_tempHumanizer :=gs_humanizor
gs_humanizor:= 1.5
}
} else if (check_point_color == SHOTGUN_WEAPON_COLOR) {
current_weapon_type := SHOTGUN_WEAPON_TYPE
is_single_fire_weapon :=true
}else if (check_point_color == SNIPER_WEAPON_COLOR) {
is_single_fire_weapon :=true
current_weapon_type := SNIPER_WEAPON_TYPE
AntiShakeX := (A_ScreenHeight // 80)
AntiShakeY := (A_ScreenHeight // 64)
ZeroX := (A_ScreenWidth // 2)
ZeroY := (A_ScreenHeight // 2)
CFovX := (A_ScreenWidth // 32+300)
CFovY := (A_ScreenHeight // 32+200)
ScanL := ZeroX - CFovX
ScanT := ZeroY - CFovY
ScanR := ZeroX + CFovX
ScanB := ZeroY + CFovY
NearAimScanL := ZeroX - AntiShakeX
NearAimScanT := ZeroY - AntiShakeY
NearAimScanR := ZeroX + AntiShakeX
NearAimScanB := ZeroY + AntiShakeY
gs_tempHumanizer :=gs_humanizor
gs_humanizor:= 1.5
;if(CheckWeaponGS(SENTINAL_GS_PIXELS)||CheckWeaponGS(LONGBOW_GS_PIXELS)||CheckWeaponGS(CHARGERIFLE_GS_PIXELS))
;{
; is_gold_scope_weapon := true
;}
}else if (check_point_color == BOCEK_WEAPON_COLOR) {
current_weapon_type := BOCEK_WEAPON_TYPE
is_single_fire_weapon :=true
}
if (check_point_color != SNIPER_WEAPON_COLOR && is_gold_scope_weapon &¤t_weapon_type != KRABER_WEAPON_TYPE) {
AntiShakeY := (A_ScreenHeight // 64)
ZeroX := (A_ScreenWidth // 2)
ZeroY := (A_ScreenHeight // 2)
CFovX := (A_ScreenWidth // 32+30)
CFovY := (A_ScreenHeight // 32+25)
ScanL := ZeroX - CFovX
ScanT := ZeroY - CFovY
ScanR := ZeroX + CFovX
ScanB := ZeroY + CFovY
NearAimScanL := ZeroX - AntiShakeX
NearAimScanT := ZeroY - AntiShakeY
NearAimScanR := ZeroX + AntiShakeX
NearAimScanB := ZeroY + AntiShakeY
gs_humanizor := gs_tempHumanizer
}
if(is_gold_scope_weapon&&gold_scope_aimassist)
{
adjustment := "GoldenScope"
gun_name := current_weapon_type adjustment
%hint_method%(gun_name)
}
else
{
%hint_method%(current_weapon_type)
}
}
~E Up::
Sleep, 200
DetectAndSetWeapon()
return
~*J Up::
if(IsMouseShown()||is_in_chat||!bloodhZ_aimassist)
Return
is_bloodhound_z := !is_bloodhound_z
if(is_bloodhound_z)
{
last_bloodhound_ztime := A_TickCount
%hint_method%("Ultimate activated")
}else
{
%hint_method%("Ultimate gone")
}
return
~*1::
;~*2::
~B::
~R::
~XButton1::
DetectAndSetWeapon()
return
~*3::
current_weapon_type := DEFAULT_WEAPON_TYPE
is_single_fire_weapon :=true
currentWeapon :=3
return
; For user using ads_only, they don't have to reset the current_weapon_type.
; This is meaningful to me since I sometimes will shot after throwing a grenade.
~G::
~*Z::
is_single_fire_weapon :=False
if (!ads_only) {
current_weapon_type := DEFAULT_WEAPON_TYPE
}
if(bloodhZ_aimassist&&!is_in_chat&&!IsMouseShown())
{
if(!is_bloodhound_z)
{
PixelSearch, Px, Py, BloodHound_Ultimate_TL[1] , BloodHound_Ultimate_TL[2] , BloodHound_Ultimate_DR[1] , BloodHound_Ultimate_DR[2], 0xFFFFFF, 4, Fast
if ErrorLevel
%hint_method%("Ultimate is not ready")
else
{
is_bloodhound_z := true
last_bloodhound_ztime := A_TickCount
%hint_method%("Ultimate activated")
}
}
}
return
~End::
%hint_method%("Closed")
Sleep 100
ExitApp
return
AimAssist()
{
if(bloodhZ_aimassist&&is_bloodhound_z)
{
if((A_TickCount - last_bloodhound_ztime)>30000)
{
is_bloodhound_z := false
%hint_method%("Ultimate Gooone")
}
}
if (!IsMouseShown()&&color_aimassist&&EMCol3 != 0x000000)
{
Loop, {
PixelSearch, AimPixelX3, AimPixelY3, NearAimScanL3, NearAimScanT3, NearAimScanR3, NearAimScanB3, EMCol3, ColVn3, Fast
; If the collimator is already in the corresponding color attachment, do not move to avoid shaking
if (ErrorLevel) {
loop, 10 {
PixelSearch, AimPixelX3, AimPixelY3, ScanL3, ScanT3, ScanR3, ScanB3, EMCol3, ColVn3, Fast
AimX3 := AimPixelX3 - ZeroX3
AimY3 := AimPixelY3 - ZeroY3
DirX3 := -1
DirY3 := -1
If ( AimX3 > 0 ) {
DirX3 := 1
}
If ( AimY3 > 0 ) {
DirY3 := 1
}
AimOffsetX3 := AimX3 * DirX3
AimOffsetY3 := AimY3 * DirY3
MoveX3 := Floor(( AimOffsetX3 ** ( 1 / 2 ))) * DirX3
MoveY3 := Floor(( AimOffsetY3 ** ( 1 / 2 ))) * DirY3
DllCall("mouse_event", uint, 1, int, MoveX3 * aa_humanizor, int, MoveY3, uint, 0, int, 0)
if (!GetKeyState("RButton","P")) {
break
}
}
}
else
{
if(auto_trigger)
Click , Left
}
if (!GetKeyState("RButton","P")) {
break
}
}
return
}
if (!IsMouseShown()&&bloodhZ_aimassist &&is_bloodhound_z)
{
Loop, {
PixelSearch, AimPixelX2, AimPixelY2, NearAimScanL2, NearAimScanT2, NearAimScanR2, NearAimScanB2, EMCol2, ColVn2, Fast
; If the collimator is already in the corresponding color attachment, do not move to avoid shaking
if (ErrorLevel) {
loop, 10 {
PixelSearch, AimPixelX2, AimPixelY2, ScanL2, ScanT2, ScanR2, ScanB2, EMCol2, ColVn2, Fast
AimX2 := AimPixelX2 - ZeroX2
AimY2 := AimPixelY2 - ZeroY2
DirX2 := -1
DirY2 := -1
If ( AimX2 > 0 ) {
DirX2 := 1
}
If ( AimY2 > 0 ) {
DirY2 := 1
}
AimOffsetX2 := AimX2 * DirX2
AimOffsetY2 := AimY2 * DirY2
MoveX2 := Floor(( AimOffsetX2 ** ( 1 / 2 ))) * DirX2
MoveY2 := Floor(( AimOffsetY2 ** ( 1 / 2 ))) * DirY2
DllCall("mouse_event", uint, 1, int, MoveX2 * bhz_humanizor, int, MoveY2, uint, 0, int, 0)
if (!GetKeyState("RButton","P")) {
break
}
}
}
else
{
if(auto_trigger)
Click , Left
}
if (!GetKeyState("RButton","P")) {
break
}
}
return
}
if (!IsMouseShown() && gold_scope_aimassist && is_gold_scope_weapon)
{
Loop, {
PixelSearch, AimPixelX, AimPixelY, NearAimScanL, NearAimScanT, NearAimScanR, NearAimScanB, EMCol, ColVn, Fast
; If the collimator is already in the corresponding color attachment, do not move to avoid shaking
if (ErrorLevel) {
loop, 10 {
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, EMCol, ColVn, Fast
AimX := AimPixelX - ZeroX
AimY := AimPixelY - ZeroY
DirX := -1
DirY := -1
If ( AimX > 0 ) {
DirX := 1
}
If ( AimY > 0 ) {
DirY := 1
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
MoveX := Floor(( AimOffsetX ** ( 1 / 2 ))) * DirX
MoveY := Floor(( AimOffsetY ** ( 1 / 2 ))) * DirY
DllCall("mouse_event", uint, 1, int, MoveX * gs_humanizor, int, MoveY, uint, 0, int, 0)
if (!GetKeyState("RButton","P")) {
break
}
}
}
else
{
if(auto_trigger)
Click , Left
}
if (!GetKeyState("RButton","P")) {
break
}
}
}
}
~$*RButton::
AimAssist()
return
AutoCycleWeaponChecker()
{
Sleep 200
check_point_color := 0
PixelGetColor, check_weapon1_color, WEAPON_1_PIXELS[1], WEAPON_1_PIXELS[2]
PixelGetColor, check_weapon2_color, WEAPON_2_PIXELS[1], WEAPON_2_PIXELS[2]
if (check_weapon1_color == LIGHT_WEAPON_COLOR || check_weapon1_color == HEAVY_WEAPON_COLOR
|| check_weapon1_color == ENERGY_WEAPON_COLOR || check_weapon1_color == SUPPY_DROP_COLOR || check_weapon1_color == SHOTGUN_WEAPON_COLOR|| check_weapon1_color == SNIPER_WEAPON_COLOR) {
check_point_color := check_weapon1_color
if(currentWeapon==2)
DetectAndSetWeapon()
} else if (check_weapon2_color == LIGHT_WEAPON_COLOR || check_weapon2_color == HEAVY_WEAPON_COLOR || check_weapon2_color == ENERGY_WEAPON_COLOR
|| check_weapon2_color == SUPPY_DROP_COLOR || check_weapon2_color == SHOTGUN_WEAPON_COLOR|| check_weapon2_color == SNIPER_WEAPON_COLOR) {
check_point_color := check_weapon2_color
if(currentWeapon==1)
DetectAndSetWeapon()
} else {
currentWeapon := 3
}
}
;~$*LButton::
; if (IsMouseShown() || current_weapon_type == DEFAULT_WEAPON_TYPE || current_weapon_type == SHOTGUN_WEAPON_TYPE)
; return
; AutoCycleWeaponChecker()
; if (ads_only && !GetKeyState("RButton"))
; return
;
; if (is_single_fire_weapon && !auto_fire)
; return
;
; Loop {
; i := A_Index
; if (A_Index > current_pattern.MaxIndex()) {
; i := current_pattern.MaxIndex()
; }
;
; compensation := StrSplit(current_pattern[i],",")
; if (compensation.MaxIndex() < 3) {
; return
; }
; x := compensation[1]
; y := compensation[2]
; interval := compensation[3]
;
; if (is_single_fire_weapon) {
; Click
; Random, rand, 1, 20
; interval := interval + rand
; }
;
; DllCall("mouse_event", uint, 0x01, uint, Round(x * modifier), uint, Round(y * modifier))
; Sleep, interval
;
; if (!GetKeyState("LButton","P")) {
; DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
; break
; }
; }
;return
~$*LButton::
if (has_gold_optics && gold_optics && is_gold_optics_weapon && GetKeyState("RButton")) {
MoveMouse2Red()
}
; Click, Down
if (IsMouseShown() || current_weapon_type == DEFAULT_WEAPON_TYPE || current_weapon_type == SHOTGUN_WEAPON_TYPE || current_weapon_type == SNIPER_WEAPON_TYPE)
return
;if (is_single_mode && !(IsAutoClickNeeded()))
; return
if (is_single_fire_weapon && !auto_fire)
return
if (ads_only && !GetKeyState("RButton"))
return
if (trigger_only && !GetKeyState(trigger_button,"T"))
return
if (current_weapon_type == HAVOC_WEAPON_TYPE) {
Sleep, 400
}
;if (current_weapon_type == NEMESIS_WEAPON_TYPE || current_weapon_type == NEMESIS_CHARGED_WEAPON_TYPE)
;{
; if (IsNemesisFullCharge()) {
; current_weapon_type := NEMESIS_CHARGED_WEAPON_TYPE
; current_pattern := NEMESIS_CHARGED_PATTERN
; } else {
; current_weapon_type := NEMESIS_WEAPON_TYPE
; current_pattern := NEMESIS_PATTERN
; }
;}
Loop {
x := 0
y := 0
interval := 20
if (A_Index <= current_pattern.MaxIndex()) {
compensation := StrSplit(current_pattern[Min(A_Index, current_pattern.MaxIndex())],",")
if (compensation.MaxIndex() < 3) {
return
}
x := compensation[1]
y := compensation[2]
interval := compensation[3]
}
if (is_single_fire_weapon) {
Click
Random, rand, 1, 20
interval := interval + rand
}
DllCall("mouse_event", uint, 0x01, uint, Round(x * modifier), uint, Round(y * modifier))
if (debug) {
ToolTip % x " " y " " a_index
}
Sleep, interval
if (!GetKeyState("LButton","P")) {
break
}
}
return
IniRead:
global gold_scope_aimassist := "0"
global bloodhZ_aimassist := "0"
global color_aimassist := "0"
global auto_trigger := "0"
global enable_voice := "0"
global bhz_humanizor := "2"
global gs_humanizor := "2"
global aa_humanizor := "2"
Global gs_tempHumanizer := gs_humanizor
IfNotExist, settings.ini
{
MsgBox, Couldn't find settings.ini. I'll create one for you.
IniWrite, "1080x1920"`n, settings.ini, screen settings, resolution
IniWrite, "5.0", settings.ini, mouse settings, sens
IniWrite, "1.0", settings.ini, mouse settings, zoom_sens
IniWrite, "1", settings.ini, mouse settings, auto_fire
IniWrite, "0", settings.ini, mouse settings, ads_only
IniWrite, "0", settings.ini, mouse settings, gold_scope_aimassist
IniWrite, "80", settings.ini, voice settings, volume
IniWrite, "7", settings.ini, voice settings, rate
IniWrite, "1", settings.ini, mouse settings, color_aimassist
IniWrite, "1", settings.ini, mouse settings, bloodhZ_aimassist
IniWrite, "1", settings.ini, mouse settings, auto_trigger
IniWrite, "1", settings.ini, voice settings, enable_voice
IniWrite, "Tritanopia", settings.ini, other settings, blind_mode
IniWrite, "0", settings.ini, mouse settings, noADS_aimassist
IniWrite, "2", settings.ini, mouse settings, bhz_humanizor
IniWrite, "2", settings.ini, mouse settings, gs_humanizor
IniWrite, "2", settings.ini, mouse settings, aa_humanizor