SCRIPT ; Chaos.SCR v1.0 for Express 1.60 or higher ; Change and setup to match your BBS and tastes. ; Adapted from script to run Assassin- by Kevin McFarland ; by Solano STation BBS abort off SETUP: clear variables ;! Change the following to fit your system define noplay = 10 ; minutes left after which play is not allowed define bbs_log = 'C:\bbs\userlog.txt' ;or pathname (c:\bbs\callers.log) define bbs_path = 'C:\bbs\' ;path BBS is run from define game_menu = 'M:\menus_80\arcade.hlp' ;pathname of main game menu ; All your Stellar Chaos files should be in one folder (Chaos_path) define Chaos_path = 'E:\Chaos\' ;Chaos folder define SCprg = 'Chaos*.Tos' ;program name define SCdoc = 'Chaosins.txt' ;doc file define SCnews = '*.log' ;news file define sc_score = 'scscore.txt' ;scores of players define old_news = 'news.bak' ;yesterday's news define %0 ; 1 key input for user selection define pause ; Dummy input, used to pause display define user_log ; For log print routine LOGPRINT define docfile ; For file printer routine DOCPRINT define fc ; Variable for file copy integer cd ; Variable for directory changes define prompt ; prompt for command routine define option ; where command routine looks for choice define time_used_call ; for time limit routine 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' ; user_log = 'Enters Chaos menu' ;if you want to know when callers gosub logprint ;enter Chaos menu TOP: prompt = '\r\i Chaos \o\b\v\{1234-DGX?\}: ' ;Add G if you exec a game menu option = 'Chaos' goto menuSC COMMAND: abort off margin (2) printe print '(&32 min) [prompt]' ; Hold the cursor on this line if time_exceeded ;check time limit every time game prompt prints printe ;blank line between game and BBS prompt exit ;let BBS log them off endif get_key %0 ;get callers choice goto [option] ;goto the if/ef choice routine LOGPRINT: open '[bbs_log]', append ;logs callers activity fprinte ' &23 [user_log]' close return DOCPRINT: printe printe ' < Control-S to Pause,\vControl-X to Abort >' printe view '[docfile]' ;formats text output return INVALID: printe 'Enter ? For Menu...' ; what happens upon invalid command goto command ; choice Chaos: if %0 = '?' ;choices for Chaos printe 'Help!' goto menusc ef %0 = 1 print 'Play Chaos? \{y,N\}: ' goto playsc ef %0 = 2 printe 'Today's News' docfile = '[Chaos_path][SCnews]' gosub docprint goto command ef %0 = 3 printe 'Yesterday's News' docfile = '[Chaos_path][old_news]' gosub docprint goto command ef %0 = 4 printe 'Chaos Rankings' docfile = '[Chaos_path][sc_score]' gosub docprint goto command ef %0 = D printe 'Chaos Doc\"s' docfile = '[Chaos_path][SCdoc]' gosub docprint goto command ef %0 = G cd= file_chgdir '[BBS_Path]' printe 'Exit To Game Menu...' execute [game_menu] ef %0 = X cd= file_chgdir '[BBS_Path]' printe 'Exit to BBS..' exit endif goto invalid PLAYSC: abort off get_key %0 if %0 # Y printe 'No' goto command else printe 'Yes' endif gosub timelimit if time_ok = N user_log = '-->Attempts Chaos after time limit!' gosub logprint goto command endif printe printe ' Loading Chaos' printe open 'E:\chaos\scuser.dat', output ; Forem2.2 fprinte '&01' ; Endif fprinte ; close ; user_log = 'Plays Chaos' gosub logprint close printe GEM '[Chaos_path][SCprg]' ;! Chaos prg filename abort off user_log= 'Quits Chaos' cd = file_chgdir '[bbs_path]' gosub logprint close printe goto command TIMELIMIT: increase noplay if &29 = 300 ;if 300 baud, cut them off noplay = [noplay] + 5 ;5 minutes sooner endif time_ok = Y time_on = &32 time_left_call = [time_per_call] - [time_on] ;time left for this call if time_left_call < noplay printe '\n Sorry, you don\"t have enough time\vduring this call to play.' time_ok = N endif time_used_day = [time_before] + [time_on] time_left_day = [time_per_day] - [time_used_day] ;time left for today if time_left_day < noplay printe '\n Sorry, you don\"t have enough time\vleft for today to play.' time_ok = N endif return MENUSC: clear screen if &11= '80' then margin (20) endif printe ' \r ' printe ' \i \o' printe ' \i Solano STation Presents \o' ; Your BBS name goes here printe ' \i -------------------- \o' printe ' \i Chaos 1.51 \o' printe ' \i \o' printe ' \b ' printe ' \r\{1\}\b Play Chaos ' printe ' \r\{2\}\b News- Today ' printe ' \r\{3\}\b News- Yesterday' printe ' \r\{4\}\b Chaos Rankings ' printe printe ' \r\{D\}\b Documentation' printe ' \r\{G\}\b Exit to Game Menu' ;if you execute a game menu printe ' \r\{X\}\b Exit to BBS' printe ' \r\{?\}\b This Menu' printe goto command