ID:268098
 
mob
proc/UserDcheck(mob/M)
if(M.HP<=0)
if(istype(src,/mob/You/Player))
var/obj/Corpse/C = new(src.loc) // Create the corpse
for(var/obj/O in src.contents)
O.Move(C) // Loop through each item and put it in the fresh corpse
sleep(2)
M<<"You Have Died!"
M.gold -= M.gold
Indent that line once.

~Ease~
In response to Ease
thanks ease
In response to Vash_616
mob
proc/UserDcheck(mob/M)
if(M.HP<=0)
if(istype(M,/mob/You/Player))
sleep(2)
M<<"You Have Died!"
M.gold -= M.gold
M.HP=M.MHP
M.MP=M.MMP
M.loc=locate(5,4,1)
M.PK=0
M<<"<Font color=gray> Game Over.."
sleep(3)
M<<"<Font color=blue>Reviving in 30 seconds "
sleep(80)
M<<"<Font color=yellow>Reviving in 20 seconds "
sleep(80)
M<<"<Font color=red>You are Revived! "
M.loc=locate(9,49,1)
return
else
return

But when i kill a monster the game over,reviving etc etc shows up for me and its not supposed to.
In response to Vash_616
Show me how you call that procedure.

~Ease~
In response to Vash_616
mob
proc/UserDcheck(mob/M)
if(M.HP<=0)
if(istype(M,/mob/You/Player))
sleep(2)
M<<"You Have Died!"
M.gold -= M.gold
M.HP=M.MHP
M.MP=M.MMP
M.loc=locate(5,4,1)
M.PK=0
M<<"<Font color=gray> Game Over.."
sleep(3)
M<<"<Font color=blue>Reviving in 30 seconds "
sleep(80)
M<<"<Font color=yellow>Reviving in 20 seconds "
sleep(80)
M<<"<Font color=red>You are Revived! "
M.loc=locate(9,49,1)
return
else
del(src)
return


I fixed the last problem,it had something to do with attacking anyways the monster wont delete when it dies,any help -_-
In response to Vash_616
But how do you CALL it? That is what is going to affect it. What tells the game to run that proc?

~Ease~
In response to Ease
mob
verb
Attacking()
set category="Fight"
for(var/mob/E in get_step(usr,usr.dir))
if(E.NPC==0)
E.HP-=usr.Str
view()<<"[usr] attacks [E] ([usr.Str])"
if(istype(src,/mob/You/Player))
if(E.HP<=0)
E<<"<font color=red>~You died!~"
world<<"<font color=red>[E] Died!"
E.HP=E.MHP
E.MP=E.MMP
E.gold+=E.gold
E.gold=0
usr.Exp+=E.Expg
E.PK=0
E << sound(null)
usr << sound(null)
LvlCheck(usr)
UserDcheck(E)
return
else
if(E.HP<=0)
usr<<"<I>You killed [E]!"
world<<"<font color=red>[usr] Slaughtered [E]!"
usr << sound(null)
E << sound(null)
usr.gold+=E.gold
E.gold=0
usr.Exp+=E.Expg
LvlCheck(usr)
del E
return
else
usr<<"You can't attack NPC!"
usr << sound(null)
return
In response to Vash_616
Okay, first, change your "if(E.NPC==0)" to "if(!E.NPC)". Second, change your "if(istype(src,/mob/You/Player))" to "if(istype(E,/mob/You/Player))".

That SHOULD work. If not, change your (now) "if(istype(E,/mob/You/Player))" to "if(E.client)".

~Ease~
In response to Ease
that worked,thanks alot :)