Prev: 68A2 Up: Map Next: 68E4
68B0: Action: Get
Picks the object up. It must be in the room, not already carried, and not worn. The carried id is written into the object's own location slot and the carried count increases.
Input
B Object number
C Object location
GetObject 68B0 LD A,($5D89) Jump to GetObject_Worn if it is not *CarriedObject.
68B3 CP C
68B4 JR NZ,GetObject_Worn
Print "you already have it.".
68B6 LD A,$15 Print SystemMessage_15 using PrintSystemMessage.
This entry point is used by the routines at DropObject, WearObject and RemoveWorn.
Print the refusal and reject the line.
GetObject_Refuse 68B8 CALL PrintSystemMessage Call PrintSystemMessage.
68BB XOR A Write 00 to Continuation.
68BC LD ($5B85),A
68BF JP RejectLine Jump to RejectLine.
Already worn.
GetObject_Worn 68C2 LD A,($5D8A) Jump to GetObject_Here if it is not *WornObject.
68C5 CP C
68C6 JR NZ,GetObject_Here
Print "you are wearing it.".
68C8 LD A,$1D Print SystemMessage_1D using PrintSystemMessage.
68CA JR GetObject_Refuse
Take it if it is here.
GetObject_Here 68CC LD A,($5D87) Jump to GetObject_Take if it is *CurrentRoom.
68CF CP C
68D0 JR Z,GetObject_Take
Print "sorry, I don't see it here.".
68D2 LD A,$16 Print SystemMessage_16 using PrintSystemMessage.
68D4 JR GetObject_Refuse
Pick the object up.
GetObject_Take 68D6 CALL ObjectAddress Call ObjectAddress.
68D9 LD A,($5D89) Write *CarriedObject into the object's location.
68DC LD (HL),A
68DD LD HL,$5D8C Increment *CarriedCount.
68E0 INC (HL)
Describe the room again.
68E1 JP RoomHasChanged Jump to RoomHasChanged.
Prev: 68A2 Up: Map Next: 68E4