ID:165413
 
I was wondering if someone would make me a peice of code

I need a system for character age. The system need to start when the character is created, and count the time they've played for. The random starting age should be 10-20 years of age. Every month should be 1 hour, every year should be 12 hours. The random age for death should be somewhere between 75-80. Which means the characters life should be a maximum of about 960 hours (mental math.. i think its right). If you would like to do this for me then please contact me.


Email [email protected]

AIM F22raptr26
mob/var
hour=0
minute=0
second=0
month
year=rand(10,20)
onlinetime=""
death=rand(75,80)
mob/proc/playeronlinetime()
set background=1
spawn(10)
src.second+=1
src.playeronlinetime()
lab
if(second>=60)
src.second=0
src.minute+=1
if(src.second>=60)
goto lab
if(src.minute>=60)
src.minute=0
src.hour+=1
src.month+=1
if(src.minute>=60)
goto lab
if(src.month>=12)
src.minute=0
src.hour=0
src.month=0
src.year+=1
if(src.month>=12)
goto lab
if(src.year>=src.death)
src.Death()
src.onlinetime="[src.hour]:[src.minute]:[src.second]"

mob/proc/Death()
src<<"You died at age [src.year]!"
src.minute=0
src.hour=0
src.month=0
src.year=0


That's pretty much it right there.
In response to CuriousNeptune
thank you
In response to CuriousNeptune
Please, think of the poor, abused goto. :(