ID:1046495
 
(See the best response by Zohan98.)
Code:
mob/proc
Attack(mob/monster/M,mob/Player/P)
if(M.hp <= 0)
return
else
sleep(10)
view() << "[M] [pick(M.attackdesc)] [P] and does [M.atk - P.def] damage!"
P.hp -= M.atk
P.hp += P.def
M.Death_Check(P)


Problem description:
For some reason when the monster gets the hero down to 0 and lower nothing happens! This is the attack code for the monster and it works well, so it has something to do with calling the proc. ;_;
Best response
Can you post the death_check proc?
mob/proc
Death_Check(mob/Player/P)
if(usr.hp <= 0)
P << sound(null)
world << "[P.name] has died!"
P.loc = null
sleep(100)
P << "You're too valuable to be gone..."
sleep(50)
P << "..."
sleep(35)
P << "Come back...!"
P.hp = usr.maxhp
P.exp = 0
P.gold = usr.gold*1/2
P.loc=locate()
mob/proc
Death_Check(mob/Player/P)
if(usr.hp <= 0)
P << sound(null)
world << "[P.name] has died!"
P.loc = null
sleep(100)
P << "You're too valuable to be gone..."
sleep(50)
P << "..."
sleep(35)
P << "Come back...!"
P.hp = usr.maxhp
P.exp = 0
P.gold = usr.gold*1/2
P.loc=locate()
OH MY GOD. LOL. I SEE THE PROBLEM. EMBARRASSED.
Apology Accepted.