The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
level system problem
Author Message
dabritmusic
Journeyman
*

Posts: 50
Likes Given: 8
Likes Received: 2 in 1 posts
Joined: Nov 2013
Reputation: 0



Post: #1
level system problem
hi how ever time a player levels it keeps their exp saved so they can level again really quick. i want to set their exp back to 0 at every level up.
i tried TAG.LEVEL=0 but it doesnt seem to work. any suggestions?


TAG.LEVEL=<EVAL <TAG.LEVEL>> +1
SERV.ALLCLIENTS @07a1 SYSMESSAGE=<NAME> has gained a level!
SERV.ALLCLIENTS @07a1 SYSMESSAGE=<NAME> is at level <EVAL <TAG.LEVEL>>
03-08-2014 10:21 AM
Find all posts by this user Like Post Quote this message in a reply
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #2
RE: level system problem
I suppose the TAG.LEVEL isn't the TAG for the EXP... Tongue

Do you have a TAG.EXP or something like that?
03-08-2014 11:24 AM
Find all posts by this user Like Post Quote this message in a reply
dabritmusic
Journeyman
*

Posts: 50
Likes Given: 8
Likes Received: 2 in 1 posts
Joined: Nov 2013
Reputation: 0



Post: #3
RE: level system problem
(03-08-2014 11:24 AM)pinku Wrote:  I suppose the TAG.LEVEL isn't the TAG for the EXP... Tongue

Do you have a TAG.EXP or something like that?

lol yea no that the level tag. that works fine. it adds the +1 level to their current one. but when they level it stored their exp which is tag.exp. say it takes 1500 exp to get to level 1 and 2000 for level 2, really they are only adding 500 to gain the next level. i want to make it so they have to gain all exp again. otherwise players level too fast and i have a cap at 100. i might consider adding tiers or something lateron.
03-08-2014 11:48 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: level system problem
EXP is directly linked to LEVEL, if you change EXP, the LEVEL will change too (based on the value you set on EXP)
so you need to use a function that doesnt change the EXP, but just calculate the min/max value for each level

probably it will take a long time and knowledge to make this, so here's a function I already made some months ago
Code:
[FUNCTION GetExpValue]
FOR 0 <LEVEL>
LOCAL.Amount += <eval <LOCAL._FOR>*<SERV.LevelNextAt>>
ENDFOR
ARGS=<LOCAL.Amount>,<eval <LOCAL.Amount>+((<LEVEL>+1)*<SERV.LevelNextAt>)>
return <eval <EXP>-<ARGV0>>,<eval <ARGV1>-<ARGV0>>

[FUNCTION MessageExample]
ARGS=<GetExpValue>
SYSMESSAGE You're on level <LEVEL> (EXP <ARGV0>/<ARGV1>)
this will return the min,max EXP value for the current level like this:
-Level 0: 0 ~ 2000 exp
-Level 1: 0 ~ 4000 exp
-Level 2: 0 ~ 6000 exp
-Level 3: 0 ~ 8000 exp

note that it wont change the char EXP value, but just visually show the same value using a more friendly number
03-08-2014 01:59 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 4 Guest(s)