//Put this script OnOpen
void main()
{

object oPC = GetLastOpenedBy();

if (!GetIsPC(oPC)) return;

object oTarget;
oTarget = GetObjectByTag("herodoor24");

DelayCommand(2.0, AssignCommand(oTarget, ActionCloseDoor(oTarget)));

DelayCommand(2.0, SetLocked(oTarget, TRUE));

}