home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d09xx
/
d0950.lha
/
BBDoors
/
BBDoors65.lha
/
rexxDoors
/
Wheel_Of_Fortune.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-08-07
|
42KB
|
1,440 lines
/* $VERS: 4.2 Wheel_Of_Fortune.rexx 11 March 1993 (11.3.93)
This game was originally written by Nick Brenkle
for the skyline bbs system.
This version has been been adapted to run on
Richard Stockton's BBBBS, and has been greatly enhanced
by Matt English, Sysop - The Alternative BBS (503)761-3043
This game is freely distributable as long as
the opening credits remain and you don't make money
off of it! Enjoy!
*/
options results
FF='0C'x /* FormFeed */
CR='0D'x /* Carraige Return */
CALL TIME('R')
SIGNAL ON BREAK_C
SIGNAL ON BREAK_E
bbspath=GETCLIP('BBS_path')
bbspath=bbspath'rexxDoors/Data/'
PARSE arg Username winnings . colorflag secs .
IF ~DATATYPE(secs,'N') THEN secs=3600
signal on syntax
def=''
pen.2=''
pen.3=''
pen.4=''
pen.5=''
pen.6=''
pen.7=''
cls = 'H'
IF colorflag=1 THEN
DO
def=''
pen.2='
'
pen.3='
'
pen.4='
'
pen.5='
'
pen.6='
'
pen.7='
'
cls = 'H'
END
bmoney = ''
startup:
/* Open the support library if it is not already open. */
if ~show('L',"rexxsupport.library") then do
addlib('rexxsupport.library',0,-30,0)
end
i = random(1,999,time('S')) /* initalize random number generator */
say''cls''
say cr
say' 'pen.2'************** Wheel of Fortune **************'def||CR
say' 'pen.4'Now featuring a 'pen.3'BONUS 'pen.4'round!!'def''CR
say cr
say' version 4.2 3-11-93'cr
say' by Matt English 'cr
say' (original by Nick Brenkle) 'cr
say cr
/* open and read users account. If no account, set one up */
player = upper(Username)
call open('infile',bbspath'WoF.players','R')
call open('newdata','RAM:wof.player.data','W')
puzwon = 0
monwon = 0
puzcur = puznum
moncur = 0
tplayed = 0 /* Times played */
pct = 0
Bonuswins = 0
do until eof('infile')
line = readln('infile')
parse var line name'|'num1'|'num2'|'num3'|'num4'|'num5'|'num6'|'num7
if (player == name) then do
puzwon = num1
monwon = num2
puzcur = num3
moncur = num4
tplayed = num5
pct = num6
if num7 = '' then do
num7 = 0
line = name'|'num1'|'num2'|'num3'|'num4'|'num5'|'num6'|'num7
end
BonusWins = num7
end
if (player ~= name) & (line ~='') then call writeln('newdata',line)
end
call close('infile')
call close('newdata')
call open(datafile,bbspath'WoF.dat','R')
puznum = readln(datafile)
current = readln(datafile)
puzzle = readln(datafile)
guessed = readln(datafile)
clue = readln(datafile)
if exists(bbspath'WoF.puzzles') then do
authorline = readln(datafile)
parse var authorline author autopuznum /*Current Auto generated puzzle number*/
author = strip(author)
if autopuznum = '' then autopuznum = 1
autopuznum = strip(autopuznum)
end
else author = readln(datafile)
last = readln(datafile)
letleft = readln(datafile) /*letters left in this puzzle*/
call close(datafile)
vowels = 'AEIOU'
const = 'BCDFGHJKLMNPQRSTVWXYZ'
alllets = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
monsig = 0
/**********************************************************************/
/* OPEN THE STATS FILE FOR STATS DISPLAY */
/**********************************************************************/
call open(statfile,bbspath'WoF.stat','R')
mostplays = readln(statfile) /* MOST TIMES PLAYED */
mostwins = readln(statfile) /* MOST PUZZLES WON */
mostmon = readln(statfile) /* MOST $ WON TOTAL */
mostsigl = readln(statfile) /* MOST $ WON IN A SINGLE GAME */
mostBonusWins = readln(statfile) /* Most Bonus games won */
if mostBonusWins = '' then do
mostBonusWins = 'MATT_ENGLISH|1'
end
call close(statfile)
first = 0
do until answer = 8
if first = 1 then say cls
say ''cr
say pen.7' ++++++++++++++++++++++++++++++++++++++++++++++'def||cr
say pen.7' + 'pen.4'Wheel of Fortune Menu 'pen.7'+'def||cr
say pen.7' ++++++++++++++++++++++++++++++++++++++++++++++'def||cr
say ''cr
say ''cr
say ' 'pen.6'1. 'pen.7'View the alltime High scores'def||cr
say ' 'pen.6'2. 'pen.7'View 'player'''s stats'def||cr
say ' 'pen.6'3. 'pen.7'View 'pen.3'ALL 'pen.7'players stats'def||cr
say ' 'pen.6'4. 'pen.7'See who beat the last 10 puzzles'def||cr
say ' 'pen.6'5. 'pen.7'How do I play? (Instructions)'def||cr
say ' 'pen.6'6. 'pen.7'Check the wheel odds'def''cr
say ' 'pen.6'7. 'pen.7'See a revealing picture of Vanna!'def''cr
say ' 'pen.6'8. 'pen.7'Play Wheel of Fortune!'def''cr
say ' 'pen.3'9. Quit'def''cr
say ''cr
options prompt " Your choice: > "
call HOTSTAT
if answer = 1 then call VATIME
if answer = 2 then call VPSTATS
if answer = 3 then call VASTATS
if answer = 4 then call VL5PUZ
if answer = 5 then call inst
if answer = 6 then call odds
if answer = 7 then call Vanna
if answer = 9 then do
say cr
say cr
say' 'pen.7' OK, fine.. be that way..'def''cr
say cr
say' Returning to the BBS..'cr
call delay(50)
exit
end
first = 1
end
/**********************************************************************/
/* check player against last and author Check for errors */
if (puznum == 0) then do
SAY ''cr
SAY ' There is an error in the puzzle file. Vanna and Pat are 'cr
SAY ' trying to fix it. Thank you for your patience.'cr
SAY ''cr
call CloseShop
exit
end
if (player == author) then do
SAY ''cr
SAY ' Vanna and Pat approach you from the wings. Vanna gives'cr
SAY ' a playful slap on the back of the hand. Pat says "Naughty.'cr
SAY ' You wrote the puzzle and must wait until someone wins."'cr
SAY ''cr
Say ' However, we will show you how your puzzle is doing before'cr
Say ' we kick you out.'cr
say ''cr
SAY ' 'pen.6'Current Puzzle: 'current''def''cr
SAY ' 'pen.6'Clue: 'clue''def''cr
SAY ' 'pen.6'Guessed: 'guessed''def''cr
SAY ''cr
Call pressreturn
say ''cr
say' BYE!'cr
call CloseShop
exit
end
if (player == last) then do
SAY ''
SAY ' Pat laughs in your face and signals for a bouncer to throw'cr
SAY ' you out of the studio. You were the last player and must'cr
SAY ' wait for someone else to play.'cr
say cr
say cr
say' 'pen.6' Returning to the BBS...'def''
call CloseShop
exit
end
/* check last time played and zero score if necessary */
if (puznum ~= puzcur) then do
puzcur = puznum
moncur = 0
end
/* menu section */
SAY ''cr
SAY ''cr
SAY ''cr
CALL SAC70'The last player was 'pen.3||last||def
SAY ''cr
SAY ''cr
SAY ''cr
SAY ' Pat Sayjack welcomes you to the show. "How are you 'player'?'cr
SAY ' Glad to have you on the show. Hey Vanna, lets see some cleavage,'cr
SAY ' I mean, lets see the puzzle!"'cr
say ''cr
say cr
call pressreturn
say cls
pos.1 ='56H' ; pos.2 ='59H' ; pos.3 ='63H' ; pos.4 ='64H'
pos.5 ='65H' ; pos.6 ='66H' ; pos.7 ='65H' ; pos.8 ='64H'
pos.9 ='63H' ; pos.10 ='59H' ; pos.11 ='56H' ; pos.12 ='54H'
pos.13 ='53H' ; pos.14 ='52H' ; pos.15 ='53H' ; pos.16 ='54H'
pprompt ='3H'
pcash='58H'
c.1 ='100' ; c.2='200' ; c.3 ='300'; c.4='400'; c.5='500' ; c.6='50'
vowmess = '18H'
mess1 = '5H'
mess2 = '5H'
pgus = '11H'
pfrspns = '14H'
pguess = '3H'
pmon = '15H'
pcurpuz = '8H'
HasSpun = 0
nfs = 0
PLAY:
do forever
SAY pen.7' *****************************************************'def||CR
SAY pen.7' *'pen.6' ---------------- Wheel of Fortune --------------- 'pen.7'*'def||cr
SAY pen.7' *****************************************************'def||CR
say cr
puzz = left(puznum,5,' ')
aut = left(author,24,' ')
say' Puzzle # 'puzz' written by 'aut''cr
say ''cr
SAY ' Current Puzzle: 'pen.3''current''def''cr
SAY ' Clue: 'pen.7''clue''def''cr
SAY ' Guessed: 'pen.5''guessed''def''cr
nfs = left(nfs,2,' ')
say' Free Spins: 'pen.6''nfs''def' 'pen.2'50 'pen.3'200 'pen.4'50'def''cr
monc = left(moncur,8,' ')
say' Winnings = $ 'pen.2''monc''def' 'pen.5'100 'pen.6'400'def''cr
say' 'pen.7'400 'pen.2'300'def''cr
say' 'pen.3'['pen.6'S'pen.3']'def'pin the Wheel 'pen.3'500 'pen.4'100'def''cr
say' 'pen.3'['pen.6'G'pen.3']'def'uess the puzzle 'pen.5'300 'pen.6'200'def''cr
say' 'pen.3'['pen.6'B'pen.3']'def'uy a Vowel 'pen.7'100 'pen.2'300'def''cr
say' 'pen.3'['pen.6'Q'pen.3']'def'uit WoF 'pen.3'50 'pen.4'500 'pen.5'50'def''cr
say cr
say cr
say cr
say cr
play2:
say''pcurpuz''pen.3''current''def''
say''pgus''pen.5''guessed''def''
say''pfrspns''pen.6''nfs''def''
say''pmon' '
say''pmon''pen.2''moncur''
CALL CHKVOWEL
IF ALLVOW = YES THEN say''vowmess''pen.3'Only vowels remain in this puzzle.'def''
if NoCarrier() then call DieGracefully
if HasSpun = 0 then call getsel
call clrl pprompt
SEL = upper(SEL)
if (SEL == 'S') then do
if HasSpun = 0 then do
call clrl mess1
call clrl mess2
money = random(1,26,time('s'))
if money = 1 then call FREESPIN
if money > 1 & money < 4 then call BANKRPT
if money = 4 then call LTURN
if money = 5 then money = 1000
if money > 5 & money < 8 then money = 500
if money > 7 & money < 10 then money = 400
if money > 9 & money < 13 then money = 300
if money > 12 & money < 16 then money = 200
if money > 15 & money < 21 then money = 100
if money > 20 & money <26 then money = 50
if money = 26 then call FREESPIN
call spinit
end
if NoCarrier() then call DieGracefully
OPTIONS prompt ''pprompt'Your guess for $'money' > '
CALL HOTKEY
gss = upper(strip(gss))
gss = left(gss,1)
HasSpun = 0
if ~(instring(gss,guessed)) then do
if (instring(gss,const)) then do
if (instring(gss,puzzle)) then do
call clrl mess1
SAY ''mess1' GOOD GUESS!'cr
guessed = guessed||gss
moncur = moncur + (money * CountIn(puzzle,gss))
current = uncover(current,puzzle,gss)
letleft = translate(letleft, ,gss)
HasSpun = 0
say''cr
say''cr
SAY ''mess2' There were 'CountIn(puzzle,gss)' 'gss' ''s in the puzzle.'cr
end
else do
if nfs > 0 then do
call clrl mess1
say ''cr
say''mess1' 'pen.3'WRONG!'def''
say ''cr
say''mess2''pen.7' Since you have a Free Spin, it''s still your turn!'def''
nfs = nfs - 1
guessed = guessed||gss
letleft = translate(letleft, ,gss)
HasSpun = 0
say ''cr
call pressreturn
say ''cr
call PLAY2
end
call clrl mess1
SAY ''mess1' 'pen.3'WRONG!!'def''cr
call delay(25)
SAY ''mess2' 'pen.2'Better luck next time..'def''cr
call delay(100)
SAY cls
say cr
say cr
say''pen.6' Returning to the BBS...'def''cr
guessed = guessed||gss
letleft = translate(letleft, ,gss)
call quit puznum,current,puzzle,guessed,clue,author,autopuznum,player,letleft
call quit2 player,puzwon,monwon,puzcur,moncur,tplayed,BonusWins
call quit3 player,tplayed,puzwon,monwon,monsig,BonusWins
call CloseShop
exit
end
end
else do
call clrl mess1
SAY ''mess1' 'pen.4' Illegal Character. (or Vowel)'def''cr
HasSpun = 1
call play2
end
end
else do
call clrl mess1
SAY ''mess1' 'pen.4' Letter Guessed Already'def''cr
HasSpun = 1
call play2
end
call play2
end
if (SEL == 'B') then do
call clrl mess1
call clrl mess2
if moncur > 249 then do
call clrl mess1
SAY ''mess1' 'pen.7'Enter The Vowel You wish to Guess.'def''
say''mess2' 'pen.6' All vowels cost 'pen.3'$250'def''cr
if NoCarrier() then call DieGracefully
else nop
Options prompt ''pprompt' Guess > '
call hotkey
gss = upper(gss)
gss = left(gss,1)
if ~(instring(gss,guessed)) then do
if instring(gss,vowels) then do
if (instring(gss,puzzle)) then do
call clrl mess1
call clrl mess2
SAY ''mess1' GOOD GUESS!'cr
guessed = guessed||gss
letleft = translate(letleft, ,gss)
moncur = moncur - 250
if (moncur < 0) then moncur = 0
current = uncover(current,puzzle,gss)
SAY ''mess2' There were 'CountIn(puzzle,gss)' 'gss' ''s in the puzzle.'cr
call play2
end
else do
if nfs > 0 then do
call clrl mess1
say''mess1'' pen.3'WRONG! $250 has been deducted.'def''
moncur = moncur - 250
say''mess2' 'pen.7'Since you have a Free Spin, it''s still your turn!'def''
call delay(50)
nfs = nfs - 1
guessed = guessed||gss
letleft = translate(letleft, ,gss)
call PLAY2
end
call clrl mess1
say''mess1'' pen.3'WRONG! $250 has been deducted.'def''
moncur = moncur - 250
say''mess2' Awwww.. Better luck next time.'
call delay(100)
say cls
guessed = guessed||gss
letleft = translate(letleft, ,gss)
call quit puznum,current,puzzle,guessed,clue,author,autopuznum,player,letleft
call quit2 player,puzwon,monwon,puzcur,moncur,tplayed,BonusWins
call quit3 player,tplayed,puzwon,monwon,monsig,BonusWins
call CloseShop
exit
end
end
else do
call clrl mess1
call clrl mess2
SAY ''mess2' Not A Vowel.'cr
call play2
end
end
else do
call clrl mess1
call clrl mess2
SAY ''mess2' Vowel Already Guessed.'cr
call play2
end
end
else do
call clrl mess1
call clrl mess2
SAY ''mess2' Not Enough Money To Buy a Vowel, you''ll need at least $250.'cr
call play2
end
end
if (SEL == 'G') then do
call clrl mess1
call clrl mess2
SAY ''mess2'Type guess directly beneath current puzzle:'cr
SAY ''pguess' >'current''cr
if NoCarrier() then call DieGracefully
Options prompt ''pprompt' >'
call hotkeysolv
solv = upper(solv)
if solv == puzzle then do
call delay(100)
say cls
SAY ''cr
SAY ''cr
SAY ' 'pen.7'CONGRATULATIONS!!'def''cr
SAY ''cr
SAY ' 'pen.3'You just won $'moncur' in cash and prizes!'def''cr
call winner player,puzzle
CALL bonus
bon = ''
CALL SetClip('BBS_winnings',winnings+moncur+bwins)
puzwon = puzwon + 1
if bwins ~= 0 then puzwon = puzwon + 1
monsig = moncur
monwon = monwon + moncur + bwins
if exists(bbspath'wof.puzzles') then do
say ''cr
say' As the winner you have to make a choice....'cr
say ''cr
say''pen.3' 1. I want to enter the next puzzle'def''cr
say ''cr
say''pen.4' 2. Let the BBS generate the next puzzle'def''cr
say' (You''ll be able to play a BBS generated puzzle)'cr
say ''cr
options prompt''pen.5' Your choice > '
pull choice
if choice = '2' then call generate
end
say ''cr
say'OK, 'player', please enter the next puzzle.'cr
say ''cr
if NoCarrier() then call NoPuzzle
Options prompt 'Puzzle:'
call hotpuz
puzzle = upper(puzzle)
letleft = puzzle
if NoCarrier() then call NoPuzzle
Options prompt 'Clue:'
call hotclue
clue = answer
current = cover(puzzle)
puznum = puznum + 1
call quit puznum,current,puzzle,'',clue,player,autopuznum,player,letleft
call quit2 player,puzwon,monwon,puzcur,moncur,tplayed,BonusWins
call quit3 player,tplayed,puzwon,monwon,monsig,BonusWins
say 'Thank you, your puzzle will be waiting for the next player!'cr
call CloseShop
exit
end
else do
if nfs > 0 then do
call clrl mess1
say''mess1' 'pen.3'WRONG!'def''
call clrl pguess
say''mess2' 'pen.7'Since you have a Free Spin, it''s still your turn!'def''
call delay(50)
nfs = nfs - 1
call PLAY2
end
say cls
say cr
say cr
SAY ' 'pen.3'Wrong! Try again when there are more letters showing.'def''cr
say ''cr
say' 'pen.6'Returning to the BBS....'def''cr
call quit puznum,current,puzzle,guessed,clue,author,autopuznum,player,letleft
call quit2 player,puzwon,monwon,puzcur,moncur,tplayed,BonusWins
call quit3 player,tplayed,puzwon,monwon,monsig,BonusWins
call CloseShop
exit
end
end
if (SEL == 'Q') then do
call clrl mess1
call clrl mess2
say''mess1' Ok, Quiting....'
say''mess2' Try again next time!'
call delay(100)
say cls
say cr
say''pen.6' Returning to the BBS...'def''cr
call quit puznum,current,puzzle,guessed,clue,author,autopuznum,player,letleft
call quit2 player,puzwon,monwon,puzcur,moncur,tplayed,BonusWins
call quit3 player,tplayed,puzwon,monwon,monsig,BonusWins
call CloseShop
exit
end
call clrl mess1
call clrl mess2
call play2
end
/*************************** WoF Procedures *******************************/
odds:
say cr
say cr
call sac70''pen.2'Wheel Spots / Odds'def''
call sac70''pen.2'1-$1000, 2-$500, 2-$400, 3-$300, 3-$200, 5-$100, 5-$50'def''
call sac70''pen.2'2-Free Spin, 1-Lose turn, 2-Bankrupt''s'def''
say cr
say cr
call sac70''pen.7'Bonus Wheel Multiplier - 10 thru 20'def''
say cr
say cr
call sac70' 'pen.3'BONUS 'pen.2'Wheel Spots / Odds'def''
call sac70''pen.2'1-$1000, 1-$500, 1-$400, 1-$300, 1-$200, 1-$100, 1-$50'def''
say cr
say cr
call pressreturn
return
vanna:
say cls
say CR
say CR
say CR
say CR
say CR
say pen.2' \'pen.3' 0'pen.2' / '||CR
say ' \|/ '||CR
say ' | '||CR
say ' | '||CR
say ' / \ '||CR
say ' / \ '||def||CR
say CR
say pen.7' V A N N A W H I T E '||def||CR
say pen.2' (TOTALLY NUDE)'||def||CR
say cr
say cr
say' photo by 'pen.6'Charles Johnston'def''cr
say cr
say cr
CALL DELAY(200)
say cls
say CR
say CR
say pen.2' Now that you''ve caught your breath we can return to the game!'||def||CR
CALL DELAY(200)
return
GETSEL:
if nolet = 1 then do
sel = 'G'
say''vowmess' '
return
end
Options prompt ' 'pprompt'Enter your selection, 'player' > '
pull SEL
SEL = Upper(SEL)
if allvow = YES & SEL = S then do
say ''pprompt''pen.3' Spinning is not a valid option since only vowels remain!!'def''
call delay(100)
call clrl pprompt
call clrl mess1
call clrl mess2
call getsel
end
call clrl pprompt
call clrl mess1
call clrl mess2
return
BONUS:
bon = 1
say cr
say cr
say' You will now move on to the 'pen.3'BONUS'def' round!'cr
say cr
say cr
call delay(200)
say cls
/* Spin the bonus wheel for multiplier
between 10 & 20 */
say cr
say cr
options prompt' Hit 'pen.3'Return'def' to generate your 'pen.5'Bonus Wheel Multiplier!!!'def' '
pull hit
say cr
say cr
thebonus = random(10,20,time('s'))
thisspot ='35H'
thisnum = 9
do 20
if thisnum = 20 then thisnum = 10
thisnum = thisnum + 1
say''thisspot''thisnum''
say''thisspot'X '
end
say''thisspot''thebonus' 'cr
say cr
say cr
say cr
say' Your 'pen.5'Bonus Wheel Multiplier is 'pen.6''thebonus''def' !!'cr
call delay(100)
call generate
bmoney = random(1,7,time('s'))
if bmoney = 1 then bmoney = 1000
if bmoney = 2 then bmoney = 500
if bmoney = 3 then bmoney = 400
if bmoney = 4 then bmoney = 300
if bmoney = 5 then bmoney = 200
if bmoney = 6 then bmoney = 100
if bmoney = 7 then bmoney = 50
pos.1 ='32H' ; pos.2 ='35H' ; pos.3 ='39H' ; pos.4 ='40H'
pos.5 ='41H' ; pos.6 ='42H' ; pos.7 ='41H' ; pos.8 ='40H'
pos.9 ='39H' ; pos.10 ='35H' ; pos.11 ='32H' ; pos.12 ='30H'
pos.13 ='29H' ; pos.14 ='28H' ; pos.15 ='29H' ; pos.16 ='30H'
pprompt ='3H'
pcash='34H'
c.1 ='100' ; c.2='200' ; c.3 ='300'; c.4='400'; c.5='500' ; c.6='50'
pamount='6H'
pboncur='16H'
pcons='2H'
pvow='2H'
say cls
SAY pen.7' +++++++++++++++++++++++++++++++++++++++++++++++++++++'def||CR
SAY pen.7' +'pen.6' --------------- !! Bonus Round !! --------------- 'pen.7'+'def||cr
SAY pen.7' +++++++++++++++++++++++++++++++++++++++++++++++++++++'def||CR
say cr
say cr
say cr
say cr
say ''cr
SAY ' Bonus Puzzle: 'pen.3''Boncur''def''cr
SAY ' Clue: 'pen.7''Bonclue''def''cr
SAY cr
say' 'pen.2'50 'pen.3'200 'pen.4'50'def''cr
say' 'pen.5'100 'pen.6'400'def''cr
say' 'pen.7'400 'pen.2'300'def''cr
say' 'pen.3'500 'pen.4'100'def''cr
say' 'pen.5'300 'pen.6'200'def''cr
say' 'pen.7'100 'pen.2'300'def''cr
say' 'pen.3'50 'pen.4'500 'pen.5'50'def''cr
say cr
say cr
options prompt''pprompt' 'pen.7'Hit 'pen.3'Return 'pen.7'to Spin the wheel !!!'def' '
pull it
call clrl pprompt
call spinit
say''pprompt' You spin for 'pen.6'$'bmoney''def' !'cr
call delay(100)
tbmoney = bmoney * thebonus /* total bonus money = spin money times multiplier */
say' 'pen.6'$'bmoney' 'def'times your 'pen.3'BONUS Multiplier ('thebonus') 'def'= 'pen.5'$'tbmoney''def' !!'
call delay(200)
call clrl pprompt
say' '
say''pamount' Playing for 'pen.5'$'tbmoney''def''
call pullcons
say''pcons'Consonants : 'pen.3''cons''def''
call pullvow
say''pvow'Vowel : 'pen.6''vow''def''
call checkcons
say''pprompt' 'boncur''cr
options prompt'Enter your guess > '
pull bguess
if upper(bguess) == upper(bonpuz) then do
BonusWins = BonusWins + 1
say cr
say' 'pen.3'Congratulations!!'def' You''re right! You just won $ 'pen.2''tbmoney' 'def'!!'cr
call delay(200)
thistot = moncur + tbmoney
say cr
say' 'pen.7'Your total winnings for this session = 'pen.3'$ 'thistot''def' !'cr
bwins = tbmoney
end
else do
say cr
say' 'pen.3'Wrong'def', better luck next time!'cr
bwins = '0'
say cr
say' The correct answer was 'pen.7''bonpuz''def''cr
call delay(200)
say cr
say' But you did win 'pen.3'$ 'moncur''def' on the regular puzzle !'cr
end
return
say cr
checkcons:
say''pprompt' OK, let''s check for letters in the 'pen.3'BONUS'def' Puzzle!..'
call delay(100)
call clrl pprompt
do i = 1 to 6
if i = 6 then checklet = vow
else checklet = substr(cons,i,1)
if instring(checklet,bonpuz) then do
say''pprompt' There were 'CountIn(bonpuz,checklet)' 'pen.7''checklet' ''s 'def'in the BONUS Puzzle!'
call delay(100)
boncur = uncover(boncur,bonpuz,checklet)
say''pboncur''boncur''
end
else do
say''pprompt' There were 'pen.3'zero 'checklet' ''s 'def'in the BONUS puzzle..'
call delay(100)
call clrl pprompt
end
end
call clrl pprompt
return
pullvow:
options prompt''pprompt' Enter one vowel > '
pull vow
vow = space(vow)
vow = upper(vow)
call clrl pprompt
if length(vow) ~= 1 | ~datatype(vow,'U') | ~instring(vow,vowels) then do
say''pprompt' You can only enter 1 Vowel, try again..'
call delay(300)
call clrl pprompt
call pullvow
end
return
pullcons:
options prompt''pprompt' Enter five consonants > '
pull cons
cons = strip(cons)
cons = space(cons)
cons = upper(cons)
call clrl pprompt
testlet = compress(cons,const)
if length(testlet) ~= 0 then ill = 1
if length(cons) ~= 5 | ~datatype(cons,'U') | ill = 1 then do
say''pprompt' You MUST enter 5 consanants only, no vowels or numbers...'
call delay(300)
call clrl pprompt
ill = 0
call pullcons
end
return
generate:
file = bbspath'wof.puzzles'
call open(puzzles,file,'R')
say ''cr
if bon = 1 then say' 'pen.7'Generating the Bonus Puzzle...'def''cr
else say' 'pen.7'Generating a new puzzle, please stand by...'def''cr
do for autopuznum
ln = readln(puzzles)
if EOF(puzzles) then do
call close(puzzles)
autopuznum = 1
call generate
end
end
puzline = readln(puzzles)
parse var puzline puzzle'|'clue
puzzle = strip(puzzle)
puzzle = upper(puzzle)
letleft = puzzle
clue = strip(clue)
clue = upper(clue)
call close(puzzles)
say ''cr
current = cover(puzzle)
puznum = puznum + 1
author = 'THE_BBS'
autopuznum = autopuznum + 1
if bon = 1 then do
boncur = current
bonpuz = puzzle
bonclue = clue
bon = ''
return
end
call quit puznum,current,puzzle,'',clue,author,autopuznum,player,letleft
call quit2 player,puzwon,monwon,puzcur,moncur,tplayed,BonusWins
call quit3 player,tplayed,puzwon,monwon,monsig,BonusWins
say ''pen.6'Thank you, a new puzzle will be waiting for the next player!'def''cr
say ''pen.6'Give it a try on your next call!'def''cr
call CloseShop
exit
LTURN:
call spinit
call clrl mess1
say''mess1''pen.3' LOSE TURN!'
call delay(40)
if nfs > 0 then do
say''mess2''pen.2' You have a Free Spin, so it''s still your turn!'
nfs = nfs -1
call play2
end
else do
say''mess2' OOPS! Well, you can try again next call.'
call delay(100)
say cls
say cr
say cr
say''pen.2' Returning to the BBS...'def''
call quit puznum,current,puzzle,guessed,clue,author,autopuznum,player,letleft
call quit2 player,puzwon,monwon,puzcur,moncur,tplayed,BonusWins
call quit3 player,tplayed,puzwon,monwon,monsig,BonusWins
call CloseShop
exit
end
Return
FREESPIN:
call spinit
call clrl mess1
say''mess1' Congratulations, you win a 'pen.5' FREE SPIN'def''
say ''cr
nfs = nfs + 1
call PLAY2
return
BANKRPT:
call spinit
call delay(50)
call clrl mess1
say''mess1' You have hit 'pen.3'Bankrupt!'def''
call delay(100)
say cls
say cr
say cr
do for 3
call sac70'BANKRUPT'
say''cr
call delay(40)
end
if nfs > 0 then do
say''mess2' You have a Free Spin, so it''s still your turn!'
say ''cr
nfs = nfs -1
moncur = 0
call play2
end
else do
call sac70' Sorry, try again next call!'
say ''cr
moncur = 0
call quit puznum,current,puzzle,guessed,clue,author,autopuznum,player,letleft
call quit2 player,puzwon,monwon,puzcur,moncur,tplayed,BonusWins
call quit3 player,tplayed,puzwon,monwon,monsig,BonusWins
call CloseShop
exit
end
Return
CHKVOWEL:
LETLEFT = SPACE(LETLEFT,0)
LETTEST = TRANSLATE(LETLEFT, ,AEIOU1234567890)
LETTEST = SPACE(LETTEST,0)
IF LENGTH(LETTEST) = 0 THEN ALLVOW = YES
ELSE ALLVOW = NO
if length(letleft) = 0 then nolet = 1
else nolet = 0
RETURN
Quit: procedure expose bbspath
arg puznum,current,puzzle,guessed,clue,author,autopuznum,player,letleft
call open('output',bbspath'WoF.dat','W')
call writeln('output',puznum)
call writeln('output',current)
call writeln('output',puzzle)
call writeln('output',guessed)
call writeln('output',clue)
call writeln('output',author autopuznum)
call writeln('output',player)
call writeln('output',letleft)
call close('output')
return
quit2:
arg name,puzwon,monwon,puzcur,moncur,tplayed,BonusWins
if tplayed >0 then do
tplayed = tplayed + 1
end
else tplayed = 1
if puzwon > 0 then do
tpct = (puzwon / tplayed) * 100
pct = substr(tpct,1,5)
pct = SPACE(pct,0)
end
else pct = 0
if BonusWins = '' then BonusWins = 0
call open('output','RAM:wof.player.data','A')
call writeln('output',name'|'puzwon'|'monwon'|'puzcur'|'moncur'|'tplayed'|'pct'|'BonusWins)
call close('output')
address command 'c:copy ram:wof.player.data' bbspath'WoF.players'
call delay(50)
call delete('ram:wof.player.data')
return
quit3:
arg player,tplayed,puzwon,monwon,monsig,BonusWins
call open(statfile,bbspath'WoF.stat','R')
mostplays = readln(statfile) /* MOST TIMES PLAYED */
mostwins = readln(statfile) /* MOST PUZZLES WON */
mostmon = readln(statfile) /* MOST $ WON TOTAL */
mostsigl = readln(statfile) /* MOST $ WON IN A SINGLE GAME */
mostBonusWins = readln(statfile)
if mostBonusWins = '' then mostBonusWins = 'MATT_ENGLISH|1'
call close(statfile)
parse var mostplays name1'|'stat1
parse var mostwins name2'|'stat2
parse var mostmon name3'|'stat3
parse var mostsigl name4'|'stat4
parse var mostBonusWins name5'|'stat5
if tplayed > stat1 then do
stat1 = tplayed
name1 = player
say ''cr
say pen.3'Congratulations! You have played more than anyone!'def||cr
say ''cr
end
if puzwon > stat2 then do
stat2 = puzwon
name2 = player
say ''cr
say pen.3'ALRIGHT! You have won the most puzzles!'def||cr
say ''cr
end
if monwon > stat3 then do
stat3 = monwon
name3 = player
say ''cr
say pen.3'You are the biggest money winner of all the players!'def||cr
say ''cr
end
if monsig > stat4 then do
stat4 = monsig
name4 = player
say ''cr
say pen.3'WOW, that game earned you the most money ever won in a single game!'def||cr
say ''cr
end
if BonusWins > stat5 then do
stat5 = BonusWins
name5 = player
say cr
say pen.7'Great! You have beat the BONUS round more times than anyone!!'def||cr
say ''cr
end
call open('outstat',bbspath'WoF.stat','W')
call writeln('outstat',name1'|'stat1)
call writeln('outstat',name2'|'stat2)
call writeln('outstat',name3'|'stat3)
call writeln('outstat',name4'|'stat4)
call writeln('outstat',name5'|'stat5)
call close('outstat')
return
Uncover: procedure
arg current,puzzle,letter
loop = 1
pos = 1
do while (pos ~== 0)
pos = index(puzzle,letter,loop)
if (pos == 1) then
current = letter||right(current,(length(current)-pos))
else nop
if (pos == length(current)) then
current = left(current,(pos-1))||letter
else if (pos ~== 0) then
current = left(current,(pos-1))||letter||right(current,(length(puzzle)-pos))
loop = pos+1
end
return(current)
CountIn: procedure
arg puzzle,letter
points = 0
pos = 1
oldpos = 1
do while (pos ~== 0)
pos = index(puzzle,letter,oldpos)
if (pos ~==0) then do
points = points + 1
oldpos = pos + 1
end
end
return(points)
cover: procedure
arg oldstring
newstring = ''
do loop = 1 to (length(oldstring))
if (instring(left(oldstring,1),'ABCDEFGHIJKLMNOPQRSTUVWXYZ')) then
newstring = newstring||"+"
else newstring = newstring||left(oldstring,1)
oldstring = right(oldstring,(length(oldstring)-1))
end
return(newstring)
instring: procedure
arg letter,string
if (index(string,letter) == 0) then return 0
else return 1
winner: procedure expose bbspath
arg player,puzzle
call open('outfile',bbspath'WoF.winners','R')
line0 = readln('outfile')
line1 = readln('outfile')
line2 = readln('outfile')
line3 = readln('outfile')
line4 = readln('outfile')
line5 = readln('outfile')
line6 = readln('outfile')
line7 = readln('outfile')
line8 = readln('outfile')
line9 = readln('outfile')
call close('outfile')
call open('outfile',bbspath'WoF.winners','W')
today = date()
when = time('C')
news = puzzle' solved by 'player' on 'today' at 'when'.'
call writeln('outfile',line1)
call writeln('outfile',line2)
call writeln('outfile',line3)
call writeln('outfile',line4)
call writeln('outfile',line5)
call writeln('outfile',line6)
call writeln('outfile',line7)
call writeln('outfile',line8)
call writeln('outfile',line9)
call writeln('outfile',news)
call close('outfile')
return
/********************* Error Checking *************************************/
SYNTAX:
SAY '*BOOM* Got a syntax error. PLEASE notify the sysop.'
SAY 'Line:' SIGL ' Error Code:' RC
call CloseShop
exit
/*************************************************************************/
spinit:
if bmoney = '' then do
if money = 1 | money = 26 then money = ''pen.2' FREE'def''
if money > 1 & money < 4 then money = ''pen.3'BRUPT'def''
if money = 4 then money = ''pen.3' LOSE'def''
end
call clcash
w = '0'
j = '1'
do 3
do i = 1 to 16
w = w+1
j = j + 1
if j > 7 then j = 2
if w > 5 then w = 1
if i = 1 | i = 3 | i = 9 | i = 11 then x = 6
else x = w
say''pos.i' '
say''pos.i''pen.j''c.x''def''
end
end
say''pcash'$500'
call clcash
say''pcash'$200'
call delay(5)
call clcash
say''pcash'$400'
call delay(10)
call clcash
say''pcash'$100'
call delay(20)
call clcash
if bmoney = '' then do
if datatype(money,'W') then say''pcash'$'money''
else say''pcash''money''
end
else do
if datatype(bmoney,'W') then say''pcash'$'bmoney''
else say''pcash''bmoney''
end
return
CloseShop:
if NoCarrier() then call DieGracefully
Options prompt 'Press RETURN:'
exit
return
DieGracefully: procedure
'exit'
exit
return
NoPuzzle
call open('infile',bbspath'wof.dat','W')
call writeln('infile','0')
call close('infile')
return
HOTKEY:
PULL gss
if length(gss)>1 then signal HOTKEY:
return
HOTSTAT:
PULL answer
if answer = '' then answer = Y
if length(answer)>1 then signal HOTSTAT:
return
HOTKEYSEL:
PULL SEL
if length(SEL)>1 then signal HOTKEYSEL:
return
HOTKEYSOLV:
PULL SOLV
return
hotpuz:
pull puzzle
puzzle = strip(puzzle)
if puzzle = '' then do
say ''pen.3'Hey cmon'def 'and enter a new puzzle!'cr
Otions prompt'Puzzle > '
call hotpuz
end
if length(puzzle) > 60 then do
say ''cr
say ' That puzzle''s a little too long. Can you think of a shorter one?'
say ''cr
options prompt'Puzzle (60 characters max) > '
call hotpuz
end
say ''cr
call sac70 'Puzzle: 'puzzle''
say ''cr
options prompt'Does this look OK? ('pen.5'Y'def','pen.3'n'def') > '
pull ok
say ''cr
if ok = 'N' then do
say ''cr
say' 'pen.5'OK, lets try again.'def''cr
say ''cr
options prompt'Please enter your puzzle > '
call hotpuz
end
return
hotclue:
pull answer
if answer = '' then do
say ''pen.6'It would help if you gave us a clue!'def||cr
say ''cr
options prompt'Clue > '
say ''cr
call hotclue
end
say ''cr
call sac70'Clue:'answer''
say ''cr
options prompt'Does this clue look OK? ('pen.5'Y'def','pen.3'n'def') > '
pull okcl
say ''cr
if okcl = 'N' then do
say ''cr
say' OK, lets try the clue again.'cr
say ''cr
options prompt'Please enter your clue > '
call hotclue
end
return
SAC70: /* SAY CENTER TEXT*/
PARSE ARG string
SAY CENTER(string,75)||CR
RETURN;
SAC: /* SAY CENTER TEXT*/
PARSE ARG string
SAY CENTER(string,50)||CR
RETURN;
VATIME:
parse var mostplays name1'|'stat1
parse var mostwins name2'|'stat2
parse var mostmon name3'|'stat3
parse var mostsigl name4'|'stat4
parse var mostBonusWins name5'|'stat5
say ''cr
say ''cr
say ' 'pen.2''name1''def' has played the most! 'pen.2''stat1''def' times!'cr
say ' 'pen.3''name2''def' has won the most games! 'pen.3''stat2''def' wins!'cr
say ' 'pen.4''name3''def' has earned the most money! $'pen.4''stat3''def' bucks!'cr
say ' 'pen.5''name4''def' has won the most money in a single game! $'pen.5''stat4''def' bucks!'cr
say ' 'pen.6''name5''def' has solved the most BONUS ROUND puzzles!! 'pen.6''stat5''def''cr
say ''cr
call pressreturn
return
clrl:
arg where
call writech('STDOUT',''where' ')
return
clcash:
call writech('STDOUT',''pcash' ')
return
VPSTATS:
say ''cr
call sac70' You have won 'pen.2''puzwon''def' times.'
call sac70' You have solved the 'pen.6'BONUS ROUND puzzle 'BonusWins''def' times!'
call sac70' You have won $'pen.3''monwon''def' bucks total.'
call sac70' The last puzzle you played was puzzle number 'pen.4''puzcur''def'.'
call sac70' You have Played The Wheel of Fortune 'pen.5''tplayed''def' times.'
call sac70' You solve the puzzle 'pen.6''pct''def' % of the time!'
say ''cr
call pressreturn
return
VASTATS:
stop = ''
call open('allstat',bbspath'WoF.players','R')
do until eof('allstat')
say cls
if stop = 1 then break
say' Player 'pen.2'Puzzles 'pen.3'Money 'pen.4'Current 'pen.5'Current 'pen.6'Times 'pen.7'Winning'def' Bonus'cr
say' name 'pen.2'won 'pen.3'won 'pen.4'Puzzle # 'pen.5'Cash 'pen.6'Played 'pen.7'%'def' wins'cr
say'--------------------------------------------------------------------------------------'cr
say ''cr
do for 16
line1 = readln('allstat')
parse var line1 namea'|'num1a'|'num2a'|'num3a'|'num4a'|'num5a'|'num6a'|'num7a
namea = left(namea,16);num1a = center(num1a,7);num2a = center(num2a,7)
num3a = center(num3a,9);num4a = center(num4a,9);num5a = center(num5a,7)
num6a = center(num6a,6);sign = '%';signa = '$'
if num7a = '' then num7a = 0
if num6a = '' then num7a = ''
num7a = left(num7a,5)
if num6a = '' then do
sign = ''
signa = ''
end
say''namea''pen.2''num1a''pen.3''signa''num2a' 'pen.4''num3a''pen.5''signa''num4a''pen.6''num5a' 'pen.7''num6a' 'sign''def' 'num7a''cr
end
say ''cr
call qreturn
end
call close('allstat')
return
VL5PUZ:
call open(puzfile,bbspath'WoF.winners','R')
laspuz0 = readln(puzfile)
laspuz1 = readln(puzfile)
laspuz2 = readln(puzfile)
laspuz3 = readln(puzfile)
laspuz4 = readln(puzfile)
laspuz5 = readln(puzfile)
laspuz6 = readln(puzfile)
laspuz7 = readln(puzfile)
laspuz8 = readln(puzfile)
laspuz9 = readln(puzfile)
call close(puzfile)
say''cls''
say cr
call sac70'The last ten puzzles were:'
say ''cr
say ''cr
say''laspuz0''cr
say''laspuz1''cr
say''laspuz2''cr
say''laspuz3''cr
say''laspuz4''cr
say''laspuz5''cr
say''laspuz6''cr
say''laspuz7''cr
say''laspuz8''cr
say''laspuz9''cr
say ''cr
say ''cr
call pressreturn
return
pressreturn:
options prompt' 'pen.5' Press 'pen.3'[Return]'pen.5' to continue'def''
pull response
return
qreturn:
stop = ''
options prompt' 'pen.5' Press 'pen.3'[Return]'pen.5' to continue or 'pen.3'"S"'pen.5' to Stop'def' '
pull response
if response = "S" then stop = 1
return
NoCarrier:
IF ADDRESS()~='BAUD' THEN RETURN 0
dcd
IF RC=0 THEN RETURN 1
temp2=TIME('E')
IF temp2>secs THEN RETURN 1
temp=secs-temp2
IF temp<120 THEN SAY '*** Only' temp 'seconds left! ***'CR
RETURN 0
RETURN 0
inst:
say cls
say cr
say cr
say' This plays just like the TV show... If you miss, it''s the next players'cr
say' turn. Only thing is you have to wait till the next caller calls and takes'cr
say' a turn! If you guess the puzzle, you will be prompted to leave the next'cr
say' puzzle! 'pen.4'Vowels cost $250. 'pen.5'Even if there''s 5 A''s, it''s still $250.'def''cr
say cr
say' Have fun... Play everytime you call!!!!'cr
say cr
say' 'pen.4'Get to the 'pen.3'BONUS 'pen.4'round!'def''cr
say cr
say' 'pen.5'Try to get to the top of the stats list!'def||cr
say''cr
call pressreturn
return
BREAK_C:
BREAK_E:
CALL CLOSE(f)
EXIT; /* a little redundant, so sue me! */
/**************************************************************************/