Narcotics (also called opioids) are used for moderate to severe pain and require a doctor's prescription. They may be habit-forming. They can also be dangerous when taken with alcohol or certain other drugs. Examples of narcotics are codeine, morphine, and oxycodone.