xb=DropList{开:1|不开:2}=0 宝宝自动修忠诚选择
UserVar zb=DropList{抓BB宝宝攻:1|不抓:2|抓BB宝宝防:3}=0 抓BB宝宝攻防选择
UserVar kh1=DropList{开:1|不开:2}=0 1号位开号选择
UserVar RS1=DropList{人法宝宝法:10|人攻宝宝攻:11|人法宝宝攻:12|人防宝宝法:13|人攻宝宝法:14}=0 人物宝宝1号位攻击选择
Plugin Hwnd=window.Foreground()
Plugin window.Move(Hwnd,0,0)
g=500
Rem 4
VBSCall FindPic(0,0,650,502,"Attachment:\宝箱.bmp",0.9,x0,y0)
If x0>0 and y0>0
    r=0
    Gosub 通修宝宝忠诚
    Gosub 位号加血
    Gosub 找怪
Else 100
    Gosub 技能
EndIf 100
Delay 200
Goto 4
Sub 通修宝宝忠诚
    If DateDiff("s",t1,now)>g and xb=1
        If kh1=1
            Gosub .修宝宝忠诚
            Delay 100
        EndIf 100
        t1=now
    EndIf 100
Return 
Sub .修宝宝忠诚
    d=0
    Rem 2000
    If d<=1
        Delay 100
        KeyDown 18,1
        KeyPress 80,1
        KeyUp 18,1
        MoveTo 330,200
        Delay 1000
        VBSCall FindPic(0,0,650,502,"Attachment:\口粮.bmp",0.9,x4,y4)
        If x4>0 and y4>0
            bx=x4:by=y4
            Gosub ManManYiDong
            For 5
                LeftClick 1
                Delay 100
            EndFor 
            Delay 100
        EndIf 100
        KeyDown 18,1
        KeyPress 80,1
        KeyUp 18,1
        Delay 200
        KeyDown 18,1
        KeyPress 79,1
        KeyUp 18,1
        Delay 500
        VBSCall FindPic(0,0,650,502,"Attachment:\驯养.bmp",0.9,x124,y124)
        If x124>0 and y124>0
            bx=x124:by=y124
            Gosub ManManYiDong
            For 20
                LeftClick 1
                Delay 100
            EndFor 
            Delay 300
        EndIf 100
        VBSCall FindPic(0,0,650,502,"Attachment:\宝宝忠诚.bmp",1,x134,y134)
        If x134>0 and y134>0
            KeyDown 18,1
            KeyPress 79,1
            KeyUp 18,1
        Else 100
            KeyDown 18,1
            KeyPress 79,1
            KeyUp 18,1
            d=d+1
            Goto 2000
        EndIf 100
    Else 100
    EndIf 100
Return 
Sub 位号加血
    If kh1=1
        Gosub 加血
        Delay 100
    EndIf 100
Return 
Sub 加血
    VBSCall FindPic(0,0,650,60,"Attachment:\宝宝血.bmp",0.9,x4,y4)
    If x4>0 and y4>0
        bx=x4-25
        by=y4
        Gosub ManManYiDong
        Delay 100
        RightClick 1
        Delay 1000
    EndIf 100
    VBSCall FindPic(0,0,650,60,"Attachment:\血量.bmp",0.9,x3,y3)
    If x3>0 and y3>0
        bx=x3-25