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

BEGIN ~X#DRIZZT~
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #1 /* Triggers after states #: 11 even though they appear after this state */
~  Global("X#DQDrizztStart","GLOBAL",1)
~ THEN BEGIN 0 // from:
  SAY #49008 /* ~Good hunting, friend. I found a peculiar scroll on one of the bodies of some Gnolls who accosted me. It appears to be a page torn from a larger volume, and I do not recognize the language. Maybe it is some kind of cipher? A bad sign that is. Perhaps, the gnolls in the area serve someone more formidable and that is the way they communicate?~ */
  IF ~~ THEN GOTO 2
  IF ~  InParty("minsc")
InMyArea("minsc")
!StateCheck("minsc",CD_STATE_NOTVALID)
~ THEN GOTO 1
  IF ~  InParty("minsc")
InMyArea("minsc")
!StateCheck("minsc",CD_STATE_NOTVALID)
~ THEN EXTERN ~BMINSC~ 352
END

IF ~~ THEN BEGIN 1 // from: 0.1
  SAY #49010 /* ~Witch? Well, my enthusiastic friend, you are welcome to keep the parchment.~ */
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.0 0.0
  SAY #49011 /* ~If you have a learned scholar, perhaps they could take a look at this. It might be important and shed light on some intrigue.~ */
  IF ~~ THEN GOTO 3
  IF ~  InParty("minsc")
InMyArea("minsc")
!StateCheck("minsc",CD_STATE_NOTVALID)
~ THEN EXTERN ~BMINSC~ 355
  IF ~  InParty("minsc")
InMyArea("minsc")
!StateCheck("minsc",CD_STATE_NOTVALID)
~ THEN EXTERN ~BDYNAH~ 283
  IF ~  InParty("minsc")
InMyArea("minsc")
!StateCheck("minsc",CD_STATE_NOTVALID)
~ THEN EXTERN ~BMINSC~ 354
  IF ~  InParty("minsc")
InMyArea("minsc")
!StateCheck("minsc",CD_STATE_NOTVALID)
~ THEN EXTERN ~BMINSC~ 353
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #49015 /* ~Ah, I see that you are a Hathran scholar. Perhaps you can help me.~ */
  IF ~~ THEN EXTERN ~BDYNAH~ 284
END

IF ~~ THEN BEGIN 4 // from:
  SAY #49017 /* ~Just one, m'lady. But the presence of one page is the indication that the whole journal might be nearby or carried off by someone of their number who escaped.~ */
  IF ~~ THEN EXTERN ~BDYNAH~ 285
END

IF ~~ THEN BEGIN 5 // from:
  SAY #49025 /* ~We can search the area quickly enough, if we split forces. What say you?~ */
  IF ~~ THEN REPLY #49026 /* ~Maybe you can search for the journal alone?~ */ GOTO 7
  IF ~~ THEN REPLY #49027 /* ~Sounds like a good plan! Let's do it!~ */ GOTO 8
  IF ~~ THEN REPLY #49028 /* ~I guess I should do it, lest I get fire-balled! Have it your way, Dynaheir. But we will search alone. The matter is small enough. There is no need to involve a Hero of the Realms.~ */ GOTO 10
END

IF ~~ THEN BEGIN 6 // from:
  SAY #49029 /* ~<CHARNAME>, I will gladly help, as you have helped me earlier. I was going to patrol hereabouts, regardless. We can search the area quickly enough, if we split forces. What say you?~ */
  IF ~~ THEN REPLY #49026 /* ~Maybe you can search for the journal alone?~ */ GOTO 9
  IF ~~ THEN REPLY #49027 /* ~Sounds like a good plan! Let's do it!~ */ GOTO 8
  IF ~~ THEN REPLY #49030 /* ~Nay, the matter is small enough. But thank you for your offer.~ */ GOTO 10
END

IF ~~ THEN BEGIN 7 // from: 5.0
  SAY #49031 /* ~I will gladly help, as you have helped me earlier. I was going to patrol the area, regardless. If I find the journal, I will gladly return it to the rightful owner. I shall meet you here in two days.~ */
  IF ~~ THEN DO ~EraseJournalEntry(49005)
EraseJournalEntry(49002)
SetGlobalTimer("X#DQGGnollTimer","GLOBAL",FOUR_MINUTES)
SetGlobalTimer("X#DztSearch","GLOBAL",TWO_DAYS)
SetGlobal("X#DrzztDynaSolo","GLOBAL",1)
EscapeArea()
~ UNSOLVED_JOURNAL #49032 /* ~Dynaheir's Journal

Drizzt the Ranger found a page from Dynaheir's journal. He thinks the rest of it could still be in the area on one of the stray gnolls. Dynaheir wants to get it back. Since Drizzt is patrolling the area, he agreed to look for the journal. I wish all my problems could have been solved with such ease. Alas, onward I go... Before I forget! Drizzt will meet me outdoors somewhere around here in two days to report on the progress of the search.~ */ EXIT
END

