Death()
var/M
M = src
if(istype(M,/mob/Player))
while(M)
if(M.Hp>0)
break
return
else
if(M.Hp<=0)
M<<"<font color = yellow><b>You have died! You can choose to return now at the cost of half your gold, or wait for someone to revive you.</font></b>"
sleep(35)
alert("Return to your home point?","Home Point","Yes","No")
if("Yes")
M.Move(locate(M.TX,M.TY,M.TZ))
M<<"<font color = yellow><b>You have lost half of your gold. You currently have [M.GP] gold left.</font></b>"
sleep(5)
break
return
if("No")
M<<"<font color = yellow><b>You have 3 minutes to be revived, else you are returned to your home point. To return anytime while down, press the center key on your number pad.</font></b>"
sleep(180)
if(M.isdead>=1)
M.Move(locate(M.TX,M.TY,M.TZ))
M<<"<font color = yellow><b>You have lost half of your gold. You currently have [M.GP] gold left.</font></b>"
break
return
else
break
return
Problem description:
Undefined vars -
M.Hp
M.TX
M.TY
M.TZ
M.GP
M.isdead
Undefined proc
M.Move
M = src
you not defining M as a mob.. var/mob/M will fix your problems