|
Author | Topic: First code ive made-Customizable RPG (Read 220 times) |
FireStarter Moderator
     Demonboy's demon slayer slave member is offline
![[avatar]](http://i41.photobucket.com/albums/e289/IronSapian/marilinmanson.jpg)
Demon Slayer
Joined: Oct 2005 Gender: Male  Posts: 261 Location: Alabama Karma: 0 |  | First code ive made-Customizable RPG « Thread Started on Oct 12, 2005, 3:48pm » | |
after tons of reading JavaScript tuts!!!for 3 weeks heres my first code!!!!
Global Footers
<script language="JavaScript" type="text/JavaScript"> /*RPG v2 coded by FireStarter do not repost and keep this header intact.*/ var rpgStats = new Array(); rpgStats[0]=[' Attack',' 5 ']; rpgStats[1]=[' Defense ',' 7 '] //no need to edit below for(f=0;f<rpgStats.length;f++) { var statName = rpgStats[f][0]; var goUp = rpgStats[f][1]; var td = document.getElementsByTagName('TD'); for(i=0;i<td.length;i++) { if(td[i].width=="20%" && td[i].className=="windowbg" && td[i].innerHTML.match(/Posts: /i)){ var postNum = (td[i].innerHTML.match(/Posts: (.+?)</i)) ? RegExp.$1: ''; postNum = postNum.replace(',',''); var totalNum = goUp*postNum td[i].innerHTML+='<br />'+statName+': '+totalNum+''; } } } </script>
_______________________________________________
RPG Stat Name goes here How many it goes up a post
if you wana add more stats copy: rpgStats[2]=['STAT NAME HERE','HOW MUCH PER POST HERE'];
add as many as you want but keep changing
rpgStats[3]=['STAT NAME HERE','HOW MUCH PER POST HERE']; ............^........keep changing that number in numerical order
or if you dont understand Request it from me an ill specially made for you!!!Hope you likey 
|
![[image]](http://i41.photobucket.com/albums/e289/IronSapian/greensiggybanner.gif) |
|
Demonboy Administrator
     member is offline
![[avatar]](http://i3.photobucket.com/albums/y90/streetskater5003/Avy/dbavy.jpg)
Joined: May 2005 Gender: Male  Posts: 346 Location: US Karma: 1 |  | Re: First code ive made-Customizable RPG « Reply #1 on Oct 14, 2005, 3:14pm » | |
vary nice when o make an RPG ill think about using this
but where dos eit go in headers and footers
|
![[image]](http://i3.photobucket.com/albums/y90/streetskater5003/sigs/dbsiggy.jpg) |
|
FireStarter Moderator
     Demonboy's demon slayer slave member is offline
![[avatar]](http://i41.photobucket.com/albums/e289/IronSapian/marilinmanson.jpg)
Demon Slayer
Joined: Oct 2005 Gender: Male  Posts: 261 Location: Alabama Karma: 0 |  | Re: First code ive made-Customizable RPG « Reply #2 on Oct 15, 2005, 11:00am » | |
Global Footers-it shows all the info in Mini profile too-no bugs so far either since I have this on my Board
|
![[image]](http://i41.photobucket.com/albums/e289/IronSapian/greensiggybanner.gif) |
|
Demonboy Administrator
     member is offline
![[avatar]](http://i3.photobucket.com/albums/y90/streetskater5003/Avy/dbavy.jpg)
Joined: May 2005 Gender: Male  Posts: 346 Location: US Karma: 1 |  | Re: First code ive made-Customizable RPG « Reply #3 on Oct 22, 2005, 11:27am » | |
cool well when i get a RPG ill add it
|
![[image]](http://i3.photobucket.com/albums/y90/streetskater5003/sigs/dbsiggy.jpg) |
|
Ramirez Code Moderator
     member is offline
![[avatar]](http://img473.imageshack.us/img473/2374/ramsam9sb.png)
The Schwarzwind
Joined: Sept 2005 Gender: Male  Posts: 43 Location: UK Karma: 0 |  | Re: First code ive made-Customizable RPG « Reply #4 on Oct 23, 2005, 10:59am » | |
Thats really nice, good for a beginner! You've got the idea of arrays nicely!
Well done
|
![[image]](http://img360.imageshack.us/img360/2618/anitog6mq.gif)
![[image]](http://img473.imageshack.us/img473/3752/ramsam0lo.png) |
|
Demonboy Administrator
     member is offline
![[avatar]](http://i3.photobucket.com/albums/y90/streetskater5003/Avy/dbavy.jpg)
Joined: May 2005 Gender: Male  Posts: 346 Location: US Karma: 1 |  | Re: First code ive made-Customizable RPG « Reply #5 on Oct 25, 2005, 3:48pm » | |
wow u got a well done from rami thats pretty good
|
![[image]](http://i3.photobucket.com/albums/y90/streetskater5003/sigs/dbsiggy.jpg) |
|
FireStarter Moderator
     Demonboy's demon slayer slave member is offline
![[avatar]](http://i41.photobucket.com/albums/e289/IronSapian/marilinmanson.jpg)
Demon Slayer
Joined: Oct 2005 Gender: Male  Posts: 261 Location: Alabama Karma: 0 |  | Re: First code ive made-Customizable RPG « Reply #6 on Nov 5, 2005, 10:19am » | |
thanks Rami  ,But I dont even compare to you
|
![[image]](http://i41.photobucket.com/albums/e289/IronSapian/greensiggybanner.gif) |
|
|