Q语言-[帝王三国送将辅助]

纯属自己写的, 玩同一个游戏的朋友,需要送将的, 把需要送的将改名为送, 然后启动辅助即可

本辅助只支持1024x576 191dpi

附上源码

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
//本源码初始化分辨率1024x576[夏天]
Dim longX="1024"
Dim longY="576"
//本源码初始化分辨率1024x576[夏天]
//////////////////////获取屏幕分辨率[strat]//////////////////////
Dim MaxX, MaxY
MaxX = GetScreenX()
MaxY = GetScreenY()
 
eg
Function eg
    //使用于720*1280分辨率
    Dim longX="720"
    Dim longY="1280"
     
    Dim MaxX, MaxY
    MaxX = GetScreenX()
    MaxY = GetScreenY()
     
    //TracePrint MaxX, MaxY
     
    //360,239
    Dim lianX, lianY
    lianX = MaxX / (longX / 360)
    lianY = MaxY / (longY / 239)
     
    //TracePrint "获取到联系人图标"
    //TracePrint lianX,lianY
    //点击
    Tap lianX,lianY
End Function
//////////////////////获取屏幕分辨率[end]////////////////////////
 
Dim time100="100"
Dim time300="300"
Dim time500="500"
Dim time1000="1000"
Dim time1500="1500"
Dim time2000="2000"
 
Function test()
    //点击进入浏览器
    Touch 216,237, 100
    Delay 2000
    //点击输入框
    Touch 183,77, 100
    Delay time300
    //循环
    For 5
        KeyPress "del"
        Delay 50
    Next
    //填入兵种
    InputText ReadUIConfig("Barbarian")
    Delay time300
    //X坐标
    TracePrint ReadUIConfig("x-coordinate")
    Delay time300
    //Y坐标
    TracePrint ReadUIConfig("y-coordinate")
    Delay time300
    //兵种
    TracePrint ReadUIConfig("Barbarian")
    Delay time300
 
End Function
 
//进入将领列表
Function 开始运作()
    Dim JingLingX, JingLingY
    ShowMessage "进入将领列表"
    Delay time300
    JingLingX = MaxX / (longX / 851)
    JingLingY = MaxY / (longY / 542)
    //Touch 851,542, 100
    Touch JingLingX,JingLingY, 100
    Delay time300
End Function
 
 
 
///////////////////////////////////////////////////////////////测试开始//////////////////////////////////////////////////////////////////
//筛选带有[送]字的将领[白色]
Function 大筛选()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:送-白色2.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        ShowMessage "找到优良类型"
        TracePrint "找到优良类型"
        Delay time300
        //选中
        Touch intX, intY, 100
        Delay time300
        //配兵
        Call 配兵()
        Delay time300
        Call 调整()
        Delay time300
    End If
    //筛选带有[送]字的将领[白色2]
    Dim intA,intB
    FindPic 0,0,0,0,"Attachment:送-白色.png","000000",1,0.9,intA,intB
    If intA > -1 And intB > -1 Then
        TracePrint intA
        TracePrint intB
        ShowMessage "找到优良类型"
        TracePrint "找到优良类型"
        Delay time300
        //选中
        Touch intA, intB, 100
        Delay time300
        //配兵
        Call 配兵()
        Delay time300
        Call 调整()
        Delay time300
    End If
    //筛选带有[送]字的将领[黄色]
    Dim intC,intD
    FindPic 0,0,0,0,"Attachment:送-黄色2.png","000000",1,0.9,intC,intD
    If intC > -1 And intD > -1 Then
        TracePrint intC
        TracePrint intD
        ShowMessage "找到成长80-84类型"
        TracePrint "找到成长80-84类型"
        Delay time300
        //选中
        Touch intC, intD, 100
        Delay time300
        //配兵
        Call 配兵()
        Delay time300
        Call 调整()
        Delay time300
    End If
    //筛选带有[送]字的将领[黄色2]
    Dim intE,intF
    FindPic 0,0,0,0,"Attachment:送-黄色.png","000000",1,0.9,intE,intF
    If intE > -1 And intF > -1 Then
        TracePrint intE
        TracePrint intF
        ShowMessage "找到成长80-84类型"
        TracePrint "找到成长80-84类型"
        Delay time300
        //选中
        Touch intE, intF, 100
        Delay time300
        //配兵
        Call 配兵()
        Delay time300
        Call 调整()
        Delay time300
    End If
    //筛选带有[送]字的将领[红色]
    Dim intH,intI
    FindPic 0,0,0,0,"Attachment:送-红色2.png","000000",1,0.9,intH,intI
    If intH > -1 And intI > -1 Then
        TracePrint intH
        TracePrint intI
        ShowMessage "找到成长85-89类型"
        TracePrint "找到成长85-89类型"
        Delay time300
        //选中
        Touch intH, intI, 100
        Delay time300
        //配兵
        Call 配兵()
        Delay time300
        Call 调整()
        Delay time300
    End If
    //筛选带有[送]字的将领[红色2]
    Dim intJ,intK
    FindPic 0,0,0,0,"Attachment:送-红色.png","000000",1,0.9,intJ,intK
    If intJ > -1 And intK > -1 Then
        TracePrint intJ
        TracePrint intK
        ShowMessage "找到成长85-89类型"
        TracePrint "找到成长85-89类型"
        Delay time300
        //选中
        Touch intJ, intK, 100
        Delay time300
        //配兵
        Call 配兵()
        Delay time300
        Call 调整()
        Delay time300
    Else
        TracePrint "Error!"
    End If
