This is so often the case - legitimate usage of prescription pills turns into full blown addiction when other substance abuse issues are already present. It doesn't help either that some Doctors, in my experience, are a little generous with the strength of painkillers handed out.
Three weeks ago I went to a GP to get some anti-virals and painkillers for a nerve infection. I told him that normal over the counter anti-inflammatory were helping a little but at night time I was in agony and couldn't sleep. He suggested high strength codeine as his opening gambit but I got the feeling I could have pushed him up into the morphine realm if I wanted. This young lad could see that there was obviously a pain management problem and wanted to help but in doing so went in at the top. In the end we agreed that a codeine-paracetamol mixture was the most sensible and we'd look at it again if it didn't work enough.