I think you are going to need to be more specific.
The term "RPG" has been widely abused by the videogame industry, and means a lot of different things.
Describe what you want to happen in your game.
Offline
I have just created a RPG battle engine which can be found at http://scratch.mit.edu/projects/archmage/97745
RPGs are one of the hardest games to program. My RPG battle engine project is a direct translation of a RPG battle engine programmed in flash actionscript. http://spamtheweb.com/ul/upload/120208/5686_RPG.php
Offline
I found some links that may interest some of you RPG makers
http://forums2.battleon.com/f/tm.asp?m=12585750
This outlines all of the formulas used in the online RPG adventure quest
http://www.gamefaqs.com/console/snes/file/588739/30935
This document shows all of the battle formulas for the Mario RPG game on the snes
You could probably incorporate those formulas into whatever RPG you want to make
Offline