Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Code Requests
  • Completed Requests
  • [Completed] [ZB]Experince/Points system
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
[Completed] [ZB]Experince/Points system; :P
Tweet Topic Started: Oct 26 2009, 01:08 PM (325 Views)
MegamanX-7 Oct 26 2009, 01:08 PM Post #1
Robotic Warrior

Posts:
49
Group:
Member
Member
#3,511
Joined:
Oct 9, 2009
Coding language
Java
well i was wondeing if someone can like help me get a proper experince and points system like for per post amd it shows like a level bar at the side containing your level and MP amount and EXP as well as a points system as well too ty =] and sorry if i explained it all weird like :P
Offline Profile Goto Top
 
Choco Oct 26 2009, 03:39 PM Post #2
Member Avatar
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ

Posts:
589
Group:
Admins
Member
#3,272
Joined:
Jun 30, 2009
Coding language
Everything
Just use this:
Code:
 

<script type="text/javascript">
//////////////////////////////////////////////
// Level/Experience/Money Hack! //
// By Chocolate570 - 3/16/07 //
// Don't Edit the Following //
/////////////////////////////////////////////
lem={
level:[],
exp:"",
mon:[],
populate:function() {
e=this.exp;
m=this.mon;
l=this.level;
$(".user_info:contains(Posts:) .spacer").each(function() {
post=$(this).prev().prev().prev().prev().prev().prev().prev().html();
curExp=e*post;
curMon=(m[2]=="before")?m[1]+(m[0]*post):(m[0]*post)+m[1];
for(i in l){if(l[i]>curExp){continue;}finExp=parseFloat(i)+1;}
$(this).before("<dt>Money:</dt><dd>"+curMon+"</dd><dt>Exp:</dt><dd>"+curExp+"</dd><dt>Level:</dt><dd>"+finExp+"</dd>");
});
}
}
lem.level=[0,50,100,200,500,1000,5000,10000,20000];
lem.exp=5;
lem.mon=[1.5,"$","before"];

$(function(){lem.populate();});
</script>

And these are the instructions:
Quote:
 
It's straightforward to edit too, but here's a walkthrough.
////////////////////////////////////
1. Levels
In the sample code, you'll see something like this:
Code:
 

lem.level=[10,50,100,200,500,1000,5000,10000,20000];

Those numbers, seperated by commas, are the different amounts of experience to get different levels. For example, to get level 2, you need 10 experience. Level 3 needs 50 experience, and so on, until you need 20,000 experience to reach level 11. You can continue this as long as you want. The user starts at level 1 automatically.

2. Money
You'll also see this:
Code:
 

lem.mon=[1.5,"$","before"];

The provided data is the money per post, the money symbol, and whether to put the money before or after, respectively. If I wanted the user to get 15 units of currency per post, use | as my currency symbol and put the symbol after the amount of money, I'd use:
Code:
 

lem.mon=[15,"|","after"];

The first one is necessary. The second one, the symbol, can be left as "". The third can be left as "", and will default to after if anything but "before".

3. Experience
This one can't get more straightforward. Simply put the number of experience you want the user to get per post.

There you have it. A simple level/experience/money hack. Enjoy. :^_^:
Posted ImageIt's a magical world, Hobbes, ol'd buddy... ...let's go exploring!
In progress: Something Special ;)
Offline Profile Goto Top
 
MegamanX-7 Oct 26 2009, 04:15 PM Post #3
Robotic Warrior

Posts:
49
Group:
Member
Member
#3,511
Joined:
Oct 9, 2009
Coding language
Java
cool it works but got a question can the money be used if like u had a store or just like a prefoward question? :)
and another question is that when i look in my profile it shows completely differen with some NaN mind explaining that as well
Edited by MegamanX-7, Oct 26 2009, 08:42 PM.
Offline Profile Goto Top
 
Vitality Nov 19 2009, 03:13 PM Post #4
Member Avatar
Tabula Rasa

Posts:
784
Group:
Former Staff
Member
#320
Joined:
Jul 26, 2008
Request Complete.

Your request has been completed, but you have not replied in a while to tell us whether it is working out for you or not. Your topic will be moved to the correct forum. We hope it works for you; if it doesn't, feel free to post another request topic in the requests forum. Just remember: read the rules first!

Thanks,
The ZBCode Staff
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Completed Requests · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 2:26 PM Jul 11
Hosted for free by ZetaBoards · Privacy Policy