i = 0
j = 1
istime=0
t1 = Plugin.GetSysInfo.GetTime
Do
While i = 1
t2 = Plugin.GetSysInfo.GetTime
If t2 - t1 > 60000 Then
t1 = t2
t2 = Plugin.GetSysInfo.GetTime
istime=1
End If
Delay 500
KeyPress "F6", 1
delay 300
KeyDown 16, 1 //shift+p
KeyPress 80, 1
KeyUp 16, 1 //shift+p
Delay 500
FindPic qx,qy,1920,1080,"D:\My Documents\hongx.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
isdead = 1
Else
isdead = 0
End If
Delay 500
KeyDown 16, 1 //shift+p
KeyPress 80, 1
KeyUp 16, 1 //shift+p
If isdead = 1 Then
If istime = 1 Then
KeyPress "F5", 1 //MsgBox "f5"
Delay 500
istime=0
Else
KeyPress "F6", 1
Delay 200
End If
Else
i = 0 //退出循环
j=1
End If
Wend
While j = 1
KeyPress "F6", 1
Delay 400
KeyPress "F2", 1
Delay 300
FindColorEx qx,qy,qx+512,qy+500,"3a35c4",0,0.7,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "W", 2
MoveTo qx+121, qy+243
LeftClick 1
End If
KeyPress "F3", 1
Delay 300
FindPic qx,qy,qx+1024,qy+768,"D:\My Documents\zuojiemian.bmp",0.9,tintX,tintY
If tintX> 0 And tintY> 0 Then
j = 0
i = 1
end if
Wend
loop
j = 1
istime=0
t1 = Plugin.GetSysInfo.GetTime
Do
While i = 1
t2 = Plugin.GetSysInfo.GetTime
If t2 - t1 > 60000 Then
t1 = t2
t2 = Plugin.GetSysInfo.GetTime
istime=1
End If
Delay 500
KeyPress "F6", 1
delay 300
KeyDown 16, 1 //shift+p
KeyPress 80, 1
KeyUp 16, 1 //shift+p
Delay 500
FindPic qx,qy,1920,1080,"D:\My Documents\hongx.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
isdead = 1
Else
isdead = 0
End If
Delay 500
KeyDown 16, 1 //shift+p
KeyPress 80, 1
KeyUp 16, 1 //shift+p
If isdead = 1 Then
If istime = 1 Then
KeyPress "F5", 1 //MsgBox "f5"
Delay 500
istime=0
Else
KeyPress "F6", 1
Delay 200
End If
Else
i = 0 //退出循环
j=1
End If
Wend
While j = 1
KeyPress "F6", 1
Delay 400
KeyPress "F2", 1
Delay 300
FindColorEx qx,qy,qx+512,qy+500,"3a35c4",0,0.7,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "W", 2
MoveTo qx+121, qy+243
LeftClick 1
End If
KeyPress "F3", 1
Delay 300
FindPic qx,qy,qx+1024,qy+768,"D:\My Documents\zuojiemian.bmp",0.9,tintX,tintY
If tintX> 0 And tintY> 0 Then
j = 0
i = 1
end if
Wend
loop