Try this:
;Artificial Intelligence Script created by Ched80
;Header
desc = Door Randomly Opens and Closes
;Triggers
:state=0:etimerstart,state=1
:state=1,random=1:state=5
:state=1,random=1:state=6
:state=1,random=1:state=7
:state=1,random=1:state=8
:state=5,etimergreater=500:state=10
:state=6,etimergreater=1000:state=10
:state=7,etimergreater=2000:state=10
:state=8,etimergreater=4000:state=10
;Door opens
:state=10:state=11,setframe=0,sound=$0
:state=11:incframe=0
:state=11,frameatend=0:state=20,coloff
:state=20:etimerstart,state=21
:state=21,random=1:state=25
:state=21,random=1:state=26
:state=21,random=1:state=27
:state=21,random=1:state=28
:state=25,etimergreater=500:state=30
:state=26,etimergreater=1000:state=30
:state=27,etimergreater=2000:state=30
:state=28,etimergreater=4000:state=30
;Door closes
:state=30:state=33,sound=$1,colon
:state=33:decframe=0
:state=33,frameatstart=0:state=0,setframe=0
;End of Script
Hope it helps.
[url="http://raptr.com/No_Turn_Right?src=em_forum"]
[/url]