AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with a XP System (https://forums.alliedmods.net/showthread.php?t=3001)

Peli 06-23-2004 17:15

Help with a XP System
 
I need help with making a xp system to store xp and give it to players as a reward for something. I need to know how to do it though , totaly new to this kind of scripting. I tried looking at the WC3 plugin but I couldn't find it. So if any of you can show me some stuff that might help , thanks. :)

Peli 06-23-2004 23:27

Anyone that made an XP system or knows how to , can you help me please? :)

BAILOPAN 06-23-2004 23:47

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 :P

Peli 06-24-2004 00:17

Thank you Bail , your a big help. :)

Peli 06-24-2004 00:45

Quote:

Originally Posted by BAILOPAN
The SIMPLEST solution... is to just do cumulative XP and fool around with little numbers... but I'd rather not think about it :P

Alright , could you get me started with that part? So I could mess with stuff... The other stuff is kinda advanced. :(


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

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