Here, try this script.
I wrote it ages ago, and it should do what you want to do, easily.
I wrote this when I was originally mucking about with itemdata in the source. That's why there are lines commented out, everywhere, as those only work in ZC >= 2.54. The script itself, as-is, works in 2.50.x.Pm
P.S. Here is the companion script, for custom bombs.
I recall writing that one for Evan.