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

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

IF ~~ THEN BEGIN 0 // from: IDRYAD2:0.0
  SAY #11019 /* ~Free us!~ */
  IF ~~ THEN REPLY #11029 /* ~Slow down! Who are you and what is going on here?~ */ EXTERN ~IDRYAD1~ 1
  IF ~~ THEN REPLY #11030 /* ~I shall neither help nor free you.~ */ EXTERN ~IDRYAD1~ 2
  IF ~~ THEN REPLY #11031 /* ~You must excuse me, ladies. I have no time to speak with you.~ */ EXTERN ~IDRYAD1~ 3
END

IF ~~ THEN BEGIN 1 // from: IDRYAD2:1.0
  SAY #11088 /* ~His concubines. Please help us to escape!~ */
  IF ~~ THEN REPLY #11374 /* ~I shall neither help nor free you.~ */ EXTERN ~IDRYAD1~ 2
  IF ~~ THEN REPLY #11375 /* ~You must excuse me, ladies. I have no time to speak with you.~ */ EXTERN ~IDRYAD1~ 3
  IF ~~ THEN REPLY #11376 /* ~How can I help you?~ */ EXTERN ~IDRYAD1~ 4
END

IF ~~ THEN BEGIN 2 // from: IDRYAD2:15.0 IDRYAD2:2.3 IDRYAD1:3.3
  SAY #11136 /* ~He has kidnapped us and kept us here for more time than I can count.~ */
  IF ~~ THEN REPLY #11143 /* ~How can I help you?~ */ EXTERN ~IDRYAD1~ 4
  IF ~InParty("Minsc")
!IsGabber("Minsc")
!Dead("Minsc")
!StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11157 /* ~Still, I care not. Goodbye.~ */ GOTO 5
  IF ~OR(4)
!InParty("Minsc")
IsGabber("Minsc")
Dead("Minsc")
StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11171 /* ~You must excuse me, ladies. I have no time to speak with you.~ */ GOTO 4
END

IF ~~ THEN BEGIN 3 // from: IDRYAD2:16.0 IDRYAD2:3.3
  SAY #11196 /* ~You can foil his plans for us at least. If you take the acorns to the Fairy Queen then she can regrow our trees and free us!~ */
  IF ~~ THEN REPLY #11211 /* ~I will be happy to help you.~ */ EXTERN ~IDRYAD1~ 6
  IF ~Global("HelpDjinni","GLOBAL",1)
~ THEN REPLY #11212 /* ~I will help you if you help me. I am looking for a flask in order to free a djinni who is trapped in the Plane of Air. Have you seen one?~ */ EXTERN ~IDRYAD2~ 8
  IF ~InParty("Minsc")
!IsGabber("Minsc")
!Dead("Minsc")
!StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11213 /* ~I refuse to help you.~ */ GOTO 5
  IF ~~ THEN REPLY #11217 /* ~Why do you not simply leave? You do not seem to be chained or caged as I was.~ */ EXTERN ~IDRYAD1~ 5
  IF ~OR(4)
!InParty("Minsc")
IsGabber("Minsc")
Dead("Minsc")
StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11250 /* ~I regret that I cannot help you.~ */ GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 14.2 11.3 6.3 3.4 2.2 IDRYAD2:9.3 IDRYAD2:4.2 IDRYAD1:8.3
  SAY #11220 /* ~Please do not forget about us! I have been so long away from the sun! I do not know how much longer I can stand it...~ */
  IF ~!IsValidForPartyDialog("Jaheira")~ THEN DO ~IncrementGlobal("ImoenDryad","AR0602",1)~ EXIT
  IF ~IsValidForPartyDialog("Jaheira")~ THEN EXTERN ~JAHEIRAJ~ 306
END

IF ~~ THEN BEGIN 5 // from: 14.1 11.2 8.1 6.2 3.2 2.1 IDRYAD2:9.2 IDRYAD1:8.2
  SAY #11254 /* ~If you will not help us then we will take your human male until you change your mind. Please! We do not want to have to do this.~ */
  IF ~~ THEN DO ~SetGlobal("MinscCharmed","AR0602",1)
~ EXTERN ~IDRYAD2~ 4
END

IF ~~ THEN BEGIN 6 // from: IDRYAD2:5.0
  SAY #11266 /* ~Our trees will die, too!~ */
  IF ~~ THEN REPLY #11423 /* ~I will be happy to help you in that case.~ */ EXTERN ~IDRYAD1~ 6
  IF ~Global("HelpDjinni","GLOBAL",1)
