笨笨随机本本


Delay 1111
BeginThread 判断卡死
Do
Call 判断任务()
loop

Sub 判断任务()
Delay 777
Q=0
FindPic 1,5,810,602,"C:\明月.bmp",0.9,Q,W
If Q > 0 And W > 0 Then 
TracePrint "找到明月等待十五秒然后去接任务"
//Delay 15000
//Call 重置()
//Delay 555

Do
Call 重置()
打开地图 

MoveTo 432, 256
Delay 333
LeftClick 2
Delay 3333

X = 0
XY=Plugin.Color.FindShape(149,295,311,378,"1|0|1,2|0|1,2|1|1,2|2|1,2|3|1,2|4|1,2|5|1,2|6|1,2|7|1,2|8|1,2|10|1,3|10|1,4|10|1,5|10|0,6|10|1,6|9|0,7|9|1,7|8|0,8|8|1,8|7|0,9|7|1,9|6|1,10|6|0,15|6|1,15|7|1,15|8|0",1)
dim MyArray
MyArray = Split(XY, "|")
X = CInt(MyArray(0)) : Y = CInt(MyArray(1))
If X > 0 Then 
TracePrint "找到了我想进入副本,退出do"
Exit Do
Else 
Call 重置()
打开地图 
Delay 666
MoveTo 397, 257
Delay 333
LeftClick 1
LeftClick 1

End If
Loop


Delay 333
MoveTo X, Y
Delay 333
LeftClick 1
Delay 777
    MoveTo 287,300
Delay 1666
LeftClick 1
Delay 333
MoveTo 210, 326
Delay 1666
LeftClick 1
TracePrint "30次就不进入了就这样"

TracePrint "等待副本进入咯~"
Delay 11111
Call 在副本()
Delay 222
Else 
Delay 333
TracePrint "不在明月在副本中"
Q=0
FindPic 1,5,810,602,"C:\明月.bmp",0.9,Q,W
If Q > 0 And W > 0 Then 
Call 判断任务()
Exit Sub
 
Else 
Call 在副本()
End If
End if
End Sub

Sub 重置()
Delay 333
KeyDown 17, 1
KeyPress 65, 1
KeyUp 17, 1

KeyDown 17, 1
KeyPress 65, 1
KeyUp 17, 1
KeyDown 17, 1
KeyPress 65, 1
KeyUp 17, 1
Delay 333
KeyPress "Esc", 1
Delay 333
End Sub

Sub 开箱子()

KeyPress "F9", 1
专门开箱子
Q = 0
W = 0
FindColor 1,19,810,613,"FEFE0E",Q,W
If Q > 0 And W > 0 Then 
MoveTo Q + 10, W - 50
Delay 333
RightClick 4
End If
TracePrint "28"
MoveTo 134, 222
RightClick 1
Delay 222
MoveTo 231, 176
RightClick 1
Delay 222
MoveTo 292, 147
RightClick 1
Delay 222
MoveTo 353, 130
RightClick 1
Delay 222
MoveTo 195, 280
RightClick 1
Delay 222
MoveTo 273, 245
RightClick 1
Delay 222
MoveTo 327, 230
RightClick 1
Delay 222
MoveTo 370, 222
RightClick 1
Delay 222
MoveTo 339, 249
RightClick 1
Delay 222

MoveTo 124, 156

RightClick 1
Delay 222
MoveTo 71, 181

RightClick 1
Delay 222
MoveTo 46, 188

RightClick 1
Delay 222
MoveTo 217, 114

RightClick 1
Delay 222
MoveTo 135, 90

RightClick 1
Delay 222
MoveTo 194, 211

RightClick 1
Delay 222
MoveTo 260, 103

RightClick 1
End Sub

Sub 在副本()
 
Do
Delay 333
TracePrint "先看有没有筛子再进行操作"
A=0
FindPic 208,73,629,583,"C:\shaizi.bmp",0.87,A,S
If A > 0 And S > 0 Then 
Delay 444
MoveTo 492, 176
Delay 222
LeftClick 3
Delay 333
Call 重置()
TracePrint "筛子被我点没有了"
End If

TracePrint "看看确认是在哪?~"
Delay 333
Q=0
FindPic 1,5,810,602,"C:\明月.bmp",0.9,Q,W
If Q > 0 And W > 0 Then 
TracePrint "竟然是在明月?!"
Delay 222
Call 判断任务()
Exit Sub
Else 
TracePrint "在副本确认了!!"
End If

