Cant we do this in game (check for character death)? its not explicitly using if / then syntax but....

/stopcasting [target=Lefthoof, nodead]
/cast [target=Lefthoof] Revive;