function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if(isPlayer(cid))and(getPlayerLevel(cid) <= 45)then
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) - getCreatureHealth(cid)))
doCreatureAddMana(cid, (getCreatureMaxMana(cid) - getCreatureMana(cid)))
doSendMagicEffect(getCreaturePosition(cid), 37)
end
return true
end