End Function
///////////////////////////////////////////////////////////////测试结束//////////////////////////////////////////////////////////////////
 
//出征带有[送]字的将领[白色]
Function 大出征()
    //默认出征编队5这一组
    Dim FineX,FineY
    FineX = MaxX / (longX / 805)
    FineY = MaxY / (longY / 153)
    ShowMessage "选中第五编队"
    Delay time300
    Touch FineX, FineY, 100
    Delay time100
    //805,153
End Function
 
//关闭将领列表窗口
Function 关闭将领列表窗口()
    Dim CloseX,CloseY
    CloseX = MaxX / (longX / 840)
    CloseY = MaxY / (longY / 69)
    //840,69
    Touch CloseX, CloseY, 100
    Delay time100
End Function
 
//////////////////////////////////配置调用[start]////////////////////////////////////
//配兵
Function 配兵()
    Dim PeiBingX, PeiBingY
    //点击配兵
    //Touch 678, 152, 100
    PeiBingX = MaxX / (longX / 678)
    PeiBingY = MaxY / (longY / 152)
    Touch PeiBingX, PeiBingY, 100
    Delay time300
    //选择兵种
    Call 总兵种()
    Delay time100
End Function
 
//调整
Function 调整()
    Dim TiaoZhengX, TiaoZhengY
    TiaoZhengX = MaxX / (longX / 627)
    TiaoZhengY = MaxY / (longY / 285)
    //Touch 627,285, 100
    Touch TiaoZhengX, TiaoZhengY, 100
    Delay time300
    //点击兵力
    Dim DianJiBingliX,DianJiBingliY
    DianJiBingliX = MaxX / (longX / 481)
    DianJiBingliY = MaxY / (longY / 354)
    //Touch 481, 354, 100
    Touch DianJiBingliX, DianJiBingliY, 100
    Delay time500
    //输入兵力
    For 5
        KeyPress "del"
        Delay 50
    Next
    ShowMessage "输入兵力1"
    InputText "1"
    //点击确定
    Dim QueDingX,QueDingY
    QueDingX = MaxX / (longX / 477)
    QueDingY = MaxY / (longY / 107)
    Touch QueDingX, QueDingY, 100
    //Touch 477, 107, 100
    Delay time300
    //再次确定
    Dim ZaiCiQueDingX,ZaiCiQueDingY
    ZaiCiQueDingX = MaxX / (longX / 337)
    ZaiCiQueDingY = MaxY / (longY / 488)
    //Touch 337, 488, 100
    Touch ZaiCiQueDingX, ZaiCiQueDingY, 100
    Delay time1500
    ShowMessage "配兵完成"
