// creator  : weidu.exe (version 23100)
// argument : GORALT1.DLG
// game		 : .
// source	 : ./DATA/25DIALOG.BIF
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~GORALT1~

IF ~NumTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #62386 /* ~The artifacts now in place, the altar shimmers and glows as you approach.  The very stones beneath your feet tremble with caged power.  The Ritual has begun.

What do you do next?
~ */
  IF ~~ THEN REPLY #62387 /* ~Open the book.~ */ GOTO 7
  IF ~~ THEN REPLY #62390 /* ~Light the candle.~ */ GOTO 7
  IF ~~ THEN REPLY #62392 /* ~Ring the bell.~ */ GOTO 1
  IF ~~ THEN REPLY #62393 /* ~Leave the altar for now.~ */ GOTO 8
END

IF ~~ THEN BEGIN 1 // from: 0.2
  SAY #62394 /* ~The bell chimes once, and the glow of the altar pulsates in response.

What do you do next?~ */
  IF ~~ THEN REPLY #62415 /* ~Open the book.~ */ GOTO 7
  IF ~~ THEN REPLY #62417 /* ~Light the candle.~ */ GOTO 7
  IF ~~ THEN REPLY #62418 /* ~Ring the bell.~ */ GOTO 2
  IF ~~ THEN REPLY #62435 /* ~Leave the altar for now.~ */ GOTO 8
END

IF ~~ THEN BEGIN 2 // from: 1.2
  SAY #62398 /* ~The bell chimes a second time, and the temple shudders as the magic gathers.

What do you do next?~ */
  IF ~~ THEN REPLY #62440 /* ~Open the book.~ */ GOTO 7
  IF ~~ THEN REPLY #62442 /* ~Light the candle.~ */ GOTO 3
  IF ~~ THEN REPLY #62443 /* ~Ring the bell.~ */ GOTO 7
  IF ~~ THEN REPLY #62444 /* ~Leave the altar for now.~ */ GOTO 8
END

IF ~~ THEN BEGIN 3 // from: 2.1
  SAY #62400 /* ~The tiny blue flame of the candle burns with an unnatural intensity.

What do you do next?~ */
  IF ~Global("CribNote","GLOBAL",0)~ THEN REPLY #62448 /* ~Open the book.~ */ GOTO 4
  IF ~Global("CribNote","GLOBAL",1)~ THEN REPLY #62462 /* ~Open the book.~ */ GOTO 5
  IF ~~ THEN REPLY #62451 /* ~Light the candle.~ */ GOTO 7
  IF ~~ THEN REPLY #62452 /* ~Ring the bell.~ */ GOTO 7
  IF ~~ THEN REPLY #62453 /* ~Leave the altar for now.~ */ GOTO 8
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #62403 /* ~You lay the book face up on the altar, but it slams itself shut.  You realize you cannot continue the ritual until you somehow discover the proper page to which you must open the book.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #63816 /* ~Open the Portal to the Temple's Lower Levels

Before I can complete the Ritual which will open the passage to the next level, I must somehow learn the proper chapter and verse which must be read from the Ritual Book.~ */ GOTO 8
END

IF ~~ THEN BEGIN 5 // from: 3.1
  SAY #62404 /* ~You lay the book on the altar, open to the chapter and verse that were woven into the sleeve of the old Priest's cloak, and recite the passage.  

What do you do next?~ */
  IF ~~ THEN REPLY #62456 /* ~Open the book.~ */ GOTO 7
  IF ~~ THEN REPLY #62458 /* ~Light the candle.~ */ GOTO 7
  IF ~~ THEN REPLY #62459 /* ~Ring the bell.~ */ GOTO 6
  IF ~~ THEN REPLY #62460 /* ~Leave the altar for now.~ */ GOTO 8
END

IF ~~ THEN BEGIN 6 // from: 5.2
  SAY #62407 /* ~You ring the bell a third time. Behind you, the mirrored portal begins to glow.  The gate to the lower levels is now open.~ */
  IF ~~ THEN DO ~EraseJournalEntry(63813)
EraseJournalEntry(63815)
EraseJournalEntry(63816)
EraseJournalEntry(71159)
SetGlobal("PortalOpen","AR3001",1)
AmbientActivate("AMB_Portal",TRUE)
SoundActivate("SndExitPortal",TRUE)
AddXP2DA("PLOT4A")
DestroySelf()
~ SOLVED_JOURNAL #63819 /* ~Open the Portal to the Temple's Lower Levels

Successfully performing the ritual activated the mirror portal in the center of the temple.  I can now descend at my own convenience.~ */ EXIT
END

IF ~~ THEN BEGIN 7 // from: 5.1 5.0 3.3 3.2 2.2 2.0 1.1 1.0 0.1 0.0
  SAY #62408 /* ~A voice echoes throughout the chamber:

"THE RITUAL HAS BEEN DEFILED!"

~ */
  IF ~~ THEN DO ~ApplyDamage(LastTalkedToBy,50,MAGIC)
SetGlobal("ReturnRitualItems","AR3001",1)
SetGlobal("SpawnGorAlt1","AR3001",0)
DestroySelf()
~ EXIT
END

IF ~~ THEN BEGIN 8 // from: 5.3 4.0 3.4 2.3 1.3 0.3
  SAY #62411 /* ~You replace the ritual items in your pack and leave the altar for the time being.  When you return you will have to perform the ritual from the beginning again.~ */
  IF ~~ THEN DO ~SetGlobal("ReturnRitualItems","AR3001",1)
SetGlobal("SpawnGorAlt1","AR3001",0)
DestroySelf()
~ EXIT
END
