mob
var
hunger=100
statreduce=0
proc
hungerdecrease()
var/mob/players/M
if(usr.statreduce==1)
if(usr.hunger==0)
healtdecrease()
else
if(usr.hunger>=51)
M.tempevade+=10
M.Fireres+=10
M.Iceres+=10
M.Litres+=10
M.Darkres+=10
M.Poisres+=10
M.Earthres+=10
usr.statreduce=0
usr<<"Your Evasion and Fire/Ice/Lightning/Dark/Poison/Earth resistence increased!"
hungerdecrease()
else
sleep(250*adventurelevel)
usr.hunger-=1
hungerdecrease()
else
if(usr.hunger>=51)
sleep(250*adventurelevel)
usr.hunger-=1
hungerdecrease()
else
M.tempevade-=10
M.Fireres-=10
M.Iceres-=10
M.Litres-=10
M.Darkres-=10
M.Poisres-=10
M.Earthres-=10
usr.statreduce=1
usr<<"Your too hungry! Evasion and Fire/Ice/Lightning/Dark/Poison/Earth resistence decreased!"
usr<<"Eat some fish to calm your hunger."
hungerdecrease()
healtdecrease()
var/mob/players/M
M.HP-=10
sleep(10)
hungerdecrease()
Problem description:The idea is every once in a while your hunger goes down its in percentage, the problem is whn it reaches 50 it stops the stats dont decrease and the hunger bar just stops at 50 even if you eat wich makes it go up again it never goes down again. So my question am i missing something in the code? this is the whole code btw.