苍穹战线练级脚本v.1

嘛,工作上的事没找到没找到什么思路,所以摸了会儿鱼,把前阵子一直想弄的苍穹战线练级脚本写了下。 这次就不放什么流程图之类的了,功能比较简单,就只是练级而已。代码扔下面了。

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
Delay 2000
Dim screenX,screenY,deviceID,first=1
screenX = GetScreenX()
screenY = GetScreenY()
deviceID = GetDeviceID()
TracePrint ""&screenX&"*"&screenY&chr(10)

While 1
TracePrint "准备进入战役"
Call zhanyi()
first = 2


Delay 3000
Wend
//----------------//
Sub zhanyi()


Dim dijiguan=6,zdd=1,zhengxin,yanboss1,ty=245,zyi=0 //zyi的值影响章节,1为第2章。dijiguan的值影响关卡//
Touch 213, 1433, 100
TracePrint "点击战役"
Delay 1000
Touch 226, 141, 100
TracePrint "关卡类型选择,选主线战役"
Delay 1000
ty=ty+zyi*355
Touch 99, ty, 100
TracePrint "章节选择"
Delay 1000
If first = 1 Then
TracePrint "第一次启动"
For 7
TouchDown 634, 608, 1
TouchMove 608,1177, 1, 400
TouchUp 1
TracePrint "归零"
Delay 1000

Next
For dijiguan
TouchDown 608,1177, 1
TouchMove 634,608, 1, 400
TouchUp 1
TracePrint "向左滑动6次"
Delay 1000

Next


End If
Delay 1000
Touch 660, 947, 100
TracePrint "进入关卡"
Delay 1000
Touch 911, 832, 100
TracePrint "确认队伍,一队"
Delay 1000
Touch 96, 1792, 100
TracePrint "确认出击"
Delay 3000
While zdd

zdd = CmpColor(1066,103, "14E6BC", 0.9)
If zdd > -1 Then
TracePrint "寻找前进并找到了"
zdd = 1
Touch 70, 1756, 100
TracePrint "点击前进"
Delay 28000
Touch 940, 1546, 100
TracePrint "点击阵型"
Delay 1000

Else
TracePrint"寻找前进,没有找到"
Touch 620, 807, 100
TracePrint "尝试点决战"
Delay 3000
yanboss1 = CmpColor(838, 1620, "FFF72A", 0.9)
If yanboss1 > -1 Then
TracePrint "没有前进且发现结束页面"
Touch 115, 1238, 100
TracePrint "结束关卡内循环,回到外界面"
Delay 2000
Exit While
End If

End If
Delay 1000

Wend



End Sub
-------------本文结束感谢您的阅读-------------