Lift()
set category = "Training"
set src in oview(0)
if(usr.stamina < 1)
usr << "You are too tired to Lift Weights!"
return
if(usr.doing)
return
if(src.lift)
return
else
src.lift = 1
if(!usr)return
usr.frozen = 1
src.icon_state = "W-Lift"
usr.icon_state = "lift"
sleep(22)
src.icon_state = "Weight"
usr.icon_state = ""
usr.exp += round(rand(5,25) + usr.level)
usr.Level()
usr.frozen = 0
if(prob((100 - usr.level)))
var/str_gain = rand(usr.level,(usr.level * 2))
usr.strength_max += str_gain
usr.strength += str_gain
if(prob(10))
usr << "\white You feel your Muscles bulge slightly..."
usr.stamina += rand(5,9)
if(usr.stamina >= usr.stamina_max)
usr.stamina = usr.stamina_max
sleep(5)
src.lift = 0
Problem description:
now his stamina never goes down
if(usr.stamina <= 1)