The code does work, but it takes a few tries to get it to work properly. You must Press Select to receive the Master Balls and Ultra Balls. After that, you must Press R to encounter the Pokemon.
Sometimes you will battle Missingno. if you made a mistake. What I do is that I hold both L+R when encountering a Pokemon and don't let go of it until the Pokemon appears.
For your Pokesav question, you can not edit Event Pokemon yet. However, you can't always pick up your Pokemon via Pokemart. I recommend you to leave the code just the way it is whether you are picking it up via Storage Box or Pokemart.
Certain Pokemon data and information will be changed when receiving via Pokemart. Eg: Moves, Statis, Name, ect.