Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Health and mana is not working!
Topic Started: May 7 2008, 06:13 PM (645 Views)
Chain C
Member Avatar
Prince of Thrones
 *   *  
The code slayer gave me is not working:

Quote:
 
<script type="text/javascript">//By slayer766 of thecodingzone.com//Starting health and manavar health = 50;var mana = 10;//How much per post?var health_amount = 6;var mana_amount = 2;if(location.href.match(/showtopic=/i)){ var a=document.getElementsByTagName("span"); for(i=0;i<a.length;i++){ if(a.className=="postdetails" && a.innerHTML.match(/Posts: (\d+)/)){ var amount = RegExp.$1.split(",").join(""); a.innerHTML += "<br />Health: "+Math.floor(parseInt(amount)*health_amount+health)+"<br />Mana: "+Math.floor(parseInt(amount)*mana_amount+mana); } }}</script>


Note:I have Internet Explorer
Offline Profile Quote Post Goto Top
 
slayer766
Member Avatar
Member
 *   *   *   *   *   *   *  
That's not what I gave you, use this:

Code:
 
<script type="text/javascript">
//By slayer766 of thecodingzone.com


//Starting health and mana
var health = 50;
var mana = 10;

//How much per post?
var health_amount = 6;
var mana_amount = 2;

if(location.href.match(/showtopic=/i)){
var a=document.getElementsByTagName("span");
for(i=0;i<a.length;i++){
if(a[i].className=="postdetails" && a[i].innerHTML.match(/Posts: (\d+)/)){
var amount = RegExp.$1.split(",").join("");
a[i].innerHTML += "<br />Health: "+Math.floor(parseInt(amount)*health_amount+health)+"<br />Mana: "+Math.floor(parseInt(amount)*mana_amount+mana);
}
}
}
</script>

Board Wrappers > Footer.
Offline Profile Quote Post Goto Top
 
Chain C
Member Avatar
Prince of Thrones
 *   *  
yeah the one i posted is not spaced out but it dosnt work!
Offline Profile Quote Post Goto Top
 
slayer766
Member Avatar
Member
 *   *   *   *   *   *   *  
What version of Internet Explorer are you using? Or whatever browser you use.
Offline Profile Quote Post Goto Top
 
Chain C
Member Avatar
Prince of Thrones
 *   *  
Im using Exploerer 7 I think.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · zIFBoards - Skinning & Code Support · Next Topic »
Add Reply