//F1红 F2 F3技能 F8回城卷
dim hp,m,n,a,b,c,d,e,f,g,h,i,j,k,l,q,r
dim zhiye,zidongzhaoguai,zidongjianwu,xp
m=85:n=10
a="":b="":e="":f="":g="":h="":i="":j="":k="":l="":q="":r=""
c=0:d=0
dim jn1,jn2
jn1=0:jn2=0
UserVar zhiye=1 选择职业 0近战 1远战
UserVar hp=50 红量<%多少时,补红
UserVar zidongzhaoguai=1 0定点刷怪 1自动刷怪
UserVar zidongjianwu=1 0不自动捡物 1自动捡物
UserVar xp=1 选择使用哪种XP技能,从右到左1,2,3
Rem 机战
Gosub 找怪
Gosub 攻击怪
Gosub 补红
Gosub 捡钱
Gosub 捡熟练度
Gosub 捡流星
Gosub 捡粉红水晶
Gosub 捡蓝水晶x
Gosub 捡聚态水晶
Gosub 检测xp
Gosub 无弹回城
Gosub 拒绝交易
Gosub 同意组队
Gosub 关闭推荐任务
Gosub 关闭导师界面
Delay 32
Goto 机战
Sub 找怪
    If zidongzhaoguai=1
        VBSCall FindColorEx(85,140,855,480,"303b8",1,0.8,x,y)
        If x<0 and y<0
            Delay 32
            c=c+1
            If c>4
                Delay 225
                MoveTo 510,500
                LeftClick 1
                Gosub 快速找怪
                VBSCall FindColorEx(85,140,855,480,"303b8",1,0.8,x,y)
                If x<0 and y<0
                    Delay 520
                    MoveTo 100,330
                    LeftClick 1
                    Gosub 快速找怪
                    VBSCall FindColorEx(85,140,855,480,"303b8",1,0.8,x,y)
                    If x<0 and y<0
                        Delay 520
                        MoveTo 510,200
                        LeftClick 1
                        Gosub 快速找怪
                        VBSCall FindColorEx(85,140,855,480,"303b8",1,0.8,x,y)
                        If x<0 and y<0
                            Delay 520
                            MoveTo 920,330
                            LeftClick 1
                            Gosub 快速找怪
                        EndIf 
                    EndIf 
                EndIf 
            EndIf 
        EndIf 
    EndIf 
Return 
Sub 攻击怪
    VBSCall FindColorEx(479,49,922,399,"303b8",1,0.8,x,y)
    If x>=0 and y>=0
        c=0
        MoveTo x-20,y+20
        LeftClick 1
        Delay 32
        Gosub 攻击
        VBSCall FindColorEx(479,339,922,650,"303b8",1,0.8,x,y)
        If x>=0 and y>=0
            c=0
            MoveTo x-20,y-20
            LeftClick 1
            Delay 32
            Gosub 攻击
            VBSCall FindColorEx(99,339,479,658,"303b8",1,0.8,x,y)
            If x>=0 and y>=0
                c=0
                MoveTo x+20,y-20
                LeftClick 1
                Delay 32
                Gosub 攻击
                VBSCall FindColorEx(83,85,479,399,"303b8",1,0.8,x,y)
                If x>=0 and y>=0
                    c=0
                    MoveTo x+20,y+20
                    LeftClick 1
                    Delay 32
                    Gosub 攻击
                EndIf 
            EndIf 
        EndIf 
    EndIf