Might take a little more than this, some pokemon can't seem to get 31 in all stats legally, need legit location, legit location hatched etc...for certain moves, also need to watch it on hatched pokemon because they don't work under the same system, I think the new pokesav checks for this though. I'm short on time at the moment and most of the info is spread around the internet, feel free to ask though if you have more questions on this.