![]() |
Routines |
| Prev: 63659 | Up: Map | Next: 63766 |
|
Unlock a door with the key.
|
||||
| Action_Unlock | 63716 | CALL Parser_ValidateDirectObject | Return if the words after the verb are not valid for this command. | |
| 63719 | RET C | |||
| 63720 | LD HL,59694 | Jump to Action_Unlock_YouCant unless the player named the witch. | ||
| 63723 | CALL Parser_AdvanceToSeparator | |||
| 63726 | JR NZ,Action_Unlock_YouCant | |||
| 63728 | LD A,11 | Jump to Action_Unlock_Next when object 11 (the chest) is here. | ||
| 63730 | CALL IsObjectInCurrentRoom | |||
| 63733 | JR Z,Action_Unlock_Next | |||
|
Reply with "It is already unlocked.".
|
||||
| 63735 | LD HL,58223 | Print "It is already unlocked." and return to the game loop. | ||
| 63738 | JP PrintResponse | |||
| Action_Unlock_Next | 63741 | LD A,16 | Jump to Action_Unlock_Chest when the player is carrying object 16 (the key). | |
| 63743 | CALL IsObjectCarried | |||
| 63746 | JR Z,Action_Unlock_Chest | |||
|
Reply with "You're not carrying a key.".
|
||||
| 63748 | LD HL,58247 | Print "You're not carrying a key." and return to the game loop. | ||
| 63751 | JP PrintResponse | |||
| Action_Unlock_Chest | 63754 | LD BC,2828 | Replace object 11 (the chest) with object 12 (the closed chest). | |
| 63757 | CALL TransformItem | |||
| 63760 | JP Response_OK | Jump back to Response_OK to confirm. | ||
| Action_Unlock_YouCant | 63763 | JP Response_YouCant_GameLoop | Tell the player the command is impossible. | |
|
View the equivalent code in;
|
||||
| Prev: 63659 | Up: Map | Next: 63766 |