home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Games 9 / CD_1.iso / dosgames / crusade / crusade.cmd < prev    next >
OS/2 REXX Batch file  |  1993-05-02  |  35KB  |  1,177 lines

  1. (***************************************************)
  2. (* Flags & Counters --- What they stand for        *)
  3. (* Flags 0   Display CMD detail as being processed *)
  4. (*           enter DEBUG to toggle ON and OFF      *)
  5. (* Flags 1   ON if player has been in cave         *)
  6. (* Flags 2   Has thrown something into chasm if ON *)
  7. (* Flags 3   Harp is in tune if ON                 *)
  8. (* Flags 5   Has met toad if ON                    *)
  9. (* Flags 6   Has met princess if ON                *)
  10. (* Flags 7   Has met horse if ON                   *)
  11. (* Counter 1 Number of turns torch has been lit    *)
  12. (* Counter 2 Number of turns player has been       *)
  13. (*           stumbling around in the dark          *)
  14. (***************************************************)
  15.  
  16. (***************************************************)
  17. (*   First -- Automatic commands executed each turn*)
  18. (*   Part     regardless of command's VERB etc     *)
  19. (***************************************************)
  20.  
  21. (***************************************************)
  22. (*  Automatic commands to control time torch is ON *)
  23. (*   -- Torch starts to flicker at 50 turns        *)
  24. (*   -- Torch goes off at 75 turns                 *)
  25. (*   -- Player dies if he stumbles around in dark  *)
  26. (*      for 5 turns                                *)
  27. (***************************************************)
  28.  
  29.  
  30. COMMAND ANY
  31. Present 210 (* Blazing torch *)
  32. CounterEquals 1 50 (* light has been on for 50 turns *)
  33. PrintMessage 74 (* light is flickering *)
  34. RoomNeedsLight (* will be dark if no light *)
  35. PrintMessage 75 (* Better get out before light goes out *)
  36. END_COMMAND
  37.  
  38. COMMAND ANY
  39. Present 210 (* Blazing torch *)
  40. CounterGT 1 50 (* light has been on for more than 50 turns *)
  41. CounterLT 1 75 (* light has been on for less than 75 turns *)
  42. PrintMessage 74 (* light is flickering *)
  43. END_COMMAND
  44.  
  45. COMMAND ANY
  46. Present 210 (* Blazing torch *)
  47. CounterEquals 1 75 (* light has been on for 75 turns *)
  48. PrintMessage 76 (* light has gone out *)
  49. SwapLocations 210 203 (* switch to unlit torch *)
  50. Destroy 207 (* dry matches *)
  51. RoomNeedsLight (* will be dark if no light *)
  52. TurnCounterON 2 (* now stumbling around in dark *)
  53. LookAtRoom
  54. END_COMMAND
  55.  
  56. COMMAND ANY
  57. RoomNeedsLight (* will be dark if no light *)
  58. NOT LightPresent (* no light in room *)
  59. CounterEquals 2 0 (* stumbling counter not currently on *)
  60. PrintMessage 77 (* stumbling is dangerous *)
  61. TurnCounterON 2 (* now start counter for stumbling around in dark *)
  62. END_COMMAND
  63.  
  64. COMMAND ANY
  65. CounterGT 2 1 (* stumbling around in dark *)
  66. RoomNeedsLight (* will be dark if no light *)
  67. NOT LightPresent (* no light in room *)
  68. PrintMessage 77 (* stumbling is dangerous *)
  69. CounterEquals 2 5
  70. KillPlayer (* Player dies *)
  71. DoneWithTurn (* no further action -- get next input *)
  72. END_COMMAND
  73.  
  74. COMMAND ANY
  75. CounterGT 2 5 (* have previously been stumbling around in dark *)
  76. RoomNeedsLight (* will be dark if no light *)
  77. NOT LightPresent (* no light in room *)
  78. TurnCounterON 2 (* re-start counter for stumbling around in dark *)
  79. END_COMMAND
  80.  
  81. (***************************************************)
  82. (*  Automatic commands to offer player hint if     *)
  83. (*  player has not been in cave by TURN 10         *)
  84. (***************************************************)
  85.  
  86. COMMAND ANY
  87. ATlocation 7 (* in cave *)
  88. TurnFlagON 1 (* has visited cave *)
  89. END_COMMAND
  90.  
  91. COMMAND ANY
  92. FlagOFF 1 (* hasn't visited cave yet *)
  93. TurnsEquals 10
  94. PrintMessage 14 (* offer player a hint for 10 points *)
  95. PromptForYes (* get player's answer *)
  96. PrintMessage 16 (* give hint *)
  97. MinusScore 10 (* subtract 10 points from score *)
  98. DoneWithTurn (* no further action -- get next input *)
  99. END_COMMAND
  100.  
  101. (***************************************************)
  102. (*  Automatic commands to control appearance and   *)
  103. (*  disappearance of guard at various locations    *)
  104. (***************************************************)
  105.  
  106. COMMAND ANY
  107. Chance 20
  108. AtLocation 24  (* Baron's private chamber *)
  109. NOT InRoom 301  (* Guard *)
  110. PutInCurrentRoom 301  (* Put guard in room *)
  111. PrintMessage 33   (* Guard suddenly appears *)
  112. BlankLine
  113. END_COMMAND
  114.  
  115. COMMAND ANY
  116. Chance 50
  117. AtLocation 17  (* Guard's quarters *)
  118. NOT InRoom 301  (* guard *)
  119. PutInCurrentRoom 301 (* angry guard *)
  120. PrintMessage 33 (* guard appears *)
  121. BlankLine
  122. END_COMMAND
  123.  
  124. COMMAND ANY
  125. Chance 50
  126. AtLocation 39 (* passage near cell *)
  127. NOT InRoom 301 (* guard *)
  128. NOT InRoom 259 (* unconscious guard *)
  129. PutInCurrentRoom 301 (* angry guard *)
  130. PrintMessage 33 (* Guard appears *)
  131. BlankLine
  132. END_COMMAND
  133.  
  134. COMMAND ANY
  135. InRoom 301 (* guard *)
  136. NOT atLocation 39 (* passage near cell *)
  137. IsWearing 230 (* Baron's Armor *)
  138. SendToRoom 301 11 (* guard leaves *)
  139. PrintMessage 45 (* Guard leaves *)
  140. AtLocation 11 (* small room in cave *)
  141. Destroy 301 (* Guard disappears *)
  142. END_COMMAND
  143.  
  144. (***************************************************)
  145. (*  Automatic commands to give and heal player     *)
  146. (*  a broken leg                                   *)
  147. (***************************************************)
  148.  
  149. COMMAND ANY
  150. IsCarrying 215 (* Broken leg *)
  151. VerbIsDirection (* Trying to move *)
  152. PrintMessage 8 (* Sorry, but you can't *)
  153. PrintMessage 43 (* with a broken leg *)
  154. DoneWithTurn (* no further action -- get next input *)
  155. END_COMMAND
  156.  
  157. COMMAND ANY
  158. Chance 20
  159. IsCarrying 215 (* Broken leg *)
  160. PrintMessage 44 (* Leg is healed *)
  161. BlankLine
  162. Destroy 215  (* get rid of broken leg *)
  163. END_COMMAND
  164.  
  165. COMMAND ANY
  166. Chance 25
  167. AtLocation 11 (* room in wall *)
  168. InRoom 301 (* Guard *)
  169. GetIt 215 (* give broken leg *)
  170. GoToRoom 10  (* guard throws you into room 10 *)
  171. PrintMessage 42
  172. PutInCurrentRoom 204 (* rope goes in to room also *)
  173. DoneWithTurn (* no further action -- get next input *)
  174. END_COMMAND
  175.  
  176. (***************************************************)
  177. (*  Automatic commands to control meeting horse    *)
  178. (*  and have horse follow player                   *)
  179. (***************************************************)
  180.  
  181. COMMAND ANY
  182. Present 303 (* horse *)
  183. FlagOFF 7 (* hasn't met horse yet *)
  184. TurnFlagON 7 (* now has met *)
  185. PrintMessage 83 (* met horse *)
  186. BlankLine
  187. END_COMMAND
  188.  
  189. COMMAND ANY
  190. FlagON 7 (* has met horse *)
  191. AtLocation 19 (* in courtyard *)
  192. PutInCurrentRoom 304 (* grazing horse *)
  193. END_COMMAND
  194.  
  195. COMMAND ANY
  196. FlagON 7 (* has met horse *)
  197. IsSomeWhere 216 (* drawbridge is down *)
  198. AtLocationGT 1 (* outside castle *)
  199. AtLocationLT 7 (* not in cave *)
  200. NOT AtLocation 3 (* not at top of tree *)
  201. PutInCurrentRoom 304 (* grazing horse *)
  202. END_COMMAND
  203.  
  204. COMMAND ANY
  205. FlagON 7 (* has met horse *)
  206. IsSomeWhere 216 (* drawbridge is down *)
  207. AtLocation 43 (* thick woods *)
  208. PutInCurrentRoom 304 (* grazing horse *)
  209. END_COMMAND
  210.  
  211. COMMAND ANY
  212. FlagON 7 (* has met horse *)
  213. IsSomeWhere 216 (* drawbridge is down *)
  214. AtLocation 12 (* top of hill *)
  215. SendToRoom 304 45 (* grazing horse goes to winning room *)
  216. END_COMMAND
  217.  
  218. (***************************************************)
  219. (*  Automatic commands to control meeting toad     *)
  220. (*  and have toad follow player and speak          *)
  221. (***************************************************)
  222.  
  223. COMMAND ANY
  224. Present 300 (* toad *)
  225. TurnFlagON 5 (* has met toad *)
  226. END_COMMAND
  227.  
  228. COMMAND ANY
  229. IsSomewhere 300 (* toad exists *)
  230. FlagON 5 (* has met toad *)
  231. PutInCurrentRoom 300 (* put toad in room *)
  232. VerbIsDirection (* moving to another location *)
  233. PrintMessage 80 (* the toad follows you *)
  234. END_COMMAND
  235.  
  236. COMMAND ANY
  237. Chance 50
  238. Present 300 (* horny toad *)
  239. PrintMessage 66 (* Toad says Rib-bit *)
  240. BlankLine
  241. END_COMMAND
  242.  
  243. (***************************************************)
  244. (*  Automatic commands to control meeting princess *)
  245. (*  and have princess follow player                *)
  246. (***************************************************)
  247.  
  248. COMMAND ANY
  249. Present 302 (* princess *)
  250. TurnFlagON 6 (* has met princess *)
  251. END_COMMAND
  252.  
  253. COMMAND ANY
  254. IsSomewhere 302 (* princess exists *)
  255. FlagON 6 (* has met princess *)
  256. PutInCurrentRoom 302 (* put princess in room *)
  257. VerbIsDirection (* moving to another location *)
  258. PrintMessage 81 (* the princess follows you *)
  259. END_COMMAND
  260.  
  261. (**************