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

BEGIN ~FSGLOBE~
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #1 /* Triggers after states #: 1 even though they appear after this state */
~Global("TalkedToFSGlobe","AR3019",0)
~ THEN BEGIN 0 // from:
  SAY #63750 /* ~Built into the floor is a strange machine with four large colored buttons.  An inscription reads: 'Those who serve must be worthy in mind, heart and spirit.  Only the worthy may unlock the final seal.' A scroll lies beside the inscription.~ */
  IF ~~ THEN DO ~SetGlobal("TalkedToFSGlobe","AR3019",1)
~ GOTO 12
END

IF WEIGHT #0 ~Global("TalkedToFSGlobe","AR3019",1)
~ THEN BEGIN 1 // from: 16.0 6.0
  SAY #63751 /* ~In front of the machine are four colored containers which correspond to the colored buttons - one red, one blue, one green and one purple.  

What do you wish to do now?~ */
  IF ~~ THEN REPLY #63757 /* ~Push the red button.~ */ GOTO 2
  IF ~~ THEN REPLY #63758 /* ~Push the blue button.~ */ GOTO 3
  IF ~~ THEN REPLY #63759 /* ~Push the green button.~ */ GOTO 4
  IF ~~ THEN REPLY #63760 /* ~Push the purple button.~ */ GOTO 5
  IF ~~ THEN REPLY #63761 /* ~Leave the machine for now.~ */ GOTO 11
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #63752 /* ~Ready for almost anything, you press the red button.~ */
  IF ~Global("RedGlobe","GLOBAL",4)~ THEN GOTO 6
  IF ~Global("RedGlobe","GLOBAL",0)~ THEN DO ~SetGlobal("RedGlobe","GLOBAL",1)
