home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / bbs / asn151 / assassin.scr < prev    next >
Text File  |  1991-10-05  |  6KB  |  207 lines

  1. SCRIPT
  2.  
  3. ; Assassin.SCR v1.0
  4. ; Change and setup to match your BBS and tastes.
  5.  
  6.  
  7.  abort off
  8.  
  9. SETUP:
  10.  
  11.  clear variables
  12.  
  13. ;! Change the following to fit your system
  14.  
  15.  define noplay = 10       ; minutes left after which play is not allowed
  16.  define bbs_log = 'f:\rcacall.log'          ;or pathname (c:\bbs\callers.log)
  17.  define bbs_path = 'f:\'                 ;path BBS is run from
  18.  define game_menu = 'f:\menus_80\games.hlp'  ;pathname of main game menu
  19.  
  20. ;  All your Assassin files should be in one folder (Assassin_path)
  21. ;  The folder containing the files MUST be on the same drive as BBS!
  22.  
  23.  define Assassin_path = 'F:\Assassin\'        ;Assassin folder
  24.  define Assnprg  = 'Assassin.Tos'             ;program name
  25.  define Assndoc  = 'Assassin.ins'             ;doc file
  26.  define Assnnews = 'Asnnews.log'              ;news file
  27.  
  28.  define %0               ; 1 key input for user selection
  29.  define pause            ; Dummy input, used to pause display
  30.  define user_log         ; For log print routine     LOGPRINT
  31.  define docfile          ; For file printer routine  DOCPRINT
  32.  define fc               ; Variable for file copy
  33.  integer cd              ; Variable for directory changes
  34.  define prompt           ; prompt for command routine
  35.  define option           ; where command routine looks for choice
  36.  define time_used_call         ; for time limit routine
  37.  define time_left_call         ;
  38.  define time_used_day          ;
  39.  define time_left_day          ;
  40.  define time_on                ;
  41.  define time_ok                ;
  42.  define time_per_call = '&13'  ;
  43.  define time_per_day = '&14'   ;
  44.  define time_before = '&15'    ;
  45.  
  46.  user_log = 'Enters Assassin menu' ;if you want to know when callers
  47.  gosub logprint                        ;enter Assassin menu
  48.  
  49. TOP:
  50.  prompt = '\r\i  Assassin  \o\b\v\{12-DGX?\}: '  ;Add G if you exec a game menu
  51.  option = 'Assassin'
  52.  
  53. goto menuAss
  54.  
  55. COMMAND:
  56.  abort off
  57.  margin (2)
  58.  printe
  59.  print '(&32 min) [prompt]'  ; Hold the cursor on this line
  60.  if time_exceeded       ;check time limit every time game prompt prints
  61.   printe                ;blank line between game and BBS prompt
  62.   exit                  ;let BBS log them off
  63.  endif
  64.  get_key %0             ;get callers choice
  65.  goto [option]          ;goto the if/ef choice routine
  66.  
  67. LOGPRINT:
  68.  open '[bbs_log]', append                    ;logs callers activity
  69.  fprinte '  &23 [user_log]'
  70.  close
  71.  return
  72.  
  73. DOCPRINT:
  74.  printe
  75.  printe ' < Control-S to Pause,\vControl-X to Abort >'
  76.  printe
  77.  view '[docfile]'                    ;formats text output
  78.  return
  79.  
  80. INVALID:
  81.  printe 'Enter ? For Menu...'        ; what happens upon invalid command
  82.  goto command                        ; choice
  83.  
  84. Assassin:
  85.  
  86.  if %0 = '?'                         ;choices for Assassin 
  87.   printe 'Help!'
  88.   goto menuAss
  89.  
  90.  ef %0 = 1
  91.   print 'Play Assassin? \{y,N\}: '
  92.   goto playAss
  93.  
  94.  ef %0 = 2
  95.   printe 'Assassin News'
  96.   docfile = '[Assassin_path][Assnnews]'
  97.   gosub docprint
  98.   goto command
  99.  
  100.  ef %0 = D
  101.   printe 'Assassin Doc\"s'
  102.   docfile = '[Assassin_path][Assndoc]'
  103.   gosub docprint
  104.   goto command
  105.  
  106.  ef %0 = G
  107.   cd= file_chgdir '[BBS_Path]'
  108.   printe 'Exit To Game Menu...'
  109.   execute [game_menu]
  110.  
  111.  ef %0 = X
  112.   cd= file_chgdir '[BBS_Path]'
  113.   printe 'Exit to BBS..'
  114.   exit
  115.  
  116.  endif
  117.  goto invalid
  118.  
  119. PLAYAss:
  120.  abort off
  121.  get_key %0
  122.  if %0 # Y
  123.   printe 'No'
  124.   goto command
  125.  else
  126.   printe 'Yes'
  127.  endif
  128.  gosub timelimit
  129.  if time_ok = N
  130.   user_log = '-->Attempts Assassin after time limit!'
  131.   gosub logprint
  132.   goto command
  133.  endif
  134.  printe
  135.  printe ' Loading Assassin'
  136.  printe
  137.  open 'F:\Assassin\Dorinfo1.def', output ; Forem2.2
  138.  fprinte 'Rubber City BBS'           ;
  139.  fprinte 'Don'                    ;
  140.  fprinte 'Crano'                ;
  141.  fprinte                           ;
  142.  fprinte                           ;
  143.  fprinte '&01'                     ;
  144.  fprinte '&01'                     ;
  145.  fprinte                           ;
  146.  %0 = '0'                ;don't know why this is needed, but it is...
  147.  fprinte '0'                       ;
  148.  fprinte '0'                       ;
  149.  fprinte '30'                      ;
  150.  fprinte                           ;
  151.  close                             ;
  152.  user_log = 'Plays Assassin'
  153.  gosub logprint
  154.  close
  155.  printe
  156.  GEM '[Assassin_path][Assnprg]'                    ;! Assassin prg filename
  157.  abort off
  158.  user_log= 'Quits Assassin'
  159.  cd = file_chgdir '[bbs_path]'
  160.  gosub logprint
  161.  close
  162.  printe
  163.  goto command
  164.  
  165. TIMELIMIT:
  166.  increase noplay
  167.  if &29 = 300                        ;if 300 baud, cut them off
  168.   noplay = [noplay] + 5              ;5 minutes sooner
  169.  endif
  170.  time_ok = Y
  171.  time_on = &32
  172.  time_left_call = [time_per_call] - [time_on] ;time left for this call    
  173.  if time_left_call < noplay
  174.   printe '\n Sorry, you don\"t have enough time\vduring this call to play.'
  175.   time_ok = N
  176.  endif
  177.  time_used_day = [time_before] + [time_on] 
  178.  time_left_day = [time_per_day] - [time_used_day] ;time left for today
  179.  if time_left_day < noplay
  180.   printe '\n Sorry, you don\"t have enough time\vleft for today to play.'
  181.   time_ok = N
  182.  endif
  183.  return
  184.  
  185. MENUAss:
  186.  clear screen
  187.  if &11= '80' then
  188.   margin (20)
  189.  endif
  190.  printe ' \r '
  191.  printe '  \i                         \o'
  192.  printe '  \i  Rubber City Presents   \o'     ; Your BBS name goes here
  193.  printe '  \i  --------------------   \o'
  194.  printe '  \i       Assassin          \o'
  195.  printe '  \i                         \o'
  196.  printe ' \b '
  197.  printe '  \r\{1\}\b   Play Assassin    '
  198.  printe '  \r\{2\}\b   Assassin News    '
  199.  printe
  200.  printe '  \r\{D\}\b   Documentation'
  201.  printe '  \r\{G\}\b   Exit to Game Menu'  ;if you execute a game menu
  202.  printe '  \r\{X\}\b   Exit to BBS'
  203.  printe '  \r\{?\}\b   This Menu'
  204.  printe
  205.  goto command
  206.  
  207.