Dim W,D,A,G,Tdim 计次
A=368-354//导入插件,只需执行一次
Import "zm.luae" //导入插件,只需执行一次
TracePrint A
T = 3066 - 1042
zm.Init //初始化插件,只需执行一次
zm.RndInitSeed() //初始化随机种子,只需执行一次,也可以使用zm.Init()初始化
W = GetNetworkTime()
D =(T & ("-2400000-") & A &(" 00:00:00"))
TracePrint D
If W > D Then
TracePrint"到"
Else
TracePrint"没"
Call jb()
End If
Sub jb()
计次 = 0
For 2
If 计次 > 2 Then
TracePrint "结束脚本"
ExitScript
Else
TracePrint "正常运行"
End If
Do
zm.Delay 3687, 4560
If CmpColorEx("669|35|000830-202020,688|35|000830-202020,704|36|000831-202020,678|27|8D8D8D-202020,688|17|8F8F8F-202020,697|26|8B8B96-202020,686|7|00020C-202020,678|7|00020C-202020",0.8) = 1 Then
zm.Delay 3268, 4058
RandomTap 688, 16, 16, "1.png"
zm.Delay 2589, 3058
End If
If CmpColorEx("219|1220|009F15-202020,219|1224|FFFFFF-202020,224|1226|88C08A-202020,218|1231|009F15-202020,215|1225|FFFFFF-202020,217|1229|009E1A-202020,222|1225|A3D5A8-202020", 0.9) = 1 or CmpColorEx("224|1224|009F16-202020,223|1227|FFFDFF-202020,218|1222|FFFFFF-202020,216|1229|FFFFFF-202020,215|1225|009F16-202020,225|1225|009F16-202020,221|1230|009F16-202020", 0.9) = 1 or CmpColorEx("224|1226|5384BD-202020,222|1226|006CB2-202020,219|1226|DDE9F2-202020,215|1226|006CB1-202020,218|1222|FFFFFF-202020,219|1229|FFFFFF-202020,219|1232|006DB2-202020", 0.9) = 1 Then
TracePrint "在采集"
Else
TracePrint"没有啦"
zm.Delay 2879, 3585
RandomTap 150, 58, 11, "1.png" //放大镜
zm.Delay 2987, 3521
RandomTap 62, 851, 21, "1.png"//选铁矿
zm.Delay 3235, 4205
RandomTap 190, 848, 13, "1.png"//搜索铁矿
zm.Delay 2578, 4320
If CmpColorEx("70|213|767574-202020,79|213|858483-202020,89|223|A5A4A4-202020,74|1067|C4C3C3-202020,62|1066|727170-202020,79|1057|686766-202020", 0.8) = 1 Then
TracePrint "出错"
zm.Delay 2788, 3568
RandomTap 532, 208, 25, "1.png"
Delay 2000
If CmpColorEx("576|91|4B679B-202020,576|78|4A6599-202020,574|54|E8F5FD-202020,574|34|CEEFF4-202020,574|11|3A5280-202020,599|38|4F89BF-202020",0.8) = 1 Then
TracePrint "找到任务"
计次 = 0
Else
计次 = 计次 + 1
TracePrint "计次+1"
TracePrint 计次
End If
Exit Do
End If
zm.Delay 2589, 3320
RandomTap 360, 639, 12, "1.png"//点击
zm.Delay 2478, 3689
RandomTap 195,876, 17, "1.png"//采集
zm.Delay 2558, 3668
RandomTap 564,1013, 18, "1.png"//创建部队
zm.Delay 2688, 3562
RandomTap 533,633, 4, "1.png"//取消部队
zm.Delay 2756, 3685
RandomTap 84,1061, 25, "1.png"//行军
zm.Delay 2688, 3250
End If
If CmpColorEx("576|91|4B679B-202020,576|78|4A6599-202020,574|54|E8F5FD-202020,574|34|CEEFF4-202020,574|11|3A5280-202020,599|38|4F89BF-202020",0.8) = 1 Then
TracePrint "找到任务"
Else
计次 = 计次 + 1
TracePrint "计次+1"
TracePrint 计次
End If
Exit Do
Loop //铁矿命令
Do
zm.Delay 2587, 3654
If CmpColorEx("669|35|000830-202020,688|35|000830-202020,704|36|000831-202020,678|27|8D8D8D-202020,688|17|8F8F8F-202020,697|26|8B8B96-202020,686|7|00020C-202020,678|7|00020C-202020",0.8) = 1 Then
zm.Delay 3268, 4058
RandomTap 688,