![]()  | 
Routines | 
| Prev: 61748 | Up: Map | Next: 61817 | 
| 
 | 
||||
| Process_BuyMeatFromTraderWithIron | 61782 | LD A,60 | Call ValidateItemPresent with item 60: "A trader,selling some meat". | |
| 61784 | CALL ValidateItemPresent | |||
| 
 
If "A trader,selling some meat" is not present in the current room then print "You can't.".
 
 | 
||||
| 61787 | JP NZ,Response_YouCant_Duplicate | Jump to Response_YouCant_Duplicate if "A trader,selling some meat" is not present in the current room. | ||
| 
 
The trader is in the room, but is the player holding the iron?
 
 | 
||||
| 61790 | LD A,35 | Call IsPlayerCarryingItem with item 35: "Some iron". | ||
| 61792 | CALL IsPlayerCarryingItem | |||
| 
 
The player is holding the iron and the trader is present.
 
Change the iron/ meat state!
 
 | 
||||
| 61795 | LD BC,9018 | Call TransformItem to transform item 35 ("Some iron") into item 58 ("Some meat"). | ||
| 61798 | CALL TransformItem | |||
| 61801 | LD A,4 | Call AddToScore to add 4 points to the score. | ||
| 61803 | CALL AddToScore | |||
| 
 
The trader is no longer needed.
 
 | 
||||
| 61806 | LD A,60 | Call Handler_DestroyItemEvent with item 60: "A trader,selling some meat". | ||
| 61808 | CALL Handler_DestroyItemEvent | |||
| 
 
Print "He accepts the iron as payment
and gives you the meat before
moving off into the crowd.".
 
 | 
||||
| 61811 | LD HL,54671 | HL=Messaging_AcceptsIronAsPayment. | ||
| 61814 | JP PrintStringAndNewline_Duplicate | Jump to PrintStringAndNewline_Duplicate. | ||
| Prev: 61748 | Up: Map | Next: 61817 |