//IMPORTANT, use the Save As button FIRST, before you Edit This Script! //Put this script OnClick or OnFailToOpen void main() { object oPC = GetClickingObject(); if (!GetIsPC(oPC)) return; if (GetItemPossessedBy(oPC, "keytag")!= OBJECT_INVALID) { SetLocked(OBJECT_SELF, FALSE); ActionOpenDoor(OBJECT_SELF); DelayCommand(5.0, ActionCloseDoor(OBJECT_SELF)); DelayCommand(5.0, SetLocked(OBJECT_SELF, TRUE)); } else { FloatingTextStringOnCreature("A specific key is needed to open this door.", oPC, TRUE); } }