Well Gibles should aim to be flawless in all stats bar SpA (which I managed to do a few times). Like wise the nature should boost its offensive prowess (+Atk or +Spe) while taking away from the SpA. For Riolu, my guys are all over the place right now, but you should be aiming for either 31/31/31/xx/31/31 or 31/xx/31/31/31/31 depending on either going for a Physical Orientated one or a Special Orientated one. A mixed set would probably have to have both Atk and SpA maxed out, while a defensive stat might be lower (though in that case the rare 31/31/31/31/31/31 would be ideal)
Hope that helped.