I made one for Dragonlance awhile back but have no clue where I put the file.

I wish I could help. If I had more time I could look at the code. I am sure someone more knowledgeable could help.