GiveItemCreate("GLOBRED1",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 7
  IF ~Global("RedGlobe","GLOBAL",1)~ THEN DO ~SetGlobal("RedGlobe","GLOBAL",2)
GiveItemCreate("GLOBRED2",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 7
  IF ~Global("RedGlobe","GLOBAL",2)~ THEN DO ~SetGlobal("RedGlobe","GLOBAL",3)
GiveItemCreate("GLOBRED3",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 7
  IF ~Global("RedGlobe","GLOBAL",3)~ THEN DO ~SetGlobal("RedGlobe","GLOBAL",4)
GiveItemCreate("GLOBRED4",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 7
END

IF ~~ THEN BEGIN 3 // from: 1.1
  SAY #63753 /* ~With a deep breath of anticipation, you reach out and press the blue button.~ */
  IF ~Global("BlueGlobe","GLOBAL",4)~ THEN GOTO 6
  IF ~Global("BlueGlobe","GLOBAL",0)~ THEN DO ~SetGlobal("BlueGlobe","GLOBAL",1)
GiveItemCreate("GLOBBLU1",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 8
  IF ~Global("BlueGlobe","GLOBAL",1)~ THEN DO ~SetGlobal("BlueGlobe","GLOBAL",2)
GiveItemCreate("GLOBBLU2",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 8
  IF ~Global("BlueGlobe","GLOBAL",2)~ THEN DO ~SetGlobal("BlueGlobe","GLOBAL",3)
GiveItemCreate("GLOBBLU3",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 8
  IF ~Global("BlueGlobe","GLOBAL",3)~ THEN DO ~SetGlobal("BlueGlobe","GLOBAL",4)
GiveItemCreate("GLOBBLU4",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 8
END

IF ~~ THEN BEGIN 4 // from: 1.2
  SAY #63754 /* ~You press the green button in, praying you have made the right choice.~ */
  IF ~Global("GreenGlobe","GLOBAL",4)~ THEN GOTO 6
  IF ~Global("GreenGlobe","GLOBAL",0)~ THEN DO ~SetGlobal("GreenGlobe","GLOBAL",1)
GiveItemCreate("GLOBGRE1",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 9
  IF ~Global("GreenGlobe","GLOBAL",1)~ THEN DO ~SetGlobal("GreenGlobe","GLOBAL",2)
GiveItemCreate("GLOBGRE2",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 9
  IF ~Global("GreenGlobe","GLOBAL",2)~ THEN DO ~SetGlobal("GreenGlobe","GLOBAL",3)
GiveItemCreate("GLOBGRE3",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 9
  IF ~Global("GreenGlobe","GLOBAL",3)~ THEN DO ~SetGlobal("GreenGlobe","GLOBAL",4)
GiveItemCreate("GLOBGRE4",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 9
END

IF ~~ THEN BEGIN 5 // from: 1.3
  SAY #63755 /* ~Hoping for the best, you press the purple button.~ */
  IF ~Global("PurpleGlobe","GLOBAL",4)~ THEN GOTO 6
  IF ~Global("PurpleGlobe","GLOBAL",0)~ THEN DO ~SetGlobal("PurpleGlobe","GLOBAL",1)
GiveItemCreate("GLOBPUR1",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 10
  IF ~Global("PurpleGlobe","GLOBAL",1)~ THEN DO ~SetGlobal("PurpleGlobe","GLOBAL",2)
GiveItemCreate("GLOBPUR2",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 10
  IF ~Global("PurpleGlobe","GLOBAL",2)~ THEN DO ~SetGlobal("PurpleGlobe","GLOBAL",3)
GiveItemCreate("GLOBPUR3",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 10
  IF ~Global("PurpleGlobe","GLOBAL",3)~ THEN DO ~SetGlobal("PurpleGlobe","GLOBAL",4)
GiveItemCreate("GLOBPUR4",LastTalkedToBy,1,0,0)
PlaySound("am3019g")
~ GOTO 10
END

IF ~~ THEN BEGIN 6 // from: 5.0 4.0 3.0 2.0
  SAY #63756 /* ~This time nothing happens when you press the button.~ */
  IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 7 // from: 2.4 2.3 2.2 2.1
  SAY #63762 /* ~The machine clicks and whirs, and produces a red globe which you pick up.  Suddenly, you hear strange sounds almost beyond your range of hearing.  The sounds rapidly get louder as something approaches.~ */
  IF ~~ THEN DO ~AddXP2DA("PLOT7A")
DestroySelf()
~ EXIT
END

IF ~~ THEN BEGIN 8 // from: 3.4 3.3 3.2 3.1
  SAY #63763 /* ~The machine clicks and whirs, and produces a blue globe which you pick up.  Suddenly, you hear strange sounds almost beyond your range of hearing.  The sounds rapidly get louder as something approaches.~ */
  IF ~~ THEN DO ~AddXP2DA("PLOT7A")
DestroySelf()
~ EXIT
END

IF ~~ THEN BEGIN 9 // from: 4.4 4.3 4.2 4.1
  SAY #63764 /* ~The machine clicks and whirs, and produces a green globe which you pick up.  Suddenly, you hear strange sounds almost beyond your range of hearing.  The sounds rapidly get louder as something approaches.~ */
  IF ~~ THEN DO ~AddXP2DA("PLOT7A")
DestroySelf()
~ EXIT
END

IF ~~ THEN BEGIN 10 // from: 5.4 5.3 5.2 5.1
  SAY #63765 /* ~The machine clicks and whirs, and produces a purple globe which you pick up.  Suddenly, you hear strange sounds almost beyond your range of hearing.  The sounds rapidly get louder as something approaches.~ */
  IF ~~ THEN DO ~AddXP2DA("PLOT7A")
DestroySelf()
~ EXIT
END

IF ~~ THEN BEGIN 11 // from: 1.4
  SAY #63766 /* ~You leave the machine for the time being, even though you suspect that the path to the next level is somehow connected to the strange colored containers.~ */
  IF ~~ THEN DO ~DestroySelf()
~ EXIT
END

IF ~~ THEN BEGIN 12 // from: 0.0
  SAY #63826 /* ~The scroll seems to have been written by a scholar who was researching the machine's purpose. You skim down to the conclusion:~ */
  IF ~~ THEN UNSOLVED_JOURNAL #63827 /* ~Unlocking the Final Seal

I will have to prove myself worthy in mind, heart and spirit before I can unlock the Final Seal which guards the stairs to the next level of the dungeon.~ */ GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #70889 /* ~"It would seem that the purpose of this machine is to dispense glass globes of four colors. The globes have two purposes. Firstly, some of the globes contain magical liquids which can be used as potions of varying degrees of power.~ */
  IF ~~ THEN GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.0
  SAY #70911 /* ~Other globes have no practical use and are probably meant to be placed in the containers that match their color.~ */
  IF ~~ THEN GOTO 15
END

IF ~~ THEN BEGIN 15 // from: 14.0
  SAY #71002 /* ~The intelligent thing to do would be to get all of the globes that one can and then place the ones that are of no use into the colored containers to obtain the prize. The globes that cannot be used are always the last ones dispensed.~ */
  IF ~~ THEN GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #71003 /* ~The problem is, every time a globe is dispensed something nasty..."

 The note trails off. It appears to be splattered with old blood.~ */
  IF ~~ THEN GOTO 1
END
