thanks for the quick reply Riolu Aura Sphere Now.
the code works as a Wild Pokémon + Level Modifier but it's not what I'm looking for. the idea is to add the posiility to add/toss masterballs with a key press so you don't have to enter the bag and do it manually. say you want to catch Bulbasaur, Ivysaur, and Venusaur. instead of triggering the code again for every pokemon, you could leave one masterball, catch Bulbasaur, then press a key to increase the masterball count to 2 so you can catch Ivysaur, and once again for Venusaur. decreasing the ball count might also work.
then if [62111880 00000000] [b2111880 00000000], the code might look like this.
94000130 FFF70000
B2111880 00000000
D9000000 00000D14
D4000000 00010000
D6000000 00000D14
D2000000 00000000
the original code sets the masterball with
00000D14 01ED0001 [where 00000D14 is the address (ball pocket 1st slot), 01ED the ball count (493), and 0001 item (masterball)]
similarly,
00000D18 00640002 [where 00000D18 is the address (ball pocket 2st slot), 0064 the ball count (100), and 0002 item (ultraball)]
that's why I try to load the value in 0x0D14 to the 'stored' register, then sum 00010000 to add a masterball and save it back to 0x0D14, but for some reason the D9 intruction doesn't seem to work. if instead I set the value of 'stored' manually and then save it, it works but then I have a static value instead of adding/decreasing based on the current item count.
the code I provided do increment the item code, but instead of doing so by 1, it increments by some random number (4,10,...) each time the code is triggered. do you by any chance know how to solve this issue?