Days of Wine and D'oh'ses is the eighteenth episode of Season 11.
After seeing a videotape of himself intoxicated, Barney turns over a new leaf and goes the sober route, under the support of Homer. Meanwhile, Bart and Lisa learn the ups and downs of photography in a contest held by the local telephone company.
During Garbage Night, Homer and Bart sneak out to find any discarded material to make off with. They eventually settle on a Tiki Mask that was discarded after the former owners, a Hawaiian restaurant, closed down. Homer then (rather crudely) created a makeshift gas line to the newly acquired tiki mask to have it spray fire and entertain the kids as being their god, which also resulted in a gas leak in the kitchen that Marge notices. He then immediately departs for Moes after the Tiki mask ended up tipping over and burning the lawn.
In Moe's Tavern, the regulars are discussing Barney's birthday party. Barney can't remember any of it; they show him a video of the night, revealing his shameful drunken antics. After receiving joke presents, such as 'I am deeply sorry for...' notepaper and helicopter flying lessons, a mocked Barney promises he will get sober. After initial difficulties, Barney makes it through an AA meeting, getting clean and sober. Heading to the Springfield Flight School Barney starts his helicopter-flying lessons. A few lessons later, Barney invites Homer along on a ride, which ends in an argument.
Meanwhile, Bart and Lisa enter a contest to win a "mystery prize" (a poorly-disguised bicycle). The contest is being run by the Springfield phone book, who are looking for a new cover photo - The twosome grab an old camera from the closet and set out to take that winning picture. They take pictures from the top of Mount Springfield, when Bart carelessly discards a hot flashbulb, starting a forest fire. The Springfield Fire Brigade are busy elsewhere, so after seeing the kids on the news, Barney and Homer team up to save them. They set off in the helicopter, but Barney has trouble flying without his instructor, and lands on a bridge. A Duff Beer truck traveling on the bridge stops just in time, spilling some of its cargo onto the road. Barney tells Homer he needs a beer to calm his nerves, and reaches for the nearest six-pack. Homer stops Barney from lapsing, drinking all six cans himself. Setting off in the helicopter again, they arrive at Mount Springfield, finding Bart and Lisa up a tall tree, surrounded by flames. A very drunk Homer reaches down and pulls the kids to safety. Bart takes a picture of the burning forest as they fly home.
The next day, Marge tells the kids that the new phone book has arrived, and their picture is on the cover. Excited, they race downstairs, only to scream when they see the picture: It's the two of them as toddlers, sat on the toilet. Marge tells them that there must have been some old photos on the camera film, but as she took it, she won the bike for them.
Meanwhile, Barney and Homer, friends again, are sat in the park. Barney is still off the alcohol, but is now addicted to Double-tall Mocha Lattés - Nearby, Moe stands triumphant, manning his new coffee cart.