Breeding is ruled by egg groups. If two Pokemon are in the same egg group, they will breed over time. Yes, you will get a riolu with egg moves, if you are patient. The way to tell if they will produce an egg is the daycare man. If he says they prefer to play with other Pokemon, they will never breed.
source: Pokemon DB