ginger899 is completely right. how could he send you home with just painkillers? it could be many things, so i suggest you go to the nearest ER too!
Go to your nearest ER. That's not good enough for the doctor to just tell you to take painkillers and send you home...in fact I think it's downright irresponsible of them!
What is the world coming to?!
You could have Irritable bowel syndrome, or you could have appendicitis, or diverticulitis...this could be a few different things. You need a proper diagnosis, and appropriate treatment