Advertisement
Stranck

Pokémon rgby - Give 99 Masterball

Apr 29th, 2017
231
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     Ace::                  ;For work with red/blue, increment those address to $D31D and $D31E
  2. 21 1C D3    ld hl, $D31C
  3. 7E          ld a, (hl)     ;Load wNumBagItems into hl
  4. 34          inc (hl)       ;Increment wNumBagItems
  5. 6F          ld l, a
  6. 26 00       ld h, $00      ;hl = wNumBagItems
  7. 29          add hl, hl     ;hl *= 2
  8. 01 1D D3    ld bc, $D31D
  9. 09          add hl, bc     ;hl += wBagItems. hl now point to the item id of the item list terminator
  10. 36 01       ld (hl), $01   ;set itemId to 01 (Masterball)
  11. 23          inc hl
  12. 36 63       ld (hl), $63   ;set item quantity to 99
  13. 23          inc hl
  14. 36 FF       ld (hl), $FF   ;Create the new item list terminator (cancel button)
  15. 23          inc hl
  16. 36 00       ld (hl), $00   ;set its quantity to 0
  17. C9          ret
  18.  
  19. ;Raw bytes for wasy paste in bgb:
  20. 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
  21.  
  22. ;Used for this video: https://youtu.be/XTprmo04FKY
Advertisement
RAW Paste Data Copied
Advertisement