I invented following system long ago, and using it in my ORPG:
When hero dies, he becomes being stored in variable and dying location goes to variables as well. Grave is spawned there. Grave is invulnerable and can be target of some Resurrection spell. After doing that, use 'remove grave from the game' and 'revive (previously stored hero) at (previously stored location)'. Prob could be hard to understand, but fairly easy to use. Ask if you need more exact trigger. Dont forget about clearing leaks!
Bonus suggestion: Also, in my ORPG, grave has the ability which allows the dead hero instantly respawn at the city. Use it.