Well, you can find Dittos in Giant Chasm, and Riolu should hatch from an egg that comes from a Lucario, in any case. If you don't get a Riolu from Lucario's egg, then your game must be screwed up.
The best way is to use ditto to bread with the other pokemon. To the egg appear quickly after putting the two pokemons together get your bike and go biking from the day-caro to skyarrow bridge. Make 6 laps in the bridge and go back to the day-care. The man will say that the egg has appeared.
umm... You will always get a Riolu, It's impossible to get a lucario straight from the egg xD
But yeah breed it with a Ditto and you are guarenteed a Riolu, or you can find a Male Riolu which are located in the cave in Route 9, I'm pressuming you have completed the game, right?
Go to serebii and check egg groups. IF you want just a generic riolu then ditto would be perfect. But if you want specific egg moves then check out the egg groups and what riolu can learn.