End Function
 
//向下翻页
Function 向下翻页()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:向下翻页.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        ShowMessage "下翻"
        Touch intX, intY, 100
        Delay time100
    End If
End Function
 
//向上翻页
Function 向上翻页()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:向上翻页.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        ShowMessage "上翻"
        Touch intX, intY, 100
        Delay time100
    End If
End Function
//////////////////////////////////配置调用[end]//////////////////////////////////////
 
//////////////////////////////////兵种调用[start]////////////////////////////////////
//轻骑兵
Function 轻骑兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:轻骑兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        ShowMessage "找到轻骑兵"
        TracePrint "找到轻骑兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//重骑兵
Function 重骑兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:重骑兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        ShowMessage "找到重骑兵"
        TracePrint "找到重骑兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//铁骑兵
Function 铁骑兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:铁骑兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        ShowMessage "找到铁骑兵"
        TracePrint "找到铁骑兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//骁骑兵
Function 骁骑兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:骁骑兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        ShowMessage "找到骁骑兵"
        TracePrint "找到骁骑兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//弓兵
Function 弓兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:弓兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        TracePrint "找到弓兵"
        ShowMessage "找到弓兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//弩兵
Function 弩兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:弩兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        TracePrint "找到弩兵"
        ShowMessage "找到弩兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//强弩兵
Function 强弩兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:强弩兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        TracePrint "找到强弩兵"
        ShowMessage "找到强弩兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//弩骑兵
Function 弩骑兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:弩骑兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        TracePrint "找到弩骑兵"
        ShowMessage "找到弩骑兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//民兵
Function 民兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:民兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        TracePrint "找到民兵"
        ShowMessage "找到民兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//轻步兵
Function 轻步兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:轻步兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        TracePrint "找到轻步兵"
        ShowMessage "找到轻步兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//重步兵
Function 重步兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:重步兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        TracePrint "找到重步兵"
        ShowMessage "找到重步兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//近卫兵
Function 近卫兵()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:近卫兵.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        TracePrint "找到近卫兵"
        ShowMessage "找到近卫兵"
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//////////////////////////////////兵种调用[end]//////////////////////////////////////
 
//出征资点
Function 出征按钮()
    Dim ChuZhengX,ChuZhengY
    ChuZhengX = MaxX / (longX / 786)
    ChuZhengY = MaxY / (longY / 48)
    Touch ChuZhengX, ChuZhengY, 100
    Delay time100
    //786,48
     
End Function
//占领资源点按钮
Function 占领资源点按钮()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:占领资源点按钮.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        Touch intX, intY, 100
        Delay time100
    End If
End Function
//查找按钮
Function 查找()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:查找按钮.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        Touch intX, intY, 100
        Delay time100
    End If
End Function
//坐标输入
Function 资点坐标()
    //点击X坐标输入框
    Dim ZiDianZuoBiaoX,ZiDianZuoBiaoY
    ZiDianZuoBiaoX = MaxX / (longX / 378)
    ZiDianZuoBiaoY = MaxY / (longY / 192)
    //Touch 378, 192, 100
    Touch ZiDianZuoBiaoX, ZiDianZuoBiaoY, 100
    Delay time500
    //删除原有数字
    For 5
        KeyPress "del"
        Delay 50
    Next
    //填入新X坐标
    ShowMessage "输入X坐标"
    Delay time500
    InputText ReadUIConfig("x-coordinate")
    Delay time1500
    /////////////////////////////////完美分割线////////////////////////////////////
    Call 确定坐标()
    Delay time100
    /////////////////////////////////完美分割线////////////////////////////////////
    //点击Y坐标输入框
    Dim ZiDianZuoBiao2X,ZiDianZuoBiao2Y
    ZiDianZuoBiao2X = MaxX / (longX / 546)
    ZiDianZuoBiao2Y = MaxY / (longY / 192)
    //Touch 546, 192, 100
    Touch ZiDianZuoBiao2X, ZiDianZuoBiao2Y, 100
    Delay time500
    //删除原有数字
    For 5
        KeyPress "del"
        Delay 50
    Next
    //填入新Y坐标
    ShowMessage "输入Y坐标"
    Delay time500
    InputText ReadUIConfig("y-coordinate")
    Delay time1500
    /////////////////////////////////完美分割线////////////////////////////////////
    Call 确定坐标()
    Delay time100
    /////////////////////////////////完美分割线////////////////////////////////////
