void main() { object oTarget; // Get the creature who triggered this event. object oPC = GetEnteringObject(); // Only fire for (real) PCs. if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) ) return; // Only fire once per PC. if ( GetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF)) ) return; SetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE); // Close and lock "HUNEFER_DOOR". AssignCommand(oTarget, ActionCloseDoor(oTarget)); SetLocked(oTarget, TRUE); // Setting the requirement for a specific key to unlock "HUNEFER_DOOR". SetLockKeyRequired(oTarget); SetLockKeyTag(oTarget, "HUNEFER_KEY"); // Setting lock data for "HUNEFER_DOOR". SetLockLockable(oTarget, FALSE); SetLockUnlockDC(oTarget, 30); }