mob/proc/LevelupSword()// SWORD LEVELING
if(src.maxswordskill>=20000)
src << "You have reached the limit of your Sword-weilding ability!"
return 0
else if((src.level*3)<=(src.maxswordskill+src.maxthrowingskill))
src<<"You must increase your over-all level before training this skill further!"
return 0
else
if(src.swordexp>=src.swordexpnext)
src.JutsuCheck()
src.maxswordskill++
src.swordskill = src.maxswordskill
src.swordexp=0
src.swordexpnext+=7.5
if(src.swordexpnext>=7500)
src.swordexpnext=7500
src<<"<font color = red><font size =1><b>You have increased your Sword Skill to [src.maxswordskill]!</font></small></b>"
The problem im having is even if i put a cap on the sword leveling it will go past 20,000..I'm not sure if I'm missing something here.. please help.. Thanks.
Also, be careful. You actually have another problem you might not know about yet. What happens if a player gets enough exp from a single attack he levels up twice? This will only level him once.