Prev: 26786 Up: Map Next: 26852
26800: 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 26800 LD A,(23945) Jump to GetObject_Worn if it is not *CarriedObject.
26803 CP C
26804 JR NZ,GetObject_Worn
Print "you already have it.".
26806 LD A,21 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 26808 CALL PrintSystemMessage Call PrintSystemMessage.
26811 XOR A Write 0 to Continuation.
26812 LD (23429),A
26815 JP RejectLine Jump to RejectLine.
Already worn.
GetObject_Worn 26818 LD A,(23946) Jump to GetObject_Here if it is not *WornObject.
26821 CP C
26822 JR NZ,GetObject_Here
Print "you are wearing it.".
26824 LD A,29 Print SystemMessage_1D using PrintSystemMessage.
26826 JR GetObject_Refuse
Take it if it is here.
GetObject_Here 26828 LD A,(23943) Jump to GetObject_Take if it is *CurrentRoom.
26831 CP C
26832 JR Z,GetObject_Take
Print "sorry, I don't see it here.".
26834 LD A,22 Print SystemMessage_16 using PrintSystemMessage.
26836 JR GetObject_Refuse
Pick the object up.
GetObject_Take 26838 CALL ObjectAddress Call ObjectAddress.
26841 LD A,(23945) Write *CarriedObject into the object's location.
26844 LD (HL),A
26845 LD HL,23948 Increment *CarriedCount.
26848 INC (HL)
Describe the room again.
26849 JP RoomHasChanged Jump to RoomHasChanged.
Prev: 26786 Up: Map Next: 26852