I seemed to remember that there was an old Dragon magazine article on that. I did a search and found
this, which it says it adapted from 1st edition D&D. It's a bit silly in places (and a bit old-school-the-DM-hates-you in others) but hey, so is DF.