Prev: 38858 Up: Map Next: 39083
39009: Action: Wear
Wear the pair of gloves.
ActionWear 39009 CALL Parser_ValidateDirectObject Return if the command does not name a single object.
39012 RET C
39013 JR ActionWear_Step1 Continue at ActionWear_Step1 to match what the player wants to wear.
Print "You can't.".
ActionWear_Loop1 39015 LD HL,25691 HL=Messaging_YouCanT.
ActionWear_Loop2 39018 CALL PrintStringAndANewline Call PrintStringAndANewline.
39021 RET Return.
Was the player trying to wear the gloves?
ActionWear_Step1 39022 LD HL,35197 Jump to ActionWear_Step4 unless the command matches the phrase at 35197 (A pair of gloves,which you are wearing. (57)).
39025 CALL Parser_AdvanceToSeparator
39028 JR NZ,ActionWear_Step4
39030 LD A,57
39032 CALL IsObjectCarried
39035 JR NZ,ActionWear_Step2
Print "You're already wearing them.".
39037 LD HL,32550 HL=Messaging_YouReAlreadyWearingThem.
39040 JP ActionWear_Loop2 Jump to ActionWear_Loop2.
ActionWear_Step2 39043 LD A,12 Jump to ActionWear_Step3 when the player is carrying A pair of gloves. (12).
39045 CALL IsObjectCarried
39048 JR Z,ActionWear_Step3
39050 LD HL,31321 Print You're not carrying on the same line.
39053 CALL PrintString
Print "any gloves".
39056 LD HL,30198 HL=Messaging_AnyGloves.
39059 JP ActionWear_Loop2 Jump to ActionWear_Loop2.
ActionWear_Step3 39062 LD BC,3072 Move A pair of gloves. (12) to nowhere (0).
39065 CALL UpdateObjectLocation
39068 LD BC,14593 Move A pair of gloves,which you are wearing. (57) to the inventory (1).
39071 CALL UpdateObjectLocation
Print "O.K.".
39074 LD HL,25702 HL=Messaging_OK.
39077 JP ActionWear_Loop2 Jump to ActionWear_Loop2.
ActionWear_Step4 39080 JP ActionWear_Loop1 Continue at ActionWear_Loop1 to say the player can't.
View the equivalent code in;
Prev: 38858 Up: Map Next: 39083