Upper right adominal pain. Randomly comes and goes for the past 3 years. Excrutiating dull pain followed by diahrea 6-8 hours later. Not gallbladder.?

Unsure. Your inquiry is not descriptive enough for me to comment on; are you male/female; any history prior surgery, etc. My advice is to go see your primary care physician and get examined!
See a specialist. There are many potential causes for your symptoms including irritable bowel disease, sphincter os oddi dysfunction, hepatobiliaru disease, pancreatic diseases, and colitis. I recommend seeing a gastroenterologist if you have not done so. At the minimum you should have complete labs performed during an exacerbation and undergo abdominal imaging and possible upper and lower endoscopy.