First off, I apologise if this is in the wrong forum, but it really was hard to decide where to put it, this question doesn't seem to fit into any forum really. Anyway, if this is in the wrong place, feel free to move/delete/whatever it 
Now, are there any mathematicians here? I got the idea to write a script that would spit out the % chance of getting a certain roll with certain dice in my IRC game (just to feed our curiosity at times), but am stumped on how to write such a script when large amounts of dice are used. As soon as more than 2 dice are introduced, the amount of manual work that I need to do to calculate the probabilities is enormous. Does anyone know of a formula I could use? There has got to be one around, but I certainly can't find one.

Now, are there any mathematicians here? I got the idea to write a script that would spit out the % chance of getting a certain roll with certain dice in my IRC game (just to feed our curiosity at times), but am stumped on how to write such a script when large amounts of dice are used. As soon as more than 2 dice are introduced, the amount of manual work that I need to do to calculate the probabilities is enormous. Does anyone know of a formula I could use? There has got to be one around, but I certainly can't find one.