home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / forum3.lzh / SAMPLES / MPU / routines.adl < prev    next >
Text File  |  1988-01-22  |  3KB  |  134 lines

  1. LOOK =
  2.     (IF ($and @GOVERB ($not @GO)) THEN
  3.     (cg)
  4.     )
  5.     ($setg GOVERB FALSE)
  6.     ($setg GO FALSE)
  7.     (IF @IncFlag THEN
  8.     ($incturn)
  9.     )
  10.     ($setg IncFlag TRUE)
  11. ;
  12.  
  13.  
  14. PROMPT =
  15.     ($spec 9 (($sdesc ($loc .ME)) 1) @SCORE ($turns))
  16.     ($say "> ")
  17. ;
  18.  
  19.  
  20. GrowX =
  21.     (IF ($prop %1 SHRNK) THEN
  22.     ($setp %1 SHRNK FALSE)
  23.     (IF ($cont %1) THEN
  24.         (GrowX ($cont %1))
  25.     )
  26.     (IF ($link %1) THEN
  27.         (GrowX ($link %1))
  28.     )
  29.     )
  30. ;
  31.  
  32.  
  33. Grow =
  34.     (IF ($prop .ME SHRNK) THEN
  35.     ($setp .ME SHRNK FALSE)
  36.     (IF ($cont .ME) THEN
  37.         (GrowX ($cont .ME))
  38.     )
  39.     )
  40. ;
  41.  
  42.  
  43. ShrnX =
  44.     (IF ($not ($prop %1 SHRNK)) THEN
  45.     ($setp %1 SHRNK TRUE)
  46.     (IF ($cont %1) THEN
  47.         (ShrnX ($cont %1))
  48.     )
  49.     (IF ($link %1) THEN
  50.         (ShrnX ($link %1))
  51.     )
  52.      ELSE
  53.     ($say "You hear a tiny POP as the " ($name %1)" vanishes completely!\n")
  54.     (IF ($link %1) THEN
  55.         (ShrnX ($link %1))
  56.     )
  57.     ($move %1 .ALL)
  58.     )
  59. ;
  60.  
  61.  
  62. Shrink =
  63.     (IF ($not ($prop .ME SHRNK)) THEN
  64.     ($setp .ME SHRNK TRUE)
  65.     (IF ($cont .ME) THEN
  66.         (ShrnX ($cont .ME))
  67.     )
  68.     )
  69. ;
  70.  
  71. WzTgl =            { Toggle the Wizard flag }
  72.     ($setg Wizrd ($not @Wizrd))
  73.     (IF @Wizrd THEN
  74.     ($say
  75. "You hear a low rumble of thunder, shaking the very ground on
  76. which you stand.  Suddenly, there is a blazing flash of light!!
  77. You are unharmed, but feal great power flowing in your body.\n"
  78.     )
  79.      ELSE
  80.     ($say "Your wizardly powers unceremoniously fade away.\n")
  81.     )
  82. ;
  83.  
  84.  
  85. TakeAct =
  86.     (IF ($eq ($prop @Dobj WEIGH) CAPAC) THEN
  87.     ($say "You can't move ")
  88.     (($sdesc @Dobj))
  89.     ($say ".\n")
  90.     ($exit 1)
  91.      ELSEIF ($and ($prop .ME SHRNK) ($not ($prop @Dobj SHRNK))) THEN
  92.     ($say "Right now, the " ($name @Dobj)
  93.           " is too big for you to deal with.\n")
  94.     ($exit 1)
  95.      ELSEIF ($gt ($plus ($prop .ME HAS) ($prop @Dobj WEIGH))
  96.          ($prop .ME HOLDS)
  97.         )
  98.      THEN
  99.     ($say "You can't carry that much more!\n")
  100.     ($exit 1)
  101.      ELSE
  102.     ($setp .ME HAS ($plus ($prop .ME HAS) ($prop @Dobj WEIGH)))
  103.     )
  104. ;
  105.  
  106.  
  107. DropAct =
  108.     ($setp .ME HAS ($minus ($prop .ME HAS) ($prop @Dobj WEIGH)))
  109.     (IF ($eq ($loc .ME) cel13) THEN
  110.     (IF ($not ($prop cel13 HOLED)) THEN
  111.         (IF ($gt ($prop @Dobj WEIGH) 75) THEN
  112.         ($say "The " ($name @Dobj)
  113.               " breaks through the ice and sinks!\n")
  114.         ($setp cel13 HOLED TRUE)
  115.         ($move hole cel13)
  116.         ($move @Dobj .ALL)
  117.         ($setg Skip TRUE)
  118.          ELSE
  119.         ($say "The ice chips a bit, but does not break.\n")
  120.         )
  121.     )
  122.      ELSEIF ($eq ($loc .ME) cel19) THEN
  123.     (IF ($not ($prop goblet FREED)) THEN
  124.         (IF ($gt ($prop @Dobj WEIGH) 75) THEN
  125.             ($say "The " ($name @Dobj))
  126.             ($say " cracks the ice, and the goblet is freed!\n")
  127.            ($setp goblet FREED TRUE)
  128.          ELSE
  129.         ($say "The ice chips a bit, but does not break.\n")
  130.         )
  131.     )
  132.     )
  133. ;
  134.