home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of Select: Games 9
/
CD_1.iso
/
dosgames
/
crusade
/
crusade.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-05-02
|
35KB
|
1,177 lines
(***************************************************)
(* Flags & Counters --- What they stand for *)
(* Flags 0 Display CMD detail as being processed *)
(* enter DEBUG to toggle ON and OFF *)
(* Flags 1 ON if player has been in cave *)
(* Flags 2 Has thrown something into chasm if ON *)
(* Flags 3 Harp is in tune if ON *)
(* Flags 5 Has met toad if ON *)
(* Flags 6 Has met princess if ON *)
(* Flags 7 Has met horse if ON *)
(* Counter 1 Number of turns torch has been lit *)
(* Counter 2 Number of turns player has been *)
(* stumbling around in the dark *)
(***************************************************)
(***************************************************)
(* First -- Automatic commands executed each turn*)
(* Part regardless of command's VERB etc *)
(***************************************************)
(***************************************************)
(* Automatic commands to control time torch is ON *)
(* -- Torch starts to flicker at 50 turns *)
(* -- Torch goes off at 75 turns *)
(* -- Player dies if he stumbles around in dark *)
(* for 5 turns *)
(***************************************************)
COMMAND ANY
Present 210 (* Blazing torch *)
CounterEquals 1 50 (* light has been on for 50 turns *)
PrintMessage 74 (* light is flickering *)
RoomNeedsLight (* will be dark if no light *)
PrintMessage 75 (* Better get out before light goes out *)
END_COMMAND
COMMAND ANY
Present 210 (* Blazing torch *)
CounterGT 1 50 (* light has been on for more than 50 turns *)
CounterLT 1 75 (* light has been on for less than 75 turns *)
PrintMessage 74 (* light is flickering *)
END_COMMAND
COMMAND ANY
Present 210 (* Blazing torch *)
CounterEquals 1 75 (* light has been on for 75 turns *)
PrintMessage 76 (* light has gone out *)
SwapLocations 210 203 (* switch to unlit torch *)
Destroy 207 (* dry matches *)
RoomNeedsLight (* will be dark if no light *)
TurnCounterON 2 (* now stumbling around in dark *)
LookAtRoom
END_COMMAND
COMMAND ANY
RoomNeedsLight (* will be dark if no light *)
NOT LightPresent (* no light in room *)
CounterEquals 2 0 (* stumbling counter not currently on *)
PrintMessage 77 (* stumbling is dangerous *)
TurnCounterON 2 (* now start counter for stumbling around in dark *)
END_COMMAND
COMMAND ANY
CounterGT 2 1 (* stumbling around in dark *)
RoomNeedsLight (* will be dark if no light *)
NOT LightPresent (* no light in room *)
PrintMessage 77 (* stumbling is dangerous *)
CounterEquals 2 5
KillPlayer (* Player dies *)
DoneWithTurn (* no further action -- get next input *)
END_COMMAND
COMMAND ANY
CounterGT 2 5 (* have previously been stumbling around in dark *)
RoomNeedsLight (* will be dark if no light *)
NOT LightPresent (* no light in room *)
TurnCounterON 2 (* re-start counter for stumbling around in dark *)
END_COMMAND
(***************************************************)
(* Automatic commands to offer player hint if *)
(* player has not been in cave by TURN 10 *)
(***************************************************)
COMMAND ANY
ATlocation 7 (* in cave *)
TurnFlagON 1 (* has visited cave *)
END_COMMAND
COMMAND ANY
FlagOFF 1 (* hasn't visited cave yet *)
TurnsEquals 10
PrintMessage 14 (* offer player a hint for 10 points *)
PromptForYes (* get player's answer *)
PrintMessage 16 (* give hint *)
MinusScore 10 (* subtract 10 points from score *)
DoneWithTurn (* no further action -- get next input *)
END_COMMAND
(***************************************************)
(* Automatic commands to control appearance and *)
(* disappearance of guard at various locations *)
(***************************************************)
COMMAND ANY
Chance 20
AtLocation 24 (* Baron's private chamber *)
NOT InRoom 301 (* Guard *)
PutInCurrentRoom 301 (* Put guard in room *)
PrintMessage 33 (* Guard suddenly appears *)
BlankLine
END_COMMAND
COMMAND ANY
Chance 50
AtLocation 17 (* Guard's quarters *)
NOT InRoom 301 (* guard *)
PutInCurrentRoom 301 (* angry guard *)
PrintMessage 33 (* guard appears *)
BlankLine
END_COMMAND
COMMAND ANY
Chance 50
AtLocation 39 (* passage near cell *)
NOT InRoom 301 (* guard *)
NOT InRoom 259 (* unconscious guard *)
PutInCurrentRoom 301 (* angry guard *)
PrintMessage 33 (* Guard appears *)
BlankLine
END_COMMAND
COMMAND ANY
InRoom 301 (* guard *)
NOT atLocation 39 (* passage near cell *)
IsWearing 230 (* Baron's Armor *)
SendToRoom 301 11 (* guard leaves *)
PrintMessage 45 (* Guard leaves *)
AtLocation 11 (* small room in cave *)
Destroy 301 (* Guard disappears *)
END_COMMAND
(***************************************************)
(* Automatic commands to give and heal player *)
(* a broken leg *)
(***************************************************)
COMMAND ANY
IsCarrying 215 (* Broken leg *)
VerbIsDirection (* Trying to move *)
PrintMessage 8 (* Sorry, but you can't *)
PrintMessage 43 (* with a broken leg *)
DoneWithTurn (* no further action -- get next input *)
END_COMMAND
COMMAND ANY
Chance 20
IsCarrying 215 (* Broken leg *)
PrintMessage 44 (* Leg is healed *)
BlankLine
Destroy 215 (* get rid of broken leg *)
END_COMMAND
COMMAND ANY
Chance 25
AtLocation 11 (* room in wall *)
InRoom 301 (* Guard *)
GetIt 215 (* give broken leg *)
GoToRoom 10 (* guard throws you into room 10 *)
PrintMessage 42
PutInCurrentRoom 204 (* rope goes in to room also *)
DoneWithTurn (* no further action -- get next input *)
END_COMMAND
(***************************************************)
(* Automatic commands to control meeting horse *)
(* and have horse follow player *)
(***************************************************)
COMMAND ANY
Present 303 (* horse *)
FlagOFF 7 (* hasn't met horse yet *)
TurnFlagON 7 (* now has met *)
PrintMessage 83 (* met horse *)
BlankLine
END_COMMAND
COMMAND ANY
FlagON 7 (* has met horse *)
AtLocation 19 (* in courtyard *)
PutInCurrentRoom 304 (* grazing horse *)
END_COMMAND
COMMAND ANY
FlagON 7 (* has met horse *)
IsSomeWhere 216 (* drawbridge is down *)
AtLocationGT 1 (* outside castle *)
AtLocationLT 7 (* not in cave *)
NOT AtLocation 3 (* not at top of tree *)
PutInCurrentRoom 304 (* grazing horse *)
END_COMMAND
COMMAND ANY
FlagON 7 (* has met horse *)
IsSomeWhere 216 (* drawbridge is down *)
AtLocation 43 (* thick woods *)
PutInCurrentRoom 304 (* grazing horse *)
END_COMMAND
COMMAND ANY
FlagON 7 (* has met horse *)
IsSomeWhere 216 (* drawbridge is down *)
AtLocation 12 (* top of hill *)
SendToRoom 304 45 (* grazing horse goes to winning room *)
END_COMMAND
(***************************************************)
(* Automatic commands to control meeting toad *)
(* and have toad follow player and speak *)
(***************************************************)
COMMAND ANY
Present 300 (* toad *)
TurnFlagON 5 (* has met toad *)
END_COMMAND
COMMAND ANY
IsSomewhere 300 (* toad exists *)
FlagON 5 (* has met toad *)
PutInCurrentRoom 300 (* put toad in room *)
VerbIsDirection (* moving to another location *)
PrintMessage 80 (* the toad follows you *)
END_COMMAND
COMMAND ANY
Chance 50
Present 300 (* horny toad *)
PrintMessage 66 (* Toad says Rib-bit *)
BlankLine
END_COMMAND
(***************************************************)
(* Automatic commands to control meeting princess *)
(* and have princess follow player *)
(***************************************************)
COMMAND ANY
Present 302 (* princess *)
TurnFlagON 6 (* has met princess *)
END_COMMAND
COMMAND ANY
IsSomewhere 302 (* princess exists *)
FlagON 6 (* has met princess *)
PutInCurrentRoom 302 (* put princess in room *)
VerbIsDirection (* moving to another location *)
PrintMessage 81 (* the princess follows you *)
END_COMMAND
(**************