Changed folder name.
Changed folder name.
This commit is contained in:
27
_module/nss/auto_door_key.nss
Normal file
27
_module/nss/auto_door_key.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
//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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user