X = 0
TracePrint "看看是不是需要开箱子了"
MoveTo 131, 80
Delay 999
XY=Plugin.Color.FindMutiColor(0,0,800,600,"00FEFE","1|0|00FEFE,1|2|00FEFE,0|2|00FEFE,-1|2|00FEFE,-2|2|00FEFE,-3|2|00FEFE,-3|3|00FEFE,-3|4|00FEFE,-2|4|00FEFE,-1|4|00FEFE,-2|6|00FEFE,-1|7|00FEFE,2|7|00FEFE,1|6|00FEFE,1|24|FEFEFE,0|24|FEFEFE,-1|24|FEFEFE,-6|28|FEFEFE,-5|28|FEFEFE,-4|28|FEFEFE,-4|29|FEFEFE,-4|30|FEFEFE,-4|31|FEFEFE,-4|32|FEFEFE,-5|32|FEFEFE",1)
dim MyArray1
MyArray1 = Split(XY, "|")
X = CInt(MyArray1(0)) : Y = CInt(MyArray1(1))
If X > 0 Then 
Delay 555
Call 开箱子()
Call 判断任务()
Exit sub 
Delay 555
End If

Call 重置()
Q=0
FindColorEx 539,146,786,448,"FEFE00",0,1.0,Q,W
If Q > 0 And W > 0 Then 
Delay 333
MoveTo Q, W
Delay 777
LeftClick 1
A=0
FindPic 16,19,438,312,"C:\mingyue.bmp",0.7,A,S
If A > 0 And S > 0 Then 
Call 判断任务()
Exit sub 
End If

End if 

A=0 
FindColorEx 504,598,581,620,"101420",0,1.0,A,S
If A > 0 And S > 0 Then 
TracePrint "zhaodao duihua"
Exit do 
End If
Loop

Delay 1222
MoveTo 171, 551
Delay 222
LeftClick 2
Call 在战斗()


End Sub

Sub 在战斗()
Do
TracePrint "等看是否在战斗呢~"
Delay 1111
E=0
FindPic 10,27,900,629,"C:\zhandou.bmp",0.9,E,R
If E > 0 And R > 0 Then 
TracePrint "find zhandou~"
Exit Do
Delay 1111
End if 
Loop
Delay 444
XY=Plugin.Color.FindMutiColor(0,0,800,600,"6CDE55","0|1|6CDE55,0|2|6CDE55,0|3|6CDE55,0|4|6CDE55,0|5|6CDE55,0|6|6CDE55,1|7|6CDE55,1|8|6CDE55,2|9|6CDE55,2|10|6CDE55,3|11|6CDE55,4|12|6CDE55,5|13|6CDE55,6|14|6CDE55,7|14|6CDE55,9|13|6CDE55,10|13|6CDE55,11|13|6CDE55,10|14|6CDE55,12|12|6CDE55,13|12|6CDE55,14|12|6CDE55,14|10|6CDE55,13|10|6CDE55,12|10|6CDE55,11|10|6CDE55,10|10|6CDE55,9|10|6CDE55,11|9|6CDE55,12|8|6CDE55,12|7|6CDE55,11|7|6CDE55,10|7|6CDE55,9|7|6CDE55",1)
dim guihuo
guihuo = Split(XY, "|")
X = CInt(guihuo(0)) : Y = CInt(guihuo(1))
If X > 0 Then 
    MoveTo X, Y - 60
    Delay 444
    LeftClick 5
End If
Do
KeyDown 17, 1
KeyPress 65, 1
KeyUp 17, 1
Delay 333
KeyPress "Esc", 1
Delay 333
E=0
FindPic 10,27,798,629,"C:\zhandou.bmp",0.9,E,R
If E > 0 And R > 0 Then 
TracePrint "在战斗中呢等10秒"
Delay 1111
A = 0

FindColorEx 10,27,798,629,"110BA8",0,1.0,A,S
If A > 0 And S > 0 Then 
TracePrint "A,S是什么鬼?"
Delay 333
MoveTo A, S
Delay 666
RightClick 3
End If
Delay 444
KeyDown 17, 1
KeyPress 65, 1
KeyUp 17, 1
Delay 111
KeyDown 17, 1
KeyPress 65, 1
KeyUp 17, 1
Delay 2222
Else 
TracePrint "退出战斗了啊已经"
Exit Do
End if 
Loop

