local positionSpawn = {x=1000, y=1000, z=7}
function onPrepareDeath(creature, killer)
-- heal him
creature:addHealth(creature:getMaxHealth())
-- maybe add him full mana?
-- teleport to spawn
creature:teleportTo(positionSpawn, true)
-- return false = BLOCK DEATH! :)
return false
end