If GetUserFlag(6,29)>0
	SetUserFlag(6,29,GetUserFlag(6,29)-1)
	Goto End
Endif

If GetUserFlag(5,29)<1
	SetUserFlag(0,29,0)
	Goto End
Endif

If #PARAM1=1
	OpenDoor(712,8,9)
Endif
If #PARAM1=2
	OpenDoor(712,13,9)
Endif
If #PARAM1=3
	OpenDoor(712,8,12)
Endif
If #PARAM1=4
	OpenDoor(712,13,12)
Endif

SetUserFlag(5,29,GetUserFlag(5,29)-1)
Timer(415,4000,#PARAM1,0,0)

Label End

Continue = 1