End Sub

Function 打开地图

Do
Delay 333
X = 0
Q = 0
KeyPress "Tab", 1
Delay 555
FindColor 1, 19, 810, 613, "A97C2B", X, Y
FindColor 1,19,810,613,"B76B37",Q,W
If Q > 0 And W > 0 And X > 0 And Y > 0 Then 
Exit do 
End If
loop
End Function
Function 专门开箱子
Do
Delay 444
KeyPress "Tab", 1
Delay 1500
Q = 0
W = 0
FindColor 16,21,652,419,"A97C2B",Q,W
If Q > 0 And W > 0 Then 
Delay 555
MoveTo 202, 158
LeftClick 2
Delay 777
KeyPress "Esc", 1
Delay 767
Exit Do
End If
Loop  

End Function

Sub 判断卡死
//等待看180秒之内能不能看到等待数字,如果能看到等待数字,退出继续找
//180秒之内找不到,退出循环重新开始
Delay 2222
Do
Delay 1333
i=0
For 180
Q = 0
Delay 1000
FindColor 0,0,1175,971,"0084F0",Q,W
If Q > 0 Then 
i = i + 1
TracePrint i
End If
Next
If i > 0 Then 
    TracePrint "没卡"


    Else 
    TracePrint "卡了重新开始"

    RestartScript 
End If

Delay 1111
Loop 

End Sub

Function 部落药店
Delay 1300
X=0
XY=Plugin.Color.FindMutiColor(0,0,800,600,"FEFEFE","1|0|FEFEFE,2|0|FEFEFE,2|1|FDFDFD,2|2|D3FEF0,2|3|BDFEE9,2|4|BCFDE8,3|4|A7FEE2,4|4|BCFDE8,4|5|92FEDB,4|6|7CFED4,4|7|7BFDD3,4|8|50FEC5,5|8|50FEC5,6|8|50FEC5,10|9|50FEC5,11|9|50FEC5,12|9|50FEC5,12|8|65FDCC,13|8|66FECD,13|7|7CFED4,13|6|92FEDB,13|5|A7FEE2,13|4|BDFEE9,13|3|D3FEF0,13|2|E9FEF7,13|1|FEFEFE,17|2|E7FCF5,18|2|E9FEF7,18|1|FCFCFC,19|1|FEFEFE,20|1|FEFEFE,21|1|FEFEFE,21|2|E8FDF6,22|2|E9FEF7,21|4|BDFEE9,21|5|A6FDE1,22|5|A7FEE2,22|6|92FEDB,22|7|7CFED4,22|8|66FECD,21|8|65FDCC,21|9|50FEC5,20|9|50FEC5,19|9|50FEC5,24|9|4FFDC4,25|9|50FEC5,26|9|50FEC5,27|9|50FEC5,28|9|50FEC5,29|9|50FEC5,29|8|66FECD,28|8|65FDCC,25|7|7BFDD3,26|7|7CFED4,26|6|91FDDA,27|6|92FEDB,27|5|A6FDE1,28|5|A7FEE2,36|5|A7FEE2,36|4|A6FDE1,35|4|BDFEE9,35|3|D3FEF0,35|2|D2FDEF,35|1|FEFEFE,34|1|FEFEFE,34|0|FEFEFE,33|0|FEFEFE,43|2|E9FEF7,44|2|E9FEF7,45|2|E9FEF7,45|3|D2FDEF,45|4|BCFDE8,45|5|A6FDE1,45|6|91FDDA,45|7|7BFDD3,45|8|65FDCC,45|9|50FEC5,44|9|50FEC5,43|9|50FEC5,47|9|50FEC5,48|9|50FEC5,50|8|65FDCC,51|8|66FECD,51|9|4EFCC3,52|9|50FEC5,53|9|50FEC5,54|9|50FEC5,54|8|65FDCC,54|7|7BFDD3,54|6|91FDDA,54|5|A6FDE1,54|4|BDFEE9,53|4|BDFEE9,52|4|BDFEE9,51|4|BDFEE9,51|5|A7FEE2,50|5|A6FDE1,50|4|BCFDE8,50|3|D2FDEF,50|2|E8FDF6,50|1|FDFDFD,51|1|FEFEFE,52|1|FEFEFE,53|1|FEFEFE,54|1|FEFEFE,55|1|FEFEFE",1)
dim buluo
buluo = Split(XY, "|")
X = CInt(buluo(0)) : Y = CInt(buluo(1))

