you need a Action Replay for the Ds or you cant use cheats and have the wire to help finalize codes in the game of your choice (of course the game varies).
Go to your Pal Pad in your key Items section of your backpack. Use it and register your friends code, however, he will also need to add your friend code aswell so you can battle/ trade :) hey you...
look you get your 493 masterballs.say you want mew pokedex number 151 ( your using national pokedex numbers) toss out 342 masterballs493-342=151remember to hold L before countering wild pokemonuse...