Gosub 补红蓝
        Plugin Bkgnd.KeyPress(Hwnd, 82)
        Delay ys
        Plugin Bkgnd.KeyPress(Hwnd, jineng)
        Delay ys
        IfColor 4+Ux,70+Uy,072BA1,2
        Else 
            Goto 选怪
        EndIf 
    EndIf 
EndIf 
Plugin Bkgnd.KeyPress(Hwnd, jineng1)
Delay ys
Rem 检查组对
VBSCall FindPic(347+Ux,321+Uy,675+Ux,444+Uy,"Attachment:\jiaruzudui.bmp",1.0,KX,KY)
If KX+Ux>0 and KY+Uy>0
    Gosub 组队
EndIf 
Rem 决斗
VBSCall FindPic(347+Ux,321+Uy,675+Ux,445+Uy,"Attachment:\juedou.bmp",1.0,JX,JY)
If abbX+Ux>0 and abbY+Uy>0
    Gosub 组队
EndIf 
Plugin Bkgnd.KeyPress(Hwnd, jineng2)
Delay ys
IfColor 4+Ux,70+Uy,072BA1,2
Else 
    Goto 选怪
EndIf 
Plugin Bkgnd.KeyPress(Hwnd, jineng3)
Delay ys
Plugin Bkgnd.KeyPress(Hwnd, jineng4)
Delay ys
IfColor 4+Ux,70+Uy,072BA1,2
    Goto 技能
Else 
    Goto 选怪
EndIf 
Goto 开始
Sub 补红蓝
    IfColor hong/100*(167+Ux-4+Ux)+4+Ux,28+Uy,0C0F0C,2
        //下面这句用于向后台窗口句柄(变量:Hwnd)发送一个键盘(扫描码:56)按键
        Plugin Bkgnd.KeyPress(Hwnd, chihong)
        Delay hongT
    EndIf 
    IfColor lan/100*(167+Ux-4+Ux)+4+Ux,45+Uy,1F1E1A,2
        //下面这句用于向后台窗口句柄(变量:Hwnd)发送一个键盘(扫描码:57)按键
        Plugin Bkgnd.KeyPress(Hwnd, chilan)
        Delay lanT
    EndIf 
Return 1
Sub 辅助技能
    If fuzu=0
        Goto 1
    EndIf 
    Plugin Bkgnd.KeyPress(Hwnd, fuzu)
    Delay 2500
    Rem 1
    If fuzu1=0
        Goto 2
    EndIf 
    Plugin Bkgnd.KeyPress(Hwnd, fuzu1)
    Delay 2500
    Rem 2
    If fuzu2=0
        Goto 3
    EndIf 
    Plugin Bkgnd.KeyPress(Hwnd, fuzu2)
    Delay 2500
    Rem 3
    If fuzu3=0
        Goto 4
    EndIf 
    Plugin Bkgnd.KeyPress(Hwnd, fuzu3
    Delay 2500
    If fuzu4=0
    Else 
        Rem 4
        Plugin Bkgnd.KeyPress(Hwnd, fuzu4)
        Delay 200
    EndIf 
Return 
Sub 组队
    If zd=1
        Plugin Bkgnd.LeftClick(Hwnd, 493+Ux, 420+Uy)
        Delay 200
        Plugin Bkgnd.LeftClick(Hwnd, 109+Ux, 740+Uy)
        Plugin Bkgnd.SendString(Hwnd, "密传后台挂机脚本防传送,110,GM形象=々闲→情 ‰=制作,挂机中")
        Delay 100
        Plugin Bkgnd.KeyPress(Hwnd, 13)
    ElseIf zd=2
        Plugin Bkgnd.LeftClick(Hwnd, 593+Ux, 421+Uy)
        Delay 200
        Plugin Bkgnd.LeftClick(Hwnd, 109+Ux, 740+Uy)
        Plugin Bkgnd.SendString(Hwnd, "对不起,挂机中,不是我不想组,而是人不在,挂机中不能组")
        Delay 100
        Plugin Bkgnd.KeyPress(Hwnd, 13)
    EndIf 
Return 组队
Sub 决斗