home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 15
/
CD_ASCQ_15_070894.iso
/
vrac
/
guess10.zip
/
GUESS.PPE
(
.txt
)
< prev
next >
Wrap
PCBoard Programming Language Executable
|
1994-05-13
|
7KB
|
266 lines
;------------------------------------------------------------------------------
; .ss.
; `²²'
; .,sS$Ss,,s$ .,sS$$$Ss. .,sS$Ss,,s$ .ss. .sSs.
; .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
; $$$' .$$$' $$$²Sçsµ²' .$$$' .$$$'.$$$' .$$$' `$$b.
; $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$' ;$$$
; `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
; .sS²°$$$²²°"' d²°'
; .$$² .$$'
; $$$.,d$$'
; `²S$$S²'
;------------------------------------------------------------------------------
; P.P.L.X. 2.OO (C)1996 - Lone Runner / AEGiS CoRP'96
;------------------------------------------------------------------------------
; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
;------------------------------------------------------------------------------
Integer INTEGER001
Integer INTEGER002
Integer INTEGER003
Integer INTEGER004
Integer INTEGER005
Integer INTEGER006
Integer INTEGER007
Integer INTEGER008
Integer INTEGER009
Integer INTEGER010
String STRING001
String STRING002
;------------------------------------------------------------------------------
If ((GrafMode() == "N") || (GrafMode() == "A")) Then
PrintLn "Sorry, but you need ANSI graphics to play this game. If you think you"
PrintLn "are capable of these, turn them on with an M command at the Main Prompt."
PrintLn
Wait
End
Endif
If (Exist(PPEPath() + "guess.cfg") == 0) Then
PrintLn "Sorry, but I can't seem to find ", PPEPath(), "GUESS.CFG."
Log "The configuration file to GUESS.PPE is missing!", 1
Wait
End
Endif
FOpen 1, PPEPath() + "guess.cfg", 0, 0
FGet 1, STRING002
FGet 1, INTEGER005
FGet 1, INTEGER008
FGet 1, INTEGER010
FClose 1
INTEGER001 = Random(9999)
INTEGER003 = 9999
INTEGER004 = 0
If (INTEGER010 < 1) INTEGER010 = 1
Cls
PrintLn "@X0E--------@X0BNumber Guess Time Gambler 1.0 @X09PPE @X08by @X07Tom Grandgent / @X0FWizWare '94@X0E--------"
PrintLn ""
PrintLn " ----@X0AInstructions@X0E----@X0A"
PrintLn ""
PrintLn " You will be given ", INTEGER005, " chances to guess a number from 0 to 9999."
PrintLn " The game will tell you whether you guessed too high or too low."
PrintLn " If you guess the number, you will get the amount of time you bet"
PrintLn " multiplied by the number of guesses you had left (the maximum"
PrintLn " multiplier is ", INTEGER010, "). If you run out of guesses, you will lose the"
PrintLn " amount of time you bet. If you want to play for fun, just bet"
PrintLn " a small amount of time, or even just 0 minutes."
:LABEL001
PrintLn ""
InputStr "How much time do you want to bet", INTEGER006, 15, 3, "0123456789", 0
If (MinLeft() < INTEGER006) Then
PrintLn ""
PrintLn "@X0FSorry, but you only have @TIMELEFT@ minutes left!"
Goto LABEL001
Endif
If (INTEGER006 > INTEGER008) Then
PrintLn ""
PrintLn "@X0FSorry, the maximum bet is ", INTEGER008, " minutes."
Goto LABEL001
Endif
Color 127
Cls
AnsiPos 22, 5
Print "@X1A╔═══════════════════════════════════╗"
AnsiPos 22, 6
Print "@X1A║ @X1FNumber Guess by Tom Grandgent @X1A║@X0F "
AnsiPos 22, 7
Print "@X1A╟───────────────────────────────────╢@X0F "
AnsiPos 22, 8
Print "@X1A║ The number is between: ║@X0F "
AnsiPos 22, 9
Print "@X1A║ Your time at stake: ║@X0F "
AnsiPos 22, 10
Print "@X1A║ Your current time left: ║@X0F "
AnsiPos 22, 11
Print "@X1A╟───────────────────────────────────╢@X0F "
AnsiPos 22, 12
Print "@X1A║ ║@X0F "
AnsiPos 22, 13
Print "@X1A║ @X1EGuesses left: Your guess @X1A║@X0F "
AnsiPos 22, 14
Print "@X1A╟───────────────────────────────────╢@X0F "
AnsiPos 22, 15
Print "@X1A║ @X1FWizWare Software '94 @X1A║@X0F "
AnsiPos 22, 16
Print "@X1A╚═══════════════════════════════════╝@X0F "
AnsiPos 22, 17
Print "@X7F @X0F "
:LABEL002
AnsiPos 47, 8
Print "@X1D", INTEGER004, "-", INTEGER003, " "
AnsiPos 44, 9
Print "@X1D", INTEGER006, " min. "
AnsiPos 48, 10
Print "@X1D@TIMELEFT@ min. "
AnsiPos 38, 13
Print "@X1D", INTEGER005, " "
AnsiPos 51, 13
Color 30
Print " "
AnsiPos 51, 13
InputStr "", INTEGER002, 30, 4, "1234567890", 0
If (INTEGER002 == 1234) INTEGER009 = 1
If ((INTEGER002 == 4321) && (INTEGER009 == 1)) Then
Cls
AdjTime INTEGER006
End
Endif
If (INTEGER002 == INTEGER001) Then
Goto LABEL004
Endif
If (INTEGER002 < INTEGER001) Then
AnsiPos 24, 12
Print "@X1EYour guess is too low! "
If (INTEGER002 > INTEGER004) INTEGER004 = INTEGER002
Dec INTEGER005
If (INTEGER005 == 0) Then
Goto LABEL003
Endif
Goto LABEL002
Endif
If (INTEGER002 > INTEGER001) Then
AnsiPos 24, 12
Print "@X1EYour guess is too high!"
If (INTEGER002 < INTEGER003) INTEGER003 = INTEGER002
Dec INTEGER005
If (INTEGER005 == 0) Then
Goto LABEL003
Endif
Goto LABEL002
Endif
:LABEL003
Color 15
Cls
PrintLn "You LOST!! LOSER!!!!!! The REAL number was ", INTEGER001, "!!"
If (INTEGER002 > INTEGER001) Then
INTEGER007 = INTEGER002 - INTEGER001
STRING001 = "less"
Else
INTEGER007 = INTEGER001 - INTEGER002
STRING001 = "more"
Endif
PrintLn "Just ", INTEGER007, " ", STRING001, " than your last guess of ", INTEGER002, " and you would've had it..."
PrintLn "Subtracting your bet from your time (", INTEGER006, " minutes)!"
INTEGER006 = INTEGER006 * -1
Goto LABEL005
:LABEL004
Cls
Color 15
PrintLn "Congratulations, you won!!"
If (INTEGER005 > INTEGER010) Then
PrintLn "And you had so many guesses left I had to put them down to ", INTEGER010, "!"
INTEGER005 = INTEGER010
Endif
If (INTEGER006 > 0) Then
PrintLn "Adding your bet (", INTEGER006, " minutes) multiplied by ", INTEGER005, " guesses left!"
INTEGER006 = INTEGER006 * INTEGER005
Endif
:LABEL005
AdjTime INTEGER006
PrintLn ""
PrintLn "Now you have @TIMELEFT@ minutes left. Have a nice day!"
PrintLn
PrintLn "This PPE is from the home of WizWare....."
PrintLn ""
PrintLn " @X09The Wizard's BBS!"
PrintLn " @X08(@X0F508@X08)@X0F481@X08-@X0F4693"
PrintLn ""
PrintLn " @X09- @X0FOver 6 gigabytes of software"
PrintLn " @X09- @X0FFiles from A-Z, something for everyone!"
PrintLn " @X09- @X0FSupport up to 28800 baud!"
PrintLn " @X09- @X0F10 FULLY ONLINE Nodes (On Hunt)"
PrintLn " @X09- @X0F100's of RIMENET Conferences"
PrintLn " @X09- @X0FHome of WizWare software!"
PrintLn " @X09- @X0Fand best of all... @X89A Cool SysOp!"
PrintLn ""
Wait
PrintLn "@X0FReturning to ", STRING002, "..."
End
;------------------------------------------------------------------------------
;
; Usage report (before postprocessing)
;
; ■ Statements used :
;
; 4 End
; 5 Cls
; 3 Wait
; 4 Color
; 22 Goto
; 14 Let
; 20 Print
; 43 PrintLn
; 17 If
; 1 FOpen
; 1 FClose
; 4 FGet
; 2 AdjTime
; 1 Log
; 2 InputStr
; 2 Dec
; 21 AnsiPos
;
;
; ■ Functions used :
;
; 1 -
; 2 *
; 2 +
; 2 -
; 9 ==
; 4 <
; 6 >
; 13 !
; 1 &&
; 1 ||
; 1 Random()
; 3 PPEPath()
; 1 MinLeft()
; 1 Exist()
; 2 GrafMode()
;
;------------------------------------------------------------------------------
;
; Analysis flags : A
;
; A - Adjust online time remaining ■ 5
; Program modify the amount of online time remaining, this may
; be a way to bypass time limits
; ■ Search for : ADJTIME
;
;------------------------------------------------------------------------------
;
; Postprocessing report
;
; 0 For/Next
; 0 While/EndWhile
; 13 If/Then or If/Then/Else
; 0 Select Case
;
;------------------------------------------------------------------------------
; AEGiS Corp - Break the routines, code against the machines!
;------------------------------------------------------------------------------