enderalse/source/scripts/_00e_dothulgradpuzzle1script.psc

73 lines
1.5 KiB
Plaintext
Raw Normal View History

ScriptName _00E_DothulgradPuzzle1Script Extends ObjectReference
;written by Julian "Sagantor"
;A short, doorblocking puzzle script in which the player
;has to bring some words in a correct order
;Script can only be fired multiple times
Message Property puzzleBox Auto
ObjectReference Property stairwell Auto
{points to a lever who activates the stairwell}
int counter = 0
Event OnActivate(ObjectReference ref)
if(ref == Game.GetPlayer())
Menu()
EndIf
EndEvent
Function Menu(Bool Menu = True, Int buttonpressed = 0)
While Menu
If buttonpressed != -1
buttonpressed = puzzleBox.Show()
Menu = False
if buttonpressed == 0 ; Nar
If counter == 3
counter = 4
EndIf
Menu()
ElseIf buttonpressed == 1 ; keta
If counter == 2
counter = 3
EndIf
Menu()
ElseIf buttonpressed == 2 ; lo
If counter == 1
counter = 2
EndIf
Menu()
ElseIf buttonpressed == 3 ; mesta
If counter == 0
counter = 1
EndIf
Menu()
ElseIf buttonpressed == 4 ;Ra
If counter == 4
counter = 5
EndIf
Menu()
ElseIf buttonpressed == 5 ; ona
If counter == 5
counter = 6
EndIf
Menu()
ElseIf buttonpressed == 6 ; dur
If counter == 6
counter = 7
EndIf
Menu()
ElseIf buttonpressed == 7 ; surtaan
If counter == 7
counter = 8
Debug.Notification("Mechanismus gestartet")
stairwell.activate(Game.GetPlayer())
Else
Menu()
EndIf
ElseIf buttonpressed == 8 ; QUIT
counter = 0
EndIf
EndIf
EndWhile
EndFunction