//-------下面是重点,杀怪判断-------------------
Sub 怪红
IfColor ux + 299, uy + 58, "1814C6", 0 Then //怪物条最左边的,判断怪是否杀死了
Call 技能
Else
Call 攻结加红
Call 捡取
Call 随机算法
Call 搜怪
End If
End Sub
Sub 搜怪
Rem 怪
Call Plugin.Bkgnd.KeyPress(Hwnd, 9)
If nom2=0 Then //判断是否抢怪
IfColor ux + 453, uy + 58, "0000A5", 0 Then //怪物条最右边的,判断是否有人打了怪
Call Plugin.Bkgnd.KeyPress(Hwnd, 54) //标志攻击技能
Call 技能
Else
goto 怪
End If
End If
End Sub
//-------上面是重点,杀怪判断-------------------
Sub 随机算法 //用来随机延迟时间,不会每次时间都一样。
nom1 = Lib.算法.随机数字串(1)
nom1=int(nom1)
If nom1=3 Then
Delay 500
ElseIf nom1 = 5 Then
Delay 700
ElseIf nom1 = 9 Then
Delay 600
Else
Delay 400
End If
End Sub
Sub 捡取
Call Plugin.Bkgnd.KeyPress(Hwnd, 192)
End Sub
Sub 立即加红
IfColor hong1/100*149+ux+105, uy+61, "0000BD", 2 Then
Else
Call Plugin.Bkgnd.KeyPress(Hwnd, 55) //7键
End If
End Sub
Sub 攻结加红
IfColor hong2/100*149+ux+105, uy+61, "0000BD", 2 Then
Else
Call Plugin.Bkgnd.KeyPress(Hwnd, 56) //8键
End If
End Sub
Sub 加蓝
IfColor lan/100*149+ux+105, uy+77, "BD4900", 2 Then
Else
Call Plugin.Bkgnd.KeyPress(Hwnd, 57) //9键
End If
End Sub
Sub 加武将红
IfColor bbhp/100*92+ux+105, uy+130, "4A4DEF", 2 Then
Else
Call Plugin.Bkgnd.KeyPress(Hwnd, 48) //0键
End If
End Sub
Sub 技能
If datediff("s",t1,now)>=q1
Call Plugin.Bkgnd.KeyPress(Hwnd, 49) //1键
Delay 10
t1=now
End If
If datediff("s",t2,now)>=q2
Call Plugin.Bkgnd.KeyPress(Hwnd, 50) //2键
Delay 10
t2=now
End If
If datediff("s",t3,now)>=q3
Call Plugin.Bkgnd.KeyPress(Hwnd, 51) //3键
Delay 10
t3=now
End If
If datediff("s",t4,now)>=q4
Call Plugin.Bkgnd.KeyPress(Hwnd, 52) //4键
Delay 10
t4=now
End If
If datediff("s",t5,now)>=q5
Call Plugin.Bkgnd.KeyPress(Hwnd, 53) //5键
Delay 10
t5=now
End If
End Sub
Sub 防检测
FindPic 214,249,807,587,"Attachment:\jing.bmp",0.9,intX1,intY2
//以下是条件判断;如果返回的坐标大于0,那么就说明找到了。
If intX1 > 0 And intY2 > 0 Then
//在这里可以添加找到坐标后,需要做的处理。
moveto intx1,intx2
//播放路径("C:\WINDOWS\Media\提醒铃声.mp3")音乐文件
Call Plugin.Media.Play("C:\WINDOWS\Media\提醒铃声.mp3")