Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ace:: ;For work with red/blue, increment those address to $D31D and $D31E
- 21 1C D3 ld hl, $D31C
- 7E ld a, (hl) ;Load wNumBagItems into hl
- 34 inc (hl) ;Increment wNumBagItems
- 6F ld l, a
- 26 00 ld h, $00 ;hl = wNumBagItems
- 29 add hl, hl ;hl *= 2
- 01 1D D3 ld bc, $D31D
- 09 add hl, bc ;hl += wBagItems. hl now point to the item id of the item list terminator
- 36 01 ld (hl), $01 ;set itemId to 01 (Masterball)
- 23 inc hl
- 36 63 ld (hl), $63 ;set item quantity to 99
- 23 inc hl
- 36 FF ld (hl), $FF ;Create the new item list terminator (cancel button)
- 23 inc hl
- 36 00 ld (hl), $00 ;set its quantity to 0
- C9 ret
- ;Raw bytes for wasy paste in bgb:
- 21 1c d3 7e 34 6F 26 00 29 01 1d d3 09 36 01 23 36 63 23 36 ff 23 36 00 c9
- ;Used for this video: https://youtu.be/XTprmo04FKY
Advertisement
Add Comment
Please, Sign In to add comment