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