Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-05-2011, 06:17 PM
Ohk4y Ohk4y is offline
Registered User
Ohk4y's Avatar
Join Date: Jun 2011
Posts: 43
Ohk4y is an unknown quantity at this point
Send a message via AIM to Ohk4y
Problem with exp gain and leveling up

I have an issue with leveling up in my script. When you kill a player it adds exp to you account with a script:
PHP Code:
findplayer(player.account).clientr.exp += int(random(511)); 
I'm trying to get it to level a player up depending on the amount of exp they have. For example;
Level 1 = 0 exp - 199 exp
Level 2 = 200 exp - 399 exp
Level 3 = 400 exp - 799 exp

How could I get it to change the level of the player, which is stored as clientr.level, when the player has anywhere between two numbers with out listing everything out like
PHP Code:
this.level1 = {1,2,3,4,5,6,7,8,9,10}; 
Thanks.
__________________
Reply With Quote
 


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 +2. The time now is 11:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.