Script

 abort off
 printe ' Press ? for menu'

SETUP:
 clear variables
  
define bbs_log = 'f:\logs\logfile.dat' ;location of callers log
define bbs_path = 'e\aardvark.inn\' ; location of BBS.PRG
define quest_path = 'e:\aardvark.inn\quest\' ; Quest pathname
define docfile = 'e:\aardvark.inn\quest\quest.txt' Quest Doc pathname
define cutoff = 5 ; check to see if the user has at least 5 min. to play

define %0
define pause
define access
define user_log
define cd
define prompt
define option
define time_used_call
define time_left_call
define time_used_day
define time_left_day
define time_on
define time_ok
define time_per_call = '&13'
define time_per_day = '&14'
define time_before = '&15'
define time_date = '&24'
define id = '31'
define player
define calls = '&27'

 
TOP:
 prompt = '\r\iQuest v1.37\o\b\v\{PD-GX?\}:\v' center
 option = 'QUEST'

;HIACCESS:
; if command_level (2)
; access = Y
;  else
;   printe
;   printe 'You\"re access level is not high\v enough to play this game'
; access = N
;  endif
;   return
   
COMMAND:
 abort off
  printe
  print '\b\o(&32 min.) [prompt]'
 if time_exceeded
  printe
 exit
  endif
   get_key %0
   goto [option]
   
INVALID:
 printe 'Enter ? for Menu....'
 goto command
 
LOGPRINT:
 open '[bbs_log]'
 fprint ' &23 [user_log]'
  close
 return

DOCPRINT:
 printe
 printe '<Control-S to Pause,\v Control-X to abort>'
 printe
 view '[docfile]'
 gosub command
return

QUEST:

 if %0 = P
  printe 'Playing Quest!'
  goto playquest
  
 ef %0 = D
  goto docprint
  
 ef %0 = x
  printe 'Exit to BBS'
 exit

 ef %0 = G
  printe 'Return to Game Menu'         
  execute 'e:\bbs\menus_80\game.scr' ;where game menu is located
 
 ef %0 = '?'
  printe 'Help!'
  goto menu
 endif
 

          

PLAYQUEST:

;gosub hiaccess
 if access = N
goto command
 endif
 if &11 = 40
goto invalid
 endif
printe 'Play Quest v.137? \{y,N\}'
  get_key %0
 if %0 # Y
printe 'No'
  goto command
 endif
print 'Yes'
 cd = file_chgdir '[quest_path]'
printe 
printe ' Only Atari ST\"s should answer yes to color monitor questions'
view '[quest_path]quest1.txt'
;user_log = 'Enters Quest'
;gosub logprint
open 'ex.nam', output
fprinte '&01'
close
if command_level (32)
 gem '[quest_path]quest137.tos', 'local'
else
 gem '[quest_path]quest137.tos'
endif
cd = file_chgdir '[bbs_path]'
view '[quest_path]quest2.txt'
 goto command
          
MENU:
 clear screen
 
printe
printe '    Aardvark Inn BBS  ' center ; change to your BBS anme
printe '      Quest v1.37     ' center
printe '    ----------------  ' center
printe '          &23         ' center
printe 
printe ' \r\{P\}\b Play Quest ' center
printe ' \r\{D\}\b Quest Docs ' center
printe
printe ' \r\{G\}\b Game Menu  ' center
printe ' \r\{X\}\b Exit to BBS' center
printe ' \r\{?\}\b This Menu  ' center
printe
 goto command
 
