PoA_PRC8/_module/nss/hunefer_shutdoor.nss
Jaysyn904 dc236b3073 Added more creature model overrides
Added more creature model overrides.  Added another "boss" creature to the Labyrinth.  Tweaked several other creatures.  Full compile.  Updated release archive.
2024-04-07 18:07:07 -04:00

29 lines
793 B
Plaintext

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);
}