proc/LevelUp()
if(src.XP == src.MaxXP)
src.lvl += 1
src.MaxXP += src.MaxXP
src.XP = 0
src.INT += 4
src.DA += 2
src.str += 3
src.MaxHP += 5
src.HP = MaxHP
src << "<b>YOU HAVE LEVELED UP, YOU ARE NOW LEVEL [src.lvl]"
if(src.lvl == 3)
src << "<b>You learned Orchideous!"
src.verbs += new/mob/mage/verb/Orchideous
if(src.lvl == 550)
src << "<b>You learned Avada Kedavra!"
src.verbs += new/mob/mage/verb/Avada_Kedavra
if(src.XP>src.MaxXP)
src.XPremainder = src.XP - src.MaxXP
src.XP += src.XPremainder
LevelUp()
it half works, it raises the MaxXP, but it doesn't raise your stats and level
That should cover what you're asking for. By expanding this code you should be able to do everything you want to do with stats.