Raised This Month: $ Target: $400
 0% 

Help with a XP System


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BAILOPAN
Join Date: Jan 2004
Old 06-23-2004 , 23:47  
Reply With Quote #3

To save XP is simple, by just using MySQL to store data in tables.

To actually accrue XP from combat and have levelling is something entirely different. You need to make an algorithm... all the good algorithms are based on logarithmic functions.

For example, here is the Runescape XP function to tell how much XP you need for a level:
Code:
experience(level) {    new x, Float:ret    for (x=1; x<level; x++)    {       ret += (x + 300*pow(float(2), float(x/7)))    }    return floatround(ret/4) }
reference

As for player versus player experience, it becomes more complicated as you need to take into account the other player's level.

A long time ago in a galaxy far away, I was fooling around with this and tried to write a stats plugin... I don't remember if it worked, or what the formula is, but the source is here:

Click here for bail_stats.sma. Look for "root_xp" which takes level of killer and level of victim and returns how much XP the killer earns.

The SIMPLEST solution... is to just do cumulative XP and fool around with little numbers... but I'd rather not think about it
__________________
egg
BAILOPAN is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode