![]()  | 
Routines | 
| Prev: F4F5 | Up: Map | Next: F518 | 
  | 
||||||||
| 
 
The player was trying to wear the cloak, but is it either in the room or in the players inventory?
 
 | 
||||||||
| Process_WearCloak | F500 | LD HL,$E3DD | Call CheckItemGroupPresent with Data_ItemGroup_Cloak. | |||||
| F503 | CALL CheckItemGroupPresent | |||||||
| 
 
The cloak is present but is the player already wearing it?
 
 | 
||||||||
| F506 | CALL IsPlayerCarryingItem | Call IsPlayerCarryingItem. | ||||||
| F509 | LD A,E | Jump to Response_YouAreAlreadyWearingIt if the item found in the group is not equal to item 64: "A white cloak" (so the found item is 6D: "A cloak (worn)"). | ||||||
| F50A | CP $64 | |||||||
| F50C | JP NZ,Response_YouAreAlreadyWearingIt | |||||||
| 
 
Change the cloak state!
 
 | 
||||||||
| F50F | LD BC,$646D | Call TransformItem to transform item 64 ("A white cloak") into item 6D ("A cloak (worn)"). | ||||||
| F512 | CALL TransformItem | |||||||
| 
 
Print "O.K.".
 
 | 
||||||||
| F515 | JP Response_OK_Duplicate | Jump to Response_OK_Duplicate. | ||||||
| Prev: F4F5 | Up: Map | Next: F518 |