Hey, I have been fooling around for a few weeks to get a working open spell and then a few days ago I read this topic
http://www.gamesas.com/topic/1349649-dynamically-attaching-scripts-to-actors-near-the-player/
Which I hoped I could use for err doors...So after a bit of tweaking...It worked!
The idea is based in a self spell that starts a quest with a reference alias that looks for player's nearest door and then checks if it's open or not.
All the looking for the nearest door or container is done by the Reference Alias itself.
Spoiler
scriptName ShanaOpenSelfQuestEffectScript extends ActiveMagicEffect{Finds nearest door and opens it if it is closed}ShanaOpenSpellQuestScript Property QuestRef AutoQuest Property ShanaOpenSpellQuest Auto;==================; VARIABLES /=============/ObjectReference closestDoor;==================; EVENTS /=============/Event OnInit() ShanaOpenSpellQuest.Start()EndEventEvent OnEffectStart(Actor Target, Actor Caster) closestDoor = QuestRef.ShanaDoorToOpen.GetReference() if ( closestDoor == None) Debug.Notification("There is no lock near!") else if( closestDoor.isLocked() ) Debug.Notification("Opening lock") closestDoor.Lock(false) else Debug.Notification("The lock is already open") endif endifEndEventEvent OnEffectFinish(Actor Target, Actor Caster) ShanaOpenSpellQuest.Stop()EndEventAnd you can see how the reference alias is defined http://i41.tinypic.com/65sawi.jpg
Quest script:
Spoiler
Scriptname ShanaOpenSpellQuestScript extends QuestReferenceAlias Property ShanaDoorToOpen Auto
Hope it helps

Whenever I feel like it, I'd like to add an explosion placed object to a ranged spell saved in another reference alias to have an ranged open spell, but since I already know it's possible, it's not as interesting lol
The get disabled condition was added to be able to use http://www.creationkit.com/GetLOS condition function, which I thought it would be needed, but setting getDistance to 100 in the Alias conditions seems to work ok
