It's come to my attention that this is likely the only thing that can control how/when a player dies. I understand that this has come up in the past as a suggestion, I'm just posting again to get on your nerves =)
I'd also like to be able to create corpses without having to hook several packet, maybe; CreateCorpse(graphic, etc); returning a corpse_reference and being able to set a mobiles last corpse prop of course.
Exported function(s): ApplyRawDamage()/ApplyDamage()
Code: Select all
function ApplyRawDamageEX( who, damage )
var hp := GetVital(who, "Life");
var realdamage := damage * 100;
if (hp <= realdamage)
// Player will die. Do something?
else
// Default behaviour.
ApplyRawDamage(who, damage);
endif
endfunction
function ApplyDamageEX( who, damage )
// Pick an armor.
// Calculate a new damage.
// Deal the damage.
ApplyRawDamageEX(who, newdamage);
endfunction
Of course what I (or we) need or want does not change what we will or won't get.