Gosub checkArms
                        Goto start
                    ElseIf AriseVar=3
                        // 使用復活咒文書
                        MoveTo 390,363
                        Delay 100
                        LeftClick 2
                        Delay 1000
                        Goto start
                    ElseIf AriseVar=4
                        // 結束遊戲程式
                        VBSCall RunApp("taskkill.exe /F /IM war.exe")
                        Delay 10000
                        KeyPress 120,1
                        Gosub GameOver1
                    EndIf 
                EndIf 
            EndIf 
        EndIf 
    EndIf 
Return Arise
// 找怪區域HM - (3,3) - 409,306,613,460
Sub FindMonHM
    i=0
    For Killvar
        ColorVar=MonColor(i)
        If i=2
            // 白色 - 自已名字範圍 Y軸 (362-394)
            VBSCall FindColor(409,200,613,362,ColorVar,x,y)
            If x>=409 and y>=200
                j=0
                For 8
                    MoveTo x+20+j*2 y+j*15
                    VBSCall Shape=GetCursorShape(0)
                    If Shape=978197372
                        For 10
                            Gosub HP
                            Gosub MP
                            LeftClick 1
                            Delay 500
                        EndFor 
                    EndIf 
                    Gosub CheckMon
                    j=j+1
                EndFor 
            EndIf 
            VBSCall FindColor(409,394,613,460,ColorVar,x,y)
            If x>=409 and y>=394
                j=0
                For 8
                    MoveTo x+20+j*2 y+j*15
                    If Shape=978197372
                        For 10
                            Gosub HP
                            Gosub MP
                            LeftClick 1
                            Delay 500
                        EndFor 
                    EndIf 
                    Gosub CheckMon
                    j=j+1
                EndFor 
            EndIf 
        Else 
            VBSCall FindColor(409,200,613,460,ColorVar,x,y)
            If x>=409 and y>=200
                j=0
                For 8
                    MoveTo x+20+j*2 y+j*15
                    If Shape=978197372
                        For 10
                            Gosub HP
                            Gosub MP
                            LeftClick 1
                            Delay 500
                        EndFor 
                        Gosub CheckMon
                    EndIf 
                    j=j+1
                EndFor 
            EndIf 
            i=i+1
        EndIf 
    EndFor 
Return FindMonHM
Sub CloseTalkWin
    IfColor 59,733,ffffff,0
        IfColor 4,728,0,0
            IfColor 11,759,ffffff,0
                MoveTo 11,759
                Delay 100
                LeftClick 1
            EndIf 
        EndIf 
    EndIf 
Return CloseTalkWin
// 尋寶、撿寶
Sub GetBaoWu
    KeyPress 32,1
    If GetBaoVar>=1