Hi! I'm new to the RPM scene and I'm having some trouble getting my formulae to work the way I want, and I was hoping for some help.

I'm currently using the Victor's Custom Hit Formula and N.A.S.T.Y. Extra Stats scripts, and I'm trying to recreate a formula that emulates a Dungeons and Dragons attack roll.

I've been trying to emulate this by incorporating AC as new stat via the N.A.S.T.Y. Extra Stats scrips and then using a formula like <hit formula> rand(20) + a.atk > b.xstats.ac </hit formula>, but I'll be the first to admit that my knowledge of Ruby scripting and formulae is woefully inadequate, and I can't seem to find information specifically about how to write formulae properly. Any help on coming up with a script that will do this (or better yet, a formula that will work with the scripts I have) would be GREATLY appreciated.

Thank you all for your time, consideration, and aid!