'
' Sample SPRINTnet login script
'
' DEBUG_TOGGLE

PRINT "\r\nAir Warrior login via SPRINTnet...\r\n" 1 0

' Set the redial count to 5 trys

REDIAL 5

SEND_INIT 30 0

RECEIVE 30 "OK"
	ON 0 :DIAL
	ERROR_GOTO :NOMODEM

:REDIAL

PRINT "\r\nPausing before retry...\r\n" 1 0

WAIT 10

:DIAL

WAIT 2

PRINT "\r\nDialing Sprint...\r\n" 1 0

DIALING 0

PRINT "\r\nWaiting for answer...\r\n" 1 0

RECEIVE 30 "CONNECT" "BUSY" "NO CARRIER"
	ON 0	:LOGIN
	ON 1	:REDIAL
	ON 2	:REDIAL
	ERROR_GOTO :ERROR

:LOGIN

WAIT 5

SEND 2 "@" 0
WAIT 1

SEND 2 "\r" 0

RECEIVE 30 "TERMINAL="
	ON 0 :SPRINT1
	ERROR_GOTO :ERROR

:SPRINT1

SEND 20 "D1\r" 0

RECEIVE 30 "@"
	ON 0 :SPRINT2
	ERROR_GOTO :ERROR

:SPRINT2

SEND 20 "C GENIE\r" 0

RECEIVE 30 "U#="
	ERROR_GOTO	:ERROR
WAIT 1

SEND_LOGIN 10 0

RECEIVE 60 "<CR> to continue"
	ERROR_GOTO	:ERROR

SEND_COMMAND 10 0

:SUCCESS
PRINT "\r\nLogin complete\r\n" 1 0
DONE


:NOMODEM

PRINT "\r\nModem is not responding!\r\n" 1 0
ERROR_END

:ERROR

PRINT "\r\nLogin failed\r\n" 1 0
ERROR_END
DONE

