here is the code
if(usr.Exp>=usr.Maxexp)
usr.Level+=1
usr.Maxexp=2000*usr.Level
usr<<"You have gained a Level"
if(usr.Statup>=20)
src.max_health+=30
src.max_magic+=8
src.Maxen+=20
usr.damage+=15
usr.Statup=0
usr<<"Your Stats are higher"
if(usr.Level == 20)
usr << "Learned Invisable"
usr.verbs += new/mob/spells/verb/Invisable
no errors but when u get to lvl 20 and u log out it gets rid of the verb when u log back in...
how can i fix this?
ID:180045
Sep 7 2001, 12:05 pm
|
|
Eponick wrote:
no errors but when u get to lvl 20 and u log out it gets rid of the verb when u log back in... You can use the CharacterHandling library, which will save characters and their verbs for you. This is a demo: byond://Deadron.SimpleSaving |
You need to save the verbs into a list which is not tmp(verbs is), like saveverbs, when they log off and then load it when they log back in. You can do it with for loops to loop through all of the players verbs, then store each one in the saveverbs list. Im not going to give you any code, just try to do it yourself first.
Alathon