forked from Using1174/cq-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path克鲁赛德战记-综合脚本(8ce0cb8b-a3c2-4b01-a425-2ea0282d85b9).mq
1675 lines (1596 loc) · 41.1 KB
/
克鲁赛德战记-综合脚本(8ce0cb8b-a3c2-4b01-a425-2ea0282d85b9).mq
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
' For 克鲁赛德战记 综合脚本
' -------------------自定义配置区--------------------------
' 周几开始买块。填[1-7],否则不买块
Dim BLOCK_BUY_DAY = 4
' 当前小时为几的倍数时,自动切回竞技场
Dim HOUR_MOD = 8
' 渠道的包名,用于自动重启。
' 不同的渠道(Taptap,Bilibili,国际服等)包名不同,需要自行配置。否则无法重启。
' 国际服包名 com.nhnst.SKCQCN
' 渠道服在国际服包名后加后缀 .uc .bili .qihu .xindong .otaku等
' 如 com.nhnst.SKCQCN.uc
Dim PACKAGE_NAME = "com.nhnst.SKCQCN"
' -------------------自定义配置结束-------------------------
' -------------------以下为系统配置,请勿随意修改-------------------------
' 扯到鱼后第一次按满的时间
' Dim FirstPressFishTime = 2300
' 检测到力量值掉到蓝色以下时,按压时间ms
Dim ON_WEAK_PRESS_TIME = 1200
Dim TryFishTimes = 0
' 已甩勾次数
Dim PushTimes = 0
' 成功钓到的鱼的个数
Dim SuccessCount = 0
' 绿色未满长按时长
Dim PULL_LONG_PRESS_MSECS = 120
' 挣扎节点(红线)每次按住多久
Dim PULL_PRESS_MSECS = 10
' 拉过红色等待多少毫秒
Dim PULL_FULL_DELAY = 30
' 钓鱼
Dim FUNC_FISHING = 0
' 竞技场
Dim FUNC_BATTLE = 1
' 副本
Dim FUNC_DUNGEON = 2
' 世界BOSS
Dim FUNC_WB = 3
' 进游戏首要功能
Dim curFunc = FUNC_FISHING
' 默认切换
Dim defaultSwitchTo = FUNC_FISHING
Dim lastHour = 0
' 上次战斗选择的对手,如果输了就换一次
Dim battleChooseFirst = TRUE
' 是否正在竞技场
Dim isInBattle = False
' 是否在世界BOSS
Dim isInWB = False
' 超过这个数重置
Dim MAX_FISH_TIMES = 999
' 赛跑按钮选择0-3,表示1-4名
Dim raceIndex = 0
' 赛跑界面卡5次就重启
Dim raceKill = 0
' 未知界面卡住
Dim unknowKill = 0
' 遗迹4卡住
Dim g4ReHome = 0
' 重启的次数
Dim restartCount = 0
' 消块类型 1消,2消,3消
Dim battleBlock = 1
' PVP买块
Dim pvpBuyBlock = False
Randomize
Delay 2000
While True
updateTimeState
loopOnce
Wend
EndScript
Function updateTimeState()
Dim h=DateTime.Hour(),m=DateTime.Minute(),s=DateTime.Second()
' 周几开始自动买块
If DateTime.WeekDay() >= BLOCK_BUY_DAY Then
pvpBuyBlock = True
End If
' 每隔n小时打一次竞技
If (h Mod HOUR_MOD) = 0 Then
If lastHour <> h Then
lastHour = h
curFunc = FUNC_BATTLE
End If
End If
End Function
Function restartApp()
ShowMessage "重启APP"
KillApp PACKAGE_NAME
Delay 15000
RunApp PACKAGE_NAME
Delay 15000
End Function
Function reHomeApp()
ShowMessage "rehome"
KeyPress "Home"
Delay 2000
RunApp PACKAGE_NAME
Delay 1500
End Function
Function loopOnce()
KeepCapture
Dim isRace = False
Dim isG4 = False
Dim isUnknow = False
If isNoFishTips() Then
onNoFishTips
ElseIf isWaitScene() Then
' 等待时, 点开始
onWaitScene
ElseIf isG4PointHand() Then
onG4PointHand
isG4 = True
ElseIf isCatchingNotice() Then
' 出现抓鱼提示
onCatchingNotice
ElseIf isFishingBar() Then
If isWhiteQTE() Then
onWhiteQTE
ElseIf isPullScene() Then
' 压力未满, 按压
onPullScene
ElseIf isPullFull() Then
' 张力满
onPullFull
ElseIf isWeakStrength() Then
onWeakStrength()
ElseIf isPushScene() Then
' 判断甩勾
onPushScene
Else
ShowMessage "unknow fishbar scene"
End If
ElseIf curFunc= FUNC_FISHING And isColorQTE() Then
' 颜色QTE
onColorQTE
ElseIf isFightingScene() Then
onFightingScene
ElseIf isContinueScene() Then
' 抓到继续
onContinueScene
ElseIf isPauseScene() Then
onPauseScene
ElseIf isFishCollectScene() Then
onFishCollectScene
ElseIf isFishShopScene() Then
onFishShopScene
ElseIf isFishBuyScene() Then
onFishBuyScene
ElseIf isFishPage() Then
' 选择渔场
onFishPage
ElseIf isMainScene() Then
onMainScene
ElseIf isAdvenScene() Then
onAdvenScene
' fight
ElseIf isDimandUseScene() Then
onDimandUseScene
ElseIf isReadyBattleScene() Then
onReadyBattleScene
ElseIf isFightWinNextScene() Then
onFightWinNextScene
ElseIf isFightFailNewScene() Then
onFightFailNewScene
ElseIf isFightChoseScene() Then
onFightChoseScene
ElseIf isThreeBattleScene() Then
onThreeBattleScene
ElseIf isBattleUpgradeScene() Then
onBattleUpgradeScene
ElseIf isBattleNoTicketScene() Then
onBattleNoTicketScene
ElseIf isRaceCheckScene() Then
onRaceCheckScene
isRace = True
ElseIf isRaceErrorScene() Then
onRaceErrorScene
ElseIf isStageFinishScene() Then
onStageFinishScene
ElseIf isBattleTestScene() Then
onBattleTestScene
ElseIf isDilaoScene() Then
onDilaoScene
ElseIf isSoulPassScene() Then
onSoulPassScene
ElseIf isWBFindTeamScene() Then
onWBFindTeamScene
ElseIf isWBTeamUpScene() Then
onWBTeamUpScene
ElseIf isWBEndWithTeamScene() Then
onWBEndWithTeamScene
ElseIf isWBEndNoTeamScene() Then
onWBEndNoTeamScene
ElseIf isWBStageScene() Then
onWBStageScene
ElseIf isWBStartScene() Then
onWBStartScene
ElseIf isItemFullScene() Then
onItemFullScene
ElseIf isWBSettleScene() Then
onWBSettleScene
ElseIf isWeaponSellScene() Then
onWeaponSellScene
ElseIf isHeroFirstMaxScene() Then
onHeroFirstMaxScene
ElseIf isPlayerLevelUpScene() Then
onPlayerLevelUpScene
ElseIf isCoverButton() Then
' 等级提升
onCoverButton
ElseIf isDilaoKeyScene() Then
onDilaoKeyScene
ElseIf isDoujiTestScene() Then
onDoujiTestScene
ElseIf isDoujiTestEndScene() Then
onDoujiTestEndScene
ElseIf isFishBuyEndScene() Then
onFishBuyEndScene
ElseIf isLoginScene() Then
onLoginScene
ElseIf isSignUpScene() Then
onSignUpScene
ElseIf isLoginWin1Scene() Then
onLoginWin1Scene
ElseIf isLoginWin2Scene() Then
onLoginWin2Scene
ElseIf isLoginWin3Scene() Then
onLoginWin3Scene
ElseIf isLoginWin4Scene() Then
onLoginWin4Scene
ElseIf isLoginWin5Scene() Then
onLoginWin5Scene
ElseIf isPoPoScene() Then
onPoPoScene()
Else
onUnknowScene
isUnknow = True
End If
If isRace Then
raceKill = raceKill + 1
If raceKill >= 5 Then
' 如果赛跑卡了就重启
restartApp
restartCount = restartCount + 1
End If
Else
raceKill = 0
End If
If isG4 Then
g4ReHome = g4ReHome + 1
If g4ReHome >= 10 Then
reHomeApp
End If
Else
g4ReHome = 0
End If
If isUnknow Then
unknowKill = unknowKill + 1
If unknowKill >= 200 Then
unknowKill = 0
restartApp
End If
Else
unknowKill = 0
End If
If Not isInBattle And curFunc <> FUNC_FISHING Then
checkPassChallenge
End If
ReleaseCapture
End Function
' 等待放鱼饵
Function isWaitScene()
If CmpColorEx("777|34|526973,405|32|526973,686|132|526973,123|91|C6A242",0.9) = 1 Then
isWaitScene = TRUE
TracePrint "isWaitScene"
Else
isWaitScene = FALSE
End If
End Function
Function onWaitScene()
If curFunc = FUNC_BATTLE Then
' 准备退出
MTouch 1021, 1865
Delay 500
Else
If TryFishTimes < MAX_FISH_TIMES Then
' 点击开始钓鱼
touchFishing
TryFishTimes = TryFishTimes + 1
ShowMessage "甩勾 " & PushTimes & " 次, 抓到 " & SuccessCount & " 条"
Delay 1500
Else
ShowMessage "买点鱼饵"
'点击蚯蚓,打开商店
MTouch 436, 74
Delay 1000
End If
End If
End Function
' 图鉴页面
Function isFishCollectScene()
If CmpColorEx("899|1529|293CCE,896|1775|293CCE,1015|1850|428EBD,534|507|9CC7D6", 1) = 1 Then
isFishCollectScene = TRUE
TracePrint "isFishCollectScene"
Else
isFishCollectScene = FALSE
End If
End Function
Function onFishCollectScene()
' 关闭图鉴
MTouch 1017, 1858
Delay 500
End Function
' 渔场商店
Function isFishShopScene()
If CmpColorEx("171|194|212839,664|595|313852,862|402|212431,665|112|526973",0.95) = 1 Then
isFishShopScene = TRUE
TracePrint "isFishShopScene"
Else
isFishShopScene = FALSE
End If
End Function
Function onFishShopScene()
For 5
swipeDown 445, 1005
Delay 300
Next
Delay 1000
KeepCapture
' 如果蚯蚓没有设置
If CmpColorEx("395|1658|52DBA5,445|1759|52DBA5",0.95) = 1 Then
MTouch 417, 1704
Delay 2200
End If
If TryFishTimes < MAX_FISH_TIMES Then
' 关闭
MTouch 1016, 1849
Else
' 购买蚯蚓按钮
MTouch 425, 1554
End If
Delay 1000
End Function
' 买蚯蚓界面
Function isFishBuyScene()
If CmpColorEx("840|1476|428EBD,241|1495|212429,231|1318|212429,245|433|313C42,273|432|313C42",0.9) = 1 Then
isFishBuyScene = TRUE
TracePrint "isFishBuyScene"
Else
isFishBuyScene = FALSE
End If
End Function
Function onFishBuyScene()
If TryFishTimes < MAX_FISH_TIMES Then
' 直接关闭
MTouch 843, 1479
Delay 1000
' 退出
MTouch 1016, 1849
Delay 1000
Else
' 随便买点40~50
' MTouch 258, 554
' 多买点
MTouch 261, 726
Delay 500
' 确定
MTouch 261, 1383
Delay 2000
onFishBuyEndScene
End If
End Function
' 买完鱼确定
Function isFishBuyEndScene()
If CmpColorEx("159|823|E7CB4A,240|829|E7CB4A,169|1092|E7CB4A,241|1108|E7CB4A",0.95) = 1 Then
isFishBuyEndScene = TRUE
TracePrint "isFishBuyEndScene"
Else
isFishBuyEndScene = FALSE
End If
End Function
Function onFishBuyEndScene()
MTouch 207, 952
Delay 1000
MTouch 1016, 1849
TryFishTimes = 0
Delay 1000
End Function
Function isNoFishTips()
If CmpColorEx("542|682|BDBABD,541|1235|BDBABD,546|964|5A75FF,551|1136|5A75FF",0.9) = 1 Then
isNoFishTips = TRUE
TracePrint "isNoFishTips"
Else
isNoFishTips = FALSE
End If
End Function
Function onNoFishTips()
ShowMessage "没有鱼饵了"
TryFishTimes = MAX_FISH_TIMES
End Function
' 甩勾
Function isPushScene()
If CmpColorEx("834|407|FF8673,843|407|FFDFB5,858|1580|848E94",0.9) = 1 Then
isPushScene = TRUE
TracePrint "isPushScene"
Else
isPushScene = FALSE
End If
End Function
Function onPushScene()
' 浮漂Y从 555~1565 用时2000ms
' 命中区域宽202像素
Dim MAX_FY = 1565
Dim FWIDTH = 1010
Dim FMSEC = 2000
Dim BWIDTH = 202
Dim dis = 0 ' 需要等待的时长
Dim intBX, intBY, intFX, intFY
FindColor 822,558,877,1568, "F76110", 0, 0.95, intBX, intBY
FindColor 822,558,877,1568, "CEEB63", 0, 0.95, intFX, intFY
If intBX > -1 And intBY > -1 And intFX > -1 And intFY > -1 Then
If intFY > intBY Then
' 已经过了
If intFY > MAX_FY Then
ShowMessage "errorPox F:" & intFY
intFY = MAX_FY
End If
dis = (MAX_FY - intFY)+(MAX_FY-intBY - BWIDTH)
dis = (dis / FWIDTH * FMSEC)
ShowMessage "等待甩勾R:" & Int(dis) & "ms"
Delay dis
touchFishing
ElseIf intFY < intBY Then
' 还没到
dis = intBY - intFY
dis = (dis / FWIDTH * FMSEC)
ShowMessage "等待甩勾L:" & Int(dis) & "ms"
Delay dis
touchFishing
Else
' 刚好在
ShowMessage "甩勾, fy:"&intFY&", by"&intBY
touchFishing
End If
PushTimes = PushTimes + 1
Delay 4500
End If
End Function
' 是否有抓到鱼
Function isCatchingNotice()
If CmpColorEx("538|221|EFFFFF,553|260|6B515A,545|290|EFFFFF",0.9) = 1 Then
isCatchingNotice = TRUE
TracePrint "isCatchingNotice"
Else
isCatchingNotice = FALSE
End If
End Function
Function onCatchingNotice()
' 压杆这么久
ShowMessage "出现鱼!"
touchFishing
End Function
Function isFishingBar()
If CmpColorEx("868|1574|848E94,862|1589|848E94,876|1611|DEE3E7,854|1612|52595A",0.9) = 1 Then
isFishingBar = TRUE
TracePrint "isFishingBar"
Else
isFishingBar = FALSE
End If
End Function
Function onXXScene()
End Function
' 力量缺乏
Function isWeakStrength()
If CmpColorEx("870|1058|7B5100,843|1055|7B3008,862|1198|527931,840|1197|426D00",0.95) = 1 Then
isWeakStrength = TRUE
TracePrint "isWeakStrength"
Else
isWeakStrength = FALSE
End If
End Function
Function onWeakStrength()
ShowMessage "加大力气"
pressFishing ON_WEAK_PRESS_TIME
End Function
' 绿色乏力
Function isGreenWeak()
' ADF36B, 84DB08 亮绿12
' 527931, 426D00 暗绿12
' 1061~1465
If CmpColorEx("866|1036|FFA200,861|1074|ADF36B,866|1435|527931,858|1542|000C52",0.9) = 1 Then
isGreenWeak = TRUE
TracePrint "isGreenWeak"
Else
isGreenWeak = FALSE
End If
End Function
Function onGreenWeak()
End Function
' 拉鱼, 张力未满状态
Function isPullScene()
If CmpColorEx("864|1060|FFA200,842|854|F76110,859|1465|527931,842|1465|426D00",0.95) = 1 Then
isPullScene = TRUE
TracePrint "isPullScene"
Else
isPullScene = FALSE
End If
End Function
Function onPullScene0()
pressFishing PULL_PRESS_MSECS
' Y 从555~1565总宽1010,需2400ms
' 蓝色宽505,绿色宽405,红色宽100
' 蓝色 1200ms
' 0.42像素/ms = 1010/2400
' Dim intX,intY
' FindColor 862,1420,862,1475,"527931",0,0.95,intX,intY
' If intX > -1 And intY > -1 Then
' Dim MIN_FY = 1060
' Dim MAX_FY = 1565
' If intY < MIN_FY Then
' TracePrint "less intY:"&intY
' intY = MIN_FY
' End If
' If intY >= MIN_FY And intY <= MAX_FY Then
' Dim dis = (MAX_FY - intY)
' Dim costTime = dis * 0.42 + 20
' pressFishing costTime
' TracePrint "press:"&costTime&", dis:"&dis
' Else
' ShowMessage "unknow force potion"
' End If
' End If
End Function
Function onPullScene()
ShowMessage "拉鱼"
While True
If isWhiteQTE() Then
onWhiteQTE
ElseIf isPullFull() Then
' 红色已过
onPullFull
ElseIf isGreenWeak() Then
' 绿色乏力
pressFishing PULL_LONG_PRESS_MSECS
ElseIf isPullScene() Then
' 绿色未满
onPullScene0
ElseIf isWeakStrength() Then
' 蓝色未满
onWeakStrength
ElseIf isFishingBar() Then
onPullFull
ElseIf isColorQTE() Then
onColorQTE
Else
ShowMessage "unknow pull scene"
Exit While
End If
KeepCapture
Wend
End Function
' 判断张力是否满
Function isPullFull()
If CmpColorEx("866|1049|FFA200,863|1372|ADF36B,862|1467|0820AD,874|1467|2134EF",0.9) = 1 Then
isPullFull = TRUE
TracePrint "isPullFull"
Else
isPullFull = FALSE
End If
End Function
Function onPullFull()
Delay PULL_FULL_DELAY
End Function
' 是否白色QTE
Function isWhiteQTE()
' 多个点或
isWhiteQTE = TRUE
TracePrint "isWhiteQTE"
Dim c1 = CmpColor(156, 1525,"FFFFFF",1)
If c1 <= -1 Then
Dim c2 = CmpColor(155, 1460,"FFFFFF",1)
If c2 <= -1 Then
Dim c3 = CmpColor(157, 1400,"FFFFFF",1)
If c3 <= -1 Then
Dim c4 = CmpColor(157, 1300,"FFFFFF",1)
If c4 <= -1 Then
isWhiteQTE = False
End If
End If
End If
End If
End Function
Function onWhiteQTE()
' 白色QTE
ShowMessage "白色QTE"
Swipe 158, 1700, 158, 1470
Swipe 158, 1530, 158, 1200
End Function
' 颜色QTE
Function isColorQTE()
If CmpColorEx("92|165|212042,92|215|212042,122|254|212031,122|1903|314563",0.9) = 1 Then
isColorQTE = TRUE
TracePrint "isColorQTE"
Else
isColorQTE = FALSE
End If
End Function
Function onColorQTE()
' 彩色QTE
' 红,黄黄,蓝蓝√
' 黄黄,红红,黄黄√
' 黄,红,黄黄√
' 红,黄黄,黄√
' 红,黄,蓝蓝蓝√
' 黄,黄,蓝√
' 黄,蓝蓝,红红√
' 红,蓝,红红√
' 红,蓝,黄黄
ShowMessage "彩色QTE"
' saveQTE
Delay 300
KeepCapture
If CmpColorEx("99|371|BD6542,98|565|0020FF,89|752|73CFFF,98|1141|BD6542,602|526|4265EF",1) = 1 Then
' 第一种情况 点 红2,黄3,蓝蓝蓝3|4|5
colorQTE 2, 3, 3
ElseIf CmpColorEx("90|369|73CFFF,98|1718|0020FF,99|1139|0020FF,87|1331|73CFFF",0.9) = 1 Then
'黄1,红8,黄黄(7|8,4|5)
colorQTE 1, 8, 8
ElseIf CmpColorEx("87|752|73CFFF,99|951|0020FF,88|1142|73CFFF,102|1332|BD6542",0.9) = 1 Then
' 红4,黄黄4|5,蓝蓝5|6
colorQTE 4, 5, 5
ElseIf CmpColorEx("92|563|52CFFF,97|757|0020FF,89|1145|73CFFF,97|1525|0020FF",0.9) = 1 Then
' 黄黄1|2,红红3|4,黄黄5|6
colorQTE 2, 4, 6
ElseIf CmpColorEx("99|564|BD6542,92|753|73CFFF,92|1331|73CFFF,98|1525|BD6542",0.9) = 1 Then
' 黄3,黄6,蓝7
colorQTE 3, 6, 7
ElseIf CmpColorEx("96|1326|73CFFF,92|1520|73CFFF,598|621|4265EF,100|566|0020FF,91|749|73CFFF",0.9) = 1 Then
' 红2,黄黄6|7,黄5
colorQTE 2, 7, 5
ElseIf CmpColorEx("105|977|0000DE,109|1168|AD4521,103|1505|52CFFF,108|1726|0020FF",0.9) = 1 Then
' 黄7,蓝蓝6|7,红红7|8
colorQTE 7, 7, 7
ElseIf CmpColorEx("106|977|0000DE,108|1165|0000DE,109|1363|AD4521,107|1744|0000DE", 0.9) = 1 Then
' 红1,蓝3,红红4|5
colorQTE 1, 3, 4
ElseIf CmpColorEx("105|403|0000DE,105|598|AD4521,106|786|21BAFF,104|979|21BAFF,89|1326|73CFFF", 0.9) = 1 Then
' 红1,蓝2,黄黄3|4
colorQTE 1, 2, 3
Else
' saveQTE
End If
End Function
Function saveQTE()
Dim dirName = "/sdcard/Pictures/"
Dim dirResult = TRUE
TracePrint "dirResult"
If Dir.Exist(dirName) <> True Then
dirResult = Dir.Create(dirName)
End If
If dirResult<>True Then
dirName = ""
End If
Dim name = dirName&Time()&".png"
SnapShot name
ShowMessage "savefile:" & name
End Function
' 钓到了,继续
Function isContinueScene()
If CmpColorEx("162|1522|E7CB4A,207|1524|E7CB4A,167|1737|E7CB4A,212|1723|E7CB4A",0.9) = 1 Then
isContinueScene = TRUE
TracePrint "isContinueScene"
Else
isContinueScene = FALSE
End If
End Function
Function onContinueScene()
If PushTimes > 0 Then
SuccessCount = SuccessCount + 1
End If
ShowMessage "甩勾 " & PushTimes & " 次, 抓到 " & SuccessCount & " 条"
Delay 1500
MTouch 192, 1601
Delay 300
End Function
Function isPauseScene()
If CmpColorEx("329|789|4A7DFF,498|809|52DBA5,671|818|E7CB4A,517|1190|7B8284",0.9) = 1 Then
isPauseScene = TRUE
TracePrint "isPauseScene"
Else
isPauseScene = FALSE
End If
End Function
Function onPauseScene()
If curFunc = FUNC_BATTLE Then
' 退出
MTouch 329, 789
Delay 1000
MTouch 262, 1140
Delay 4000
Else
' 设置
' MTouch 498,809
' 继续
MTouch 671,818
End If
End Function
Function isDimandUseScene()
If CmpColorEx("865|690|293C4A,821|706|213039,851|1192|428EBD,685|760|213031,726|705|DEEFFF",0.9) = 1 Then
isDimandUseScene = TRUE
TracePrint "isDimandUseScene"
Else
isDimandUseScene= FALSE
End If
End Function
Function onDimandUseScene()
MTouch 851, 1192
Delay 2000
End Function
Function isLoginScene()
If CmpColorEx("57|1654|DEF3FF,70|1669|212429,57|1866|212429,51|1883|5A7D94",0.9) = 1 Then
isLoginScene = TRUE
TracePrint "isLoginScene"
Else
isLoginScene = FALSE
End If
End Function
Function onLoginScene()
MTouch 114, 972
ShowMessage "重启次数:" & restartCount
Delay 2000
End Function
Function isSignUpScene()
If CmpColorEx("931|439|213039,984|443|293C4A,926|1346|213039,970|1376|293C4A,952|1447|428EBD",0.9) = 1 Then
isSignUpScene = TRUE
TracePrint "isSignUpScene"
Else
isSignUpScene = FALSE
End If
End Function
Function onSignUpScene()
MTouch 952, 1447
Delay 500
End Function
Function isLoginWin1Scene()
If CmpColorEx("982|64|213039,1017|1852|428EBD,997|567|213039,1032|59|293C4A",0.9) = 1 Then
isLoginWin1Scene = TRUE
TracePrint "isLoginWin1Scene"
Else
isLoginWin1Scene = FALSE
End If
End Function
Function onLoginWin1Scene()
MTouch 1014, 1854
Delay 500
End Function
Function isLoginWin2Scene()
If CmpColorEx("146|394|DEEFFF,989|356|213039,1019|1578|428EBD,1027|1255|293C4A",0.9) = 1 Then
isLoginWin2Scene = TRUE
TracePrint "isLoginWin2Scene"
Else
isLoginWin2Scene = FALSE
End If
End Function
Function onLoginWin2Scene()
MTouch 1019, 1578
Delay 500
End Function
Function isLoginWin3Scene()
If CmpColorEx("931|1518|428EBD,893|1207|213039,946|622|293C4A,551|1533|DEEFFF",0.9) = 1 Then
isLoginWin3Scene = TRUE
TracePrint "isLoginWin3Scene"
Else
isLoginWin3Scene = FALSE
End If
End Function
Function onLoginWin3Scene()
MTouch 931, 1518
Delay 500
End Function
Function isLoginWin4Scene()
If CmpColorEx("981|1634|428EBD,950|1453|213039,997|1448|293C4A,1009|1071|293C4A",0.9) = 1 Then
isLoginWin4Scene = TRUE
TracePrint "isLoginWin4Scene"
Else
isLoginWin4Scene = FALSE
End If
End Function
Function onLoginWin4Scene()
MTouch 981, 1634
Delay 500
End Function
Function isLoginWin5Scene()
If CmpColorEx("855|309|213039,904|303|293C4A,854|1464|213039,906|1445|293C4A,885|1631|428EBD",0.9) = 1 Then
isLoginWin5Scene = TRUE
TracePrint "isLoginWin5Scene"
Else
isLoginWin5Scene = FALSE
End If
End Function
Function onLoginWin5Scene()
MTouch 882, 1631
Delay 500
End Function
Function isBattleTestScene()
If CmpColorEx("100|149|213863,98|234|213863,154|1313|3938CE,177|1767|425173,163|1515|5ACBF7",0.9) = 1 Then
isBattleTestScene = TRUE
TracePrint "isBattleTestScene"
Else
isBattleTestScene = FALSE
End If
End Function
Function onBattleTestScene()
MTouch 126, 196
Delay 1000
End Function
' 渔场选择界面
Function isFishPage()
If CmpColorEx("125|1215|C6A242,69|1377|291C73,990|1621|101818,985|57|213039",0.9) = 1 Then
isFishPage = TRUE
TracePrint "isFishPage"
Else
isFishPage = FALSE
End If
End Function
Function onFishPage()
If curFunc = FUNC_BATTLE Then
MTouch 1014, 1857
Delay 1000
Exit Function
End If
' 点一下
MTouch 867, 1679
Delay 500
' 滑到顶
For 3
swipeUp 917, 1765
Delay 250
Next
Delay 500
Dim fixWidth = 147
For i = 0 To 4
MTouch 267 + i * fixWidth * 2, 1700
Delay 500
MTouch 90, 1700
Delay 800
Next
Delay 4000
End Function
Function isCoverButton()
If CmpColorEx("147|794|212429,166|876|212429,164|1124|212429,53|578|000000",0.95) = 1 Then
isCoverButton = TRUE
TracePrint "isCoverButton"
Else
isCoverButton = FALSE
End If
End Function
Function onCoverButton()
MTouch 173, 955
Delay 800
End Function
' 选择竞技场
Function isThreeBattleScene()
If CmpColorEx("389|228|10185A,168|228|181C39,858|270|182029,187|1697|181C39,391|1711|10185A",0.9) = 1 Then
isThreeBattleScene = TRUE
TracePrint "isThreeBattleScene"
Else
isThreeBattleScene = FALSE
End If
End Function
Function onThreeBattleScene()
If curFunc = FUNC_BATTLE Then
' 竞技场
MTouch 361, 482
' MTouch 360, 961
Else
MTouch 1019,1830
End If
Delay 1000
End Function
' 战斗选人or 进入竞技
Function isFightChoseScene()
If CmpColorEx("531|358|213031,139|1282|EFCF42,138|1579|EFCF42,174|615|314552",0.9) = 1 Then
isFightChoseScene = TRUE
TracePrint "isFightChoseScene"
Else
isFightChoseScene = FALSE
End If
End Function
Function onFightChoseScene()
isInBattle = True
If pvpBuyBlock Then
' 买块
MTouch 459, 554
Delay 100
' 加速
MTouch 453, 696
Delay 100
End If
If battleChooseFirst Then
' 选第一个
MTouch 500, 1480
Else
' 选第二个
MTouch 334, 1475
End If
Delay 500
' 进入竞技
MTouch 173,1274
Delay 1500
End Function
' 选人开始战斗
Function isReadyBattleScene()
If CmpColorEx("60|570|DEEFFF,131|973|52DFAD,112|1472|EFCF42,644|1526|DEEFFF",0.9) = 1 Then
isReadyBattleScene = TRUE
TracePrint "isReadyBattleScene"
ElseIf CmpColorEx("609|309|9CCFDE,141|324|314552,192|1423|EFCF42,64|1556|DEEFFF,539|368|213031",1) = 1 Then
isReadyBattleScene = TRUE
TracePrint "isReadyBattleScene"
Else
isReadyBattleScene = FALSE
End If
End Function
Function onReadyBattleScene()
' 准备开始
MTouch 124,1479
Delay 1000
End Function
' 正在战斗,放技能
Function isFightingScene()
If CmpColorEx("170|676|101031,7|862|212042,184|477|212042,172|102|101021", 0.95) = 1 Then
' 判断间隙
isFightingScene = TRUE
TracePrint "isFightingScene"
ElseIf CmpColorEx("267|1780|31BAD6,267|1643|31C3DE,239|1583|31C7E7,243|1589|082829",0.9) = 1 Then
' 女神边框
isFightingScene = TRUE
TracePrint "isFightingScene2"
Else
isFightingScene = FALSE
End If
End Function
Function onFightingScene()
Dim loopTimes = 0
Do
onFightingScene0 loopTimes
KeepCapture