In FireRed, there are berries that sometimes spawn after every 512 steps in Berry Forest. Is it possible to see this same behavior in a script? I would like Lostelle to maybe (not always) give the player a random berry after every 512 steps. I know how to generate a random berry, but I don't know how to check or call for the amount of steps a player has taken.
Edit: So I tried playing around with a couple of "pedometer" vars that I found, but it seems like the only var that works is 0x4020, which is specifically used for repel. Is there another var I can use besides 0x4020 that won't roll over to 0x0 when it hits its set value? Here's a script I've tested with 0x4020.
EDIT: I figured out how to use 0x4023 which doesn't roll over back to 0x0 when it reaches its maximum value, which is 0x5DC. I had previously thought that all the pedometer vars counted downwards from the value I set. Turns out only 0x4020 (repel) counts downwards to 0x0 from the value I set, while 0x4023 counts upwards to the maximum value of 0x5DC from the value I set. The others (0x4021-0x4022) do roll over according to Spherical Ice with even shorter maximum values. Here's an example script that I finally got working.
0x4023 0x5DC is 1500 steps while 0x4023 0x3DC is 988 steps. Subtract the two and you'll end up with 512 steps.
I will now make Lostelle give me a random berry- or not, every 512 steps I take!