// creator  : weidu.exe (version 23100)
// argument : _ELMINS4.DLG
// game		 : .
// source	 : ./override/_ELMINS4.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~_ELMINS4~

IF ~NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #78529 /* ~<CHARNAME>! Stop this madness, child, I beg of thee! Thou hast soaked these halls with the blood of innocents and I cannot permit it to go further.~ */
  IF ~~ THEN REPLY #78530 /* ~Stay back! Stay where you are! The one with you wears the face of my stepfather and I know him for dead!~ */ EXTERN ~_GORION3~ 0
  IF ~~ THEN REPLY #78533 /* ~Reveal your true nature, doppelganger! You are no more an Elminster than I'm Drizzt the Drow!~ */ GOTO 2
  IF ~~ THEN REPLY #78534 /* ~Explain yourself! And if I see anything move besides your lips, I'll kill you where you stand or die trying!~ */ GOTO 3
  IF ~Global("X#JaDoppelgangEl","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#JaDoppelgangEl","GLOBAL",1)~ EXTERN ~_JAHEIJ~ 93
END

IF ~~ THEN BEGIN 1 // from:
  SAY #78535 /* ~Please, child, sheathe those weapons and sheathe thy madness, too. Come with us and we shall see thee, at last, to safety.~ */
  IF ~~ THEN REPLY #78536 /* ~Yes, Elminster. Guide me from this place of horror that I might spend a gentler moment at the side of my stepfather.~ */ GOTO 4
  IF ~~ THEN REPLY #78537 /* ~I know you, mirrorkin, and you be no more an Elminster than I'm Drizzt the Drow!~ */ GOTO 2
  IF ~~ THEN REPLY #78538 /* ~You said that these walls were soaked with innocent blood. Then who was it that chased me down these wretched halls, calling my name in voices I once knew, only to close and attack in trait'rous form?~ */ EXTERN ~_GORION3~ 1
END

IF ~~ THEN BEGIN 2 // from: 1.1 0.1
  SAY #78539 /* ~And Drizzt thou art not, thank goodness. As for this old rag-tag physique, thinkest thou that I would let anyone duplicate it without express permission? I have it copyrighted, thou must know... Come, poor soul, let us leave this darkness behind and struggle towards the light. The three of us shall guide thee.~ */
  IF ~~ THEN REPLY #78540 /* ~Alright, Elminster. You have earned my trust and I shall follow you from this place.~ */ GOTO 4
  IF ~~ THEN REPLY #78541 /* ~Wipe such words of light from your spittled teeth, creature of darkness! I shall kill you in all your treacherous forms!!!~ */ GOTO 5
  IF ~~ THEN REPLY #78542 /* ~What about the one that wears the face of my stepfather like a mask? I know him for dead and only a mirrorkin would haunt me so!~ */ EXTERN ~_GORION3~ 0
  IF ~~ THEN REPLY #78543 /* ~What is going on here? I can't trust any one of you until I have some answers!~ */ EXTERN ~_GORION3~ 1
END

IF ~~ THEN BEGIN 3 // from: 0.2
  SAY #78544 /* ~I am a doddering and elderly fool for having let it come to this! There stood I, Elminster the Arrogant, nudging and prodding but never taking action... The most powerful mage in the Realms reduced to a meager puppeteer... Listen close, <CHARNAME>: With the help of doppelgangers and some powerful magics, Sarevok has encased thee within a vast and frightening illusion. I was unsure whether I could even penetrate it to reach thee. The time has come for a leap of faith, child. Thou must fling aside this foul illusion and let us lead thee back to reality where Sarevok is fightable.~ */
  IF ~~ THEN REPLY #78545 /* ~I dream only of a warm bed and some light to wake me from this nightmare. I shall follow you, Elminster, and trust you fully.~ */ GOTO 4
  IF ~~ THEN REPLY #78546 /* ~If this is madness then leave me to it! If you flee now, I shall not attempt to kill you!~ */ GOTO 5
  IF ~Global("X#ELMINS4","GLOBAL",0)
