home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / forum3.lzh / SAMPLES / AARD / routines.adl < prev    next >
Text File  |  1987-09-25  |  3KB  |  98 lines

  1. {*** ROUTINE DECLARATIONS ***}
  2.  
  3. ROUTINE
  4.   darkq, ei8, scads, ctake, cdrop, scord, exitg, onlmp;
  5.  
  6.  
  7. {*** DEAD-END ROUTINES ***}
  8.  
  9. PROMPT =
  10.     ($spec 9 (($sdesc ($loc .ME)) 1) ($prop .ME pscore) ($turns))
  11.     ($say "> ")
  12. ;
  13.  
  14. cg = ($say "Can't go that way.\n");
  15.  
  16. tosml = ($say "The hole is too small for you to fit through.\n");
  17.  
  18. dumdir = ($say "I don't know which direction that is.\n");
  19.  
  20. tohigh = ($say "The hole is too high for you to reach.\n");
  21.  
  22. nothe = ($say "This section is not implemented yet.\n");
  23.  
  24. skore =
  25.     ($say
  26.     "You scored "
  27.     ($str ($prop .ME pscore))
  28.     " out of "
  29.     ($str ($prop .ME pmax))
  30.     " possible points.\n"
  31.     )
  32. ;
  33.  
  34.  
  35. Rating0 = "junior beginning";
  36. Rating1 = "senior beginning";
  37. Rating2 = "intermediate";
  38. Rating3 = "expert";
  39. Rating4 = "junior master";
  40. Rating5 = "master";
  41. Rating6 = "senior master";
  42. Rating7 = "life master";
  43. Rating8 = "super-stud";
  44.  
  45.  
  46. ratng =
  47.     ($setp .ME ratvl 0)
  48.     (IF ($prop .ME pscore) THEN
  49.     ($setp .ME ratvl ($div    ($times ($prop .ME pscore) 8)
  50.                     ($prop .ME pmax)))
  51.     )
  52.     ($say
  53.     "That gives you a ranking of "
  54.     ($plus Rating0 ($prop .ME ratvl))
  55.     " adventurer.\n"
  56.     )
  57. ;
  58.  
  59.  
  60. ratnx =
  61.     (IF ($eq ($prop .ME ratvl) 8) THEN
  62.     ($say "CONGRATULATIONS.\n")
  63.     ($spec QUIT)
  64.     )
  65.     ($setp .ME ratvl ($plus ($prop .ME ratvl) 1))
  66.     ($setp .ME ratvl ($times ($prop .ME ratvl) ($prop .ME pmax)))
  67.     ($setp .ME ratvl ($div ($prop .ME ratvl) 8))
  68.     ($setp .ME ratvl ($plus ($prop .ME ratvl) 1))
  69.     ($setp .ME ratvl ($minus ($prop .ME ratvl) ($prop .ME pscore)))
  70.     ($say
  71.     "To achieve the next higher rating, you need to score "
  72.     ($str ($prop .ME ratvl))
  73.     " more points.\n"
  74.     )
  75. ;
  76.  
  77.  
  78. endgame =
  79.     ($incturn)
  80.     (IF ($eq ($prop .ME pscore) ($prop .ME pmax)) THEN
  81.     ($say
  82. "     As you drop the last treasure, the lights come up and you hear a voice
  83. say, \"CONGRATULATIONS, ADVENTURER.  You have restored the museum
  84. displays to their former glory.  Now accept the Director's thanks, and
  85. also his reward!\"\n"
  86. "     You are miraculously transported to a room you have never seen before,
  87. filled to the top with precious gold and jewels.  The voice appears again,
  88. saying, \"Your reward is as follows:  you are granted the privilege of\n"
  89. "becoming the new curator of the Museum.  Your first responsibility is
  90. to catalog and sort these treasures for placement in the Museum.  Your
  91. salary is $3.25 per hour.  Again, thanks!\"\n"
  92. "     The voice disappears, and you are left alone in the immense room.
  93. You'd better get to work, for you have a LOT to do!\n"
  94.     )
  95.     ($spec QUIT)
  96.     )
  97. ;
  98.