Javascript Tools for RPG

To write Random Generater for D&D3.5e, I made some Javascript utilities, and open them as GPL Free Software.

Copyright

These three scripts ( util.js, rpg_util.js, item_util.js ) are GPL free software.  You can use them freely under the GPL.  These scripts are distributed without any warranty.
For the details of GPL, visit GNU GENERAL PUBLIC LICENSE Ver 2.

Other Javascripts in my website are *NOT GPL FREE SOFTWARE* because they are derivative works from D&D RPG.  You can use them for non-commercial personal use only.

Usage

For example, if you want ramdom encounter generator as follows:
To display this, HTML file sample.html is as follows:
<head>
<title>Sample</title>
<script language="JavaScript" src="./util.js"></script>
<script language="JavaScript" src="./rpg_util.js"></script>
<script language="JavaScript" src="./item_util.js"></script>
</head>
<body>
<script language="Javascript">
var rTable = new RT(D100, [
new RTE(10, "None"),
new RTE(100, new RT(D6, [
new RTE(1, "Green Dragon"),
new RTE(3, function() {return ((dice(4)+1)+" Skeletons");}),
new RTE(5, new CH(["Dire Bear", "Dire Wolf", "Dire Weasel"])),
new RTE(6, new AM(3, new CH(["Skeleton", "Zombie", "Wight", "Ghoul"])))
]))
]);
document.writeln("Result="+getValue(rTable)+"<BR>");
</script>
</body>
</html>

APIs

util.js : Utilitiy for Javascript

Required: None.

rpg_util.js : Utility for RPG

Required: utils.js

item_util.js : Utility for item generation

Require: rpg_util.js (thus also util.js)