Post by Singular on Dec 13, 2006 21:49:37 GMT -5
This will make a simple RPG in your Mini Profile. The great part about this code is that you can show / hide the stats. (They will start out hidden.) Unfortunately, this version is not editable (unless you are a good coder) but it still contains everything that you need in an RPG:
- Gold
- Strength
- Levels
- HP
- Magic
Please do not PM me for code help.
Preview: Here
Global FOOTER
________________________________________________________
<script type="text/javascript">
<!--
/* gb0y's First Simple RPG [Hide / Show] by g0alieb0y
v4studios.proboards32.com/
Please keep this intact and Please don't repost */
var showMsg = "Show/Hide Stats"; // Message you click to show / hide stats
// Below is for Money (Gold)
var moneyName = "Gold: "; // Name before the amount of money
var perPost = "4"; // Amount of money for each post
// Below is for Strength
var strengthName = "Strength: "; // Name before the amount of Strength
var perStrength = "3" // Amount of strength points per karma
// Below is for level
var levelName = "Level: "; // Name before the amount of Levels they are on
var perLevel = ".5"; // Amount of Levels per post
// Below is for HP
var hpName = "HP: "; // Name before the level of the users HP
var perHp = "1"; // Amount of HP per post
// Below is for Magic
var magicName = "Magic: "; // Name before the amount of magic
var perMagic = "2"; // Amount of magic per post
// Don't Edit Below
var td = document.getElementsByTagName('td');
for ( a=0;a<td.length;a++ ) {
if ( td.width == "20%" && td.innerHTML.match (/Posts/)) {
var postAmount = td.innerHTML.split ("Posts:")[1]
var moneyAmount = parseInt (postAmount) *+perPost
var strengthMath = parseInt (postAmount) *+perStrength
var levelMath = parseInt (postAmount) *+perLevel
var levelHp = parseInt (postAmount) *+perHp
var levelMagic = parseInt (postAmount) *+perMagic
function expand(thediv) {
thediv.style.display = (thediv.style.display == "none") ? "" : "none";
}
td.innerHTML += "<br><a onclick=expand(this.nextSibling);>"+showMsg+"</a><div id='stats' name='stats' style='display: none;'>"+moneyName+moneyAmount+" <br>"+strengthName+strengthMath+" <br>"+levelName+levelMath+" <br>"+hpName+levelHp+" <br>"+magicName+levelMagic+"<br></div>";
}
}
//-->
</script>
________________________________________________________
You can edit GREEN
- Gold
- Strength
- Levels
- HP
- Magic
Please do not PM me for code help.
Preview: Here
Global FOOTER
________________________________________________________
<script type="text/javascript">
<!--
/* gb0y's First Simple RPG [Hide / Show] by g0alieb0y
v4studios.proboards32.com/
Please keep this intact and Please don't repost */
var showMsg = "Show/Hide Stats"; // Message you click to show / hide stats
// Below is for Money (Gold)
var moneyName = "Gold: "; // Name before the amount of money
var perPost = "4"; // Amount of money for each post
// Below is for Strength
var strengthName = "Strength: "; // Name before the amount of Strength
var perStrength = "3" // Amount of strength points per karma
// Below is for level
var levelName = "Level: "; // Name before the amount of Levels they are on
var perLevel = ".5"; // Amount of Levels per post
// Below is for HP
var hpName = "HP: "; // Name before the level of the users HP
var perHp = "1"; // Amount of HP per post
// Below is for Magic
var magicName = "Magic: "; // Name before the amount of magic
var perMagic = "2"; // Amount of magic per post
// Don't Edit Below
var td = document.getElementsByTagName('td');
for ( a=0;a<td.length;a++ ) {
if ( td.width == "20%" && td.innerHTML.match (/Posts/)) {
var postAmount = td.innerHTML.split ("Posts:")[1]
var moneyAmount = parseInt (postAmount) *+perPost
var strengthMath = parseInt (postAmount) *+perStrength
var levelMath = parseInt (postAmount) *+perLevel
var levelHp = parseInt (postAmount) *+perHp
var levelMagic = parseInt (postAmount) *+perMagic
function expand(thediv) {
thediv.style.display = (thediv.style.display == "none") ? "" : "none";
}
td.innerHTML += "<br><a onclick=expand(this.nextSibling);>"+showMsg+"</a><div id='stats' name='stats' style='display: none;'>"+moneyName+moneyAmount+" <br>"+strengthName+strengthMath+" <br>"+levelName+levelMath+" <br>"+hpName+levelHp+" <br>"+magicName+levelMagic+"<br></div>";
}
}
//-->
</script>
________________________________________________________
You can edit GREEN