Q=0
QW=Plugin.Color.FindMutiColor(0,0,1280,1024,"FEFEFE","1|0|FEFEFE,2|0|FEFEFE,2|1|FDFDFD,2|2|D3FEF0,2|3|BDFEE9,2|4|BCFDE8,3|4|A7FEE2,4|4|BCFDE8,4|5|92FEDB,4|6|7CFED4,4|7|7BFDD3,4|8|50FEC5,5|8|50FEC5,6|8|50FEC5,6|8|50FEC5,11|7|77FED2,10|7|76FDD1,10|6|8AFED8,9|6|8AFED8,10|5|9DFDDE,10|4|B0FDE4,11|4|B1FEE5,11|3|C3FDEA,12|3|C4FEEB,13|3|C3FDEA,13|4|B0FDE4,13|5|9DFDDE,13|6|89FDD7,13|7|77FED2,13|8|63FDCB,13|9|50FEC5,12|9|4FFDC4,14|9|50FEC5,15|9|50FEC5,17|9|4FFDC4,18|9|50FEC5,19|9|50FEC5,20|9|50FEC5,21|9|50FEC5,22|8|66FECD,21|8|65FDCC,18|8|66FECD,18|7|7BFDD3,19|7|7CFED4,19|6|91FDDA,20|6|92FEDB,20|5|A6FDE1,21|5|A7FEE2,21|4|BCFDE8,21|3|D2FDEF,21|2|E8FDF6,21|1|FEFEFE,20|1|FEFEFE,19|1|FEFEFE,18|1|FDFDFD,18|2|E9FEF7,17|2|E8FDF6,17|3|D2FDEF,18|3|D3FEF0,35|3|D3FEF0,36|4|A6FDE1,36|5|A7FEE2,36|6|92FEDB,36|7|7CFED4,36|8|66FECD,37|8|4FFDC4,37|9|50FEC5,43|9|50FEC5,44|9|50FEC5,45|9|50FEC5,46|9|50FEC5,47|9|50FEC5,48|9|50FEC5,49|9|4FFDC4,50|9|50FEC5,51|9|50FEC5,53|9|50FEC5,53|8|65FDCC,54|8|66FECD,54|7|7BFDD3,55|7|7CFED4,55|6|92FEDB,54|6|91FDDA,54|6|91FDDA,53|6|92FEDB,52|6|92FEDB,51|6|92FEDB,50|6|90FCD9,50|5|A7FEE2,49|5|A6FDE1,49|4|BCFDE8,49|3|D2FDEF,50|3|D3FEF0,50|2|E9FEF7,50|1|FCFCFC,51|1|FEFEFE,52|1|FEFEFE,53|1|FEFEFE,54|1|FEFEFE,54|2|E8FDF6,55|2|E9FEF7,55|3|D3FEF0,55|4|BDFEE9,55|5|A7FEE2,46|6|92FEDB,46|6|92FEDB,46|5|A7FEE2,46|4|BDFEE9,46|3|D3FEF0,46|1|FEFEFE,45|1|FDFDFD,45|2|E9FEF7,44|2|E9FEF7,43|2|E9FEF7,45|5|A6FDE1,45|6|91FDDA,45|7|7BFDD3,45|8|65FDCC,45|9|50FEC5,44|9|50FEC5,43|9|50FEC5,49|8|65FDCC,50|8|66FECD",1)
dim xiaoqian
xiaoqian = Split(QW, "|")
Q = CInt(xiaoqian(0)): W = CInt(xiaoqian(1))
If X > 0 or Q > 0 Then 
打开地图 
TracePrint "是162,15或者42,19"
Do 
MoveTo 444,44
Delay 555
Q=0
FindColor 18,188,805,650,"62F1F8",Q,W
If Q > 0 And W > 0 Then 
TracePrint "发现,循环点药店"
MoveTo Q, W
Delay 555
LeftClick 2
End If
Delay 666
E=0
FindColorEx 3,21,805,650,"36EDFE",0,1.0,E,R
If E > 0 And R > 0 Then 
MoveTo E + 256, R + 66
TracePrint "找到治疗,点后推出循环"
Delay 667
LeftClick 1
Call 重置()
Exit Do 
End If
Loop

Else 
Exit Function 
End If
End Function

上一篇:Reading vmstat in linux – Part 1


下一篇:大前端JS篇之节流和防抖