![]() |
Routines |
| Prev: 97CA | Up: Map | Next: 98AB |
|
Wear the pair of gloves.
|
||||
| ActionWear | 9861 | CALL Parser_ValidateDirectObject | Return if the command does not name a single object. | |
| 9864 | RET C | |||
| 9865 | JR ActionWear_Step1 | Continue at ActionWear_Step1 to match what the player wants to wear. | ||
|
Print "You can't.".
|
||||
| ActionWear_Loop1 | 9867 | LD HL,$645B | HL=Messaging_YouCanT. | |
| ActionWear_Loop2 | 986A | CALL PrintStringAndANewline | Call PrintStringAndANewline. | |
| 986D | RET | Return. | ||
|
Was the player trying to wear the gloves?
|
||||
| ActionWear_Step1 | 986E | LD HL,$897D | Jump to ActionWear_Step4 unless the command matches the phrase at 897D (A pair of gloves,which you are wearing. (39)). | |
| 9871 | CALL Parser_AdvanceToSeparator | |||
| 9874 | JR NZ,ActionWear_Step4 | |||
| 9876 | LD A,$39 | |||
| 9878 | CALL IsObjectCarried | |||
| 987B | JR NZ,ActionWear_Step2 | |||
|
Print "You're already wearing them.".
|
||||
| 987D | LD HL,$7F26 | HL=Messaging_YouReAlreadyWearingThem. | ||
| 9880 | JP ActionWear_Loop2 | Jump to ActionWear_Loop2. | ||
| ActionWear_Step2 | 9883 | LD A,$0C | Jump to ActionWear_Step3 when the player is carrying A pair of gloves. (0C). | |
| 9885 | CALL IsObjectCarried | |||
| 9888 | JR Z,ActionWear_Step3 | |||
| 988A | LD HL,$7A59 | Print You're not carrying on the same line. | ||
| 988D | CALL PrintString | |||
|
Print "any gloves".
|
||||
| 9890 | LD HL,$75F6 | HL=Messaging_AnyGloves. | ||
| 9893 | JP ActionWear_Loop2 | Jump to ActionWear_Loop2. | ||
| ActionWear_Step3 | 9896 | LD BC,$0C00 | Move A pair of gloves. (0C) to nowhere (00). | |
| 9899 | CALL UpdateObjectLocation | |||
| 989C | LD BC,$3901 | Move A pair of gloves,which you are wearing. (39) to the inventory (01). | ||
| 989F | CALL UpdateObjectLocation | |||
|
Print "O.K.".
|
||||
| 98A2 | LD HL,$6466 | HL=Messaging_OK. | ||
| 98A5 | JP ActionWear_Loop2 | Jump to ActionWear_Loop2. | ||
| ActionWear_Step4 | 98A8 | JP ActionWear_Loop1 | Continue at ActionWear_Loop1 to say the player can't. | |
|
View the equivalent code in;
|
||||
| Prev: 97CA | Up: Map | Next: 98AB |