Begin anon_DoorLockScript; Local script attached to door (ID).; Re-locks the door after the player passes through it.If ( CellChanged == 1 ) Lock 50endifEnd anon_DoorLockScript
Begin Relocking_doorShort KeyUsedIf ( CellChanged == 1 ) Lock 20 Set KeyUsed to 0EndifIf ( OnActivate == 1 ) Activate If ( GetLocked == 0 ) Set KeyUsed to 1 EndifElseif ( KeyUsed == 0 ) If ( GetLocked == 0 ) Messagebox "The door has a magical lock and can only be unlocked by the correct key." Lock 20 EndifEndifEnd
Begin Relocking_doorShort KeyUsedIf ( CellChanged == 1 ) Lock 20 Set KeyUsed to 0EndifIf [ GetJournalIndex "CT_Access" < 1 ] Messagebox "Only the correct key will open this door." ReturnEndifIf ( onactivate == 1 ) Activate If ( GetLocked == 0 ) Set KeyUsed to 1 EndifElseif ( KeyUsed == 0 ) If ( GetLocked == 0 ) Messagebox "The door has a magical lock and can only be unlocked by the correct key." Lock 20 EndifEndifEnd
Begin CT_Passkey;Based on an original script by ToccattaShort KeyUsedShort CheckaccessIf ( CellChanged == 1 ) Lock 20 Set KeyUsed to 0 Set Checkaccess to 0EndifIf ( Checkaccess==0 ) ReturnEndifIf ( onactivate == 1 ) Set Checkaccess to 1Endif[If ( Checkaccess==1 ) If [ GetJournalIndex "CT_Access" < 1 ] If ( GetLocked == 1 ) Messagebox "Dunhaven staff and approved visitors only." Set Checkaccess to 0 Endif Endif[Elseif ( GetLocked == 0 ) ; Prevents forced entry Messagebox "This door resists your attempts to open it." Lock 20 Set Checkaccess to 0EndifIf [ GetJournalIndex "CT_Access" >= 1 ] Activate If ( GetLocked == 0 ) Set KeyUsed to 1 Set Checkaccess to 0 EndifElseif ( KeyUsed == 0 ) If ( GetLocked == 0 ) Messagebox "This door resists your attempts to open it without the correct key." Lock 20 Set Checkaccess to 0 EndifEndifEnd
Begin CT_Passkey;Based on an original script by ToccattaShort KeyUsedIf ( CellChanged == 1 ) Lock 20 Set KeyUsed to 0 EndifIf ( OnActivate == 1 ) If ( GetJournalIndex "CT_Access" >= 1 ) ActivateElse Messagebox "Authorized access only." Playsound3d "Door Latched Two Open" If ( GetLocked == 0 ) Set KeyUsed to 1 Endif EndifElseif ( KeyUsed == 0 ) If ( GetLocked == 0 ) Messagebox "This door resists your attempts to open it without the correct key." Lock 20 Endif Endif End
Begin CT_Passkey ;Based on an original script by Toccatta Short KeyUsed If ( CellChanged == 1 ) Lock 20 Set KeyUsed to 0 Endif If ( OnActivate == 1 ) If ( GetJournalIndex "CT_Access" >= 1 ) Activate Else Messagebox "Authorized access only." Playsound3d "Door Latched Two Open" If ( GetLocked == 0 ) Set KeyUsed to 1 Endif Endif Elseif ( KeyUsed == 0 ) If ( GetLocked == 0 ) Messagebox "The door groans and squeaks as you attempt to open it. You stop pushing for fear of breaking the door. You need to find the right key!" "Ok" Lock 20 Endif Endif End