Ok i'm not 100% sure what your talking about but ill give it a go.
;Artificial Intelligence Script
;Header
desc = Pickup Item
;Triggers
:state=0,always:globalvar=50
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupanitem.tga,hudname=itemprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:state=1,playertake,coloff,incvar=1,plrsound=audiobank\misc\ping.wav,hudshow=itemprompt,hudfadeout=itemprompt
:state=1:rundecal=5
;End of Script
;Artificial Intelligence Script
;Header
desc = Auto Proximity Door (Open and Close)
;Triggers
:state=0,always:globalvar=50
:state=0,anywithin=75,varequal=5:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,anyfurther=100:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0
;End of Script
Ok now the first script goes on the artifacts the second goes on an animated door. In the second script the varequal=5 change the number 5 to the number of artifacts.