~ THEN REPLY #11424 /* ~I will help you if you will help me. I am looking for a flask in order to free a djinni who is trapped in the Plane of Air. Have you seen one?~ */ EXTERN ~IDRYAD2~ 8
  IF ~InParty("Minsc")
!IsGabber("Minsc")
!Dead("Minsc")
!StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11425 /* ~I refuse to help you.~ */ GOTO 5
  IF ~OR(4)
!InParty("Minsc")
IsGabber("Minsc")
Dead("Minsc")
StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11426 /* ~I regret that I cannot help you.~ */ GOTO 4
END

IF ~~ THEN BEGIN 7 // from: IDRYAD2:7.0
  SAY #11367 /* ~He uses Her key. He still loves her, you see. He keeps her room just as it was, though well protected. We go there sometimes and look at her things.~ */
  IF ~~ THEN EXTERN ~IDRYAD1~ 7
END

IF ~~ THEN BEGIN 8 // from: IDRYAD2:8.0
  SAY #11381 /* ~If you take the acorns to the Fairy Queen then she can regrow our trees and free us! She lives in the south end of the Windspear hills! Will you do this for us?~ */
  IF ~~ THEN REPLY #11383 /* ~I will take your acorns to this Fairy Queen in exchange for the flask.~ */ GOTO 9
  IF ~InParty("Minsc")
!IsGabber("Minsc")
!Dead("Minsc")
!StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11394 /* ~It is too much of a bother.~ */ GOTO 5
  IF ~OR(4)
!InParty("Minsc")
IsGabber("Minsc")
Dead("Minsc")
StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11420 /* ~I cannot help you.~ */ GOTO 10
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #11421 /* ~Thank you! Here is the flask.~ */
  IF ~~ THEN DO ~GiveItem("MISC4D",Player1)
SetGlobal("HelpDjinni","GLOBAL",2)
~ UNSOLVED_JOURNAL #47514 /* ~Freeing the djinn.

I have retrieved the flask from the dryads... all that remains now is to go back to the genie and return it to him.~ */ EXTERN ~IDRYAD2~ 12
END

IF ~~ THEN BEGIN 10 // from: 8.2
  SAY #11422 /* ~We will not give you the flask if you will not help us. Return to me if you change you mind. We must escape from this place!~ */
  IF ~~ THEN DO ~IncrementGlobal("ImoenDryad","AR0602",1)~ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 16 17 even though they appear after this state */
~Global("Acorns","AR0602",0)
!Dead("Ulene")
!Dead("Cania")~ THEN BEGIN 11 // from:
  SAY #11439 /* ~Will you help to free us now?~ */
  IF ~~ THEN REPLY #11440 /* ~I will help you. What do you wish me to do?~ */ EXTERN ~IDRYAD1~ 6
  IF ~Global("HelpDjinni","GLOBAL",1)
~ THEN REPLY #11441 /* ~I will help you if you will help me. I am looking for a flask in order to free a djinni who is trapped in the Plane of Air. Have you seen one?~ */ EXTERN ~IDRYAD2~ 8
  IF ~InParty("Minsc")
!IsGabber("Minsc")
!Dead("Minsc")
!StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11442 /* ~I refuse to help you.~ */ GOTO 5
  IF ~OR(4)
!InParty("Minsc")
IsGabber("Minsc")
Dead("Minsc")
StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #11443 /* ~I cannot help you.~ */ GOTO 4
END

IF ~~ THEN BEGIN 12 // from: IDRYAD2:10.0
  SAY #11450 /* ~He uses Her key. He still loves her, you see. He keeps her room just as it was, though well protected.  We go there sometimes and look at her things.~ */
  IF ~~ THEN DO ~IncrementGlobal("ImoenDryad","AR0602",1)~ EXIT
END

IF WEIGHT #3 /* Triggers after states #: 16 17 even though they appear after this state */
~Global("Acorns","AR0602",2)
!Dead("Ulene")
!Dead("Cania")~ THEN BEGIN 13 // from:
  SAY #11455 /* ~You have returned, <RACE>. Is there something else that you require of us?~ */
  IF ~~ THEN REPLY #11456 /* ~I require nothing else. I must return to my search for an exit.~ */ GOTO 19
  IF ~~ THEN REPLY #11457 /* ~Could you repeat the advice that you gave me earlier?~ */ EXTERN ~IDRYAD2~ 10
  IF ~Global("HelpDjinni","GLOBAL",1)
