the encounter codea are for spawning wild pokemon, but I think someone posted one to affect eggs, but I'm not really sure.
your best bet is to spawn the parent pokemon then breeding them, the babies will be legal unless you use a shiny code that forces a specific kind of PID or something crazy...