• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[TFS 1.2] addExperience

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi everyone, the main idea of the code below is if the player are lower than level 250 then will put him in level 250.
The problem is if the player are level 10 and I use this code the player will go to level 260, etc.
How I fix it? It's stupid probably, but I didn't find any solution, already check Metables

Code:
if player:getLevel() < 250 then
     player:addExperience(getExpForLevel(player:getLevel() + 250) - player:getExperience(), false)
   end

Thanks.
 
Back
Top