-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathAzurLane.ahk
4669 lines (4550 loc) · 145 KB
/
AzurLane.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
/* Free to use, Free for life.
Made by panex0845
*/
;@Ahk2Exe-SetName AzurLane Helper
;@Ahk2Exe-SetDescription AzurLane Helper
;@Ahk2Exe-SetVersion 1.0.0.1
;@Ahk2Exe-SetMainIcon img\01.ico
if not A_IsAdmin { ;強制用管理員開啟
Run *RunAs "%A_ScriptFullPath%"
Exitapp
}
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent
#SingleInstance, force
Coordmode, pixel, window
Coordmode, mouse, window
DetectHiddenWindows, On
DetectHiddenText, On
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_WorkingDir% ; Ensures a consistent starting directory.
SetControlDelay, -1
SetBatchLines, 1000ms
SetTitleMatchMode, 3
Menu, Tray, NoStandard
Menu, tray, add, &顯示介面, Showsub
Menu, tray, add, ,
Menu, Tray, Default, &顯示介面
Menu, tray, add, 結束, Exitsub
Menu, Tray, Icon , img\01.ico,,, 1
Gui, font, s11 Q0, 新細明體
RegRead, ldplayer, HKEY_CURRENT_USER, Software\Changzhi\dnplayer-tw, InstallDir
if (ldplayer="") {
Msgbox, 未偵測到雷電模擬器已被安裝,請嘗試重新安裝。
Exitapp
}
Global ldplayer
Gui Add, Text, x15 y20 w100 h20 , 模擬器標題:
IniRead, title, settings.ini, emulator, title,
if (title="") or (title="ERROR") {
InputBox, title, 設定精靈, `n`n 請輸入模擬器標題,, 400, 200,,,,, 雷電模擬器
if ErrorLevel {
Exitapp
}
else if (title="") {
Msgbox, 16, 設定精靈, 未輸入任何資訊。
reload
}
else {
InputBox, emulatoradb, 設定精靈, `n`n 請輸入模擬器編號,, 400, 200,,,,, 0
if (emulatoradb>15 or emulatoradb<0) {
msgbox, 請輸入介於0-15的數字
exitapp
}
else {
Iniwrite, %emulatoradb%, settings.ini, emulator, emulatoradb
Iniwrite, %title%, settings.ini, emulator, title
reload
}
}
}
Run, %comspec% /c powercfg /change /monitor-timeout-ac 0,, Hide ;關閉螢幕省電模式
iniread, SetGuiBGcolor, settings.ini, OtherSub, SetGuiBGcolor, 0
IniRead, SetGuiBGcolor2, settings.ini, OtherSub, SetGuiBGcolor2, FFCCCC
if (SetGuiBGcolor)
{
Gui, Color, %SetGuiBGcolor2%
}
Gui Add, Edit, x110 y17 w100 h21 vtitle ginisettings , %title%
Gui Add, Text, x220 y20 w80 h20 , 代號:
IniRead, emulatoradb, settings.ini, emulator, emulatoradb, 0
Gui, Add, DropDownList, x270 y15 w40 h300 vemulatoradb ginisettings Choose%emulatoradb%, 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|0||
GuicontrolGet, emulatoradb
Gui Add, Text, x330 y20 w80 h20 , 容許誤差:
IniRead, AllowanceValue, settings.ini, emulator, AllowanceValue, 2000
Gui Add, Edit, x410 y17 w50 h21 vAllowanceValue ginisettings readonly Number Limit4, %AllowanceValue%
Gui, Add, Button, x20 y470 w100 h20 gstart vstart , 開始
Gui, Add, Button, x140 y470 w100 h20 greload vreload, 停止
Gui, Add, Button, x260 y470 w100 h20 gReAnchorSub vReAnchorSub, 再次出擊
Gui, Add, Button, x480 y470 w100 h20 gReSizeWindowSub vReSizeWindowSub, 調整視窗
Gui, Add, button, x780 y470 w100 h20 gexitsub, 結束
Gui, Add, text, x480 y20 w400 h20 vstarttext,
Gui, Add, text, x480 y50 w150 h20 vAnchorTimesText, 出擊次數:0 次
;~ Gui, Add, text, x650 y50 w150 h20 vAnchorFailedText, 旗艦大破:0 次
Gui, Add, ListBox, x480 y74 w400 h393 ReadOnly vListBoxLog
;~ Gui, Add, Picture, x480 y450 0x4000000 ,img\WH.png
Gui,Add,Tab, x10 y50 w460 h405 gTabFunc, 出 擊|出擊2|學 院|後 宅|任 務|其 他|
;/////////////////// GUI Right Side Start ///////////////////
Gui, Tab, 出 擊
Tab1_Y := 90
iniread, AnchorSub, settings.ini, Battle, AnchorSub
Gui, Add, CheckBox, x30 y%Tab1_Y% w150 h20 gAnchorsettings vAnchorSub checked%AnchorSub% +c4400FF, 啟動自動出擊
Tab1_Y += 30
Gui, Add, text, x30 y%Tab1_Y% w80 h20 , 選擇地圖:
Tab1_Y -= 5
iniread, AnchorMode, settings.ini, Battle, AnchorMode, 普通
if AnchorMode=普通
Gui, Add, DropDownList, x110 y%Tab1_Y% w60 h100 vAnchorMode gAnchorsettings, 普通||困難|
else if AnchorMode=困難
Gui, Add, DropDownList, x110 y%Tab1_Y% w60 h100 vAnchorMode gAnchorsettings, 普通|困難||
iniread, AnchorChapter, settings.ini, Battle, AnchorChapter
iniread, AnchorChapter2, settings.ini, Battle, AnchorChapter2
Tab1_Y += 5
Gui, Add, text, x180 y%Tab1_Y% w20 h20 , 第
Tab1_Y -= 5
if AnchorChapter=紅染1
Gui, Add, DropDownList, x200 y%Tab1_Y% w60 h300 vAnchorChapter gAnchorsettings Choose%AnchorChapter%, 1|2|3|4|5|6|7|紅染1||紅染2|S.P.|
else if AnchorChapter=紅染2
Gui, Add, DropDownList, x200 y%Tab1_Y% w60 h300 vAnchorChapter gAnchorsettings Choose%AnchorChapter%, 1|2|3|4|5|6|7|紅染1|紅染2||S.P.|
else if AnchorChapter=S.P.
Gui, Add, DropDownList, x200 y%Tab1_Y% w60 h300 vAnchorChapter gAnchorsettings Choose%AnchorChapter%, 1|2|3|4|5|6|7|紅染1|紅染2|S.P.||
else
Gui, Add, DropDownList, x200 y%Tab1_Y% w60 h300 vAnchorChapter gAnchorsettings Choose%AnchorChapter%, 1||2|3|4|5|6|7|紅染1|紅染2|S.P.|
Tab1_Y += 5
Gui, Add, text, x270 y%Tab1_Y% w40 h20 , 章 第
Gui, Add, DropDownList, x310 y115 w40 h100 vAnchorChapter2 gAnchorsettings Choose%AnchorChapter2% , 1||2|3|4|
Gui, Add, text, x360 y%Tab1_Y% w20 h20 , 節
Tab1_Y += 35
Gui, Add, text, x30 y%Tab1_Y% w80 h20 , 出擊艦隊:
Tab1_Y -= 5
iniread, ChooseParty1, settings.ini, Battle, ChooseParty1, 第一艦隊
if ChooseParty1=第一艦隊
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vChooseParty1 gAnchorsettings, 第一艦隊||第二艦隊|第三艦隊|第四艦隊|第五艦隊|第六艦隊|
else if ChooseParty1=第二艦隊
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vChooseParty1 gAnchorsettings, 第一艦隊|第二艦隊||第三艦隊|第四艦隊|第五艦隊|第六艦隊|
else if ChooseParty1=第三艦隊
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vChooseParty1 gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊||第四艦隊|第五艦隊|第六艦隊|
else if ChooseParty1=第四艦隊
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vChooseParty1 gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊|第四艦隊||第五艦隊|第六艦隊|
else if ChooseParty1=第五艦隊
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vChooseParty1 gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊|第四艦隊|第五艦隊||第六艦隊|
else if ChooseParty1=第六艦隊
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vChooseParty1 gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊|第四艦隊|第五艦隊|第六艦隊||
Tab1_Y += 5
Gui, Add, text, x210 y%Tab1_Y% w15 h20 , 、
Tab1_Y -= 5
iniread, ChooseParty2, settings.ini, Battle, ChooseParty2, 不使用
if ChooseParty2=不使用
Gui, Add, DropDownList, x230 y%Tab1_Y% w90 h150 vChooseParty2 gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊|第四艦隊|第五艦隊|第六艦隊|不使用||
else if ChooseParty2=第一艦隊
Gui, Add, DropDownList, x230 y%Tab1_Y% w90 h150 vChooseParty2 gAnchorsettings, 第一艦隊||第二艦隊|第三艦隊|第四艦隊|第五艦隊|第六艦隊|不使用|
else if ChooseParty2=第二艦隊
Gui, Add, DropDownList, x230 y%Tab1_Y% w90 h150 vChooseParty2 gAnchorsettings, 第一艦隊|第二艦隊||第三艦隊|第四艦隊|第五艦隊|第六艦隊|不使用|
else if ChooseParty2=第三艦隊
Gui, Add, DropDownList, x230 y%Tab1_Y% w90 h150 vChooseParty2 gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊||第四艦隊|第五艦隊|第六艦隊|不使用|
else if ChooseParty2=第四艦隊
Gui, Add, DropDownList, x230 y%Tab1_Y% w90 h150 vChooseParty2 gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊|第四艦隊||第五艦隊|第六艦隊|不使用|
else if ChooseParty2=第五艦隊
Gui, Add, DropDownList, x230 y%Tab1_Y% w90 h150 vChooseParty2 gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊|第四艦隊|第五艦隊||第六艦隊|不使用|
else if ChooseParty2=第六艦隊
Gui, Add, DropDownList, x230 y%Tab1_Y% w90 h150 vChooseParty2 gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊|第四艦隊|第五艦隊|第六艦隊||不使用|
Tab1_Y += 32
iniread, SwitchPartyAtFirstTime, settings.ini, Battle, SwitchPartyAtFirstTime
Gui, Add, CheckBox, x110 y%Tab1_Y% w190 h20 gAnchorsettings vSwitchPartyAtFirstTime checked%SwitchPartyAtFirstTime% , 進入地圖時交換隊伍順序
iniread, WeekMode, settings.ini, Battle, WeekMode
Gui, Add, CheckBox, x310 y%Tab1_Y% w80 h20 gAnchorsettings vWeekMode checked%WeekMode% , 周回模式
Tab1_Y += 33
Gui, Add, text, x30 y%Tab1_Y% w80 h20 , 偵查目標:
Tab1_Y -= 3 ; Y = 207
iniread, Ship_Target1, settings.ini, Battle, Ship_Target1, 1
iniread, Ship_Target2, settings.ini, Battle, Ship_Target2, 1
iniread, Ship_Target3, settings.ini, Battle, Ship_Target3, 1
iniread, Ship_Target4, settings.ini, Battle, Ship_Target4, 1
iniread, Item_Bullet, settings.ini, Battle, Item_Bullet, 1
iniread, Item_Quest, settings.ini, Battle, Item_Quest, 1
iniread, Plane_Target1, settings.ini, Battle, Plane_Target1, 0
Gui, Add, CheckBox, x110 y%Tab1_Y% w80 h20 gAnchorsettings vShip_Target1 checked%Ship_Target1% , 航空艦隊
Gui, Add, CheckBox, x195 y%Tab1_Y% w80 h20 gAnchorsettings vShip_Target2 checked%Ship_Target2% , 運輸艦隊
Gui, Add, CheckBox, x280 y%Tab1_Y% w80 h20 gAnchorsettings vShip_Target3 checked%Ship_Target3% , 主力艦隊
Gui, Add, CheckBox, x365 y%Tab1_Y% w80 h20 gAnchorsettings vShip_Target4 checked%Ship_Target4% , 偵查艦隊
Tab1_Y += 25
Gui, Add, CheckBox, x110 y%Tab1_Y% w80 h20 gAnchorsettings vItem_Bullet checked%Item_Bullet% , 子彈補給
Gui, Add, CheckBox, x195 y%Tab1_Y% w80 h20 gAnchorsettings vItem_Quest checked%Item_Quest% , 神秘物資
Gui, Add, CheckBox, x280 y%Tab1_Y% w80 h20 gAnchorsettings vPlane_Target1 checked%Plane_Target1% , 航空器
Tab1_Y += 33
Gui, Add, text, x30 y%Tab1_Y% w80 h20 , 受到伏擊:
iniread, Assault, settings.ini, Battle, Assault, 規避
Tab1_Y -= 5
if Assault=規避
Gui, Add, DropDownList, x110 y%Tab1_Y% w60 h100 vAssault gAnchorsettings, 規避||迎擊|
else if Assault=迎擊
Gui, Add, DropDownList, x110 y%Tab1_Y% w60 h100 vAssault gAnchorsettings, 規避|迎擊||
Tab1_Y += 5
Gui, Add, text, x185 y%Tab1_Y% w80 h20 , 自律模式:
Tab1_Y -= 5
iniread, Autobattle, settings.ini, Battle, Autobattle, 自動
if Autobattle=自動
Gui, Add, DropDownList, x265 y%Tab1_Y% w80 h100 vAutobattle gAnchorsettings, 自動||半自動|關閉|
else if Autobattle=半自動
Gui, Add, DropDownList, x265 y%Tab1_Y% w80 h100 vAutobattle gAnchorsettings, 自動|半自動||關閉|
else if Autobattle=關閉
Gui, Add, DropDownList, x265 y%Tab1_Y% w80 h100 vAutobattle gAnchorsettings, 自動|半自動|關閉||
Tab1_Y += 35
Gui, Add, text, x30 y%Tab1_Y% w80 h20 , 遇到BOSS:
Tab1_Y -= 5
iniread, BossAction, settings.ini, Battle, BossAction, 隨緣攻擊-當前隊伍
if BossAction=隨緣攻擊-當前隊伍
Gui, Add, DropDownList, x110 y%Tab1_Y% w150 h150 vBossAction gAnchorsettings, 隨緣攻擊-當前隊伍||隨緣攻擊-切換隊伍|優先攻擊-當前隊伍|優先攻擊-切換隊伍|能不攻擊就不攻擊|撤退|
else if BossAction=隨緣攻擊-切換隊伍
Gui, Add, DropDownList, x110 y%Tab1_Y% w150 h150 vBossAction gAnchorsettings, 隨緣攻擊-當前隊伍|隨緣攻擊-切換隊伍||優先攻擊-當前隊伍|優先攻擊-切換隊伍|能不攻擊就不攻擊|撤退|
else if BossAction=優先攻擊-當前隊伍
Gui, Add, DropDownList, x110 y%Tab1_Y% w150 h150 vBossAction gAnchorsettings, 隨緣攻擊-當前隊伍|隨緣攻擊-切換隊伍|優先攻擊-當前隊伍||優先攻擊-切換隊伍|能不攻擊就不攻擊|撤退|
else if BossAction=優先攻擊-切換隊伍
Gui, Add, DropDownList, x110 y%Tab1_Y% w150 h150 vBossAction gAnchorsettings, 隨緣攻擊-當前隊伍|隨緣攻擊-切換隊伍|優先攻擊-當前隊伍|優先攻擊-切換隊伍||能不攻擊就不攻擊|撤退|
else if BossAction=能不攻擊就不攻擊
Gui, Add, DropDownList, x110 y%Tab1_Y% w150 h150 vBossAction gAnchorsettings, 隨緣攻擊-當前隊伍|隨緣攻擊-切換隊伍|優先攻擊-當前隊伍|優先攻擊-切換隊伍|能不攻擊就不攻擊||撤退|
else if BossAction=撤退
Gui, Add, DropDownList, x110 y%Tab1_Y% w150 h150 vBossAction gAnchorsettings, 隨緣攻擊-當前隊伍|隨緣攻擊-切換隊伍|優先攻擊-當前隊伍|優先攻擊-切換隊伍|能不攻擊就不攻擊|撤退||
Tab1_Y += 35
Gui, Add, text, x30 y%Tab1_Y% w140 h20 , 心情低落:
Tab1_Y -= 5
iniread, mood, settings.ini, Battle, mood, 強制出戰
if mood=強制出戰
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vmood gAnchorsettings, 強制出戰||更換隊伍|休息1小時|休息2小時|休息3小時|休息5小時|
else if mood=更換隊伍
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vmood gAnchorsettings, 強制出戰|更換隊伍||休息1小時|休息2小時|休息3小時|休息5小時|
else if mood=休息1小時
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vmood gAnchorsettings, 強制出戰|更換隊伍|休息1小時||休息2小時|休息3小時|休息5小時|
else if mood=休息2小時
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vmood gAnchorsettings, 強制出戰|更換隊伍|休息1小時|休息2小時||休息3小時|休息5小時|
else if mood=休息3小時
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vmood gAnchorsettings, 強制出戰|更換隊伍|休息1小時|休息2小時|休息3小時||休息5小時|
else if mood=休息5小時
Gui, Add, DropDownList, x110 y%Tab1_Y% w90 h150 vmood gAnchorsettings, 強制出戰|更換隊伍|休息1小時|休息2小時|休息3小時|休息5小時||
Tab1_Y += 35
iniread, Use_FixKit, settings.ini, Battle, Use_FixKit
iniread, AlignCenter, settings.ini, Battle, AlignCenter
Gui, Add, CheckBox, x30 y%Tab1_Y% w120 h20 gAnchorsettings vUse_FixKit checked%Use_FixKit% , 使用維修工具
Gui, Add, CheckBox, x160 y%Tab1_Y% w160 h20 gAnchorsettings vAlignCenter checked%AlignCenter% , 偵查時嘗試置中地圖
Tab1_Y += 28
iniread, BattleTimes, settings.ini, Battle, BattleTimes, 0
Gui, Add, CheckBox, x30 y%Tab1_Y% w50 h20 gAnchorsettings vBattleTimes checked%BattleTimes% , 出擊
IniRead, BattleTimes2, settings.ini, Battle, BattleTimes2, 20
Gui Add, Edit, x82 y%Tab1_Y% w40 h20 vBattleTimes2 gAnchorsettings Number Limit4, %BattleTimes2%
Tab1_Y += 3
Gui Add, Text, x128 y%Tab1_Y% w90 h20 , 輪,強制休息
Tab1_Y -= 3
IniRead, TimetoBattle, settings.ini, Battle, TimetoBattle, 0
Gui, Add, CheckBox, x230 y%Tab1_Y% w30 h20 gAnchorsettings vTimetoBattle checked%TimetoBattle% , 於
IniRead, TimetoBattle1, settings.ini, Battle, TimetoBattle1, 1302
IniRead, TimetoBattle2, settings.ini, Battle, TimetoBattle2, 0102
Gui Add, Edit, x270 y%Tab1_Y% w40 h20 vTimetoBattle1 gAnchorsettings Number Limit4, %TimetoBattle1% ;指定的重新出擊時間 (24小時制)
Gui Add, Edit, x320 y%Tab1_Y% w40 h20 vTimetoBattle2 gAnchorsettings Number Limit4, %TimetoBattle2% ;指定的重新出擊時間(24小時制)
Tab1_Y += 3
Gui Add, Text, x370 y%Tab1_Y% w90 h20 , 時,重新出擊
Tab1_Y += 25
iniread, StopBattleTime, settings.ini, Battle, StopBattleTime, 0
Gui, Add, CheckBox, x30 y%Tab1_Y% w70 h20 vStopBattleTime gAnchorsettings checked%StopBattleTime% , 每出擊
Tab1_Y -= 2
iniread, StopBattleTime2, settings.ini, Battle, StopBattleTime2, 5
Gui, Add, DropDownList, x100 y%Tab1_Y% w40 h300 vStopBattleTime2 gAnchorsettings Choose%StopBattleTime2% , 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|
Tab1_Y += 5
Gui Add, Text, x150 y%Tab1_Y% w90 h20 , 輪,休息
Tab1_Y -= 5
iniread, StopBattleTime3, settings.ini, Battle, StopBattleTime3, 10
Tab1_Y += 3
Gui, Add, Edit, x220 y%Tab1_Y% w40 h20 vStopBattleTime3 gAnchorsettings Number Limit4, %StopBattleTime3%
Tab1_Y += 3
Gui Add, Text, x270 y%Tab1_Y% w90 h20 , 分鐘
;~ Gui, Add, CheckBox, x30 y%Tab1_Y% w60 h20 checked%BattleTimes% , TEST
Gui, Tab, 出擊2
Tab2_Y := 90
;~ Gui, Add, text, x30 y%Tab2_Y% w360 h20 +cFF0088, 本頁為出擊頁面的詳細設定,需勾選自動出擊方有效果
;~ Gui, Add, GroupBox, x13 y120 w455 h170, `
Gui, Add, text, x30 y%Tab2_Y% w150 h20, 船䲧已滿:
Tab2_Y-=3
iniread, Shipsfull, settings.ini, Battle, Shipsfull, 停止出擊
if Shipsfull=整理船䲧
Gui, Add, DropDownList, x110 y%Tab2_Y% w100 h100 vShipsfull gAnchorsettings, 整理船䲧||停止出擊|關閉遊戲|
else if Shipsfull=停止出擊
Gui, Add, DropDownList, x110 y%Tab2_Y% w100 h100 vShipsfull gAnchorsettings, 整理船䲧|停止出擊||關閉遊戲|
else if Shipsfull=關閉遊戲
Gui, Add, DropDownList, x110 y%Tab2_Y% w100 h100 vShipsfull gAnchorsettings, 整理船䲧|停止出擊|關閉遊戲||
else
Gui, Add, DropDownList, x110 y%Tab2_Y% w100 h100 vShipsfull gAnchorsettings, 整理船䲧||停止出擊|關閉遊戲|
Tab2_Y+=3
Gui, Add, text, x220 y%Tab2_Y% w180 h20, 如整理,要退役的角色:
iniread, IndexAll, settings.ini, Battle, IndexAll, 1 ;全部
iniread, Index1, settings.ini, Battle, Index1 ;前排先鋒
iniread, Index2, settings.ini, Battle, Index2 ;後排主力
iniread, Index3, settings.ini, Battle, Index3 ;驅逐
iniread, Index4, settings.ini, Battle, Index4 ;輕巡
iniread, Index5, settings.ini, Battle, Index5 ;重巡
iniread, Index6, settings.ini, Battle, Index6 ;戰列
iniread, Index7, settings.ini, Battle, Index7 ;航母
iniread, Index8, settings.ini, Battle, Index8 ;維修
iniread, Index9, settings.ini, Battle, Index9 ;其他
Tab2_Y+=30
Gui, Add, text, x30 y%Tab2_Y% w50 h20 , 索 引
Tab2_Y-=3
Gui, Add, CheckBox, x80 y%Tab2_Y% w50 h20 gAnchorsettings vIndexAll checked%IndexAll% , 全部
Guicontrol, disable, IndexAll
Gui, Add, CheckBox, x130 y%Tab2_Y% w80 h20 gAnchorsettings vIndex1 checked%Index1% , 前排先鋒
Gui, Add, CheckBox, x210 y%Tab2_Y% w80 h20 gAnchorsettings vIndex2 checked%Index2% , 後排主力
Gui, Add, CheckBox, x290 y%Tab2_Y% w50 h20 gAnchorsettings vIndex3 checked%Index3% , 驅逐
Gui, Add, CheckBox, x340 y%Tab2_Y% w50 h20 gAnchorsettings vIndex4 checked%Index4% , 輕巡
Gui, Add, CheckBox, x390 y%Tab2_Y% w50 h20 gAnchorsettings vIndex5 checked%Index5% , 重巡
Tab2_Y+=30
Gui, Add, CheckBox, x80 y%Tab2_Y% w50 h20 gAnchorsettings vIndex6 checked%Index6% , 戰列
Gui, Add, CheckBox, x130 y%Tab2_Y% w50 h20 gAnchorsettings vIndex7 checked%Index7% , 航母
Gui, Add, CheckBox, x180 y%Tab2_Y% w50 h20 gAnchorsettings vIndex8 checked%Index8% , 維修
Gui, Add, CheckBox, x230 y%Tab2_Y% w50 h20 gAnchorsettings vIndex9 checked%Index9% , 其他
iniread, CampAll, settings.ini, Battle, CampAll, 1 ;全部
iniread, Camp1, settings.ini, Battle, Camp1 ;白鷹
iniread, Camp2, settings.ini, Battle, Camp2 ;皇家
iniread, Camp3, settings.ini, Battle, Camp3 ;重櫻
iniread, Camp4, settings.ini, Battle, Camp4 ;鐵血
iniread, Camp5, settings.ini, Battle, Camp5 ;東煌
iniread, Camp6, settings.ini, Battle, Camp6 ;北方聯合
iniread, Camp7, settings.ini, Battle, Camp7 ;其他
Tab2_Y+=33
Gui, Add, text, x30 y%Tab2_Y% w50 h20 , 陣 營
Tab2_Y-=3
Gui, Add, CheckBox, x80 y%Tab2_Y% w50 h20 gAnchorsettings vCampAll checked%CampAll% , 全部
Guicontrol, disable, CampAll
Gui, Add, CheckBox, x130 y%Tab2_Y% w50 h20 gAnchorsettings vCamp1 checked%Camp1% , 白鷹
Gui, Add, CheckBox, x180 y%Tab2_Y% w50 h20 gAnchorsettings vCamp2 checked%Camp2% , 皇家
Gui, Add, CheckBox, x230 y%Tab2_Y% w50 h20 gAnchorsettings vCamp3 checked%Camp3% , 重櫻
Gui, Add, CheckBox, x280 y%Tab2_Y% w50 h20 gAnchorsettings vCamp4 checked%Camp4% , 鐵血
Gui, Add, CheckBox, x330 y%Tab2_Y% w50 h20 gAnchorsettings vCamp5 checked%Camp5% , 東煌
Tab2_Y+=30
Gui, Add, CheckBox, x80 y%Tab2_Y% w80 h20 gAnchorsettings vCamp6 checked%Camp6% , 北方聯合
Gui, Add, CheckBox, x160 y%Tab2_Y% w50 h20 gAnchorsettings vCamp7 checked%Camp7% , 其他
iniread, RarityAll, settings.ini, Battle, RarityAll, 1 ;全部
iniread, Rarity1, settings.ini, Battle, Rarity1, 1 ;普通
iniread, Rarity2, settings.ini, Battle, Rarity2, 1 ;稀有
iniread, Rarity3, settings.ini, Battle, Rarity3 ;精銳
iniread, Rarity4, settings.ini, Battle, Rarity4 ;超稀有
Tab2_Y+=33
Gui, Add, text, x30 y%Tab2_Y% w75 h20 , 稀有度:
Tab2_Y-=3
Gui, Add, CheckBox, x80 y%Tab2_Y% w50 h20 gAnchorsettings vRarityAll checked%RarityAll% , 全部
Guicontrol, disable, RarityAll
Gui, Add, CheckBox, x130 y%Tab2_Y% w50 h20 gAnchorsettings vRarity1 checked%Rarity1% , 普通
Gui, Add, CheckBox, x180 y%Tab2_Y% w50 h20 gAnchorsettings vRarity2 checked%Rarity2% , 稀有
Gui, Add, CheckBox, x230 y%Tab2_Y% w50 h20 gAnchorsettings vRarity3 checked%Rarity3% , 精銳
Gui, Add, CheckBox, x280 y%Tab2_Y% w75 h20 gAnchorsettings vRarity4 checked%Rarity4% , 超稀有
iniread, DailyGoalSub, settings.ini, Battle, DailyGoalSub
;~ Gui, Add, GroupBox, x11 y280 w457 h75, `
Tab2_Y+=33 ;270
Gui, Add, CheckBox, x30 y%Tab2_Y% w200 h20 gAnchorsettings vDailyGoalSub checked%DailyGoalSub% , 自動執行每日任務:指派:
Tab2_Y-=2 ;268
iniread, DailyParty, settings.ini, Battle, DailyParty, 第一艦隊
if DailyParty=第一艦隊
Gui, Add, DropDownList, x240 y%Tab2_Y% w90 h150 vDailyParty gAnchorsettings, 第一艦隊||第二艦隊|第三艦隊|第四艦隊|第五艦隊|
else if DailyParty=第二艦隊
Gui, Add, DropDownList, x240 y%Tab2_Y% w90 h150 vDailyParty gAnchorsettings, 第一艦隊|第二艦隊||第三艦隊|第四艦隊|第五艦隊|
else if DailyParty=第三艦隊
Gui, Add, DropDownList, x240 y%Tab2_Y% w90 h150 vDailyParty gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊||第四艦隊|第五艦隊|
else if DailyParty=第四艦隊
Gui, Add, DropDownList, x240 y%Tab2_Y% w90 h150 vDailyParty gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊|第四艦隊||第五艦隊|
else if DailyParty=第五艦隊
Gui, Add, DropDownList, x240 y%Tab2_Y% w90 h150 vDailyParty gAnchorsettings, 第一艦隊|第二艦隊|第三艦隊|第四艦隊|第五艦隊||
iniread, DailyGoalRed, settings.ini, Battle, DailyGoalRed, 1
iniread, DailyGoalRedAction, settings.ini, Battle, DailyGoalRedAction
Tab2_Y+=28
Gui, Add, CheckBox, x50 y%Tab2_Y% w110 h20 gAnchorsettings vDailyGoalRed checked%DailyGoalRed% , 斬首行動:第
Tab2_Y-=2
Gui, Add, DropDownList, x160 y%Tab2_Y% w40 h100 vDailyGoalRedAction gAnchorsettings Choose%DailyGoalRedAction% , 1||2|3|4|
Tab2_Y+=5
Gui, Add, text, x210 y%Tab2_Y% w40 h20 , 關。
iniread, DailyGoalGreen, settings.ini, Battle, DailyGoalGreen, 1
iniread, DailyGoalGreenAction, settings.ini, Battle, DailyGoalGreenAction
Tab2_Y+=23
Gui, Add, CheckBox, x50 y%Tab2_Y% w110 h20 gAnchorsettings vDailyGoalGreen checked%DailyGoalGreen% , 海域突進:第
Tab2_Y-=2
Gui, Add, DropDownList, x160 y%Tab2_Y% w40 h100 vDailyGoalGreenAction gAnchorsettings Choose%DailyGoalGreenAction% , 1||2|3|4|
Tab2_Y+=5
Gui, Add, text, x210 y%Tab2_Y% w40 h20 , 關。
iniread, DailyGoalBlue, settings.ini, Battle, DailyGoalBlue, 1
iniread, DailyGoalBlueAction, settings.ini, Battle, DailyGoalBlueAction
Tab2_Y+=23
Gui, Add, CheckBox, x50 y%Tab2_Y% w110 h20 gAnchorsettings vDailyGoalBlue checked%DailyGoalBlue% , 商船護衛:第
Tab2_Y-=2
Gui, Add, DropDownList, x160 y%Tab2_Y% w40 h100 vDailyGoalBlueAction gAnchorsettings Choose%DailyGoalBlueAction% , 1||2|3|4|
Tab2_Y+=5
Gui, Add, text, x210 y%Tab2_Y% w40 h20 , 關。
iniread, DailyGoalSunday, settings.ini, Battle, DailyGoalSunday
Tab2_Y-=29
Gui, Add, CheckBox, x260 y%Tab2_Y% w140 h20 gAnchorsettings vDailyGoalSunday checked%DailyGoalSunday% , 禮拜日三個都打
iniread, OperationSub, settings.ini, Battle, OperationSub
Tab2_Y+=56
Gui, Add, CheckBox, x30 y%Tab2_Y% w230 h20 gAnchorsettings vOperationSub checked%OperationSub% , 自動執行演習,選擇敵方艦隊:
Tab2_Y-=2
iniread, Operationenemy, settings.ini, Battle, Operationenemy, 隨機的
if Operationenemy=隨機的
Gui, Add, DropDownList, x260 y%Tab2_Y% w80 h150 vOperationenemy gAnchorsettings, 隨機的||最弱的|最左邊|最右邊|
else if Operationenemy=最弱的
Gui, Add, DropDownList, x260 y%Tab2_Y% w80 h150 vOperationenemy gAnchorsettings, 隨機的|最弱的||最左邊|最右邊|
else if Operationenemy=最左邊
Gui, Add, DropDownList, x260 y%Tab2_Y% w80 h150 vOperationenemy gAnchorsettings, 隨機的|最弱的|最左邊||最右邊|
else if Operationenemy=最右邊
Gui, Add, DropDownList, x260 y%Tab2_Y% w80 h150 vOperationenemy gAnchorsettings, 隨機的|最弱的|最左邊|最右邊||
else
Gui, Add, DropDownList, x260 y%Tab2_Y% w80 h150 vOperationenemy gAnchorsettings, 隨機的||最弱的|最左邊|最右邊|
Gui, Add, button, x355 y%Tab2_Y% w100 h24 gResetOperationSub vResetOperation, 重置演習
iniread, Leave_Operatio, settings.ini, Battle, Leave_Operatio
Tab2_Y+=28
Gui, Add, CheckBox, x50 y%Tab2_Y% w110 h20 gAnchorsettings vLeave_Operatio checked%Leave_Operatio% , 血量過低撤退
Gui, Tab, 學 院
iniread, AcademySub, settings.ini, Academy, AcademySub
Gui, Add, CheckBox, x30 y90 w150 h20 gAcademysettings vAcademySub checked%AcademySub% +c4400FF, 啟動自動學院
iniread, AcademyOil, settings.ini, Academy, AcademyOil, 1
Gui, Add, CheckBox, x30 y120 w150 h20 gAcademysettings vAcademyOil checked%AcademyOil%, 自動採集石油
iniread, AcademyCoin, settings.ini, Academy, AcademyCoin, 1
Gui, Add, CheckBox, x30 y150 w150 h20 gAcademysettings vAcademyCoin checked%AcademyCoin%, 自動蒐集金幣
iniread, AcademyTactics, settings.ini, Academy, AcademyTactics, 1
Gui, Add, CheckBox, x30 y180 w120 h20 gAcademysettings vAcademyTactics checked%AcademyTactics%, 自動學習技能
iniread, 150expbookonly, settings.ini, Academy, 150expbookonly, 1
Gui, Add, CheckBox, x160 y180 w200 h20 gAcademysettings v150expbookonly checked%150expbookonly%, 僅使用150`%經驗的課本
iniread, AcademyShop, settings.ini, Academy, AcademyShop, 1
Gui, Add, CheckBox, x30 y210 w200 h20 gAcademysettings vAcademyShop checked%AcademyShop%, 商店刷新時自動購物`(金幣)
iniread, SkillBook_ATK, settings.ini, Academy, SkillBook_ATK
iniread, SkillBook_DEF, settings.ini, Academy, SkillBook_DEF
iniread, SkillBook_SUP, settings.ini, Academy, SkillBook_SUP
iniread, Cube, settings.ini, Academy, Cube
Gui, Add, CheckBox, x50 y240 w80 h20 gAcademysettings vSkillBook_ATK checked%SkillBook_ATK%, 攻擊教材
Gui, Add, CheckBox, x140 y240 w80 h20 gAcademysettings vSkillBook_DEF checked%SkillBook_DEF%, 防禦教材
Gui, Add, CheckBox, x230 y240 w80 h20 gAcademysettings vSkillBook_SUP checked%SkillBook_SUP%, 輔助教材
Gui, Add, CheckBox, x310 y240 w80 h20 gAcademysettings vCube checked%Cube%, 心智魔方
Gui, Tab, 後 宅
iniread, DormSub, settings.ini, Dorm, DormSub
Gui, Add, CheckBox, x30 y90 w150 h20 gDormsettings vDormSub checked%DormSub% +c4400FF, 啟動自動整理後宅
iniread, DormCoin, settings.ini, Dorm, DormCoin, 1
Gui, Add, CheckBox, x30 y120 w150 h20 gDormsettings vDormCoin checked%DormCoin%, 自動蒐集傢俱幣
iniread, Dormheart, settings.ini, Dorm, Dormheart, 1
Gui, Add, CheckBox, x30 y150 w150 h20 gDormsettings vDormheart checked%Dormheart%, 自動撈取海洋之心
iniread, DormFood, settings.ini, Dorm, DormFood
Gui, Add, CheckBox, x30 y180 w80 h20 gDormsettings vDormFood checked%DormFood%, 糧食低於
IniRead, DormFoodBar, settings.ini, Dorm, DormFoodBar, 80
Gui, Add, Slider, x110 y178 w100 h30 gDormsettings vDormFoodBar range10-80 +ToolTip , %DormFoodBar%
Gui, Add, Text, x215 y180 w20 h20 vDormFoodBarUpdate , %DormFoodBarUpdate%
Gui, Add, Text, x240 y180 w100 h20 vTestbar1Percent, `%自動補給
Gui, Tab, 任 務
iniread, MissionSub, settings.ini, MissionSub, MissionSub
Gui, Add, CheckBox, x30 y90 w150 h20 gMissionsettings vMissionSub checked%MissionSub% +c4400FF, 啟動自動接收任務
Gui, Tab, 其 他
Gui, Add, button, x30 y90 w120 h20 gDebug2, 除錯
Gui, Add, button, x180 y90 w200 h20 gForumSub, Bug回報、功能建議討論區
Gui, Add, button, x180 y120 w200 h20 gDiscordSub, Discord
Gui, Add, button, x30 y120 w120 h20 gDailyGoalSub2, 執行每日任務
Gui, Add, button, x30 y150 w120 h20 gOperationSub, 執行演習
Gui, Add, button, x30 y180 w120 h20 gstartemulatorsub, 啟動模擬器
iniread, GuiHideX, settings.ini, OtherSub, GuiHideX
Gui, Add, CheckBox, x30 y210 w200 h20 gOthersettings vGuiHideX checked%GuiHideX% , 按X隱藏本視窗,而非關閉
iniread, EmulatorCrushCheck, settings.ini, OtherSub, EmulatorCrushCheck
Gui, Add, CheckBox, x30 y240 w200 h20 gOthersettings vEmulatorCrushCheck checked%EmulatorCrushCheck% , 自動檢查模擬器是否當機
iniread, AutoLogin, settings.ini, OtherSub, AutoLogin
Gui, Add, CheckBox, x30 y270 w200 h20 gOthersettings vAutoLogin checked%AutoLogin% , 斷線自動重登(Google帳號)
Gui, Add, CheckBox, x30 y300 w125 h20 gOthersettings vSetGuiBGcolor checked%SetGuiBGcolor% , 自訂背景顏色 0x
Gui Add, Edit, x155 y299 w80 h21 vSetGuiBGcolor2 gOthersettings Limit6, %SetGuiBGcolor2%
;/////////////////// GUI Right Side End ///////////////////
IniRead, azur_x, settings.ini, Winposition, azur_x, 0
IniRead, azur_y, settings.ini, Winposition, azur_y, 0
if azur_x=
azur_x := 0
if azur_y=
azur_y := 0
Gui Show, w900 h500 x%azur_x% y%azur_y%, Azur Lane - %title%
Menu, Tray, Tip , Azur Lane `(%title%)
#include Gdip.dll
pToken := Gdip_Startup()
Winget, UniqueID,, %title%
Allowance = %AllowanceValue%
Global UniqueID
Global Allowance
LogShow("啟動完畢,等待開始")
Gosub, whitealbum
Settimer, whitealbum, 10000 ;很重要!
iniread, Autostart, settings.ini, OtherSub, Autostart, 0
if (Autostart)
{
iniwrite, 0, settings.ini, OtherSub, Autostart
Goto, Start
}
return
Debug2:
text1 := GdiGetPixel(12, 24)
text2 := DwmGetPixel(12, 24)
text3 := GdiGetPixel(1300, 681)
text4 := DwmGetPixel(1300, 681)
text5 := GdiGetPixel(485, 21)
text6 := DwmGetPixel(485, 21)
text11 := Dwmcheckcolor(1300, 681, 16777215)
text22 := Dwmcheckcolor(12, 24, 16041247)
text33 := Dwmcheckcolor(1, 35, 2633790)
WinGet, UniqueID, ,Azur Lane - %title%
Global UniqueID
gui, Color, FF0000
sleep 100
Red := DwmGetPixel(336, 456)
sleep 200
gui, Color, 00FF00
sleep 100
Green := DwmGetPixel(336, 456)
sleep 200
gui, Color, 0000FF
sleep 100
Blue := DwmGetPixel(336, 456)
sleep 200
gui, Color, FFFFFF
sleep 100
White := DwmGetPixel(336, 456)
sleep 200
gui, Color, 000000
sleep 100
Black := DwmGetPixel(336, 456)
sleep 200
gui, Color, Default
Msgbox, Red: %Red% `nGreen:%Green%`nBlue: %Blue%`nWhite: %White%`nBlack:%Black%`n`nGdiGetPixel(211, 17):%text1% and 4294231327`nDwmGetPixel(211, 17):%text2% and %text22%`nGdiGetPixel(1300, 681):%text3% and 4294967295`nDwmGetPixel(1300, 681):%text4% and %text11%`nGdiGetPixel(485, 21):%text5% and 4280823870`nDwmGetPixel(485, 21):%text6% and %text33%
Winget, UniqueID,, %title%
Global UniqueID
return
TabFunc: ;切換分頁讀取GUI設定,否則可能導致選項失效
gosub, inisettings
gosub, Anchorsettings
gosub, Academysettings
gosub, Dormsettings
gosub, Missionsettings
gosub, Othersettings
return
inisettings: ;一般設定
Guicontrolget, title
Guicontrolget, emulatoradb
Guicontrolget, AllowanceValue
Iniwrite, %emulatoradb%, settings.ini, emulator, emulatoradb
Iniwrite, %title%, settings.ini, emulator, title
Iniwrite, %AllowanceValue%, settings.ini, emulator, AllowanceValue
return
Anchorsettings: ;出擊設定
Guicontrolget, AnchorSub
Guicontrolget, AnchorMode
Guicontrolget, ChapterMode
Guicontrolget, AnchorChapter
Guicontrolget, AnchorChapter2
Guicontrolget, Assault
Guicontrolget, mood
Guicontrolget, moodtime
Guicontrolget, Autobattle
Guicontrolget, BossAction
Guicontrolget, Shipsfull
Guicontrolget, ChooseParty1
Guicontrolget, ChooseParty2
Guicontrolget, SwitchPartyAtFirstTime
Guicontrolget, WeekMode
Guicontrolget, Use_FixKit
Guicontrolget, AlignCenter
Guicontrolget, BattleTimes
Guicontrolget, BattleTimes2
Guicontrolget, Ship_Target1
Guicontrolget, Ship_Target2
Guicontrolget, Ship_Target3
Guicontrolget, Ship_Target4
Guicontrolget, Item_Bullet
Guicontrolget, Item_Quest
Guicontrolget, Plane_Target1
Guicontrolget, TimetoBattle
Guicontrolget, TimetoBattle1
Guicontrolget, TimetoBattle2
Guicontrolget, StopBattleTime
Guicontrolget, StopBattleTime2
Guicontrolget, StopBattleTime3
Iniwrite, %AnchorSub%, settings.ini, Battle, AnchorSub
Iniwrite, %AnchorMode%, settings.ini, Battle, AnchorMode
Iniwrite, %ChapterMode%, settings.ini, Battle, ChapterMode
Iniwrite, %AnchorChapter%, settings.ini, Battle, AnchorChapter
Iniwrite, %AnchorChapter2%, settings.ini, Battle, AnchorChapter2
Iniwrite, %Assault%, settings.ini, Battle, Assault
Iniwrite, %mood%, settings.ini, Battle, mood
Iniwrite, %moodtime%, settings.ini, Battle, moodtime
Iniwrite, %Autobattle%, settings.ini, Battle, Autobattle
Iniwrite, %BossAction%, settings.ini, Battle, BossAction
Iniwrite, %Shipsfull%, settings.ini, Battle, Shipsfull
Iniwrite, %ChooseParty1%, settings.ini, Battle, ChooseParty1
Iniwrite, %ChooseParty2%, settings.ini, Battle, ChooseParty2
Iniwrite, %SwitchPartyAtFirstTime%, settings.ini, Battle, SwitchPartyAtFirstTime
Iniwrite, %WeekMode%, settings.ini, Battle, WeekMode
Iniwrite, %Use_FixKit%, settings.ini, Battle, Use_FixKit
Iniwrite, %AlignCenter%, settings.ini, Battle, AlignCenter
Iniwrite, %BattleTimes%, settings.ini, Battle, BattleTimes
Iniwrite, %BattleTimes2%, settings.ini, Battle, BattleTimes2
Iniwrite, %Ship_Target1%, settings.ini, Battle, Ship_Target1
Iniwrite, %Ship_Target2%, settings.ini, Battle, Ship_Target2
Iniwrite, %Ship_Target3%, settings.ini, Battle, Ship_Target3
Iniwrite, %Ship_Target4%, settings.ini, Battle, Ship_Target4
Iniwrite, %Item_Bullet%, settings.ini, Battle, Item_Bullet
Iniwrite, %Item_Quest%, settings.ini, Battle, Item_Quest
Iniwrite, %Plane_Target1%, settings.ini, Battle, Plane_Target1
Iniwrite, %TimetoBattle%, settings.ini, Battle, TimetoBattle
Iniwrite, %TimetoBattle1%, settings.ini, Battle, TimetoBattle1
Iniwrite, %TimetoBattle2%, settings.ini, Battle, TimetoBattle2
Iniwrite, %StopBattleTime%, settings.ini, Battle, StopBattleTime
Iniwrite, %StopBattleTime2%, settings.ini, Battle, StopBattleTime2
Iniwrite, %StopBattleTime3%, settings.ini, Battle, StopBattleTime3
Global Assault, Autobattle, shipsfull, ChooseParty1, ChooseParty2, AnchorMode, SwitchPartyAtFirstTime, WeekMode, AnchorChapter, AnchorChapter2
FirstChooseParty := 0
;////出擊2///////
Guicontrolget, IndexAll
Guicontrolget, Index1
Guicontrolget, Index2
Guicontrolget, Index3
Guicontrolget, Index4
Guicontrolget, Index5
Guicontrolget, Index6
Guicontrolget, Index7
Guicontrolget, Index8
Guicontrolget, Index9
Guicontrolget, CampAll
Guicontrolget, Camp1
Guicontrolget, Camp2
Guicontrolget, Camp3
Guicontrolget, Camp4
Guicontrolget, Camp5
Guicontrolget, Camp6
Guicontrolget, Camp7
Guicontrolget, RarityAll
Guicontrolget, Rarity1
Guicontrolget, Rarity2
Guicontrolget, Rarity3
Guicontrolget, Rarity4
Guicontrolget, DailyGoalSub
Guicontrolget, DailyParty
Guicontrolget, DailyGoalSunday
Guicontrolget, DailyGoalRed
Guicontrolget, DailyGoalRedAction
Guicontrolget, DailyGoalGreen
Guicontrolget, DailyGoalGreenAction
Guicontrolget, DailyGoalBlue
Guicontrolget, DailyGoalBlueAction
Guicontrolget, OperationSub
Guicontrolget, Operationenemy
Guicontrolget, Leave_Operatio
Iniwrite, %IndexAll%, settings.ini, Battle, IndexAll ;全部
Iniwrite, %Index1%, settings.ini, Battle, Index1 ;前排先鋒
Iniwrite, %Index2%, settings.ini, Battle, Index2 ;後排主力
Iniwrite, %Index3%, settings.ini, Battle, Index3 ;驅逐
Iniwrite, %Index4%, settings.ini, Battle, Index4 ;輕巡
Iniwrite, %Index5%, settings.ini, Battle, Index5 ;重巡
Iniwrite, %Index6%, settings.ini, Battle, Index6 ;戰列
Iniwrite, %Index7%, settings.ini, Battle, Index7 ;航母
Iniwrite, %Index8%, settings.ini, Battle, Index8 ;維修
Iniwrite, %Index9%, settings.ini, Battle, Index9 ;其他
Iniwrite, %CampAll%, settings.ini, Battle, CampAll ;全部
Iniwrite, %Camp1%, settings.ini, Battle, Camp1 ;白鷹
Iniwrite, %Camp2%, settings.ini, Battle, Camp2 ;皇家
Iniwrite, %Camp3%, settings.ini, Battle, Camp3 ;重櫻
Iniwrite, %Camp4%, settings.ini, Battle, Camp4 ;鐵血
Iniwrite, %Camp5%, settings.ini, Battle, Camp5 ;東煌
Iniwrite, %Camp6%, settings.ini, Battle, Camp6 ;北方聯合
Iniwrite, %Camp7%, settings.ini, Battle, Camp7 ;其他
Iniwrite, %RarityAll%, settings.ini, Battle, RarityAll ;全部
Iniwrite, %Rarity1%, settings.ini, Battle, Rarity1 ;普通
Iniwrite, %Rarity2%, settings.ini, Battle, Rarity2 ;稀有
Iniwrite, %Rarity3%, settings.ini, Battle, Rarity3 ;精銳
Iniwrite, %Rarity4%, settings.ini, Battle, Rarity4 ;超稀有
Iniwrite, %DailyGoalSub%, settings.ini, Battle, DailyGoalSub ;自動執行每日任務
Iniwrite, %DailyParty%, settings.ini, Battle, DailyParty ;每日隊伍選擇
Iniwrite, %DailyGoalSunday%, settings.ini, Battle, DailyGoalSunday ;禮拜日三個都打
Iniwrite, %DailyGoalRed%, settings.ini, Battle, DailyGoalRed
Iniwrite, %DailyGoalRedAction%, settings.ini, Battle, DailyGoalRedAction
Iniwrite, %DailyGoalGreen%, settings.ini, Battle, DailyGoalGreen
Iniwrite, %DailyGoalGreenAction%, settings.ini, Battle, DailyGoalGreenAction
Iniwrite, %DailyGoalBlue%, settings.ini, Battle, DailyGoalBlue
Iniwrite, %DailyGoalBlueAction%, settings.ini, Battle, DailyGoalBlueAction
Iniwrite, %OperationSub%, settings.ini, Battle, OperationSub ;自動執行演習
Iniwrite, %Operationenemy%, settings.ini, Battle, Operationenemy
Iniwrite, %Leave_Operatio%, settings.ini, Battle, Leave_Operatio
Global IndexAll, Index1, Index2, Index3, Index4, Index5, Index6, Index7, Index8, Index9, CampAll, Camp1,Camp2, Camp3, Camp4, Camp5, Camp6, Camp7, Camp8, Camp9, RarityAll, Rarity1, Rarity2, Rarity3, Rarity4, DailyParty, Leave_Operatio
return
Academysettings: ;學院設定
Guicontrolget, AcademySub
Guicontrolget, AcademyOil
Guicontrolget, AcademyCoin
Guicontrolget, AcademyTactics
Guicontrolget, AcademyShop
Guicontrolget, 150expbookonly
Guicontrolget, SkillBook_ATK
Guicontrolget, SkillBook_DEF
Guicontrolget, SkillBook_SUP
Guicontrolget, Cube
Iniwrite, %AcademySub%, settings.ini, Academy, AcademySub
Iniwrite, %AcademyOil%, settings.ini, Academy, AcademyOil
Iniwrite, %AcademyCoin%, settings.ini, Academy, AcademyCoin
Iniwrite, %AcademyShop%, settings.ini, Academy, AcademyShop
Iniwrite, %AcademyTactics%, settings.ini, Academy, AcademyTactics
Iniwrite, %150expbookonly%, settings.ini, Academy, 150expbookonly
Iniwrite, %SkillBook_ATK%, settings.ini, Academy, SkillBook_ATK
Iniwrite, %SkillBook_DEF%, settings.ini, Academy, SkillBook_DEF
Iniwrite, %SkillBook_SUP%, settings.ini, Academy, SkillBook_SUP
Iniwrite, %Cube%, settings.ini, Academy, Cube
return
Dormsettings: ;後宅設定
Guicontrolget, DormSub
Guicontrolget, DormCoin
Guicontrolget, Dormheart
Guicontrolget, DormFood
Guicontrolget, DormFoodBar
Iniwrite, %DormSub%, settings.ini, Dorm, DormSub
Iniwrite, %DormCoin%, settings.ini, Dorm, DormCoin
Iniwrite, %Dormheart%, settings.ini, Dorm, Dormheart
Iniwrite, %DormFood%, settings.ini, Dorm, DormFood
Iniwrite, %DormFoodBar%, settings.ini, Dorm, DormFoodBar
Guicontrol, ,DormFoodBarUpdate, %DormFoodBar%
Global DormFood
return
Missionsettings: ;任務設定
Guicontrolget, MissionSub
Iniwrite, %MissionSub%, settings.ini, MissionSub, MissionSub
return
Othersettings: ;其他設定
Guicontrolget, GuiHideX
Guicontrolget, EmulatorCrushCheck
Guicontrolget, AutoLogin
Guicontrolget, SetGuiBGcolor
Guicontrolget, SetGuiBGcolor2
Iniwrite, %GuiHideX%, settings.ini, OtherSub, GuiHideX
Iniwrite, %EmulatorCrushCheck%, settings.ini, OtherSub, EmulatorCrushCheck
Iniwrite, %AutoLogin%, settings.ini, OtherSub, AutoLogin
Iniwrite, %SetGuiBGcolor%, settings.ini, OtherSub, SetGuiBGcolor
Iniwrite, %SetGuiBGcolor2%, settings.ini, OtherSub, SetGuiBGcolor2
Global AutoLogin
return
exitsub:
WindowName = Azur Lane - %title%
wingetpos, azur_x, azur_y,, WindowName
iniwrite, %azur_x%, settings.ini, Winposition, azur_x
iniwrite, %azur_y%, settings.ini, Winposition, azur_y
exitapp
return
Showsub:
Gui, show
return
GuiClose:
if GuiHideX {
Traytip, 訊息, `nAzurLane (%title%) 背景執行中!`n , 2
Gui, Hide
} else {
WindowName = Azur Lane - %title%
wingetpos, azur_x, azur_y,, WindowName
iniwrite, %azur_x%, settings.ini, Winposition, azur_x
iniwrite, %azur_y%, settings.ini, Winposition, azur_y
ExitApp
}
return
guicontrols: ;關閉某些按鈕,避免更動
Guicontrol, disable, Start
Guicontrol, disable, title
Guicontrol, disable, emulatoradb
Guicontrol, disable, EmulatorCrushCheck
Guicontrol, disable, BattleTimes2
Guicontrol, disable, Timetobattle1
Guicontrol, disable, Timetobattle2
Guicontrol, disable, StopBattleTime3
return
Start:
gosub, TabFunc
gosub, guicontrols
IfWinNotExist , %title%
goto startemulatorsub
Winget, UniqueID,, %title%
Allowance = %AllowanceValue%
emulatoradb = %emulatoradb%
Global UniqueID
Global Allowance
Global emulatoradb
LogShow("開始!")
WinRestore, %title%
WinMove, %title%, , , , 1318, 758
WinSet, Transparent, off, %title%
Settimer, Mainsub, 2500
Settimer, WinSub, 3200
if (EmulatorCrushCheck)
{
Settimer, EmulatorCrushCheckSub, 600000
}
return
ForumSub:
Run, https://github.com/panex0845/AzurLane/issues
return
DiscordSub:
Run, https://discord.gg/GFCRSap
return
EmulatorCrushCheckSub:
CheckPostion1 := DwmGetpixel(56, 84)
CheckPostion2 := DwmGetpixel(313, 515)
CheckPostion3 := DwmGetpixel(938, 235)
CheckPostion4 := DwmGetpixel(163, 357)
CheckPostion5 := DwmGetpixel(513, 66)
Withdraw := DwmCheckcolor(772, 706, 12996946)
sleep 1000
if (DwmGetpixel(56, 84)=CheckPostion1 and DwmGetpixel(313, 515)=CheckPostion2 and DwmGetpixel(938, 235)=CheckPostion3 and DwmGetpixel(163, 357)=CheckPostion4 and DwmGetpixel(513, 66)=CheckPostion5 and !Withdraw and DwmCheckcolor(1225, 83, 16249847) and DwmCheckcolor(1240, 83, 16249847))
{
sleep 1000
if (DwmGetpixel(56, 84)=CheckPostion1 and DwmGetpixel(313, 515)=CheckPostion2 and DwmGetpixel(938, 235)=CheckPostion3 and DwmGetpixel(163, 357)=CheckPostion4 and DwmGetpixel(513, 66)=CheckPostion5 and !Withdraw and DwmCheckcolor(1225, 83, 16249847) and DwmCheckcolor(1240, 83, 16249847))
{
sleep 1000
if (DwmGetpixel(56, 84)=CheckPostion1 and DwmGetpixel(313, 515)=CheckPostion2 and DwmGetpixel(938, 235)=CheckPostion3 and DwmGetpixel(163, 357)=CheckPostion4 and DwmGetpixel(513, 66)=CheckPostion5 and !Withdraw and DwmCheckcolor(1225, 83, 16249847) and DwmCheckcolor(1240, 83, 16249847))
{
LogShow("=====模擬器當機=====")
iniwrite, 1, settings.ini, OtherSub, Autostart
runwait, dnconsole.exe quit --index %emulatoradb% , %ldplayer%, Hide
sleep 10000
goto, startemulatorSub
}
}
}
return
ResetOperationSub:
GuiControl, disable, ResetOperation
OperationDone := VarSetCapacity ;重置演習判斷
iniWrite, 0, settings.ini, Battle, OperationYesterday
LogShow("演習已被重置")
sleep 200
GuiControl, Enable, ResetOperation
;~ if (DwmCheckcolor(12, 200, 16777215) and DwmCheckcolor(1144, 440, 14592594)) ;如果位於首頁
;~ {
;~ Random, x, 1018, 1144
;~ Random, y, 339, 455
;~ C_Click(x, y) ;點擊出擊
;~ Loop
;~ {
;~ if (DwmCheckcolor(794, 710, 16777215) and DwmCheckcolor(812, 699, 13000026)) ;如果在現實地圖(關卡)
;~ {
;~ C_Click(54, 88) ;回到上一頁
;~ }
;~ else if (DwmCheckcolor(750, 719, 10864623) and DwmCheckcolor(132, 63, 14085119)) ;在關卡選擇頁面
;~ {
;~ Break
;~ }
;~ sleep 300
;~ }
;~ }
return
Mainsub: ;優先檢查出擊以外的其他功能
LDplayerCheck := DwmCheckcolor(1, 35, 2633790)
Formattime, Nowtime, ,HHmm
if !LDplayerCheck ;檢查模擬器有沒有被縮小
{
goto, Winsub
}
else if LDplayerCheck
{
if (NowTime=0101 or Nowtime=1301)
{
DailyDone := VarSetCapacity ;重置每日判斷
OperationDone := VarSetCapacity ;重置演習判斷
iniWrite, 0, settings.ini, Battle, OperationYesterday
}
MainCheck := [DwmCheckcolor(12, 200, 16777215), DwmCheckcolor(12, 200, 16250871)] ;主選單圖示
MainCheck := CheckArray(MainCheck*)
Formation := DwmCheckcolor(895, 415, 16777215) ;編隊BTN
WeighAnchor := DwmCheckcolor(1035, 345, 16777215) ;出擊BTN
LDtitlebar := DwmCheckcolor(1, 35, 2633790) ;
MissionCheck := DwmCheckcolor(948, 709, 16772071) ;任務驚嘆號
if (MissionSub and MissionCheck and MainCheck and Formation and WeighAnchor and LDtitlebar) ;任務
{
gosub, MissionSub
sleep 3000
}
AcademyCheck := DwmCheckcolor(627, 712, 11882818) ;學院驚嘆號
if (AcademySub and AcademyCheck and MainCheck and Formation and WeighAnchor and LDtitlebar and AcademyDone<1) ;學院
{
gosub, AcademySub
sleep 3000
}
DormMissionCheck := DwmCheckcolor(790, 710, 16244694) ;後宅驚嘆號
if (DormSub and DormMissionCheck and MainCheck and Formation and WeighAnchor and LDtitlebar and DormDone<1) ;後宅
{
gosub, DormSub
sleep 3000
}
if ((AnchorSub and LDtitlebar) and (!AcademyCheck or AcademyDone=1 or !AcademySub) and (!DormMissionCheck or DormDone=1 or !DormSub)) ;出擊
{
gosub, AnchorSub
}
}
if ((Timetobattle) and (Nowtime=TimetoBattle1 or Nowtime=TimetoBattle2) and RunOnceTime<1)
{
StopAnchor := 0
LogShow("重新出擊")
Timetobattle11 := Timetobattle1+1
Timetobattle22 := Timetobattle2+1
RunOnceTime := 1
}
else if (RunOnceTime=1 and (Nowtime=Timetobattle11 or Nowtime=Timetobattle11))
{
RunOnceTime := VarSetCapacity
Timetobattle11 := VarSetCapacity
Timetobattle22 := VarSetCapacity
}
return
clock:
StopAnchor := 0
return
ReAnchorSub:
Guicontrol, disable, ReAnchorSub
LogShow("再次出擊!")
StopAnchor := VarSetCapacity
StopBattleTimeCount := VarSetCapacity
WeighAnchorCount := VarSetCapacity
sleep 1000
Guicontrol, enable, ReAnchorSub
return
AnchorSub: ;出擊
if (DwmCheckcolor(46, 181, 16774127) and DwmCheckcolor(1140, 335, 14577994)) ;在主選單偵測到軍事任務已完成
{
LogShow("執行軍事委託")
C_Click(20, 200)
Loop
{
if (DwmCheckcolor(495, 321, 15704642)) ;出現選單
{
C_Click(444, 318) ;點擊軍事委託完成
sleep 2500
}
else if (DwmCheckcolor(1216, 75, 16777215) or DwmCheckcolor(1215, 76, 16777215)) ;出現委託成功S頁面
{
break
}
sleep 500
}
Loop
{
sleep 1000
if (DwmCheckcolor(1226, 74, 16777215) or DwmCheckcolor(1215, 76, 16777215)) ;委託成功 S
{
C_Click(639, 141) ;隨便點
sleep 1000
}
else if (DwmCheckcolor(461, 316, 16777215) and DwmCheckcolor(432, 321, 16777215) and DwmCheckcolor(268, 348, 9240551) and DwmCheckcolor(237, 355, 9240551)) ;如果已經"空閒"
{
C_Click(441, 314)
sleep 1500
}
else if (DwmCheckcolor(135, 57, 15726591) and DwmCheckcolor(167, 59, 16251903)) ;成功進入委託頁面
{
Rmenu := 1
break
}
else
{
LoopVar++
if (LoopVar>100)
{
LogShow("軍事委託出現錯誤")
LoopVar := VarSetCapacity
Rmenu := VarSetCapacity
Break
}