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

BEGIN ~GORCHR~

IF ~NumTimesTalkedTo(0)~ THEN BEGIN 0 // from:
  SAY #62622 /* ~More suicidal fanatics willing to die in the service of Helm, I see.  Or have you been forced into service, as I once was a millennium ago?~ [GORCHR07] */
  IF ~~ THEN REPLY #62623 /* ~I am not a follower of Helm, though I willingly serve him in this cause, foul creature!~ */ GOTO 1
  IF ~~ THEN REPLY #62624 /* ~I serve no one but myself.  I'm here looking out for my own interests.~ */ GOTO 1
  IF ~~ THEN REPLY #62625 /* ~Forced into service?  What are you talking about?~ */ GOTO 1
  IF ~~ THEN REPLY #62651 /* ~Are you the "Imprisoned One"?~ */ GOTO 12
END

IF ~~ THEN BEGIN 1 // from: 12.0 0.2 0.1 0.0
  SAY #62626 /* ~Hmmm... sounds like you have been tricked into doing Helm's dirty work.  Looks like we are both unwilling participants in this little drama.~ [GORCHR08] */
  IF ~~ THEN REPLY #62627 /* ~All lies!  Stand aside and let me descend to face the Imprisoned One!~ */ GOTO 2
  IF ~~ THEN REPLY #62628 /* ~Perhaps you could show me the way down to the next level and I'll see if I can get us both out of this mess.~ */ GOTO 2
  IF ~~ THEN REPLY #62629 /* ~Well, I never really trusted that Odren anyway.  What do you suggest we do?~ */ GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.2 1.1 1.0
  SAY #62630 /* ~Listen, friend.  We can help each other.  The fact of the matter is, you cannot get through the gate to the next level unless I open it for you.~ [GORCHR09] */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #62631 /* ~So I'm not going to let you through the gate unless you help me end the enchantment that has kept me bound in this infernal dungeon for the last thousand years!  Do we have a deal?~ [GORCHR10] */
  IF ~~ THEN REPLY #62632 /* ~What must be done?~ */ DO ~SetGlobal("zGorChrJob","GLOBAL",1)~ GOTO 6
  IF ~~ THEN REPLY #62633 /* ~I'll never deal with you, foul demon!~ */ DO ~SetGlobal("zGorChrJob","GLOBAL",1)~ GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 8.1 5.1 3.1
  SAY #62634 /* ~You are as stupid and stubborn as those fanatical Helmites who stumbled in here forty years ago!  Come back and talk to me when you are ready to see reason.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5 // from: 6.0
  SAY #62635 /* ~This cage I'm stuck in was fashioned over a thousand years ago by four arch-mages, who combined the power of four diverse elements to imprison me here for all eternity.~ */
  IF ~~ THEN REPLY #62640 /* ~How can I get you out?~ */ GOTO 7
  IF ~~ THEN REPLY #62641 /* ~Why should I care? You will not be freed by me.~ */ GOTO 4
END

IF ~Global("zGorChrJob","GLOBAL",1)
Global("ScepterKeys","GLOBAL",0)
~ THEN BEGIN 6 // from: 3.0
  SAY #62636 /* ~Glad you've decided to be reasonable.  The Helmites were never reasonable. It is so much easier to deal with one who isn't a fanatic.~ [GORCHR13] */
  IF ~~ THEN DO ~SetGlobalTimer("Shout","LOCALS",5)
~ GOTO 5
END

IF ~~ THEN BEGIN 7 // from: 5.0
  SAY #62642 /* ~The wizards who trapped me here each had a lab on this level of the dungeon, where they worked to fashion the enchantments of my cage.~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #62645 /* ~Each wizard created a scepter to focus and channel his power.  Only the combined power of the four scepters can lock or unlock my cage.~ */
  IF ~~ THEN REPLY #62646 /* ~I will find the scepters. What next?~ */ DO ~SetGlobal("zGorChrJob","GLOBAL",2)~ GOTO 9
  IF ~~ THEN REPLY #62647 /* ~You can stay in the cage and rot.~ */ GOTO 4
END

IF ~Global("ScepterKeys","GLOBAL",0)
Global("zGorChrJob","GLOBAL",2)
!PartyHasItem("PLOT03a")
!PartyHasItem("PLOT03b")
!PartyHasItem("PLOT03c")
!PartyHasItem("PLOT03d")
~ THEN BEGIN 9 // from: 8.0
  SAY #62648 /* ~Gather the scepter keys and place them in the four slots around the cage.  Once free I'll be on my way, and you can go through the gate and take on the Imprisoned One - if you still want to.~ [GORCHR11] */
  IF ~~ THEN DO ~SetGlobalTimer("Shout","LOCALS",5)
~ UNSOLVED_JOURNAL #63822 /* ~Gather the Four Scepter Keys

I have entered into a bargain with a chromatic demon, though I had little choice.  I need to gather the four scepter keys to unlock his elemental cage.  Only then will he give me access to the level below.~ */ EXIT
END

IF ~Global("ScepterKeys","GLOBAL",0)
Global("zGorChrJob","GLOBAL",2)
OR(4)
!PartyHasItem("PLOT03A")
!PartyHasItem("PLOT03B")
!PartyHasItem("PLOT03C")
!PartyHasItem("PLOT03D")
~ THEN BEGIN 10 // from:
  SAY #62649 /* ~Quickly, gather the rest of the scepters!  Once you have all four I can finally be free!~ [GORCHR12] */
  IF ~~ THEN DO ~SetGlobalTimer("Shout","LOCALS",5)
~ EXIT
END

IF ~Global("ScepterKeys","GLOBAL",1)~ THEN BEGIN 11 // from:
  SAY #62650 /* ~After a thousand wasted years, I'm finally free!  And now to spread some seriously bloody carnage to make up for lost time. Oh, where shall I start? Where shall I start? Oh... I think I'll start with you!~ [GORCHR14] */
  IF ~~ THEN DO ~TriggerActivation("Cage",FALSE)
EraseJournalEntry(63822)
EraseJournalEntry(70666)
EraseJournalEntry(71102)
AddXP2DA("PLOT5A")
DestroyItem("INVULNER")
DestroyItem("RIDRING")
TakeItemReplace("GORCHRAM","GORCHR",Myself)
CreateVisualEffectObject("SPFLESHS",Myself)
JumpToPoint([2070.1598])
SetHomeLocation([2070.1598])
CreateVisualEffect("SPFLESHS",[2070.1598])
Enemy()
~ SOLVED_JOURNAL #63823 /* ~Gather the Four Scepter Keys

As I feared, the chromatic demon attacked me as soon as I released it from its cage.  A high price to pay, but necessary if I wish to continue into the deeper depths of the dungeon.~ */ EXIT
END

IF ~~ THEN BEGIN 12 // from: 0.3
  SAY #62652 /* ~I am imprisoned, but I am not the "Imprisoned One."  Obviously you are not one of those fanatical Knights of the Vigil, or you would already know that.~ */
  IF ~~ THEN GOTO 1
END

IF ~Global("ScepterKeys","GLOBAL",0)
Global("zGorChrJob","GLOBAL",2)
PartyHasItem("PLOT03A")
PartyHasItem("PLOT03B")
PartyHasItem("PLOT03C")
PartyHasItem("PLOT03D")
~ THEN BEGIN 13 // from:
  SAY #70865 /* ~You have the four scepters!   Place them around the cage so I may be free!~ */
  IF ~~ THEN DO ~SetGlobalTimer("Shout","LOCALS",5)
~ EXIT
END
