Bemmu over at NWScript has created a tutorial for attaching a script to a lever that will open a door.
Tutorial level: very basic
The goal in this tutorial is to create a lever that will cause a door to open when pulled. Following along should be very easy and there will only be about three lines of nwscript (the scripting language in Neverwinter Nights 1 & 2) involved.
Head over to NWScript to check it out:
http://www.nwscript.com/making-a-lever-operated-door.php