potion
Health_potion
icon='hpot.dmi'
verb
take()
set src in oview(1)
usr<<"You pick up the [src]."
Move(usr)
drop()
set src in usr
usr<<"You drop the [src]."
Move(usr.loc)
drink()
if(usr.HP>=MaxHP)
usr<<"You're already at full health."
else
usr.HP+=15
usr<<"You drink the Health potion"
del(src)
Problem description:
It sais that MaxHP is an undefined variable, but then i define it as MaxHP=30+(10*Lvl), and it sais Lvl is undefined...I can't think of a way to define it without copying the entire Leveling system. Although it does work if I leave out the "if(usr.HP>=MaxHP)" and just have it add the health, whether the health is over the maximum or not...please help!
Thanks
Try making it so when you gain a level to multiply your health by 10 (*10), and make sure lvl is defined too. I am kind of confused what you are asking, but I think that should be right.
You could try making it usr.MaxHP also, I doubt it will work, but it may.