~ THEN REPLY #11458 /* ~I search for a flask that will free a djinni trapped by your master in the Plane of Air. Have you any such thing?~ */ GOTO 18
END

IF ~~ THEN BEGIN 14 // from: IDRYAD2:12.0
  SAY #17741 /* ~He has left our acorns with Ilyich. Ilyich is mean!~ */
  IF ~~ THEN REPLY #17743 /* ~Then I suppose I shall have to obtain your acorns from this Ilyich fellow. Who is he and where can he be found?~ */ GOTO 15
  IF ~InParty("Minsc")
!IsGabber("Minsc")
!Dead("Minsc")
!StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #17744 /* ~This is too much of a bother for me. I cannot help you.~ */ GOTO 5
  IF ~OR(4)
!InParty("Minsc")
IsGabber("Minsc")
Dead("Minsc")
StateCheck("Minsc",STATE_SLEEPING)
~ THEN REPLY #17745 /* ~I'm afraid I cannot help you. This will take too much time.~ */ GOTO 4
  IF ~PartyHasItem("MISC4N")~ THEN REPLY #17994 /* ~I believe that I have the acorns you are talking about.~ */ GOTO 17
END

IF ~~ THEN BEGIN 15 // from: 14.0
  SAY #17746 /* ~Ilyich is the clan chief of the master's duergar slaves. He is somewhere within the dungeon.  Return to us when you have the acorns and we will tell you how to escape.~ */
  IF ~~ THEN DO ~IncrementGlobal("ImoenDryad","AR0602",1)
SetGlobal("Acorns","AR0602",1)
SetGlobal("HelpDryads","GLOBAL",1)
~ UNSOLVED_JOURNAL #34092 /* ~Helping Irenicus' captive dryads.

I have agreed to help a trio of dryads return their acorns to the Fairy Queen.  Somewhere in the dungeon is a dwarf by the name of Ilyich who has the acorns.~ */ EXIT
END

IF WEIGHT #0 ~Global("Acorns","AR0602",1)
!PartyHasItem("misc4n")
!Dead("Ulene")
!Dead("Cania")~ THEN BEGIN 16 // from:
  SAY #17749 /* ~You must get our acorns back from Ilyich, the clan leader of Irenicus' duergar slaves. He is somewhere within the dungeon.  Return to us when you have the acorns and we will tell you how to escape.~ */
  IF ~~ THEN REPLY #17751 /* ~I will get the acorns and return to you.~ */ GOTO 19
  IF ~Global("HelpDjinni","GLBOAL",1)~ THEN REPLY #17752 /* ~I will help you if you will help me. I am looking for a flask in order to free a djinni who is trapped in the Plane of Air. Have you seen one?~ */ EXTERN ~IDRYAD2~ 8
END

IF WEIGHT #1 ~PartyHasItem("misc4n")
Global("Acorns","AR0602",1)
!Dead("Ulene")
!Dead("Cania")
~ THEN BEGIN 17 // from: 14.3
  SAY #17759 /* ~You have done a noble thing for us. Please take these acorns to the Fairy Queen who lives north east of the human settlement called Trademeet.~ */
  IF ~~ THEN DO ~SetGlobal("Acorns","AR0602",2)
~ UNSOLVED_JOURNAL #34093 /* ~Helping Irenicus' captive dryads.

In order to free the captive dryads from their imprisonment, I must bring their acorns to the Fairy Queen, who is apparently located in an area called the Windspear Hills.~ */ EXTERN ~IDRYAD2~ 7
END

IF ~~ THEN BEGIN 18 // from: 13.2 IDRYAD2:11.2 IDRYAD1:9.2
  SAY #18245 /* ~You are very noble to risk your own safety to free the djinni. We have the flask and shall give it to you.~ */
  IF ~~ THEN DO ~IncrementGlobal("ImoenDryad","AR0602",1)
GiveItem("MISC4D",Player1)
SetGlobal("HelpDjinni","GLOBAL",2)
~ UNSOLVED_JOURNAL #47514 /* ~Freeing the djinn.

I have retrieved the flask from the dryads... all that remains now is to go back to the genie and return it to him.~ */ EXIT
END

IF ~~ THEN BEGIN 19 // from: 16.0 13.0 IDRYAD2:13.0 IDRYAD2:11.0 IDRYAD1:10.0 IDRYAD1:9.0
  SAY #58056 /* ~May the forest always open a path for you!~ */
  IF ~~ THEN EXIT
END
