Delay 100
            KeyPress 13,1
            Delay 200
            Goto 查找准备标记
        End if
        Goto 开始战斗
    End if
    Delay 500
    Call FindPic (300,210,770,440,"Attachment:\意外.bmp",1,intx,inty)
    If intx > 0 and inty > 0 Then
        Delay 100
        KeyPress 13,1
        Delay 200
        Goto 查找准备标记
    End if
    Delay 500
Wend
Rem 开始战斗
KeyPress 50,1
Delay 100
LeftClick 1
KeyDown 32,1
Rem 战斗
Delay 100
KeyPress 50,1
RightDown 1
Delay 100
LeftClick 1
Delay 1000
KeyUp 32,1
LeftClick 1
KeyDown 32,1
Delay 200
KeyPress 51,1
Delay 200
LeftClick 1
Delay 1000
LeftClick 1
RightUp 1
KeyUp 32,1
x = -1
y = -1
intx = -1
inty = -1
a = 0
While x = -1 and y = -1
    Call FindPic (450,150,750,350,"Attachment:\战斗结束.bmp",1,x,y)
    Delay 100
    Call FindPic (300,210,770,440,"Attachment:\意外.bmp",1,intx,inty)
    If intx > 0 and inty > 0 Then
        Delay 100
        KeyPress 13,1
        Delay 200
        Goto 查找准备标记
    End if
    a = a+1
    If a > 3 Then
        Goto 战斗2
    End if
Wend
Goto 查找准备标记
Rem 战斗2
Delay 100
KeyPress 50,1
RightDown 1
Delay 100
LeftClick 1
Delay 1200
LeftClick 1
Delay 200
KeyPress 51,1
Delay 200
LeftClick 1
Delay 1000
LeftClick 1
RightUp 1
x = -1
y = -1
intx = -1
inty = -1
a = 0
While x = -1 and y = -1
    Call FindPic (450,150,750,350,"Attachment:\战斗结束.bmp",1,x,y)
    Delay 100
    Call FindPic (300,210,770,440,"Attachment:\意外.bmp",1,intx,inty)
    If intx > 0 and inty > 0 Then
        Delay 100
        KeyPress 13,1
        Delay 200
        Goto 查找准备标记
    End if
    a = a+1
    If a > 3 Then
        Goto 开始战斗
    End if
Wend
Goto 查找准备标记