All you really have to do is get your Riolu to level 27.
Hi you just have to keep feeding it poffins it likes and leveling it up and holding the soothe bell will help too.Every now and then go to hearthome to ask the girl in the the pokemon fan club and she will say stuff like oh your pokemon likes you very much,I feel like I'm introuding.