LeftUp 1
                Delay 100
                Str="将"&i&"级材料放入包裹"
                Gosub 日志记录
            Else 
                Str="包内无"&i&"级材料"
            EndIf 
        EndFor 
        i=i+1
    EndWhile 
    Delay 100
    MoveTo x10,y10
    Delay 1000
    LeftDoubleClick 1
    Delay 100
    KeyPress 27,1
Return 
Sub 检查包满
    KeyDown 18,1
    Delay 100
    KeyPress 69,1
    Delay 100
    KeyUp 18,1
    VBSCall FindPic(cx-182,cy+49,cx+48,cy+254,"Attachment:\空位.bmp",0.8,x,y)
    If x>0 and y>0
        Str="包未满,继续挖矿!!!!!!"
        Gosub 日志记录
    Else 
        Str="包已满,去卖矿!!!!!!"
        Gosub 日志记录
        Gosub 卖矿
        Str="卖矿完毕,继续采集!!!!!!!"
        Gosub 日志记录
    EndIf 
    KeyPress 27,1
    Delay 100
Return 
Sub 卖矿
    KeyDown 18,1
    Delay 100
    KeyPress 69,1
    Delay 100
    KeyUp 18,1
    Delay 1000
    VBSCall FindPic(cx-182,bby+49,bbx+48,bby+254,"Attachment:\【FF】.bmp",0.9,x,y)
    If x>0 and y>0
        MoveTo x,y
        Delay 100
        RightClick 1
        Delay 100
    Else 
        Str="找不到应天F,脚本结束"
        Gosub 日志记录
        Goto MyEnd
    EndIf 
    KeyPress 27,1
    Rem 走到管理员旁边
    VBSCall FindPic(502,38,641,81,"Attachment:\应天府.bmp",0.9,x,y)
    If x>0 and y>0
        KeyPress 9,1
        Delay 100
        MoveTo 298,300
        //已改
        Delay 100
        LeftClick 1
        Delay 100
        KeyPress 27,1
    Else 
        Gosub 等待
        Goto 走到管理员旁边
    EndIf 
    Delay 10000
    //行走延时
    KeyPress 120,1
    Delay 100
    Rem 杂货摊
    VBSCall FindColorEx(583,314,618,392,"d8aca0",1,0.8,x,y)
    //已改
    If x>0 and y>0
        MoveTo x y
        Delay 100
        LeftClick 1
    Else 
        Gosub 等待
        Goto 杂货摊
    EndIf 
    Delay 2000
    Rem 我这有
    VBSCall FindPic(26,176,646,447,"Attachment:\我这有.bmp",0.9,x,y)
    If x>0 and y>0
        MoveTo x y
        Delay 100
        LeftClick 1
    Else 
        Gosub 等待
        Goto 我这有
    EndIf 
    Delay 1000
    Rem 出售
    x2=311:y2=263