Cracked ribs? Confirmed by xray? If just bruised, ice & anti-infammatory med like aleve/advil/motrin. If actually broken, doc can rx Lidocaine pain patches to ease the pain or possibly do intercostal nerve block (with Lidocaine ± steroid) for longer lasting relief. Avoid rib belts as they tend to limit breathing & increase risk of pneumonia.
OTC Meds. The pain from fractured ribs can be fairly severe especially if you sneeze or cough. It might require some narcotics initially but afterwards nonsteroidal anti-inflammatory drugs or Acetaminophen should work just fine. This assumes you have no significant underlying hepatic or renal disease.