ID:139530
 
Code:
strexp()
var/K=rand(7,13)-str/9
K*=5
if(village=="Leaf"&&leafpriority=="Training"||village=="Sand "&&sandpriority=="Training"||village=="Sound"&&soundpriority==" Training")K=K*1.2
if(village=="Leaf")K=K*(leafrep/100)
if(village=="Sand")K=K*(sandrep/100)
if(village=="Sound")K=K*(soundrep/100)
if(skillhardworker)K=K*(1.05+skillhardworker*0.05)
if(rank=="Hokage"||rank=="Kazekage"||rank=="Sound Leader")K=K*0.75
if(sharingan>=2)K=K*1.1
if(K<1)K=1
strexp+=K
if(strexp>=100)
var/J=strexp-100
strexp=J
str++
exp++
src<<"
Your strength has increased! It is now [str]!([exp]/[maxexp])"
if(exp>=maxexp)levelup()


Problem description:
Well, its like this when a person gets over 100 xp it stacks it so like this
it has 1000 strexp he lvls it up 10 lvls but i want it to be that it imidediatly levels not after he trained a bit
i tried to change this var/J=strexp-100 to var/J=strexp==0
but that just made it gain 1 level

</1>
There's so many things wrong with this code. I would recommend not using anything from Naruto Next Generation's source code, to be quite honest. For one, it's ripping, and second it's just plain terrible.

If you want someone to immediately level after doing something, just call <small>src.level ++<small> in the proc whenever said proc is called.
In response to DarkeWarrior
I have done alot at this source atm so i wont change from source
In response to Memek234
Basically you're ripping a game(using it without owners permission). Doing this can get you in serious trouble and will probably result in you being hated all over BYOND.