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

BEGIN ~JAHEIR~

IF ~ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
NumTimesTalkedTo(0)
!Dead("Khalid")
~ THEN BEGIN 0 // from:
  SAY #294 /* ~Cure Blindness/Deafness~ */
  IF ~~ THEN DO ~SetGlobal("SpokeToKhalid","GLOBAL",1)
~ EXTERN ~KHALID~ 0
END

IF ~NumTimesTalkedTo(0)
!Dead("Khalid")
~ THEN BEGIN 1 // from:
  SAY #295 /* ~Short bows were the first to be developed, although they were not called such.  This is more of a default term that refers to anything which is not a long bow. This is a magical short-bow, giving the user an additional +1 to hit.

STATISTICS:

THAC0: +1 bonus
Weight: 2
Speed Factor: 5
Proficiency Type: Short Bow
Type:  2-handed
Requires: 3 Strength
Not Usable By:
 Druid
 Cleric
 Mage
 Monk
 Kensai
 Cavalier~ */
  IF ~~ THEN DO ~SetGlobal("SpokeToKhalid","GLOBAL",1)
~ EXTERN ~KHALID~ 0
END

IF ~~ THEN BEGIN 2 // from: KHALID:1.0
  SAY #296 /* ~Word Of Power~ */
  IF ~~ THEN EXTERN ~KHALID~ 4
END

IF ~~ THEN BEGIN 3 // from: KHALID:4.0 KHALID:0.0
  SAY #297 /* ~Finale~ */
  IF ~~ THEN EXTERN ~KHALID~ 2
END

IF ~~ THEN BEGIN 4 // from: KHALID:2.0
  SAY #298 /* ~***Placeholder for end movie***
~ */
  IF ~~ THEN EXTERN ~KHALID~ 3
END

IF ~~ THEN BEGIN 5 // from: KHALID:3.0
  SAY #299 /* ~Water flows down in a rush from some unknown source. There is an odd play of shadows deep within the pool.~ */
  IF ~~ THEN REPLY #312 /* ~What is happening? My magic... I... no...~ */ GOTO 6
  IF ~~ THEN REPLY #313 /* ~I do not want to die... please have mercy!~ */ GOTO 7
  IF ~InParty("Xzar")
InParty("Montaron")
~ THEN REPLY #314 /* ~Repulsion field~ */ GOTO 8
  IF ~!InParty("Xzar")
InParty("Montaron")
~ THEN REPLY #16713 /* ~As you wish, my Lady.  I hope my companionship will please you.~ */ GOTO 14
  IF ~InParty("Xzar")
!InParty("Montaron")
~ THEN REPLY #16714 /* ~I'm sorry to bother you.  I don't think I can afford this.~ */ GOTO 8
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #300 /* ~Five eyes surround this hellish door, as if part of the very stone itself. The eyes follow you as you move, and a palpable aura of evil emanates from them. They guard this door and if you wish to pass through, you must find some way of bypassing their guard.~ */
  IF ~~ THEN DO ~SetGlobalTimer("Jaheira","GLOBAL",FOUR_DAYS)
SetGlobalTimer("Khalid","GLOBAL",TWELVE_DAYS)
ActionOverride("Khalid",JoinParty())
JoinParty()
~ JOURNAL #3424 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 7 // from: 5.1
  SAY #301 /* ~With the tools you currently have, there is no way to close the eyes or open the door. The answer must be found elsewhere.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from: 5.4 5.2
  SAY #302 /* ~You take a Tear of Bhaal from your pack and place it in an eye. The eye closes and guards the door no longer.~ */
  IF ~~ THEN DO ~SetGlobalTimer("Jaheira","GLOBAL",FOUR_DAYS)
SetGlobalTimer("Khalid","GLOBAL",TWELVE_DAYS)
ActionOverride("Khalid",JoinParty())
JoinParty()
~ JOURNAL #3424 /* ~~ */ EXIT
END

IF ~Global("SpokeToKhalid","GLOBAL",1)
~ THEN BEGIN 9 // from:
  SAY #15439 /* ~Hah!  These fights are jolly good, aye?  Takes your mind off the Council's taxes and all, they do!~ */
  IF ~~ THEN DO ~~ EXIT
END

IF ~False()~ THEN BEGIN 10 // from:
  SAY #16093 /* ~I do not follow by a stranger's command. Who are you?~ */
  IF ~~ THEN DO ~~ EXIT
END

IF ~False()~ THEN BEGIN 11 // from:
  SAY #16094 /* ~Oh, you know me, as well as you should know yourself. We are one and the same, and I bear the pin that tells our name. Let your eyes not deceive you as you look upon this 'trinket.'~ */
  IF ~~ THEN DO ~~ EXIT
END

IF ~False()~ THEN BEGIN 12 // from:
  SAY #16095 /* ~I... Yes, I see. If you would give me a moment I will do what needs be done.~ */
  IF ~~ THEN DO ~~ EXIT
END

IF ~False()~ THEN BEGIN 13 // from:
  SAY #16096 /* ~Make your farewells quick, you will not be gone long.~ */
  IF ~~ THEN DO ~~ EXIT
END

IF ~~ THEN BEGIN 14 // from: 5.3
  SAY #16715 /* ~As the lady wishes, of course.  I have no objections.~ */
  IF ~~ THEN DO ~SetGlobalTimer("Jaheira","GLOBAL",FOUR_DAYS)
SetGlobalTimer("Khalid","GLOBAL",TWELVE_DAYS)
ActionOverride("Khalid",JoinParty())
JoinParty()
~ EXIT
END