InParty("ajantis")
InMyArea("ajantis")
!StateCheck("ajantis",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#ELMINS4","GLOBAL",1)~ EXTERN ~_AJANTJ~ 263
  IF ~Global("X#ELMINS4","GLOBAL",0)
InParty("ajantis")
InMyArea("ajantis")
!StateCheck("ajantis",CD_STATE_NOTVALID)
InParty("minsc")
InMyArea("minsc")
!StateCheck("minsc",CD_STATE_NOTVALID)
InParty("edwin")
InMyArea("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#ELMINS4","GLOBAL",1)~ EXTERN ~_AJANTJ~ 264
  IF ~Global("X#ELMINS4","GLOBAL",0)
InParty("minsc")
InMyArea("minsc")
!StateCheck("minsc",CD_STATE_NOTVALID)
InParty("edwin")
InMyArea("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#ELMINS4","GLOBAL",1)~ EXTERN ~_EDWINJ~ 173
  IF ~Global("X#ELMINS4","GLOBAL",0)
InParty("minsc")
InMyArea("minsc")
!StateCheck("minsc",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#ELMINS4","GLOBAL",1)~ EXTERN ~_MINSCJ~ 174
END

IF ~~ THEN BEGIN 4 // from: 3.0 2.0 1.0 _EDWINJ:174.0 _EDWINJ:173.0 _AJANTJ:269.0 _AJANTJ:268.0 _AJANTJ:267.0 _AJANTJ:266.0 _AJANTJ:265.0 _AJANTJ:264.0 _AJANTJ:263.0
  SAY #78547 /* ~Stay close, then, <CHARNAME> and do not stray too far from me, for monsters, imagined and real, still lurk behind each corner. I will give thee further instructions when the time comes.~ */
  IF ~~ THEN DO ~SetGlobal("MACDoppelMoveCK","GLOBAL",1)
DialogueInterrupt(FALSE)
ActionOverride("gorion3",MoveToPoint([1368.532]))
ActionOverride("tethto3",MoveToPoint([1293.682]))
MoveToPoint([1322.618])
DialogueInterrupt(TRUE)
SetGlobal("MACDoppelMoveCK","GLOBAL",2)
~ EXIT
END

IF ~~ THEN BEGIN 5 // from: 3.1 2.1 _EDWINJ:174.1 _EDWINJ:173.1 _AJANTJ:269.1 _AJANTJ:268.1 _AJANTJ:267.1 _AJANTJ:266.1 _AJANTJ:265.1 _AJANTJ:264.1 _AJANTJ:263.1
  SAY #78548 /* ~Thsss, then, fleshling! Go mad, if you will, and feel the rasp of our claws against your mind!~ */
  IF ~~ THEN DO ~SetGlobal("MACDoppelMoveCK","GLOBAL",5)
~ EXIT
END

IF ~Global("MACDoppelMoveCK","GLOBAL",4)
~ THEN BEGIN 6 // from:
  SAY #78549 /* ~Calm yourself, <CHARNAME>, and hold firm. This fragile bubble of reality about us weakens! Curses! Whate'er thou doest, do not resist them. They are merely phantasmal illusions and can do no true harm!~ */
  IF ~~ THEN DO ~SetGlobal("MACDoppelMoveCK","GLOBAL",5)
~ EXIT
END

IF ~Global("MACDoppelMoveCK","GLOBAL",2)
~ THEN BEGIN 7 // from:
  SAY #78550 /* ~Stay close, I say, lest thou fall prey once more to thy delusions. We are almost there.~ */
  IF ~~ THEN DO ~SetGlobal("MACDoppelMoveCK","GLOBAL",3)
DialogueInterrupt(FALSE)
ActionOverride("gorion3",MoveToPoint([672.1039]))
ActionOverride("tethto3",MoveToPoint([610.1163]))
MoveToPoint([635.1106])
DialogueInterrupt(TRUE)
SetGlobal("MACDoppelMoveCK","GLOBAL",4)
~ EXIT
END
