I work as an addiction counselor, so I know how tough this situation can be. Really, you just have to decide where your boundaries are. Let go of thoughts of "helping them" with their problem, and figure out what you're comfortable with. If you decide to keep being their friend, then you have to be ready to watch them deal with thier addiction. If you decide not to, then losing a friend may clue them into the consequences of their decision.
What ever you decide, remember that it's about doing what's right for YOU. Only they can make their own choices. Good luck, it's a hard situation.