IF ~~ THEN BEGIN 8 // from: 6.1 5.1
  SAY #49033 /* ~Well met! Let us convene here after a day of searching.~ */
  IF ~~ THEN DO ~EraseJournalEntry(49005)
EraseJournalEntry(49002)
SetGlobalTimer("X#DQGGnollTimer","GLOBAL",FOUR_MINUTES)
SetGlobalTimer("X#DztSearch","GLOBAL",ONE_DAY)
EscapeArea()
~ UNSOLVED_JOURNAL #49034 /* ~Dynaheir's Journal

Drizzt, the Ranger, found a page from Dynaheir's journal. He thinks the rest of it could still be in the area on one of the stray gnolls. Dynaheir wants to get it back. Since Drizzt is patrolling the area, he agreed to join in the search for the journal. Drizzt will meet me here in one day to report on the progress of the search. I am impressed that the notorious Drow is willing to work with us. I may need to search this area after a day has passed to find him again.~ */ EXIT
END

IF ~~ THEN BEGIN 9 // from: 6.0
  SAY #49035 /* ~Indeed, I can. If I find the journal, I will gladly return it to the rightful owner. I shall meet you here in one day.~ */
  IF ~~ THEN DO ~EraseJournalEntry(49005)
EraseJournalEntry(49002)
SetGlobalTimer("X#DQGGnollTimer","GLOBAL",FOUR_MINUTES)
SetGlobalTimer("X#DztSearch","GLOBAL",ONE_DAY)
EscapeArea()
~ UNSOLVED_JOURNAL #49036 /* ~Dynaheir's Journal

Drizzt, the Ranger, found a page from Dynaheir's journal. He thinks the rest of it could still be in the area on one of the stray gnolls. Dynaheir wants to get it back. Since Drizzt is patrolling the area, he agreed to search for the journal. Drizzt will meet me here in one day to report on the progress of his search. I may need to search this area after a day has passed to find him again.~ */ EXIT
END

IF ~~ THEN BEGIN 10 // from: 6.2 5.2
  SAY #49037 /* ~As you wish. Good hunting to you, my friend.~ */
  IF ~~ THEN DO ~EraseJournalEntry(49005)
EraseJournalEntry(49002)
SetGlobal("X#DyQuPartyAlone","GLOBAL",1)
SetGlobalTimer("X#DQGGnollTimer","GLOBAL",FOUR_MINUTES)
EscapeArea()
~ UNSOLVED_JOURNAL #49038 /* ~Dynaheir's Journal

Drizzt, the Ranger, found a page from Dynaheir's journal. He thinks the rest of it could still be in the area on one of the stray gnolls. Dynaheir wants to get it back, so we will search this area.~ */ EXIT
END

IF WEIGHT #0 ~  Global("X#DrzztReappears","GLOBAL",1)
~ THEN BEGIN 11 // from:
  SAY #49114 /* ~I am glad to see you again, my friend. I have recovered your companion's journal.~ */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #49115 /* ~A vicious group of gnolls had it. I do not know if it makes more sense to you than to me, but they were claiming fealty to someone they called 'The Old One'.~ */
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #49116 /* ~Here is the journal.~ */
  IF ~  OR(3)
!InParty("edwin")
!InMyArea("edwin")
StateCheck("edwin",CD_STATE_NOTVALID)
InParty("dynaheir")
InMyArea("dynaheir")
!StateCheck("dynaheir",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#DrzztReappears","GLOBAL",2)
SetGlobal("X#DynaJournal","GLOBAL",8)
SetGlobalTimer("X#DJRomanceAbduction","GLOBAL",TWO_DAYS)
SetGlobalTimer("X#DJTOED","GLOBAL",ONE_DAY)
TakePartyItem("X#DYJOR1")
DestroyItem("X#DYJOR1")
~ EXTERN ~DYNAHJ~ 123
  IF ~  InParty("edwin")
InMyArea("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
InParty("dynaheir")
InMyArea("dynaheir")
!StateCheck("dynaheir",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#DrzztReappears","GLOBAL",2)
SetGlobalTimer("X#DJRomanceAbduction","GLOBAL",TWO_DAYS)
SetGlobalTimer("X#DJTOED","GLOBAL",ONE_DAY)
TakePartyItem("X#DYJOR1")
DestroyItem("X#DYJOR1")
~ EXTERN ~BEDWIN~ 325
END

IF ~~ THEN BEGIN 14 // from:
  SAY #49118 /* ~I was glad to assist. Fare thee well!~ */
  IF ~~ THEN DO ~EraseJournalEntry(49005)
EraseJournalEntry(49002)
EraseJournalEntry(49032)
EraseJournalEntry(49034)
EraseJournalEntry(49036)
EraseJournalEntry(49038)
GiveItemCreate("X#DYJOR2",Player1,1,1,0)
SetGlobal("X#DynaJournal","GLOBAL",8)
ActionOverride("x#drizzt",EscapeArea())
~ SOLVED_JOURNAL #49086 /* ~Dynaheir's Missing Journal

We have retrieved Dynaheir's missing journal. She has decided to keep close watch on it in the future.~ */ EXIT
END
