![]() |
Needed Formula for Exp / Level Gain
Hey guys, i'm here with another question.
-------------------------------------------------------------------------- What would be a good formula to substitute for all of this repetition: PHP Code:
|
temp.needed = (2 ^ clientr.explevel) * 100;
|
Quote:
|
If you are using my EXP Barebones then all you need to do is replace the temp.needed line in the getEXPNeeded function.
Link: http://forums.graalonline.com/forums...58&postcount=3 |
Quote:
PHP Code:
|
Okay, I replaced it and it is working now, thanks again fowlplay4!
|
>_<
Wait, Nevermind. It just about killed my hud that displays all of the information..
>_< class : expfunctions PHP Code:
PHP Code:
|
You don't need that system at all, and all your system is doing is spamming the server with triggers for no reason...
Everything is taken care of in the player-joined expfunctions class. All you have to do in other systems is call the player's addEXP function. Show me what script you have in your onActionPlayerOnline function in your Control-NPC, because I have a feeling you might not even be using it correctly. |
PHP Code:
|
showStats and enableFeatures are both clientside-only, they shouldn't be in onActionPlayerOnline.
|
Quote:
|
Alright now in other scripts you just have to call:
player.addEXP(100); or findplayer("Ohk4y").addEXP(100); To add experience to yourself, expfunctions then internally checks to see if you gained enough EXP to level up. The class is flexible enough so you don't have to reset EXP if you change your EXP Needed formula. It also initializes the player to level 1 if they haven't logged in before (or if their level is 0). You can also call: player.levelUp(); if you just want to directly level yourself. |
| All times are GMT +2. The time now is 05:42 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.