ID:150517
 
Ok im adding a level system to my game, but it wont level, i have a proc to reset my exp to 0 after it gets to 100 and a proc thats supposed to add 1 to the level after the exp gets to 100. heres my code someone plase help


proc
ExpReset()
if(usr.exp >= 100)
usr.exp = 0

proc
LevelUp()
if(usr.exp >= 100)
usr.level = level + 1

proc
DeathCheck()
if(health <= 0)
src.Move(locate(1,1,1))

verb
attack(M as mob in oview(1))
set category = "attacks"
usr << "You attack [M]!"
var/damage = strength
usr <<"[damage] damage!"
usr.powerlevel = powerlevel + 50
usr.health = health + 10
usr.exp = exp + 5
usr.strength = strength + 1
usr.defense = defense + 1
M:ExpReset()
M:LevelUp()
M:health -= strength
M:DeathCheck()
try downloading my Leveling System it does Just what you want.

Here it is.
In response to Nadrew
Thanks nadrew its finaly workin for me, but could you tell me how to make more vars?
In response to Jotdaniel
In response to Jotdaniel
nm, i got them all to work, dude you have a great level system there.
In response to Nadrew
hey, i found a problem with your level system, its easily fiexed though, you forgot to make the max hp raise with the hp. thats all, just tryin to help
In response to Jotdaniel
Jotdaniel wrote:
hey, i found a problem with your level system, its easily fiexed though, you forgot to make the max hp raise with the hp. thats all, just tryin to help

Thanks for telling me..
In response to Jotdaniel
Jotdaniel wrote:
nm, i got them all to work, dude you have a great level system there.

Thanks but its only great to newbies compired to other libs that are around mine is completely basic.
In response to Nadrew
yes i know, i just say that because all mine have had one or more major bugs and yours actualy works.
In response to Vortezz
I need to put a class selection in deadrons charecter handling, can anyone tell me how to do that?
In response to Jotdaniel
Start by putting a class selection code in your game while using deadron's library.
In response to LexyBitch
LexyBitch wrote:
Start by putting a class selection code in your game while using deadron's library.

Or consider looking at this demo which shows you exactly how to do it:

byond://Deadron.CharacterSaving

In response to Deadron
thanks deadron