xx=659
yy=296
Gosub gopos
Delay 25000
Gosub 找商人
// ==============================================================
i=10
Gosub 卖东西
// 交票再来
MoveTo x+50,y-65
Delay 1000
LeftClick 2
Delay 2000
Goto 再来
// ==============================================================
Sub 买东西
    Rem 找包
    VBSCall FindPic(0,150,260,440,"Attachment:\包裹.bmp",0.9,x,y)
    If x>0 and y>0
        Delay 1000
    Else 
        Goto 找包
    EndIf 
    Rem 打开商店
    MoveTo x+50,y+9
    Delay 1000
    LeftClick 2
    Delay 3000
    // 买大米,94银的时候买
    VBSCall FindPic(340,150,680,450,"Attachment:\94.bmp",1,x6,y6)
    If x6>0 and y6>0
        MoveTo x6-80,y6-5
        Delay 500
    Else 
        Goto 打开商店
    EndIf 
    Rem 买
    LeftClick 5
    // 检查是否操作过快,是否商品列表已经改变
    VBSCall FindPic(300,30,750,150,"Attachment:\重.bmp",0.9,x7,y7)
    If x7>0 and y7>0
        Goto 打开商店
    EndIf 
    // 检查是否用完商票,是否买够
    VBSCall FindPic(300,30,750,150,"Attachment:\再.bmp",0.9,x8,y8)
    If x8>0 and y8>0
        Delay 500
    Else 
        Goto 买
    EndIf 
Return 买东西
Sub 卖东西
    Rem 找包1
    VBSCall FindPic(0,150,260,440,"Attachment:\包裹.bmp",0.9,x,y)
    If x>0 and y>0
        Delay 1000
    Else 
        Goto 找包1
    EndIf 
    Rem 打开商店1
    MoveTo x+50,y+9
    Delay 1000
    LeftClick 2
    Delay 3000
    // 卖大米,94银的时候卖
    VBSCall FindPic(340,150,680,450,"Attachment:\94.bmp",1,x9,y9)
    If x9>0 and y9>0
        MoveTo 830,455
        Delay 2000
    Else 
        Goto 打开商店1
    EndIf 
    j=0
    For i
        j=j+1
        VBSCall FindPic(300,30,750,150,"Attachment:\重.bmp",0.9,x10,y10)
        If x10>0 and y10>0
            Goto 打开商店1
        EndIf 
        RightClick 3
        Delay 1000
        If (j Mod 5)=0
            MoveR -136,34
        Else 
            MoveR 34,0
        EndIf 
        Delay 2000
    EndFor 
Return 卖东西
Sub gopos
    KeyPress 9,1
    Rem 区域
    Delay 2000
    VBSCall FindPic(377,111,660,140,"Attachment:\区域地图.bmp",0.9,x2,y2)
    If x2>0 and y2>0
        Delay 1000
        MoveTo xx,yy
        Delay 1000
        LeftClick 1
        Delay 10000