» Tue Oct 19, 2010 2:37 pm
If the script was an Object Script and running on the ring, you could use http://cs.elderscrolls.com/constwiki/index.php/GetContainer to determine who's carrying the ring.
Using it on a reference from outside the ring might not work, as it's quite impossible to obtain a reference to an object "inside an inventory" the way the game engine is handling these things.
Also it won't make much sense to ask this based on the ObjectID of the ring, as said ring can exist as dozens of instances of this Base Object.
Figuring out who's attacking the player is another question. Without the game or the CS I'm unable to figure it out right now, but it should be implementable as well quite sure. You might have to take care of choosing 1 from "multiple" enemies who are all attacking the player at the same time though.