mob
proc
deathcheck()
if(src.HP<=0)
if(src.client == 1)
world<<"[src] Has been killed by [usr]!"
usr.exp+= 50
usr.Level_Up()
src.death+=1
usr.kills+=1
src.loc=locate(8,10,1)
src.HP=src.MHP
else
world<<"[src] Has been killed by [usr]!"
usr.exp += 50
usr.kills += 1
del(src)
usr.Level_Up()
mob
proc
Level_Up()
if(src.exp>=src.maxexp)//If your exp var equals, or passes your maxexp var
src.lvl++//Add to your level
src.exp=0//resets your exp to 0
src.maxexp*=2//makes your maxexp double
src.str+=50//adds str
src.MMana+=100
src.def+=10
src.upgrade()
mob
proc
upgrade()
if(usr.lvl==10)
usr.rank="Begginer"
if(usr.lvl==25)
usr.rank="Player"
if(usr.lvl==50)
usr.rank="Advanced Player"
if(usr.lvl==75)
usr.rank="Super Player"
if(usr.lvl==100)
usr.rank="Novice"
if(usr.lvl==150)
usr.rank="Godly"
if(usr.lvl==200)
usr.rank="Unstoppable"
Problem description: For some reason, when my Exp hits the Max Exp, it won't level up. Instead, it will keep gaining Exp.
A bigger problem though is your deathcheck(). You should not be using usr at all in this proc. Insted you should pass the killer as an argument to the proc:
And then use killer instead of usr.
Also, if(src.client==1) is always going to be false because src.client is not a number. You should just use if(src.client) for that.
Lummox JR