Unfortunately, this isn't going to work as it is set up. If a script is on the ring, all commands will run on it, not the wearer! A ring can't die, so nothing will happen. Also, I am unsure whether scripts run on objects in inventories anyway. Even if it did run on the NPC you want, it would suffer from a flaw: Resurrection resets NPC's inventories.
I would suggest you put the script on the NPC herself, and instead of resurrection check for low health and then bump it up. Try this:
CODE
begin revive_new
short doOnce
if ( doOnce == 0 )
set doOnce to 1
endif
if ( GetHealthRatio < 1 )
ModCurrentHealth, 10000;This will not go over max health
endif
end
If you can't put the script on the NPC, use a global script instead; set it to be a startscript.
CODE
begin revive_glob
short doOnce
if ( doOnce == 0 )
set doOnce to 1
endif
if ( "MyCompanionID"->GetHealthRatio < 1 )
"MyCompanionID"->ModCurrentHealth, 10000;This will not go over max health
endif
end
Either of the above should work. If you want to get into scripting I suggest you check out the official forums, there are some capable modders hanging around:
http://www.elderscrolls.com/forums/index.php?showforum=5