39 lines
783 B
Plaintext
39 lines
783 B
Plaintext
Scriptname _00E_FS_ChestOpenPassphrase extends ObjectReference
|
|
|
|
Event OnInit()
|
|
|
|
BlockActivation(True)
|
|
Lock(100)
|
|
|
|
EndEvent
|
|
|
|
Event OnActivate(ObjectReference akActionRef)
|
|
|
|
if Self.IsActivationBlocked()
|
|
if ! EnderalFunctions.TextInputEnabled() || ! IsLocked()
|
|
Activate(akActionRef, true)
|
|
elseif CheckForPassphrase()
|
|
Lock(False)
|
|
BlockActivation(False)
|
|
Activate(akActionRef)
|
|
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
|
|
|
|
Message Property _00E_MQ07a_sRChainNothingHappens Auto
|