*hacker voice* hacker voice i'm in

Subscribers:
388
Published on ● Video Link: https://www.youtube.com/watch?v=z6T7Tb9DnHA



Duration: 9:32
200 views
0


I wrote some code to set the quantity of the item in your second slot to 255. It's a little bit useless since you need two stacks of items with more than 99 things in them, so clearly you already have an item duplication method. Additionally, very similar code already exists to do the same for the item in your /first/ slot. But I wanted to try my hand at this myself. :)

The code is:

Burn Heal x43
Ice Heal x114
Revive x201

That's 0C 2B 0D 72 35 C9, or:

inc c Together with line 3, this makes a nop
dec hl Store the address of slot 2's quantity in hl
dec c Together with line 1, this makes a nop
ld (hl),d Store the value of register d in the address pointed to by hl (d always contains 0)
dec (hl) Decrease the value of the address pointed to by hl by 1 (underflow to 255)
ret Return to the game's code