![]()  | 
Routines | 
| Prev: 62504 | Up: Map | Next: 62552 | 
  | 
||||||||
| 
 
The player was trying to wear the helmet, but is it either in the room or in the players inventory?
 
 | 
||||||||
| Process_WearHelmet | 62528 | LD HL,58219 | Call CheckItemGroupPresent with Data_ItemGroup_Helmet. | |||||
| 62531 | CALL CheckItemGroupPresent | |||||||
| 
 
The helmet is present but is the player already wearing it?
 
 | 
||||||||
| 62534 | CALL IsPlayerCarryingItem | Call IsPlayerCarryingItem. | ||||||
| 62537 | LD A,E | Jump to Response_YouAreAlreadyWearingIt if the item found in the group is not equal to item 31: "A bronze helmet" (so the found item is 32: "A bronze helmet (worn)"). | ||||||
| 62538 | CP 31 | |||||||
| 62540 | JP NZ,Response_YouAreAlreadyWearingIt | |||||||
| 
 
Change the helmet state!
 
 | 
||||||||
| 62543 | LD BC,7968 | Call TransformItem to transform item 31 ("A bronze helmet") into item 32 ("A bronze helmet (worn)"). | ||||||
| 62546 | CALL TransformItem | |||||||
| 
 
Print "O.K.".
 
 | 
||||||||
| 62549 | JP Response_OK_Duplicate | Jump to Response_OK_Duplicate. | ||||||
| Prev: 62504 | Up: Map | Next: 62552 |