-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path全境封锁2-按键助手.ahk
1714 lines (1450 loc) · 44.4 KB
/
全境封锁2-按键助手.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
#include FindText.ahk
#Include BTT.ahk
; #Include %A_ScriptDir%\Class_DD\class_DD.ahk
#MenuMaskKey vkE8
#InstallKeybdHook
#InstallMouseHook
#KeyHistory 100
#UseHook
#MaxThreadsPerHotkey 1
#MaxThreads 30
#MaxThreadsBuffer off
; SendMode InputThenPlay
ListLines , Off
CurPID := DllCall("GetCurrentProcessId")
Process , Priority, %CurPID%, High
CoordMode , Pixel, Screen
CoordMode , Mouse, Screen
SetWorkingDir %A_ScriptDir%
;#####################
;#====读取ini&初始化====#
;#####################
global ver := "4.0"
global voiceObject := ComObjCreate("SAPI.SpVoice")
voiceObject.Volume := 100
global hwid := 0
global debug := 0 ;调试专用
if debug and vTtsSpeak
Speak("debug Online")
global _maxMouseDelay:=30
global _maxKeyDelay:=50
global _Readytofire = 1 ;射击等待
global _timerRunning = 0
global crosshairX =
global crosshairY =
;简单连击
global speedArray := [25, 50, 75, 120] ; 连击间隔时间,单位毫秒,多个速率请使用这种格式:[80, 160, 320]
global speedIndex := 1
;服装箱子
global skinBoxEnable := 0
;狙击塔循环
global loopJuTaEnable := 0
global vStartTime:=0
global vEndTime:=0
global vTtsSpeak:=1
global _downVal := 2
global _rightVal := 0
global _shotdelay := 0
Global vCloseEAC:=1
Global vSetUPC:=1
global vm := 0
global _chooseGun := 1 ;默认1号武器
global _weaponText :="武器"
global lenInfo:=0
global lenFireInfo:=0
global vajMode:=1 ;按键模式
if FileExist("TheDivision2.ini")
{
IniRead , _maxMouseDelay, TheDivision2.ini, 基本参数, 鼠标按键延迟, 30
IniRead , _maxKeyDelay, TheDivision2.ini, 基本参数, 键盘按键延迟, 50
IniRead , vOnekeyRun, TheDivision2.ini, 游戏启动, 一键启动, 1
IniRead , vCloseEAC, TheDivision2.ini, 游戏启动, 关闭EAC, 1
IniRead , vSetUPC, TheDivision2.ini, 游戏启动, 降低UPC, 1
IniRead , vSetEN, TheDivision2.ini, 游戏启动, 英文模式, 1
IniRead , vOneKeyZL, TheDivision2.ini, 一键政令, 启用, 1
IniRead , vResetArea, TheDivision2.ini, 一键政令, 重置控制点, 1
IniRead , vAutoBox, TheDivision2.ini, 服装箱子, 启用, 0
IniRead , _downVal, TheDivision2.ini, 高级模式, 垂直偏移, 2
IniRead , _RightVal, TheDivision2.ini, 高级模式, 水平偏移, 0
IniRead , _shotdelay, TheDivision2.ini, 高级模式, 单发间隔, 0
IniRead , speedIndex, TheDivision2.ini, 简单模式, 单发间隔, 1
IniRead , _autofire, TheDivision2.ini, 自动射击, 启用, 0
IniRead , vShootMode, TheDivision2.ini, 自动射击, 连射模式, 1 ;1-简单模式,2-高级模式
IniRead , vAutoShoot, TheDivision2.ini, 自动射击, 发现敌人自动射击, 0
IniRead , vAutoLiu, TheDivision2.ini, 无限溜溜球, 启用, 0
IniRead , vLiuMode, TheDivision2.ini, 无限溜溜球, 溜溜球模式, 1 ;1-装配工,2固线
IniRead , vAutoGxLiu, TheDivision2.ini, 无限溜溜球,技能使用后自动重置固线, 0 ;1-装配工,2固线
IniRead , vAutoJuTa, TheDivision2.ini, 瞬发狙击塔,狙击塔快速使用, 0
IniRead , vJuTaAndShoot, TheDivision2.ini, 瞬发狙击塔,狙击塔间隔射击, 1
IniRead , vInfoMethod, TheDivision2.ini, 信息显示, 显示模式, 1 ;1-渐隐,2固定
IniRead , vTtsSpeak, TheDivision2.ini, 信息显示,TTS语音通报, 1
IniRead , vajMode, TheDivision2.ini, 键鼠操作模式, 按键模式, 1
readWeapon(_chooseGun)
}
Else{
FileAppend,
(LTrim
[自动射击]
启用=0
连射模式=1
发现敌人自动射击=0
[简单模式]
单发间隔=1
[高级模式]
单发间隔1=0
垂直偏移1=2
水平偏移1=0
单发间隔2=0
垂直偏移2=2
水平偏移2=0
单发间隔3=0
垂直偏移3=2
水平偏移3=0
武器名1=武器1
武器名2=武器2
武器名3=武器3
武器名修饰后缀=已上线
[服装箱子]
启用=0
[无限溜溜球]
启用=0
溜溜球模式=1
技能使用后自动重置固线=0
[游戏启动]
一键启动=1
关闭EAC=1
降低UPC=1
[一键政令]
启用=1
重置控制点=1
[瞬发狙击塔]
狙击塔快速使用=0
狙击塔间隔射击=1
[信息显示]
显示模式=1
TTS语音通报=1
[基本参数]
鼠标按键延迟=30
键盘按键延迟=50
[键鼠操作模式]
按键模式=1
), TheDivision2.ini
}
SetMouseDelay, 0,_maxMouseDelay, Play
SetKeyDelay, 0, _maxKeyDelay, Play
;#####################
;#====菜单相关====#
;#####################
Menu , tray, NoStandard
if debug{
Menu , tray, add, ********Debug调试模式**********, MenuHandler
Menu , tray, add,
Menu, tray, Color, 00FF00
}
Menu , tray, add, 一键启动|Ctrl+F10,MenuHandler
if (vOnekeyRun) {
Menu , tray, check, 一键启动|Ctrl+F10
}
Menu , tray, add, 游戏启动后关闭小蓝熊,MenuHandler
if (vCloseEAC) {
Menu , tray, check, 游戏启动后关闭小蓝熊
}
Menu , tray, add, 游戏启动后降低UPC优先级,MenuHandler
if (vSetUPC) {
Menu , tray, check, 游戏启动后降低UPC优先级
}
; Menu , tray, add,ALT+F10键会顺序关闭全境2/小蓝熊/UPC,MenuHandler
; Menu , tray, Disable, ALT+F10键会顺序关闭全境2/小蓝熊/UPC
Menu , tray, add,
Menu , tray, add, 一键政令|ALT+1,MenuHandler
if (vOneKeyZL) {
Menu , tray, check, 一键政令|ALT+1
}
Menu , tray, add, 一键政令时重置控制点,MenuHandler
if (vResetArea) {
Menu , tray, check, 一键政令时重置控制点
}
;服装箱
Menu , tray, add,
Menu , tray, add, 自动开服装箱|ALT+2,MenuHandler
if (vAutoBox) {
Menu , tray, check, 自动开服装箱|ALT+2
}
;连射
Menu , tray, add,
; Menu, tray, add,自动连射,MenuHandler
; fn := Func("AutoFireSwitch")
Menu , Tray, Add, 自动连射|F4开关,MenuHandler
Menu , MySubMenu1, Add, 简单模式,MenuHandler
Menu , MySubMenu1, Add, 高级模式,MenuHandler
Menu , Tray, Add, 连射模式, :MySubMenu1
Menu , tray, add,发现敌人自动射击 ,MenuHandler
if (vShootMode=1) {
Menu , MySubMenu1, check, 简单模式
Menu , tray, Disable, 发现敌人自动射击
} else if(vShootMode=2){
Menu , MySubMenu1, check, 高级模式
Menu , tray, Enable, 发现敌人自动射击
}
if (_autofire) {
Menu , tray, check, 自动连射|F4开关
}
else{
Menu , tray, Disable, 连射模式
Menu , tray, Disable, 发现敌人自动射击
}
if (vAutoShoot) {
Menu , tray, check, 发现敌人自动射击
}
else{
Menu , tray, uncheck,发现敌人自动射击
}
;===========================================
;溜溜球
Menu,tray,add,
Menu,Tray,Add,无限溜溜球|F5开关,MenuHandler
Menu,MySubMenu2,Add,装配工模式,MenuHandler
Menu,MySubMenu2,Add,固线模式,MenuHandler
Menu,Tray,Add,溜溜球模式,:MySubMenu2
Menu,Tray,Add,固线自动重置,MenuHandler
if (vLiuMode=1) {
Menu , MySubMenu2, check, 装配工模式
} else if (vLiuMode=2){
Menu , MySubMenu2, check, 固线模式
}
if (vLiuMode=1) {
Menu,Tray,Disable,固线自动重置
}
else if(vLiuMode=2){
Menu,Tray,enable,固线自动重置
}
if (vAutoGxLiu) {
Menu,Tray,check,固线自动重置
}
else{
Menu,Tray,uncheck,固线自动重置
}
if (vAutoLiu) {
Menu , tray, check, 无限溜溜球|F5开关
Menu , tray, enable, 溜溜球模式
}
else{
Menu , tray, uncheck, 无限溜溜球|F5开关
Menu , tray, Disable, 溜溜球模式
Menu,Tray,Disable,固线自动重置
}
; Menu , tray, add,鼠标侧键1|ALT+Q刷新技能 ,MenuHandler
; Menu , tray, Disable, 鼠标侧键1|ALT+Q刷新技能
Menu,Tray,Add,
Menu , tray, add,瞬发狙击塔|F6开关 ,MenuHandler
Menu , tray, add, 狙击塔间隔射击,MenuHandler
if (vAutoJuTa) {
Menu,Tray,check,瞬发狙击塔|F6开关
Menu , tray, enable, 狙击塔间隔射击
}
else{
Menu,Tray,uncheck,瞬发狙击塔|F6开关
Menu ,tray, Disable, 狙击塔间隔射击
}
if (vJuTaAndShoot) {
Menu,Tray,check,狙击塔间隔射击
}
else{
Menu,Tray,uncheck,狙击塔间隔射击
}
; Menu , tray, add,鼠标侧键1|ALT+E开启/关闭循环 ,MenuHandler
; Menu , tray, Disable, 鼠标侧键1|ALT+E开启/关闭循环
Menu,tray,add,
Menu,MySubMenu4,Add,兼容模式,MenuHandler
Menu,MySubMenu4,Add,游戏模式,MenuHandler
Menu,MySubMenu4,Add,强力模式,MenuHandler
if (vajMode=1) {
Menu , MySubMenu4, check, 兼容模式
} else if(vajMode=2){
Menu , MySubMenu4, check, 游戏模式
} else if(vajMode=3){
Menu , MySubMenu4, check, 强力模式
}
Menu,Tray,Add,键鼠操作模式,:MySubMenu4
Menu,tray,add,信息显示|F2,MenuHandler
Menu,tray,check,信息显示|F2
Menu,MySubMenu3,Add,渐隐模式,MenuHandler
Menu,MySubMenu3,Add,固定模式,MenuHandler
if (vInfoMethod=1) {
Menu , MySubMenu3, check, 渐隐模式
} else if (vInfoMethod=2) {
Menu , MySubMenu3, check, 固定模式
}
Menu,Tray,Add,显示模式,:MySubMenu3
Menu,Tray,Add,TTS语音通报,MenuHandler
if (vTtsSpeak) {
Menu,Tray,check,TTS语音通报
}
else{
Menu,Tray,uncheck,TTS语音通报
}
; Menu , tray, add,鼠标侧键1|ALT+Q刷新技能 ,MenuHandler
; Menu , tray, Disable, 鼠标侧键1|ALT+Q刷新技能
;===========================================
startuplnk := A_StartMenu . "\Programs\Startup\" . A_ScriptName . ".lnk"
Menu,Tray,Add,
Menu, Tray, Add, 开机启动,MenuHandler
if(FileExist(startuplnk))
Menu, Tray, Check, 开机启动
Menu,Tray,Add,
;常规控制 Menu, tray, add, Menu, tray, NoStandard
Menu,tray,add,重置 |Reload,ReloadScript
Menu,tray,add,暂停 |F1,PauseScript
Menu,tray,add,
Menu,tray,add,帮助 | Help,Help
Menu,tray,add,版本 | Ver %ver%,Version ;使用资源表示符 207 表示的图标
Menu,tray,add,退出 | Exit,ExitScript
Menu,tray,tip,杀戮小队QQ群专享版
;#####################
;#====脚本====#
;#####################
#If vOnekeyRun
!F10::
WinGet, NewPID1, PID, ahk_exe TheDivision2.exe
if NewPID1
Process,close,%NewPID1%
Sleep 3000
; WinGet, NewPID2, PID, ahk_exe EasyAntiCheat.exe
; if NewPID2
; Process,close,%NewPID2%
; Sleep 3000
WinGet, NewPID3, PID, ahk_exe upc.exe
if NewPID3
Process,close,%NewPID3%
Sleep 1000
return
#If vOnekeyRun
^F10::
WinGet, NewPID, PID, ahk_exe TheDivision2.exe
if not NewPID
{Run,uplay://launch/4932/0
if vTtsSpeak
Speak("叛变特工已上线")
if(vCloseEAC or vSetUPC)
{
vStartTime:=A_Now
SetTimer,timeCS,1000
}
}
else if (vCloseEAC or vSetUPC)
{
CloseAndSet()
}
return
timeCS:
vEndTime:=A_Now
EnvSub, vEndTime, vStartTime, Minutes
; ShowToolTip(vEndTime)
if(vEndTime>=4)
{
CloseAndSet()
SetTimer,timeCS,Delete
}
return
CloseAndSet(){
cmdInfo := cmdClipReturn("taskkill /f /im EasyAntiCheat.exe /t")
; cmdInfo := cmdClipReturn("taskkill /f /im notepad++.exe /t")
; msgbox % SubStr(cmdInfo,1,2)
if cmdInfo and vCloseEAC and vTtsSpeak
{
Speak(SubStr(cmdInfo,1,2)="成功" ? "已经关闭小蓝熊":"未能关闭小蓝熊")
}
if vSetUPC and WinExist("ahk_exe upc.exe")
{
WinGet, NewPID, PID, ahk_exe upc.exe
Process, Priority, %NewPID%, Low
;Process, Priority,"upc.exe",Low
Sleep 3000
if vTtsSpeak
Speak(ErrorLevel ? "成功设置UPC优先级为低":"UPC优先级设置失败")
}
}
cmdClipReturn(command){
cmdInfo:=""
Clip_Saved:=ClipboardAll
try{
Clipboard:=""
Run,% ComSpec " /C " command " | CLIP", , Hide
ClipWait,2
cmdInfo:=Clipboard
}catch{}
Clipboard:=Clip_Saved
return cmdInfo
}
; 打开或关闭 5 政令,默认是 Alt+1
#If (WinActive("ahk_exe TheDivision2.exe") or debug) AND vOneKeyZL
!1::
; vDelay:=80
sleep 250
SendKey("m")
; Sleep vDelay
SendKey("z")
; Sleep vDelay
SendKey("Down")
; Sleep vDelay
SendKey("Space")
; Sleep vDelay
loop, 4
{
SendKey("Space")
; Sleep vDelay
SendKey("Down")
; Sleep vDelay
}
SendKey("Space")
; Sleep vDelay
SendKey("Esc")
; Sleep vDelay
;根据选项决定是否重置控制点
if (vResetArea = 1)
{
SendKey("Down")
; Sleep vDelay
SendKey("Space")
; Sleep vDelay
}
SendKey("f")
Sleep 300
SendKey("Space",200)
Sleep 300
SendKey("m")
return
; 启动自动打开服装箱,默认是 Alt+2
#If (WinActive("ahk_exe TheDivision2.exe") or debug) AND vAutoBox
!2::
skinBoxEnable := !skinBoxEnable
if(skinBoxEnable)
{
if vTtsSpeak
Speak("启动自动打开服装箱")
SetTimer, openBOX, 15000
Gosub, openBOX
}
else{
SetTimer, openBOX, off
SendKey("x")
btt(,,,3)
if vTtsSpeak
Speak("已停止打开服装箱")
}
return
openBOX:
;发现黄色标题-删除特工
Text :="|<删除特工>*101$130.0000000000000000000000000000000000k0U000000000yDU47s1k03020000000003Az0ElUBU1A080000000008m4F321X04k1k000000000X8H4AMA60n3zy3zzzk0002AVAEl3UA3A08000k000008m4l3Aw0QDw0U003000000X8H4Ar00sn02000A000002AVAEm3zy2A0Q000k000008m4l380Q08lzzk03000000X8n4Ak0U1X00800A00000DzzwEn0206A00U00k00000Tzyl360800o02003000000X8H4AM1k03rzy00A000002AVAEkjzz0Czzw00k000008m4l320803k02003000000X8H4A80U0T00800A000002BVAElV2A7A70U00k000008q4l3iA8M0kC2003000000XMH4DkUVU30Q800A000006BV0Ek6230A0kU00k00000Mo4130k8A0k02003000001XEEAA30UM300800C000004D3AkkM21UA1VUTzzzk000Hwwz303s00k7y000000000000080300200000000000000000000000000000000000000000000000000008"
if (ok:=FindText(X, Y,, , , , 0, 0, Text))
{
SendKey("Esc")
sleep 1500
}
btt("删除特工检测1完成",800,500,3,"Style8")
;发现白色标题-删除特工
Text :="|<删除特工>*91$81.zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzjvzzzzzzzzVwzpzTzU1zzyysD/wi0D00zz+GrNnbYzTztzzvLGvMyQ3vzzDzzOuLOC1hk1ztzzvLGuQ0xiCTzDzzOuLHyzBznztzzv02vDrzXUDzDzy00LN03wU3ztzzvHGvcbyDyTzDzzOuLRyrZtnztzzvLGtBqTjaTzDzzOuL3Cvxynzs0zvLSvvrDjyS00TyMvrSyxxw7zzzzn6Svy7zjtzzzzyUW7Tzzzzzzzzzyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzw"
if (ok:=FindText(X, Y,, , , , 0, 0, Text))
{
SetTimer, openBOX, off
skinBoxEnable := !skinBoxEnable
btt(,,,3)
MsgBox, 0, 警告, 发现删除特工按钮停止运行
if vTtsSpeak
Speak("已停止打开服装箱")
Gosub,ReloadScript
}
btt("删除特工检测2完成",800,500,3,"Style8")
Text :="|<开启贮藏箱>*93$110.zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzszzzzzzzzzzzzzzzzzz00Tzzzzzzzzzzzzzzzwy3ztzzzzzzzzzzzzzzTryDTz1zzzzzzzzzzzrxzU07bDjzzzzzzzzzxzTnzwtm1yNxzzzzzzrTrwzziIA1k07yzzzzw01z0Dvh3zTrk7bxzzzxy1nk0vEzqzz7k6TzzzTbwzzyozzg00trU7zzbtzDzzhDztTkDwrbzzvyTm01vHzy63TwzxzzwzbxDzCozzx9rsD0TzyTtzHzvdDzzERD0bnzzDyTozyuTzy41HwtyzzrzjtDzjXzzhSJyC1Dzzzvys0nmTzvE4TVb3zzzzzzz0to1ypbDl9yzzzzzzzzyzy1d/mNO7jzzzzzzzzzzzqs8irU3zzzzzzzzzzzzDsfxvwzzzzzzzzzzzzzyMzSTDzzzzzzzzzzzzzzzrU3zzzzzzzzzzzzzzzzztzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzs"
if (ok:=FindText(X, Y,, , , , 0, 0, Text))
{
btt("开启箱子",800,500,3,"Style8")
SendKey("x", 2500)
Sleep 4500
SendKey("Space")
btt("接受箱子",800,500,3,"Style8")
Sleep 2000
SendKey("x")
}
else{
SendKey("Space")
Sleep 2000
SendKey("x")
}
; Text:="|<揭露物品>*192$123.zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzXzzzzzzzzzzzzzzzzzs00Dzzzzzzzzzzzzjtzzy07tzzzzzzzzzzzzxzDzzXzzjzzzzzzzzzkTzjtzzwzzxzzzzzzzs003zRzDzzbzzjzzzzsTw00zznjk07wzzxzzzk01zzwTzyRy00TbzzDztw1zDzy007njkAnwzztzzDbzty007yS04taTbzkDztwzzDkzrznk1bAnw003zzDby1wzySCyRtvaTk3zzztw00Db1n1brjCQnzzzzzy1UTtwkCzzwxnnCTzzzzz0AzzDzzr0zbiytnzzw0TzDbztzkDzzwxzbCS07Dtztws0Dzzz0DDjxvnUwnzDzDU07zkDk1zxzCSQzaTtztz7zzs0wTDzcnnnjwnzTzBtzzyDa3nzwCSSRzaTvzsCDUDnwqCTz3bbnjwnzTz1k00yTbs7zktwyRzaTvzsQ0TblszVzsCDDnjwnzTz77nwy0Ds1w9nvyxzaTvzllyzbwDwD3bjyTbjwnzTwADXwztw7VzxzbwxzaTnz9Vs7bz0w0Dzjtzbjwk0zzhCAQyM77sztyTww0D0zzxtXlbnDtzbzjbzDU3zzzzjAzwyNzDwzxts1zzzzzzxsjXbnDtzbzDT0TzzzzzzjU0QyNXDxztzzzzzzzzzxy1zjn0s0Dzzzzzzzzzzzjzzty0TU7zzzzzzzzzzzxzz0DUTzzzzzzzzzzzzzsDzw3zzzzzzzzzzzzzzzz1zzzzzzzzzzzzzzzzzzzwTzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzU"
; if (ok:=FindText(X, Y,, , , , 0, 0, Text))
; {
; btt("接受箱子",500,500,3,"Style9")
; SendKey("Space")
; Sleep 1500
; SendKey("x")
; }
return
#If (WinActive("ahk_exe TheDivision2.exe") or debug) and vAutoLiu AND vLiuMode=1
!q::
XButton1::
; SetKeyDelay, 0, 30, Play
SendKey("q")
sleep 30
SendKey("q",30,"down")
loop,15{
Random, keydelay, 10, 50
SendKey("5",keydelay)
; sleep keydelay
}
sleep 1500
SendKey("q",30,"up")
return
#If (WinActive("ahk_exe TheDivision2.exe") or debug) and vAutoLiu AND vLiuMode=2
!q::
~XButton1::
Sleep 200
gxliuAction()
return
gxliuAction()
{
; SetKeyDelay, 0, 40, Play
; Random, vdelay, 80, 120
SendKey("b")
; Sleep vdelay
SendKey("Down")
; Sleep vdelay
SendKey("Down")
; Sleep vdelay
SendKey("Space")
; Sleep vdelay
Random, vdelay, 100, 200
SendKey("Down")
Sleep vdelay
SendKey("Space")
Sleep vdelay
SendKey("UP")
Sleep vdelay
SendKey("Space")
Sleep vdelay
; Random, vdelay, 80, 120
SendKey("Esc")
; Sleep vdelay
SendKey("UP")
SendKey("Space")
SendKey("Space") ;切换到主武器
SendKey("Esc")
SendKey("b")
; Sleep vdelay
Return
}
#InputLevel 1
#If (WinActive("ahk_exe TheDivision2.exe") or debug) and vAutoLiu AND vLiuMode=2 and vAutoGxLiu
~q::
~e::
~5::
~6::
~LButton::
if (A_ThisHotkey = "~LButton" and A_PriorHotkey = "~Q" and A_TimeSincePriorHotkey <= 1500 ;Q然后左键释放
or A_ThisHotkey="~Q" and A_PriorHotkey = "~Q" and A_TimeSincePriorHotkey <= 600 ;双击Q释放
or A_ThisHotkey="~Q" and A_TimeSinceThisHotkey >= 400 ;长按Q释放
or A_ThisHotkey="~5" ) ;立即使用特工技能1
{
Sleep 800
gxliuAction()
}
else if (A_ThisHotkey = "~LButton" and A_PriorHotkey = "~E" and A_TimeSincePriorHotkey <= 1500 ;E然后左键释放
or A_ThisHotkey="~E" and A_PriorHotkey = "~E" and A_TimeSincePriorHotkey <= 600 ;双击E释放
or A_ThisHotkey="~E" and A_TimeSinceThisHotkey >= 400
or A_ThisHotkey="~6" ) ;立即使用特工技能2
{
Sleep 400
gxliuAction()
}
return
#InputLevel 0
#If (WinActive("ahk_exe TheDivision2.exe") or debug)
~F2::
if (winc_presses > 0) ; SetTimer 已经启动, 所以我们记录键击.
{
winc_presses += 1
return
}
; 否则, 这是新开始系列中的首次按下. 把次数设为 1 并启动
; 计时器:
winc_presses := 1
SetTimer, KeyWinD, -800 ; 在 800 毫秒内等待更多的键击.
return
KeyWinD:
if (winc_presses = 1) ; 此键按下了一次.
{
gosub,ShowBTT ;单击则切换显示信息
}
else if (winc_presses = 2) ; 此键按下了两次.
{
if (vInfoMethod=2)
vInfoMethod=1
else if (vInfoMethod=1)
vInfoMethod=2 ;双击则切换显示模式
}
else if (winc_presses > 2)
{
vTtsSpeak=1 ;三击切换TTS语音播报
}
; 不论触发了上面的哪个动作, 都对 count 进行重置
; 为下一个系列的按下做准备:
winc_presses := 0
return
~F4::
if (winc_presses > 0) ; SetTimer 已经启动, 所以我们记录键击.
{
winc_presses += 1
return
}
; 否则, 这是新开始系列中的首次按下. 把次数设为 1 并启动
; 计时器:
winc_presses := 1
SetTimer, KeyWinA, -800 ; 在 800 毫秒内等待更多的键击.
return
KeyWinA:
if (winc_presses = 1) ; 此键按下了一次.
{
MenuHandler("自动连射|F4开关") ;单击则切换自动连射功能
}
else if (winc_presses = 2) ; 此键按下了两次.
{
vShootMode=vShootMode=1?2:1
MenuHandler("连射模式") ;双击则切换连射模式
}
else if (winc_presses > 2)
{
MenuHandler("发现敌人自动射击") ;三击切换发现敌人自动射击
}
; 不论触发了上面的哪个动作, 都对 count 进行重置
; 为下一个系列的按下做准备:
winc_presses := 0
return
~F5::
if (winc_presses > 0) ; SetTimer 已经启动, 所以我们记录键击.
{
winc_presses += 1
return
}
; 否则, 这是新开始系列中的首次按下. 把次数设为 1 并启动
; 计时器:
winc_presses := 1
SetTimer, KeyWinB, -800 ; 在 800 毫秒内等待更多的键击.
return
KeyWinB:
if (winc_presses = 1) ; 此键按下了一次.
{
MenuHandler("无限溜溜球|F5开关") ;单击则切换自动溜溜球功能
}
else if (winc_presses = 2) ; 此键按下了两次.
{
vLiuMode=vLiuMode=1?2:1
MenuHandler("溜溜球模式") ;双击则切换溜溜球模式
}
else if (winc_presses > 2)
{
MenuHandler("固线自动重置") ;三击切换发现敌人自动射击
}
; 不论触发了上面的哪个动作, 都对 count 进行重置
; 为下一个系列的按下做准备:
winc_presses := 0
return
~F6::
if (winc_presses > 0) ; SetTimer 已经启动, 所以我们记录键击.
{
winc_presses += 1
return
}
; 否则, 这是新开始系列中的首次按下. 把次数设为 1 并启动
; 计时器:
winc_presses := 1
SetTimer, KeyWinC, -800 ; 在 800 毫秒内等待更多的键击.
return
KeyWinC:
if (winc_presses = 1) ; 此键按下了一次.
{
MenuHandler("瞬发狙击塔|F6开关") ;单击则切换狙击塔功能
}
else if (winc_presses = 2) ; 此键按下了两次.
{
MenuHandler("狙击塔间隔射击") ;双击则切换狙击塔间隔射击
}
; else if (winc_presses > 2)
; {
; ; gosub,AutoGxLiu ;三击切换发现敌人自动射击
; }
; ; 不论触发了上面的哪个动作, 都对 count 进行重置
; ; 为下一个系列的按下做准备:
winc_presses := 0
return
~F1::Suspend, Toggle
#If
#If (WinActive("ahk_exe TheDivision2.exe") or debug) and vAutoJuTa
!e up::
XButton1 Up::
loopJuTaEnable := !loopJuTaEnable
if(loopJuTaEnable)
{
if vTtsSpeak
Speak("狙击塔 battle control online")
SetTimer, loopJuTa, 4000
gosub loopJuTa
}
else{
SetTimer, loopJuTa, off
if vTtsSpeak
Speak("狙击塔已下线")
}
return
loopJuTa:
; Random, vRanDelay, 50, 180
; sleep vRanDelay6
if vJuTaAndShoot
{
SendKey("LButton",20,2)
; SendKey("Click")
sleep 600
}
else{
sleep 1000
}
SendKey("6",500)
sleep 600
loop 5{
sleep 120
SendKey("e")
}
sleep 600
SendKey("6",500)
sleep 200
return
; #IfWinActive ahk_exe TheDivision2.exe
; 切换速率,默认是鼠标侧键
#If (WinActive("ahk_exe TheDivision2.exe") or debug) AND vShootMode=1 and _autofire
~\::
speedIndex += 1
if (speedIndex > speedArray.Length()) {
speedIndex := 0
}
if vTtsSpeak
Speak(speedIndex > 0 ? "连击间隔 " speedArray[speedIndex] : "已关闭连击")
IniWrite, %speedIndex%, TheDivision2.ini, 简单模式, 单发间隔
return
~^\::
speedIndex -= 1
if (speedIndex <0) {
speedIndex := speedArray.Length()
}
if vTtsSpeak
Speak(speedIndex > 0 ? "连击间隔 " speedArray[speedIndex] : "已关闭连击")
IniWrite, %speedIndex%, TheDivision2.ini, 简单模式, 单发间隔
return
#If
#If (WinActive("ahk_exe TheDivision2.exe") or debug) AND vShootMode=2 and _autofire
~1::
_chooseGun :=1
readWeapon(_chooseGun)
return
~2::
_chooseGun :=2
readWeapon(_chooseGun)
return
~3::
_chooseGun :=3
readWeapon(_chooseGun)
return
readWeapon(_chooseGun)
{
IniRead , _downVal, TheDivision2.ini, 高级模式, 垂直偏移%_chooseGun%, 2
IniRead , _RightVal, TheDivision2.ini, 高级模式, 水平偏移%_chooseGun%, 0
IniRead , _shotdelay, TheDivision2.ini, 高级模式, 单发间隔%_chooseGun%, 0
IniRead , _weaponText, TheDivision2.ini, 高级模式, 武器名%_chooseGun%, 武器%_chooseGun%
IniRead , _weaponTextFix, TheDivision2.ini, 高级模式, 武器名修饰后缀, 已上线
}
~=::
_downVal := _downVal + 1
if vTtsSpeak
Speak("垂直偏移补偿为" _downVal)
IniWrite, % _downVal, TheDivision2.ini, 高级模式, 垂直偏移%_chooseGun%
return
~-::
if _downVal > 0
{
_downVal := _downVal - 1
if vTtsSpeak
Speak("垂直偏移补偿为" _downVal)
IniWrite , % _downVal, TheDivision2.ini, 高级模式, 垂直偏移%_chooseGun%
}
return
~^=:: ; Adds right adjust
_RightVal := _RightVal + 1
; 右为正值,左为负值
if vTtsSpeak
Speak("水平偏移补偿为" _RightVal)
IniWrite, % _RightVal, TheDivision2.ini, 高级模式, 水平偏移%_chooseGun%
return
~^-:: ; 增加水平偏移
_RightVal := _RightVal - 1
; 右为正值,左为负值
if vTtsSpeak
Speak("水平偏移补偿为" _RightVal)
IniWrite, % _RightVal, TheDivision2.ini, 高级模式, 水平偏移%_chooseGun%
return
~\:: ;单发延迟 (0为连射)
_shotdelay := _shotdelay + 25
if vTtsSpeak
Speak("单发射击延迟为" _shotdelay)
IniWrite, % _shotdelay, TheDivision2.ini, 高级模式, 单发间隔%_chooseGun%
return
~^\::
if _shotdelay > 0
{
_shotdelay := _shotdelay - 25
if _shotdelay<0
_shotdelay:=0
if vTtsSpeak
Speak("单发射击延迟为" _shotdelay)
IniWrite, % _shotdelay, TheDivision2.ini, 高级模式, 单发间隔%_chooseGun%
}
return
; 按住鼠标右键再按左键连击,其他情况不连击
#If speedIndex > 0 AND _autofire AND vShootMode=1 and (WinActive("ahk_exe TheDivision2.exe") or debug)
~RButton & LButton::fastFire()
return
#If (WinActive("ahk_exe TheDivision2.exe") or debug) AND vShootMode=2 and _autofire
LButton::lessrecoil()
#If
lessrecoil()
{
while GetKeyState("LButton", "P")
{
ApplyReduction()
}
return
}
#If (WinActive("ahk_exe TheDivision2.exe") or debug) AND vShootMode=2 and _autofire and not vAutoShoot
~RButton & LButton:: lessrecoil_noCheck()
lessrecoil_noCheck()
{
while GetKeyState("LButton", "P") and GetKeyState("RButton", "P")
{
TryToFire()
ApplyReduction()
}
loop,4{
Sleep 120
sendkey("j",25,"up")
}
_timerRunning = 0
_Readytofire = 1
return
}
#If