![]() |
Basic leveling system
PHP Code:
It might look kinda messy, but that's because I added support so you could modify it by only changing two vars listed in the onCreated() event (this.levelvar and this.exp). If you want to add more logging, simple edit the switch case labeled reset with code you want in. I have not added any leveling up code, that you have to make yourself, so it will fit your server's leveling up plans etc. Any questions, suggestions to improve it etc are welcome. And.. uhm.. enjoy? |
JEEZ MAN. Calm down! lol
You're posting like two things in a day in the code gallery. Great script as always! ^^ |
Quote:
Planning on releasing some of my old stuff, maybe some old mudlib I've done :o Anyways, thanks again :) |
k newb question i know but
1. can i possibly use this on my friends server? 2. does it just go into like a weapon type script oooor is it much more advanced xD i r nub |
Sorry Chompy, but I don't like it. Any half decent leveling system would be controlled entirely on serverside, and definitely not in a timeout. All checks should be in a level up function, that ONLY an add exp function would trigger (ever).
Quote:
2. Yes, in a Weapon NPC. |
basic? i'll show you a basic levelup script:
PHP Code:
|
Hmm, just noticed that this thread was bumped..
Ziro, the code is old though ;o I'll see if I get time to update the code though.. Edit: Made this up fast PHP Code:
For example if you put this script in a wnpc named LevelingSystem, you would do this where you add exp: PHP Code:
|
I'd do it with this structure:
PHP Code:
|
Hmm, that code wouldn't do well though, as it would return all the time :O
But, yeah, I would of made the levelup() function public or an addexp() function.. but yeah, get the 'draft' ;p |
Quote:
|
Quote:
|
Does this just go as a server wnpc and add it to myself for testing? Did that and didn't see anything at all.
I r noob. |
Quote:
The latest ones, (the ones without a timeout) are more of an 'utility' code, which you use after adding experience to the player. The script is quite old (based on when I made it), and now a days I would of done it another way :) PS: This script is dependent that you script the leveling up formula and the actions the script will do when the player actually levels up :p |
Only if I was better at GS2...
|
All times are GMT +2. The time now is 04:27 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.