Well, I've been messing with coordinates and stuff, and I'm thinking of making a code that searches for an item, then when it finds it, it teleports to the first occurrence of that item (and after I get that to work, I'll make it check if you're already at the first item, and if so it'll teleport you to the next)

Since I can view addresses/values etc in game with a code, I found this

Code:
00020FD7 = very top left corner
22FD7 = for each full space you move right (or down) this increases by 2
24FD7
26FD7
28FD7
2AFD7
2CFD7
2EFD7
30FD7
etc
However, I'm not quite sure how to get them to match how the game handles item slots (like, instead of going left to right all the way, it goes in 16/16 grids)

Any help?