Dim FileInt,FileText,FilePath,vfso,vfile
Dim x,y,fishColor,wx,wy,n,nF1,nF2,nF3,nF4,nF
FilePath="钓鱼.ini"
Set vfso = CreateObject("Scripting.FileSystemObject")
Set vfile = vfso.OpenTextFile(FilePath, 8, 1)
Plugin wx=Sys.GetScRX()
Plugin wy=Sys.GetScRY()
//F1,F2,F3,F4 表示每个键上有多少鱼饵,没有就用0表示
nF1=200
nF2=0
nF3=0
nF4=0
//设置提示钩到鱼的图标的其中一点颜色
fishColor="f7f3f7"
//*************************挂机开始**********************************
vfile.WriteLine  ""
Rem 开始
//上鱼饵
If nF1>0
    KeyPress 112,1
    nF1=nF1-1:nF="F1"
ElseIf nF2>0
    KeyPress 113,1
    nF2=nF2-1:nF="F2"
ElseIf nF3>0
    KeyPress 114,1
    nF3=nF3-1:nF="F3"
ElseIf nF4>0
    KeyPress 115,1
    nF4=nF4-1:nF="F4"
Else 
    vfile.WriteLine  now & " 没有鱼饵,停止挂机."
    Goto 完成
EndIf 
Delay 800
//刨杆
KeyPress 32,1
Delay 800
vfile.WriteLine  now & " 开始新的等待,正在使用" & nF & "的鱼饵"
n=0
//判断有没有掉到鱼
Rem 等待
Delay 1000
n=n+1
//判断时间
If n>=40
    vfile.WriteLine now & " 由于超过" & n & "秒未钓到鱼.脚本重新运行"
    Goto l
EndIf 
//找色
VBSCall FindColorEx(300,130,wx-200,wy-300,fishColor,1,0.9,x,y)
If x<=0 and y<=0
    Goto 等待
EndIf 
//拉杆
vfile.WriteLine now & " 颜色位置为(" & CStr(x) & "x" & CStr(y) & ")完成一次,还剩下的鱼饵数量为:" & nF1 & "," & nF2 & "," & nF3 & "," & nF4
Rem l
Delay 1500
KeyPress 32,1
Delay 50
KeyPress 32,1
Delay 4000
Goto 开始
Rem 完成