End Function
//确定坐标按钮
Function 确定坐标()
    Dim OkX,OkY
    OkX = MaxX / (longX / 480)
    OkY = MaxY / (longY / 108)
    //480,108
    Touch OkX, OkY, 100
    Delay time100
End Function
 
//资点输入完成确定按钮
Function 资点确定()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:资点确定按钮.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//占领按钮
Function 占领()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:占领按钮.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        ShowMessage "占领"
        Delay time500
        Touch intX, intY, 100
        Delay time1000
    End If
End Function
//////////////////////////////////////////////////////////////////////////////////
 
//滑动!!!!!!!!!!有待测试
Function 滑动()
    //用300毫秒的时间,从点100,100划动到点200,200
    Dim XiaX,XiaY,ShangX,ShangY
    XiaX = MaxX / (longX / 649)
    XiaY = MaxY / (longY / 439)
    ShangX = MaxX / (longX / 666)
    ShangY = MaxY / (longY / 206)
    //Swipe 649,439,666,206,300
    Swipe XiaX, XiaY, ShangX, ShangY, 300
    Delay time500
End Function
 
//资点出征按钮
Function 出征按钮2()
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:出征按钮2.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        ShowMessage "出征"
        Delay time300
        Touch intX, intY, 100
        Delay time500
    End If
End Function
//关闭资点窗口
Function 关闭资点窗口()
    Dim GuanBiX,GuanBiY
    GuanBiX = MaxX / (longX / 726)
    GuanBiY = MaxY / (longY / 107)
    //726,107
    Touch GuanBiX, GuanBiY, 100
    Delay time100
End Function
 
Function 总兵种()
    //Dim iname=0
    Dim iname=ReadUIConfig("Barbarian")
 
    Select Case iname
    Case 0
        TracePrint "轻骑兵"
        Call 轻骑兵()
        Delay time100
    Case 1
        TracePrint "重骑兵"
        Call 重骑兵()
        Delay time100
    Case 2
        TracePrint "铁骑兵"
        Call 铁骑兵()
        Delay time100
    Case 3
        TracePrint "骁骑兵"
        Call 骁骑兵()
        Delay time100
    Case 4
        TracePrint "弓兵"
        Call 弓兵()
        Delay time100
    Case 5
        TracePrint "弩兵"
        Call 弩兵()
        Delay time100
    Case 6
        TracePrint "强弩兵"
        Call 强弩兵()
        Delay time100
    Case 7
        TracePrint "弩骑兵"
        Call 弩骑兵()
        Delay time100
    Case 8
        TracePrint "民兵"
        Call 民兵()
        Delay time100
    Case 9
        TracePrint "轻步兵"
        Call 轻步兵()
        Delay time100
    Case 10
        TracePrint "重步兵"
        Call 重步兵()
        Delay time100
    Case 11
        TracePrint "近卫兵"
        Call 近卫兵()
        Delay time100
    Case Else
        TracePrint "选择错误!即将退出,请重新选择!!"
        //强制停止脚本运行
        EndScript
    End Select
     
