[按键精灵] 纯文本查看 复制代码
Dim intX,intY,队号
Dim 是否相等
Dim ret
Dim 返回坐标()
Call 离开基地()
Do
Tap 359, 984
Delay 1000
ret = zm.FindColor(532,165,645,168,"423421|AD8652", "0.7-0.9") //智能相似度要有双引号
If not ret Then //可以直接用not表示没找到
TracePrint "没有找到"
Call 智能换第六角色()
Delay 200
Call 离开基地()
End If
// FindPic 350,710,535,766,"Attachment:3.png","000000",0,0.9,intX,intY
If zm.FindPic(350,710,535,766, "3.png", 0.9) Then //可以直接用我插件的找图命令, 更加节省代码量, 后面找图自己改
TracePrint "遇到逃跑怪回家"
Delay 200
Tap 54, 1080
Delay 200
Tap 502, 1094
End If
// FindPic 350,711,449,765,"Attachment:2.png|Attachment:4.png|Attachment:7.png","000000",0,0.9,intX,intY
If zm.FindPic(350,711,449,765,"2.png|4.png|7.png", 0.9, 返回坐标) Then //这是我插件带上返回参数的写法
Delay 200
Tap 返回坐标["x"],返回坐标["y"]
End If
FindPic 316,769,542,957,"Attachment:6.png","000000",0,0.9,intX,intY
If intX > -1 And intY > -1 Then
Delay 500
Call 找到蛇()
Delay 500
Call 等待队长放人()
Delay 500
Call 结束战斗()
Delay 500
Call 离开队伍()
End If
Loop
Sub 离开基地()
Dim intX,intY
FindPic 0,0,0,0,"Attachment:1.png","000000",0,0.9,intX,intY
If intX > -1 And intY > -1 Then
Delay 200
Tap intX,intY
End If
Delay 200
Tap 502, 1094//点击离开基地
TracePrint "离开基地"
End Sub
Sub 智能换第六角色()
ret = zm.FindPicTap("11.png","左下","0.7-0.9") //可以省略Attachment:前缀
If ret Then
Delay 400
Tap 490, 843
Delay 500
Tap 376, 571
Delay 400
End If
KillApp "com.xxyystudio.g2"
Delay 1000
RunApp "com.xxyystudio.g2"
Delay 10000
Tap 369, 1077
Delay 200
Tap 360, 960
Delay 5000
Tap 601, 995
Delay 200
Tap 632, 1214
Delay 5000
End Sub
Sub 找到蛇()
TracePrint "找到路牌"
Delay 400
Tap intX, intY
Delay 400
Tap 403, 762
Delay 400
Tap 401, 839
Delay 400
Tap 395, 837
Delay 400
Tap 395, 841
Delay 400
Tap 508, 1215
Delay 400
Tap 311, 868
Delay 1000
zm.KeyPressDel(2)
TracePrint "申请入队"
Delay 200
InputText ReadUIConfig("队号", "100")
Delay 200
Tap 374, 968
End Sub
Sub 等待队长放人()
Do
Delay 200
Tap 374, 968
Delay 2000
TracePrint "等待队长放人"
FindPic 0,0,0,0,"Attachment:5.png","000000",0,0.8,intX,intY
If intX > -1 And intY > -1 Then
TracePrint "进入队伍"
Delay 400
Tap 71, 1207
Delay 400
TracePrint "发起组队攻击"
Tap 415, 840
Delay 400
Tap 602, 1128
Exit Do
End If
Loop
End Sub
Sub 结束战斗()
Do
Delay 1000
TracePrint "战斗中"
FindMultiColor 273,959,436,1110,"394952","-2|-14|425963,-1|18|425963,-58|17|4A616B,-59|2|425963,-59|-14|4A616B,57|-14|4A616B,58|1|425963,57|17|4A616B",1,1.0,intX,intY
If intX > -1 And intY > -1 Then
Delay 200
Tap intX, intY
TracePrint "图片找到并执行了点击"
Delay 200
tap 70,1201 //搜索界面世界坐标
Delay 200
tap 507,1215 //搜索界面下组队坐标
Delay 200
Tap 104,242 //组队界面下“我的队伍坐标”
Exit Do
End If
Loop
End Sub
Sub 离开队伍()
Do
Delay 1000
TracePrint"寻找离开队伍"
FindPic 520,318,668,925,"Attachment:9.png","000000",1,0.8,intX,intY
If intX > -1 And intY > -1 Then
TracePrint intX,intY
Delay 200
Tap intX,intY
Delay 200
Tap 71, 1209
Exit Do
End If
Loop
End Sub