2024年4月21日发(作者:)

//得到当前最前面的窗口句柄

xyq = ound()

//移动窗口到(0, 0)位置

Call (xyq, 0, 0)

//利用小地图,自动寻路

Dim x,y,a,b

Dim color1,color2,color3,color4

//根据地图的大小自己改下面的数字,有的地方地图大,有的地方地图小。

x=100

y=100

a=430

b = 360

call 判断是否进入战斗()

Rem 开始移动鼠标

KeyPress "Tab", 1

Delay 1000

MoveTo a, b

Delay 1000

LeftClick 1

Delay 1000

KeyPress "Tab", 1

Delay 2000

Call 判断是否进入战斗()

Rem 开跑咯

If a =430 and b =360 Then

a=a-x-x

Goto 开始移动鼠标

End If

If a>299 and b < 239 Then

b=b+y+y

Goto 开始移动鼠标

End If

If a < 299 and b <239 then

a=a+x+x

Goto 开始移动鼠标

End If

If a < 299 and b >239 then

b=b-y-y

Goto 开始移动鼠标

End If

Sub 判断是否进入战斗()

FindPic 0,0,1024,768,"Attachment:战斗.bmp",0.9,intX,intY

If intX > 0 And intY > 0 Then

Call 自动战斗()

Else

Delay 1000

Goto 开跑咯

End If

End Sub

Sub 自动战斗()

FindPic 0,0,1300,800,"Attachment:法术.bmp",0.7,intX,intY

If intX > 0 And intY > 0 Then

Delay 1500

KeyDown 18, 1

KeyPress 65, 1

KeyUp 18, 1

Else

Delay 2000

Call 判断是否进入战斗()

End If

End Sub

Event

End Event