Becoming addicted to opiates isn't nearly as big a concern at this point as is the fact that it sounds like his liver has been severely damaged. When they turn yellow and retain fluids in their feet and ankles, it's a pretty good bet that he definitely needs medical attention. When my father died from cirrhosis of the liver, he was yellow and was very swollen. This isn't something to mess around with. Your friend needs medical attention as soon as possible.