Scriptname _00E_FS_ChestOpenPassphrase extends ObjectReference  

Event OnInit()

	Self.BlockActivation(True)

EndEvent

Event OnActivate(ObjectReference akActionRef)

	if Self.IsActivationBlocked()

		if CheckForPassphrase()
			Self.Lock(False)
			Self.BlockActivation(False)
			Self.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