void main() { object oPC = GetLastClosedBy(); if (GetItemPossessedBy(oPC, "stash_key3")!=OBJECT_INVALID) { SetLocked(OBJECT_SELF, TRUE); } }