End Function
//检测将领出征状态
Function 出征状态()
    //打开军情
    Dim JunQingX,JunQingY
    JunQingX = MaxX / (longX / 25)
    JunQingY = MaxY / (longY / 347)
    //25,347
    Touch JunQingX, JunQingY, 100
    Delay time2000
    //////////////////////////////华丽分割线//////////////////////////////
    Dim intX,intY
    FindPic 0,0,0,0,"Attachment:送攻占.png","000000",1,0.9,intX,intY
    If intX > -1 And intY > -1 Then
        TracePrint intX
        TracePrint intY
        TracePrint "出征状态"
        ShowMessage "将领属于出征状态,等待返回"
        Delay time300
        Call 刷新军情()
        Delay time1000
    Else
        //测试是否是返回状态
        Call 返回状态()
        Delay time1000
    End If
End Function
//检测将领返回状态
Function 返回状态()
    Dim intE,intF
    FindPic 0,0,0,0,"Attachment:送返回.png","000000",1,0.9,intE,intF
    If intE > -1 And intF > -1 Then
        TracePrint intE
        TracePrint intF
        TracePrint "返回状态"
        ShowMessage "将领属于返回状态,等待返回"
        Delay time300
        Call 刷新军情()
        Delay time1000
    Else
        TracePrint "悠闲状态"
        ShowMessage "将领属于悠闲状态,开始重新配兵出征"
        Delay time300
        Call 关闭军情()
        Delay time100
        //调用主程序
        Call Main()
        Delay time300
    End If
End Function
 
//关闭军情窗口
Function 关闭军情
    Dim CloseJQX,CloseJQY
    CloseJQX = MaxX / (longX / 839)
    CloseJQY = MaxY / (longY / 69)
    //839,69
    Touch CloseJQX, CloseJQY, 100
    Delay time100
End Function
//刷新军情状态
Function 刷新军情()
    Dim ShuaiXinJQX,ShuaiXinJQY
    ShuaiXinJQX = MaxX / (longX / 220)
    ShuaiXinJQY = MaxY / (longY / 491)
    ShowMessage "刷新军情状态"
    Delay time300
    //220,491
    Touch ShuaiXinJQX, ShuaiXinJQY, 100
    Delay time2000
End Function
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////Main Thread Start//////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
Function Main()
    //开始
    Call 开始运作()
    Delay time300
    //配兵
    For 4
        Call 大筛选()
        Delay time100
        Call 向下翻页()
        Delay time300
    Next
    ShowMessage "到尽头了..."
    //关闭将领列表窗口
    Call 关闭将领列表窗口()
    Delay time300
    //出征
    Call 出征按钮()
    Delay time300
    //进入资点
    Call 占领资源点按钮()
    Delay time2000
    //查找
    Call 查找()
    Delay time300
    //输入X和Y坐标
    Call 资点坐标()
    Delay time1000
    //确定资点
    Call 资点确定()
    Delay time300
    //占领按钮
    Call 占领()
    Delay time300
    //出征第五编队
    Call 大出征()
    Delay time300
    //出征攻打
    Call 出征按钮2()
    Delay time300
    //再次确定出征
    Call 资点确定()
    Delay time2000
    //关闭窗口
    Call 关闭资点窗口()
    Delay time300
 
End Function
 
Do
    //检测将领状态
    Call 出征状态()
    Delay 10000
Loop
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////Main Thread End////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

附上apk

链接:https://pan.baidu.com/s/1BGn0icX5Fe-fyCKylz34Tg
提取码:t2mf

posted @   扶苏公子x  阅读(966)  评论(0编辑  收藏  举报
编辑推荐:
· 智能桌面机器人:用.NET IoT库控制舵机并多方法播放表情
· Linux glibc自带哈希表的用例及性能测试
· 深入理解 Mybatis 分库分表执行原理
· 如何打造一个高并发系统?
· .NET Core GC压缩(compact_phase)底层原理浅谈
阅读排行:
· 新年开篇:在本地部署DeepSeek大模型实现联网增强的AI应用
· DeepSeek火爆全网,官网宕机?本地部署一个随便玩「LLM探索」
· Janus Pro:DeepSeek 开源革新,多模态 AI 的未来
· 上周热点回顾(1.20-1.26)
· 【译】.NET 升级助手现在支持升级到集中式包管理

阅读目录(Content)

此页目录为空

点击右上角即可分享
微信分享提示