home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / guess10.zip / GUESS.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-05-13  |  7KB  |  266 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Integer  INTEGER001
  20.     Integer  INTEGER002
  21.     Integer  INTEGER003
  22.     Integer  INTEGER004
  23.     Integer  INTEGER005
  24.     Integer  INTEGER006
  25.     Integer  INTEGER007
  26.     Integer  INTEGER008
  27.     Integer  INTEGER009
  28.     Integer  INTEGER010
  29.     String   STRING001
  30.     String   STRING002
  31.  
  32. ;------------------------------------------------------------------------------
  33.  
  34.     If ((GrafMode() == "N") || (GrafMode() == "A")) Then
  35.         PrintLn "Sorry, but you need ANSI graphics to play this game. If you think you"
  36.         PrintLn "are capable of these, turn them on with an M command at the Main Prompt."
  37.         PrintLn 
  38.         Wait
  39.         End
  40.     Endif
  41.     If (Exist(PPEPath() + "guess.cfg") == 0) Then
  42.         PrintLn "Sorry, but I can't seem to find ", PPEPath(), "GUESS.CFG."
  43.         Log "The configuration file to GUESS.PPE is missing!", 1
  44.         Wait
  45.         End
  46.     Endif
  47.     FOpen 1, PPEPath() + "guess.cfg", 0, 0
  48.     FGet 1, STRING002
  49.     FGet 1, INTEGER005
  50.     FGet 1, INTEGER008
  51.     FGet 1, INTEGER010
  52.     FClose 1
  53.     INTEGER001 = Random(9999)
  54.     INTEGER003 = 9999
  55.     INTEGER004 = 0
  56.     If (INTEGER010 < 1) INTEGER010 = 1
  57.     Cls
  58.     PrintLn "@X0E--------@X0BNumber Guess Time Gambler 1.0 @X09PPE @X08by @X07Tom Grandgent / @X0FWizWare '94@X0E--------"
  59.     PrintLn ""
  60.     PrintLn "                          ----@X0AInstructions@X0E----@X0A"
  61.     PrintLn ""
  62.     PrintLn "     You will be given ", INTEGER005, " chances to guess a number from 0 to 9999."
  63.     PrintLn "     The game will tell you whether you guessed too high or too low."
  64.     PrintLn "     If you guess the number, you will get the amount of time you bet"
  65.     PrintLn "     multiplied by the number of guesses you had left (the maximum"
  66.     PrintLn "     multiplier is ", INTEGER010, ").  If you run out of guesses, you will lose the"
  67.     PrintLn "     amount of time you bet.  If you want to play for fun, just bet"
  68.     PrintLn "     a small amount of time, or even just 0 minutes."
  69.     :LABEL001
  70.     PrintLn ""
  71.     InputStr "How much time do you want to bet", INTEGER006, 15, 3, "0123456789", 0
  72.     If (MinLeft() < INTEGER006) Then
  73.         PrintLn ""
  74.         PrintLn "@X0FSorry, but you only have @TIMELEFT@ minutes left!"
  75.         Goto LABEL001
  76.     Endif
  77.     If (INTEGER006 > INTEGER008) Then
  78.         PrintLn ""
  79.         PrintLn "@X0FSorry, the maximum bet is ", INTEGER008, " minutes."
  80.         Goto LABEL001
  81.     Endif
  82.     Color 127
  83.     Cls
  84.     AnsiPos 22, 5
  85.     Print "@X1A╔═══════════════════════════════════╗"
  86.     AnsiPos 22, 6
  87.     Print "@X1A║   @X1FNumber Guess by Tom Grandgent   @X1A║@X0F  "
  88.     AnsiPos 22, 7
  89.     Print "@X1A╟───────────────────────────────────╢@X0F  "
  90.     AnsiPos 22, 8
  91.     Print "@X1A║ The number is between:            ║@X0F  "
  92.     AnsiPos 22, 9
  93.     Print "@X1A║ Your time at stake:               ║@X0F  "
  94.     AnsiPos 22, 10
  95.     Print "@X1A║ Your current time left:           ║@X0F  "
  96.     AnsiPos 22, 11
  97.     Print "@X1A╟───────────────────────────────────╢@X0F  "
  98.     AnsiPos 22, 12
  99.     Print "@X1A║                                   ║@X0F  "
  100.     AnsiPos 22, 13
  101.     Print "@X1A║ @X1EGuesses left:    Your guess       @X1A║@X0F  "
  102.     AnsiPos 22, 14
  103.     Print "@X1A╟───────────────────────────────────╢@X0F  "
  104.     AnsiPos 22, 15
  105.     Print "@X1A║       @X1FWizWare Software '94        @X1A║@X0F  "
  106.     AnsiPos 22, 16
  107.     Print "@X1A╚═══════════════════════════════════╝@X0F  "
  108.     AnsiPos 22, 17
  109.     Print "@X7F  @X0F                                     "
  110.     :LABEL002
  111.     AnsiPos 47, 8
  112.     Print "@X1D", INTEGER004, "-", INTEGER003, "  "
  113.     AnsiPos 44, 9
  114.     Print "@X1D", INTEGER006, " min. "
  115.     AnsiPos 48, 10
  116.     Print "@X1D@TIMELEFT@ min. "
  117.     AnsiPos 38, 13
  118.     Print "@X1D", INTEGER005, " "
  119.     AnsiPos 51, 13
  120.     Color 30
  121.     Print "      "
  122.     AnsiPos 51, 13
  123.     InputStr "", INTEGER002, 30, 4, "1234567890", 0
  124.     If (INTEGER002 == 1234) INTEGER009 = 1
  125.     If ((INTEGER002 == 4321) && (INTEGER009 == 1)) Then
  126.         Cls
  127.         AdjTime INTEGER006
  128.         End
  129.     Endif
  130.     If (INTEGER002 == INTEGER001) Then
  131.         Goto LABEL004
  132.     Endif
  133.     If (INTEGER002 < INTEGER001) Then
  134.         AnsiPos 24, 12
  135.         Print "@X1EYour guess is too low!  "
  136.         If (INTEGER002 > INTEGER004) INTEGER004 = INTEGER002
  137.         Dec INTEGER005
  138.         If (INTEGER005 == 0) Then
  139.             Goto LABEL003
  140.         Endif
  141.         Goto LABEL002
  142.     Endif
  143.     If (INTEGER002 > INTEGER001) Then
  144.         AnsiPos 24, 12
  145.         Print "@X1EYour guess is too high!"
  146.         If (INTEGER002 < INTEGER003) INTEGER003 = INTEGER002
  147.         Dec INTEGER005
  148.         If (INTEGER005 == 0) Then
  149.             Goto LABEL003
  150.         Endif
  151.         Goto LABEL002
  152.     Endif
  153.     :LABEL003
  154.     Color 15
  155.     Cls
  156.     PrintLn "You LOST!!  LOSER!!!!!!  The REAL number was ", INTEGER001, "!!"
  157.     If (INTEGER002 > INTEGER001) Then
  158.         INTEGER007 = INTEGER002 - INTEGER001
  159.         STRING001 = "less"
  160.     Else
  161.         INTEGER007 = INTEGER001 - INTEGER002
  162.         STRING001 = "more"
  163.     Endif
  164.     PrintLn "Just ", INTEGER007, " ", STRING001, " than your last guess of ", INTEGER002, " and you would've had it..."
  165.     PrintLn "Subtracting your bet from your time (", INTEGER006, " minutes)!"
  166.     INTEGER006 = INTEGER006 * -1
  167.     Goto LABEL005
  168.     :LABEL004
  169.     Cls
  170.     Color 15
  171.     PrintLn "Congratulations, you won!!"
  172.     If (INTEGER005 > INTEGER010) Then
  173.         PrintLn "And you had so many guesses left I had to put them down to ", INTEGER010, "!"
  174.         INTEGER005 = INTEGER010
  175.     Endif
  176.     If (INTEGER006 > 0) Then
  177.         PrintLn "Adding your bet (", INTEGER006, " minutes) multiplied by ", INTEGER005, " guesses left!"
  178.         INTEGER006 = INTEGER006 * INTEGER005
  179.     Endif
  180.     :LABEL005
  181.     AdjTime INTEGER006
  182.     PrintLn ""
  183.     PrintLn "Now you have @TIMELEFT@ minutes left.  Have a nice day!"
  184.     PrintLn 
  185.     PrintLn "This PPE is from the home of WizWare....."
  186.     PrintLn ""
  187.     PrintLn "                 @X09The Wizard's BBS!"
  188.     PrintLn "                   @X08(@X0F508@X08)@X0F481@X08-@X0F4693"
  189.     PrintLn ""
  190.     PrintLn "        @X09- @X0FOver 6 gigabytes of software"
  191.     PrintLn "        @X09- @X0FFiles from A-Z, something for everyone!"
  192.     PrintLn "        @X09- @X0FSupport up to 28800 baud!"
  193.     PrintLn "        @X09- @X0F10 FULLY ONLINE Nodes (On Hunt)"
  194.     PrintLn "        @X09- @X0F100's of RIMENET Conferences"
  195.     PrintLn "        @X09- @X0FHome of WizWare software!"
  196.     PrintLn "        @X09- @X0Fand best of all...  @X89A Cool SysOp!"
  197.     PrintLn ""
  198.     Wait
  199.     PrintLn "@X0FReturning to ", STRING002, "..."
  200.     End
  201.  
  202. ;------------------------------------------------------------------------------
  203. ;
  204. ; Usage report (before postprocessing)
  205. ;
  206. ; ■ Statements used :
  207. ;
  208. ;    4       End
  209. ;    5       Cls
  210. ;    3       Wait
  211. ;    4       Color 
  212. ;    22      Goto 
  213. ;    14      Let 
  214. ;    20      Print 
  215. ;    43      PrintLn 
  216. ;    17      If 
  217. ;    1       FOpen 
  218. ;    1       FClose 
  219. ;    4       FGet 
  220. ;    2       AdjTime 
  221. ;    1       Log 
  222. ;    2       InputStr 
  223. ;    2       Dec 
  224. ;    21      AnsiPos 
  225. ;
  226. ;
  227. ; ■ Functions used :
  228. ;
  229. ;    1       -
  230. ;    2       *
  231. ;    2       +
  232. ;    2       -
  233. ;    9       ==
  234. ;    4       <
  235. ;    6       >
  236. ;    13      !
  237. ;    1       &&
  238. ;    1       ||
  239. ;    1       Random()
  240. ;    3       PPEPath()
  241. ;    1       MinLeft()
  242. ;    1       Exist()
  243. ;    2       GrafMode()
  244. ;
  245. ;------------------------------------------------------------------------------
  246. ;
  247. ; Analysis flags : A
  248. ;
  249. ; A - Adjust online time remaining ■ 5
  250. ;     Program modify the amount of online time remaining, this may
  251. ;     be a way to bypass time limits
  252. ;     ■ Search for : ADJTIME
  253. ;
  254. ;------------------------------------------------------------------------------
  255. ;
  256. ; Postprocessing report
  257. ;
  258. ;    0       For/Next
  259. ;    0       While/EndWhile
  260. ;    13      If/Then or If/Then/Else
  261. ;    0       Select Case
  262. ;
  263. ;------------------------------------------------------------------------------
  264. ;                 AEGiS Corp - Break the routines, code against the machines!
  265. ;------------------------------------------------------------------------------
  266.