It's even simpler than that
Code:
pbAddToParty((rand(PBSpecies.maxValue)+1),20)
20 is the level. Note that this can give any pokemon, including legendaries. If you want to blacklist certain pokemon, you will have to make a slight change.
Edit, just reread what you asked
Code:
randpoke=pbGetBabySpecies((rand(PBSpecies.maxValue)+1))
pbAddToParty(randpoke,20)
This still can include legendaries though.