// creator  : weidu.exe (version 23600)
// argument : X#BEADOR.DLG
// game     : .
// source   : ./override/X#BEADOR.DLG
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

BEGIN ~X#BEADOR~

IF ~  Global("X#BeadorStarts","GLOBAL",1)
~ THEN BEGIN 0 // from:
  SAY #49591 /* ~Strangers... get away from here... to the tree house. Maretha... rescue her... don't bother with me...~ */
  IF ~~ THEN DO ~SetGlobal("X#BeadorStarts","GLOBAL",2)
~ EXTERN ~JAHEIJ~ 208
END

IF ~  Global("X#JaheiraQuestFaldorn","GLOBAL",1)
~ THEN BEGIN 1 // from:
  SAY #49591 /* ~Strangers... get away from here... to the tree house. Maretha... rescue her... don't bother with me...~ */
  IF ~~ THEN DO ~SetGlobal("X#JaheiraQuestFaldorn","GLOBAL",2)
~ EXTERN ~JAHEIJ~ 209
END

IF ~  GlobalGT("X#JaheiraQuest","GLOBAL",2)
GlobalLT("X#JaheiraQuest","GLOBAL",6)
GlobalGT("X#JaheiraHealsB","GLOBAL",4)
~ THEN BEGIN 2 // from:
  SAY #49592 /* ~Please, help Maretha! She is in danger...~ */
  IF ~~ THEN EXIT
END

IF ~  GlobalGT("X#JaheiraQuest","GLOBAL",5)
Global("X#MarethaResBeadAlive","GLOBAL",2)
~ THEN BEGIN 3 // from:
  SAY #49593 /* ~I am so glad Maretha is safe now. I have stayed here on the off chance that I can tell you in person how grateful I am for your assistance.~ */
  IF ~~ THEN DO ~SetGlobal("X#MarethaResBeadAlive","GLOBAL",3)
AddexperienceParty(100)
EscapeArea()
~ EXIT
END

IF ~  Global("X#JaheiraHealsB","GLOBAL",4)
~ THEN BEGIN 4 // from:
  SAY #49620 /* ~Jaheira? *cough* Jaheira, is that you? I thought I would never see your face again, after... after you left... *cough*~ */
  IF ~~ THEN EXTERN ~JAHEIJ~ 217
END

IF ~~ THEN BEGIN 5 // from:
  SAY #49622 /* ~You... you have not changed at all over these years, Jaheira. How've you been doing all this time?~ */
  IF ~  InParty("khalid")
InMyArea("khalid")
!StateCheck("khalid",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#JaheiraHealsB","GLOBAL",5)
~ EXTERN ~KHALIJ~ 40
  IF ~  OR(2)
!InParty("khalid")
Dead("khalid")
~ THEN DO ~SetGlobal("X#JaheiraHealsB","GLOBAL",5)
~ EXTERN ~JAHEIJ~ 220
END

IF ~~ THEN BEGIN 6 // from:
  SAY #49624 /* ~Ah... and my greetings to you, Khalid, as well. *cough* It appears that my question has been answered, then.~ */
  IF ~~ THEN DO ~SetGlobal("X#JaheiraQuest","GLOBAL",3)
AddexperienceParty(500)
~ EXIT
  IF ~  InParty("khalid")
InMyArea("khalid")
!StateCheck("khalid",CD_STATE_NOTVALID)
~ THEN EXTERN ~JAHEIJ~ 219
  IF ~  InParty("khalid")
InMyArea("khalid")
!StateCheck("khalid",CD_STATE_NOTVALID)
~ THEN GOTO 7
  IF ~  InParty("khalid")
InMyArea("khalid")
!StateCheck("khalid",CD_STATE_NOTVALID)
~ THEN EXTERN ~JAHEIJ~ 218
END

IF ~~ THEN BEGIN 7 // from: 6.2
  SAY #49626 /* ~By Silvanus, praise you and Seniyad both! Please, Jaheira, you must free her... there is a bridge over the river nearby, cross it and go back south... find the tree house. She was... *cough*... just taken there, to be tortured by Andarthe, one of the Shadow Archdruids. Please, hurry!~ */
  IF ~~ THEN DO ~SetGlobal("X#JaheiraQuest","GLOBAL",3)
AddexperienceParty(500)
~ EXIT
  IF ~  InParty("khalid")
InMyArea("khalid")
!StateCheck("khalid",CD_STATE_NOTVALID)
~ THEN EXTERN ~JAHEIJ~ 219
END

IF ~~ THEN BEGIN 8 // from:
  SAY #49629 /* ~Jaheira? What about this moistness in your eyes, and the tremble in your voice? And why do I not see Khal-~ */
  IF ~~ THEN EXTERN ~JAHEIJ~ 221
END

IF ~~ THEN BEGIN 9 // from:
  SAY #49631 /* ~As you wish, Jaheira. There is a bridge over the river nearby, cross it and go back south... find the tree house. She was... *cough*... just taken there, to be tortured by Andarthe, one of the Shadow Archdruids. Please, hurry!~ */
  IF ~~ THEN EXTERN ~JAHEIJ~ 222
END
