For the kind of pain caused by broken ribs, the best painkiller is:
http://en.wikipedia.org/wiki/Diclofenac
Otherwise, it's quite crap as a generic painkiller, but for muscle strain and broken (or cracked) ribs, it's extremely efficient. So efficient one pill will keep you pain-free for 24 hours.
I guess your doc has already prescribed them to you?