void main() { object oPC = GetEnteringObject(); object oDoor = GetNearestObject(OBJECT_TYPE_DOOR, OBJECT_SELF, 1); if (GetIsPC(oPC)) { SetLocked(oDoor, 0); ActionOpenDoor(oDoor); } }