Attribute VB_Name = "StartUp"
Public Sub Main()
    If FindWindowPartial("ShipBot (v1.") > 0 Then End

    If StartWarping = True Then
        Do While InitAddress("SUBSPACE.") = False
            DoEvents
        Loop
    Else
        If InitAddress("SUBSPACE.") = False Then
            MsgBox "Load SubSpace before running ShipBot", vbCritical, "Ooops"
            CloseHandles
            End
        End If

        MyName = TrimZero(Peek(Peek4(4702840) + 502, 24))

        If MyName = "" Or MyName = " " Then
            MsgBox "Enter a zone before running ShipBot", vbExclamation, "Ooops"
            CloseHandles
            End
        End If
    End If

    GreetMessage = "ShipBot (v1.0) - Send '::help' for commands"
    UseGreet = False
    PlayersRequired = 30

    StartWinsock

'    MakeTimer
    LoadLists
    OpenPLog

    MainFrm.Show
    SSLoad
End Sub

Public Sub ShutDown()
    StopWarping

    SaveLists
    ClosePLog
    CloseHandles
'    DestroyTimer
    StopWinsock
    End
End Sub
