There are prescription-grade NSAIDs that make Advil look like candy, but they're admittedly still not as heavy-hitting as bona fide painkillers. Great for inflammatory pain though.
Not just your GI, but they increase your risk of cardiovascular issues as well, among many others, whereas opiates do not cause any of those horrible side-effects. Dose matters, it does matter with NSAIDs, too, if I pop 10 acetaminophen, you can rest assured I will have liver cirrhosis.