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

BEGIN ~FIREBE~

IF ~  IsGabber("IMOEN")
PartyHasItem("BOOK40")
Global("TalkedToFirebead","GLOBAL",1)
Global("FirebeadDone","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #14995 /* ~Ah, you are generous to an old man, so I will be generous in turn. Let me give you another book in exchange. Personally, I would call it more fantasy than history but I get the sense that you may enjoy it, nonetheless.~ */
  IF ~~ THEN DO ~AddexperienceParty(300)
ReputationInc(1)
TakePartyItem("BOOK40")
GiveItem("BOOK55",LastTalkedToBy)
GiveItem("BAG03",LastTalkedToBy)
SetGlobal("FirebeadDone","GLOBAL",1)
EraseJournalEntry(27082)
~ SOLVED_JOURNAL #27083 /* ~A Book for Firebead
Old Firebead was grateful for my locating his book and rewarded me.~ */ EXIT
END

IF ~  IsGabber(Player1)
PartyHasItem("BOOK40")
Global("TalkedToFirebead","GLOBAL",1)
Global("FirebeadDone","GLOBAL",0)
~ THEN BEGIN 1 // from:
  SAY #14994 /* ~Ah, you are generous to an old man, so I will be generous in turn. Let me give you another book in exchange. It is a touch darker than what you have given me but I get a sense that you may enjoy it, nonetheless.~ */
  IF ~~ THEN DO ~AddexperienceParty(300)
ReputationInc(1)
TakePartyItem("BOOK40")
GiveItem("BOOK36",LastTalkedToBy)
GiveItem("BAG03",LastTalkedToBy)
SetGlobal("FirebeadDone","GLOBAL",1)
EraseJournalEntry(27082)
~ SOLVED_JOURNAL #27083 /* ~A Book for Firebead
Old Firebead was grateful for my locating his book and rewarded me.~ */ EXIT
  IF ~Global("X#FirebeardImoen1","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FirebeardImoen1","GLOBAL",1)~ EXTERN ~IMOEN2~ 133
END

IF ~  False()
~ THEN BEGIN 2 // from:
  SAY #14996 /* ~I always felt you were cut from wiser cloth than that, old friend. Gorion would be sad, indeed.~ */
  IF ~~ THEN EXIT
  IF ~Global("X#FIREBE2","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FIREBE2","GLOBAL",1)~ GOTO 8
  IF ~Global("X#FIREBE2","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FIREBE2","GLOBAL",1)~ EXTERN ~VICONJ~ 222
  IF ~Global("X#FIREBE2","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FIREBE2","GLOBAL",1)~ GOTO 10
  IF ~Global("X#FIREBE2","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FIREBE2","GLOBAL",1)~ EXTERN ~JAHEIJ~ 418
  IF ~Global("X#FIREBE2","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FIREBE2","GLOBAL",1)~ GOTO 14
  IF ~Global("X#FIREBE2","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#FIREBE2","GLOBAL",1)~ EXTERN ~GARRIJ~ 226
END

IF ~  OR(2)
IsGabber(Player1)
IsGabber("IMOEN")
Global("TalkedToFirebead","GLOBAL",0)
Global("FirebeadDone","GLOBAL",0)
~ THEN BEGIN 3 // from:
  SAY #14993 /* ~Ah, you're old Gorion's ward, the lonely kid of Candlekeep! Of course! I heard about the loss of Gorion, and I must give you my deepest condolences. I hope since you've left Candlekeep, you've kept up on your reading... Oh, the world of books... I have heard that a new copy of that wondrous tome, "The History of the Fateful Coin," can be had for a pretty penny in one of the stores around here. If you would be so kind as to buy it for an old man like myself, I'd gladly reimburse you. I'd even give you a little bonus to help in your travels. It must be so hard with Gorion gone.~ */
  IF ~~ THEN DO ~SetGlobal("TalkedToFirebead","GLOBAL",1)
~ UNSOLVED_JOURNAL #27082 /* ~A Book for Firebead
I have met an old friend in Beregost! Firebead Elvenhair, an elderly mage who visited the library at Candlekeep on occasion, has asked me to check out the stores in the area and purchase a copy of "The History of the Fateful Coin" for him, should I ever set eyes on it. Confining as its walls could be, there are days when I miss Candlekeep with every bone and every ounce of flesh in my body. This, I guess, is just going to be one of those days.~ */ EXIT
END

IF ~  OR(2)
PartyHasItem("BOOK36")
PartyHasItem("BOOK55")
Global("FirebeadDone","GLOBAL",1)
~ THEN BEGIN 4 // from:
  SAY #14991 /* ~Ah, I know a bookworm when I see one. Come back when I have a little more time and perhaps we can discuss history and literature a bit.~ */
  IF ~~ THEN EXIT
END

IF ~  IsGabber("IMOEN")
Global("FirebeadDone","GLOBAL",1)
~ THEN BEGIN 5 // from:
  SAY #14997 /* ~How is my favorite bookworm?~ */
  IF ~~ THEN EXIT
END

IF ~  True()
~ THEN BEGIN 6 // from:
  SAY #14998 /* ~Ah, next time you pass through Candlekeep, you should read the "History of the Bell in the Depths." It is an old favorite of mine that I'm sure you would like.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 7 // from: IMOEN2:133.4
  SAY #46929 /* ~Imoen! Glad to see you, lass. Forgive me for not recognizing you immediately; but you have changed!~ */
  IF ~~ THEN DO ~AddexperienceParty(300)
ReputationInc(1)
TakePartyItem("BOOK40")
GiveItem("BOOK36",LastTalkedToBy)
GiveItem("BAG03",LastTalkedToBy)
SetGlobal("FirebeadDone","GLOBAL",1)
EraseJournalEntry(27082)
~ SOLVED_JOURNAL #27083 /* ~A Book for Firebead
Old Firebead was grateful for my locating his book and rewarded me.~ */ EXIT
  IF ~  InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
~ THEN EXTERN ~IMOEN2~ 136
  IF ~  InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
~ THEN EXTERN ~IMOEN2~ 135
  IF ~  InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
~ THEN EXTERN ~IMOEN2~ 134
END

IF ~~ THEN BEGIN 8 // from: 2.1
  SAY #50178 /* ~Farewell!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 9 // from:
  SAY #50178 /* ~Farewell!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 10 // from: 2.3
  SAY #50214 /* ~Much of history is unsettling, but I hope you will enjoy the book nonetheless.~ */
  IF ~~ THEN EXIT
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN GOTO 11
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN EXTERN ~VICONJ~ 223
END

IF ~~ THEN BEGIN 11 // from: 10.1
  SAY #50178 /* ~Farewell!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 12 // from: JAHEIJ:418.3
  SAY #50214 /* ~Much of history is unsettling, but I hope you will enjoy the book nonetheless.~ */
  IF ~~ THEN EXIT
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN GOTO 13
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN EXTERN ~VICONJ~ 224
END

IF ~~ THEN BEGIN 13 // from: 12.1 JAHEIJ:418.1
  SAY #50178 /* ~Farewell!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 14 // from: 2.5
  SAY #50212 /* ~Yes, it is dark, but history often is.~ */
  IF ~~ THEN EXIT
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN GOTO 16
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN EXTERN ~VICONJ~ 225
  IF ~  InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN GOTO 15
  IF ~  InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN EXTERN ~JAHEIJ~ 419
END

IF ~~ THEN BEGIN 15 // from: 14.3 JAHEIJ:419.3
  SAY #50214 /* ~Much of history is unsettling, but I hope you will enjoy the book nonetheless.~ */
  IF ~~ THEN EXIT
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN GOTO 16
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN EXTERN ~VICONJ~ 225
END

IF ~~ THEN BEGIN 16 // from: 15.1 14.1 JAHEIJ:419.1
  SAY #50178 /* ~Farewell!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 17 // from: GARRIJ:226.5
  SAY #50212 /* ~Yes, it is dark, but history often is.~ */
  IF ~~ THEN EXIT
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN GOTO 19
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN EXTERN ~VICONJ~ 226
  IF ~  InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN GOTO 18
  IF ~  InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN EXTERN ~JAHEIJ~ 420
END

IF ~~ THEN BEGIN 18 // from: 17.3 GARRIJ:226.3 JAHEIJ:420.3
  SAY #50214 /* ~Much of history is unsettling, but I hope you will enjoy the book nonetheless.~ */
  IF ~~ THEN EXIT
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN GOTO 19
  IF ~  InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN EXTERN ~VICONJ~ 226
END

IF ~~ THEN BEGIN 19 // from: 18.1 17.1 GARRIJ:226.1 JAHEIJ:420.1
  SAY #50178 /* ~Farewell!~ */
  IF ~~ THEN EXIT
END
