UserVar hong=70 血量<hong%时,自动吃红。
UserVar xp=DropList{是:1|否:2}=0 是否自动XP
UserVar XPZ="877,555" XP坐标
UserVar sou=DropList{是:1|否:2}=0 搜不到怪是否随机移动
UserVar cs=3 随机移动步数
UserVar cs2=2 检查几次金币
UserVar cs3=2 找到怪后打几下
UserVar Ys=3500 每步延时
XY=Split(XPZ,",")
mx=XY(0):my=XY(1)
Rem 机战
Gosub 检查HP
Gosub 检查装备是否要修
Gosub 检查XP
Gosub 找怪1
Gosub 捡物
Goto 机战
Sub 检查HP
IfColor hong/100*(205-88)+88,14,000000,2
KeyPress 112,1
Delay 10
EndIf
Return
Sub 检查装备是否要修
VBSCall FindPic(743,53,853,140,"Attachment:\装备要修.bmp",0.9,x,y)
If x>0 and y>0
KeyPress 119,1
Delay 10
For 10
Beep
EndFor
EndScript
EndIf
Return
Sub 检查XP
VBSCall FindPic(0,0,114,121,"Attachment:\xp1.bmp",0.9,x,y)
If x=-1 and y=-1
Goto 再次检查
Else
Goto 回去
EndIf
VBSCall FindPic(0,400,42,542,"Attachment:\xp2.bmp",0.9,x2,y2)
If x2=-1 and y2=-1 and xp=1
MoveTo mx,my
Delay 10
LeftClick 1
EndIf
Rem 回去
Return
Sub 找怪1
S=0
Rem 渐开线
r=20:x0=512:y0=384:x=0:y=0:shape=248174080:r=10
While r<300
n=0
While n<3.1415926*2
x=x0+r*cos(n)
y=y0-r*sin(n)
MoveTo x y
VBSCall Shape1=GetCursorShape(0)
If Shape1=Shape
For cs3
RightClick 1
Delay 10
S=1
EndFor
Goto 渐开线
EndIf
n=n+0.03
EndWhile
Delay 10
r=r+30
EndWhile
VBSCall FindColorEx(300,165,784,523,"0303b8",1,0.9,x,y)
If x=-1 and y=-1 and sou=1 and S=0
Gosub 检查HP
Gosub 捡物
Gosub 随机移动
EndIf
Return
Sub 捡物
For cs2
VBSCall FindPic(0,0,1024,768,"Attachment:\金币.bmp",0.9,x,y)
If x>0 and y>0
MoveTo x,y
Delay 100
LeftClick 1
Delay 3000
EndIf
EndFor
Return
Sub 随机移动
Randomize
sjsj = Int((4 * Rnd) + 1)
If sjsj=1
MoveTo 14,100
Delay 100
For cs
LeftClick 1
Delay Ys