Sub 打怪
    Delay 10
    t6=now
    //初始化时间
    Rem 怪没死
    KeyPressH 49,1
    Delay 100
    //----------------------------------
    Gosub 时间技能
    Delay 10
    Gosub 锁怪时间
    Delay 10
    Gosub 红蓝检测
    Delay 10
    Gosub 组队交易检测
    //---------------------------------
    VBSCall FindColorEx(x-539,y+33,x-331,y+43,color(2),1,0.6,x1,y1)
    If x1>0 and y1>0
        //怪没死
        Goto 怪没死
    Else 
        Gosub 捡起东西
    EndIf 
Return 打怪
//*******************************************
//   放时间技能
//********************************************
Sub 时间技能
    Delay 10
    If DateDiff("s",t1,now)>=sj(0)
        //< DateDiff 函数:返回两个日期之间的时间间隔>
        //<"s":秒> <t1:时间变量> <now:当前系统日期和时间> <s(0):自定义时间变量>
        KeyPressH 50 1
        //按键2
        Delay 100
        t1=now
    EndIf 
    If DateDiff("s",t2,now)>=sj(1)
        KeyPressH 51 1
        //按键3
        Delay 100
        t2=now
    EndIf 
    If DateDiff("s",t3,now)>=sj(2)
        //< DateDiff 函数:返回两个日期之间的时间间隔>
        //<"s":秒> <t1:时间变量> <now:当前系统日期和时间> <s(0):自定义时间变量>
        KeyPressH 52,1
        //按键 4
        Delay 100
        t3=now
        //重新定义时间变量
    EndIf 
    If DateDiff("s",t4,now)>=sj(3)
        KeyPressH 53 1
        //按键5
        Delay 100
        t4=now
    EndIf 
    If DateDiff("s",t5,now)>=sj(4)
        KeyPressH 189 1
        //按键-
        Delay 100
        t5=now
    EndIf 
Return 时间技能
//********************************
//      锁怪6秒超时换怪判断
//********************************
Sub 锁怪时间
    Delay 10
    If DateDiff("s",t6,now)>=6
        //< DateDiff 函数:返回两个日期之间的时间间隔>
        //<"s":秒> <t1:时间变量> <now:当前系统日期和时间> <s(0):自定义时间变量>
        Delay 8
        t6=now
        //重新定义时间变量
        VBSCall FindColorEx(x-361,y+33,x-331,y+43,color(2),1,0.6,x1,y1)
        If x1>0 and y1>0
            //还没打到怪,太远或卡或是BOSS,重新找怪
            KeyPressH 9,1
            //锁定下一个怪
        EndIf 
    EndIf 
Return 锁怪时间
//****************************************
//          捡拾东西
//****************************************
Sub 捡起东西
    KeyPressH 54 3
    //捡起东西
    Delay 50
    KeyPressH 54 3
    //捡起东西
    Delay 50
Return 捡起东西
//******************************************
//       组队+复活+交易
//******************************************
Sub 复活
    If FH=0