**Create the doors and link them to each other.

new: simp 2 2 1 "ds door" 11 23 0
attr 4
seta va00 targ
sets ov01 "chwp"
sets ov02 "0 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 0"
sets ov03 "excl"
mvto 223 881

new: simp 2 2 1 "ds door" 11 23 0
attr 4
seta va01 targ
sets ov01 "chwp"
sets ov02 "0 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 0"
sets ov03 "excl"
mvto 2161 2206

targ va00
seta ov00 va01
targ va01
seta ov00 va00


**Now for the scripts!
**ov00: Linked door.
**ov01: Sound effect.
**ov02: Animation.
**ov03: Error sound.
**Push script.
scrp 2 2 1 1
**Open.
	gsub open
*If it was opened by the Hand or the selected Norn, move the camera.
	doif from eq norn or from eq pntr
		targ ov00
		cmrp posx posy 1
		targ ownr
	endi
**If it was opened by something other than the Hand, try to move it.
	doif from ne pntr
		seta va00 from
		targ ov00
		gsub open
		setv va01 posx
		setv va02 posy
		targ from
**DON'T KNOW IF THIS ACTUALLY WORKS: Force it to be dropped by anything carrying it.
		mesg writ from 5
**If it's a creature, use MVFT.
		doif crea targ eq 1
			doif tmvf va01 va02 eq 1
				mvft va01 va02
			else
				snde ov03
			endi
		endi
**If it was opened by the Hand, grab all creatures touching it and try to move them.
	else
		etch 4 0 0
			doif tmvf va01 va02 eq 1
				mvft va01 va02
			endi
		next
	endi
	subr open
		anms ov02
		snde ov01
	retn
endm

rscr
enum 2 2 1
	kill targ
next