2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_FS_ChestOpenPassphrase extends ObjectReference
|
|
|
|
|
|
|
|
Event OnInit()
|
|
|
|
|
2024-02-20 14:48:51 +00:00
|
|
|
BlockActivation(True)
|
|
|
|
Lock(100)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnActivate(ObjectReference akActionRef)
|
|
|
|
|
|
|
|
if Self.IsActivationBlocked()
|
2024-02-20 14:48:51 +00:00
|
|
|
if ! EnderalFunctions.TextInputEnabled() || ! IsLocked()
|
|
|
|
Activate(akActionRef, true)
|
|
|
|
elseif CheckForPassphrase()
|
|
|
|
Lock(False)
|
|
|
|
BlockActivation(False)
|
|
|
|
Activate(akActionRef)
|
2021-10-05 22:15:58 +00:00
|
|
|
else
|
|
|
|
_00E_MQ07a_sRChainNothingHappens.Show()
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
bool Function CheckForPassphrase()
|
|
|
|
|
|
|
|
String sRiddleInput = (((Self as ObjectReference) as FORM) as UILIB_1).ShowTextInput("$Say the password:")
|
|
|
|
|
|
|
|
if sRiddleInput == "KlopfKlopfKlopf"
|
|
|
|
Return True
|
|
|
|
Else
|
|
|
|
Return False
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
2024-02-20 14:48:51 +00:00
|
|
|
Message Property _00E_MQ07a_sRChainNothingHappens Auto
|