// creator  : weidu.exe (version 23100)
// argument : BERNARD.DLG
// game		 : .
// source	 : ./override/BERNARD.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~BERNARD~ 2 // non-zero flags may indicate non-pausing dialogue
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #0 ~GlobalGT("JaheiraCursed","GLOBAL",0)
GlobalLT("JaheiraCursed","GLOBAL",10)
!InParty("Jaheira")
NumTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #1579 /* ~What can I be getting for you? A little treat for the road perhaps? A room for the night?~ */
  IF ~~ THEN REPLY #1599 /* ~Maybe later. Right now I need some information instead.~ */ GOTO 1
  IF ~~ THEN REPLY #1600 /* ~I'm looking for a friend of mine. A fellow by the name of Belgrade. Have you seen him?~ */ GOTO 2
  IF ~~ THEN REPLY #1601 /* ~My friend, Jaheira, said I might find a man named Belgrade here.~ */ GOTO 3
  IF ~~ THEN REPLY #1602 /* ~Just... just looking around. Don't let me keep you.~ */ GOTO 6
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #1580 /* ~What kind of information might that be?  I keep out o' politics, I don't get in peoples' affairs, and I don't cause trouble, so ask questions with that in mind.~ */
  IF ~~ THEN REPLY #1603 /* ~I'm looking for a man named Belgrade. Seen him?~ */ GOTO 7
  IF ~~ THEN REPLY #1604 /* ~I'm looking for a man that might be a Harper. Do you know where Harpers might gather around here?~ */ GOTO 7
  IF ~~ THEN REPLY #1605 /* ~A druid friend of mine is quite ill, and I am trying to track the man that cursed her.~ */ GOTO 7
  IF ~~ THEN REPLY #1621 /* ~Jaheira suggested I come here. She said I might find someone named Belgrade.~ */ GOTO 3
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #1606 /* ~Can't say that I have, sorry. Anything else?~ */
  IF ~~ THEN REPLY #1623 /* ~That was awfully quick. Are you sure of that?~ */ GOTO 8
  IF ~~ THEN REPLY #1624 /* ~Well, I guess not. thanks anyway.~ */ GOTO 6
  IF ~~ THEN REPLY #1625 /* ~Are you certain? Jaheira was sure he would be here.~ */ GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 9.2 7.2 2.2 1.3 0.2
  SAY #1607 /* ~Jaheira?  Why didn't you say so?  Ask again , friend, you'll find me more cooperative.  You were looking for Belgrade?  You won't find him, I'm sorry to say.~ */
  IF ~~ THEN REPLY #1609 /* ~Moved on has he? Do you know where to find him?~ */ GOTO 4
  IF ~~ THEN REPLY #1610 /* ~He hiding out somewere? Any way I can get a message to him?~ */ GOTO 4
  IF ~~ THEN REPLY #1611 /* ~You seem awfully friendly now. Why?~ */ GOTO 5
END

IF ~~ THEN BEGIN 4 // from: 5.1 5.0 3.1 3.0
  SAY #1612 /* ~Nothing like that.  He's dead.  Died not far from here.  No cause, but it weren't natural.  He was fit as an ox and not a day past 27.  You looking into it?~ */
  IF ~~ THEN REPLY #1613 /* ~Yes I am. Jaheira is likely suffering from the same affliction. I need to find a man named Ployer.~ */ GOTO 11
  IF ~~ THEN REPLY #1615 /* ~Dead? That does not bode well. Any idea who was behind it?~ */ GOTO 12
  IF ~~ THEN REPLY #1616 /* ~Possibly. Do you know where he was found exactly, or where he might have gone that day?~ */ GOTO 13
END

IF ~~ THEN BEGIN 5 // from: 8.2 3.2
  SAY #1617 /* ~Jaheira be a friend to many, and some owe her more than others. I ain't sayin' more, but you are welcome here come the hells or falling skies.~ */
  IF ~~ THEN REPLY #1618 /* ~Well, I appreciate that. Now about Belgrade, can I meet him somehow? Do I need passwords and secret handshakes and all that?~ */ GOTO 4
  IF ~~ THEN REPLY #1619 /* ~She may not last that long. Where can I find this Belgrade. It is urgent and I will go wherever need be.~ */ GOTO 4
END

IF ~~ THEN BEGIN 6 // from: 9.0 8.1 7.0 2.1 0.3
  SAY #1620 /* ~Don't be loitering long then. I've customers to keep happy.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 7 // from: 1.2 1.1 1.0
  SAY #1622 /* ~First sentence and you've gone and broken at least two of my conditions.  Sorry, but I can't help you there.  Perhaps a good wine or a lovely chowder instead?~ */
  IF ~~ THEN REPLY #1632 /* ~No, thanks. I'll be going.~ */ GOTO 6
  IF ~~ THEN REPLY #1638 /* ~You don't seem too forthcoming. Is there anything you CAN tell me?~ */ GOTO 10
  IF ~~ THEN REPLY #1637 /* ~Damnation, Jaheira was sure this place would have a clue or two!~ */ GOTO 3
END

IF ~~ THEN BEGIN 8 // from: 2.0
  SAY #1626 /* ~Positive. Next?~ */
  IF ~~ THEN REPLY #1627 /* ~Well, what about an old slaver named Ployer? Seen him?~ */ GOTO 9
  IF ~~ THEN REPLY #1628 /* ~I guess that's it. Thanks for your help anyway.~ */ GOTO 6
  IF ~~ THEN REPLY #1629 /* ~Odd. Jaheira was sure he would be here.~ */ GOTO 5
  IF ~~ THEN REPLY #1630 /* ~Heard anything about Harpers in the area? Where they might be?~ */ GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.3 8.0
  SAY #1631 /* ~Nope, can't help you. Perhaps some lovely fish cakes or a mead?~ */
  IF ~~ THEN REPLY #1633 /* ~No, thanks. I'll be going.~ */ GOTO 6
  IF ~~ THEN REPLY #1635 /* ~You don't seem too forthcoming. Is there anything you CAN tell me?~ */ GOTO 10
  IF ~~ THEN REPLY #1636 /* ~Damnation, Jaheira was sure this place would have a clue or two!~ */ GOTO 3
END

IF ~~ THEN BEGIN 10 // from: 9.1 7.1
  SAY #1639 /* ~Yes. Don't hang around in taverns asking pointed questions. We never met, and I never heard you ask for any of those names. Good day.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 11 // from: 13.0 12.0 4.0
  SAY #1640 /* ~The Slaver?  He ain't allowed here.  Made his fortune on stolen babies.  I was damn glad to see Jaheira ruin him.  Have I seen him?  No and I wouldn't want to.~ */
  IF ~~ THEN REPLY #1641 /* ~What were you saying about Belgrade's death? Did you know who was behind it?~ */ GOTO 12
  IF ~~ THEN REPLY #1642 /* ~Do you know where Belgrade may have gone the day he died?~ */ GOTO 13
  IF ~~ THEN REPLY #1643 /* ~Thanks, you've been a great help. I don't know if I got what I needed, but thanks nonetheless.~ */ GOTO 14
END

IF ~~ THEN BEGIN 12 // from: 13.1 11.0 4.1
  SAY #1644 /* ~Don't know, but a Harper makes many enemies. Don't rightly want to meet the fool brave or stupid enough to kill one of their number. Harpers never forget.~ */
  IF ~~ THEN REPLY #1646 /* ~Thanks. What were you saying about Ployer?~ */ GOTO 11
  IF ~~ THEN REPLY #1647 /* ~Do you know where he went that day? Where he might have been going?~ */ GOTO 13
  IF ~~ THEN REPLY #1648 /* ~Thanks, you've been a great help. I don't know if I got what I needed, but thanks nonetheless.~ */ GOTO 14
END

IF ~~ THEN BEGIN 13 // from: 12.1 11.1 4.2
  SAY #1645 /* ~Belgrade wooed nobles; he was never in the slums except the day he was dead.  Dumped in the northeast maybe, but there were too many tracks to tell for sure.~ */
  IF ~~ THEN REPLY #1649 /* ~Thanks. What were you saying about Ployer?~ */ GOTO 11
  IF ~~ THEN REPLY #1650 /* ~Do you know who might have killed him?~ */ GOTO 12
  IF ~~ THEN REPLY #1651 /* ~Thanks, you've been a great help. I don't know if I got what I needed, but thanks nonetheless.~ */ GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.2 12.2 11.2
  SAY #1654 /* ~Oh, Belgrade had also asked about a black and green robe he found.  Seemed odd then, but he was an odd fellow.  All Harpers are like that. Wouldn't have it any other way.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #4836 /* ~Save Jaheira from Baron Ployer's curse.

It seems that Jaheira's fellow Harper friend, the merchant Belgrade, was killed by the same kind of curse that has been applied to Jaheira.  His body was found a couple of months previous in the east end of the slums... a better place than anywhere else to begin looking for Ployer.~ */ EXIT
END

IF WEIGHT #1 ~GlobalGT("JaheiraCursed","GLOBAL",0)
GlobalLT("JaheiraCursed","GLOBAL",10)
InParty("Jaheira")
!StateCheck("Jaheira",STATE_SLEEPING)
!Dead("Jaheira")
Global("CursedJaheira","LOCALS",0)
~ THEN BEGIN 15 // from:
  SAY #1655 /* ~What can I do for... Jaheira?  Jaheira, no games now, you look like you've seen yer own ghost, or are about to.  Young lady, you look about ninety! Are you ill?~ */
  IF ~~ THEN DO ~SetGlobal("CursedJaheira","LOCALS",1)
~ EXTERN ~JAHEIRAJ~ 82
END

IF ~~ THEN BEGIN 16 // from:
  SAY #1657 /* ~The hell you are! These louts you traveling with running you ragged? I'll have them fishing for shark in the bay with no net if they...~ */
  IF ~~ THEN EXTERN ~JAHEIRAJ~ 83
END

IF ~~ THEN BEGIN 17 // from:
  SAY #1659 /* ~Oh, I'm sorry, Jaheira, but he's not around anymore. I ain't had the pleasure of his company in nigh unto...~ */
  IF ~~ THEN EXTERN ~JAHEIRAJ~ 84
END

IF ~~ THEN BEGIN 18 // from:
  SAY #1662 /* ~Ohh, Jaheira, you misunderstand me. Belgrade, he's... he's dead.~ */
  IF ~~ THEN EXTERN ~JAHEIRAJ~ 85
END

IF ~~ THEN BEGIN 19 // from:
  SAY #1664 /* ~A while back.  He got sickly just like... oh my, just like you. What is it, a plague that only affects Harpers?  I knew your lot would anger the wrong god or...~ */
  IF ~~ THEN EXTERN ~JAHEIRAJ~ 86
END

IF ~~ THEN BEGIN 20 // from:
  SAY #1666 /* ~Found Belgrade in the east slums. Too many tracks to tell if he was dumped there.  And Ployer?  He ain't welcome here.  Damn glad you exposed him, Jaheira.~ */
  IF ~~ THEN EXTERN ~JAHEIRAJ~ 87
END

IF ~~ THEN BEGIN 21 // from:
  SAY #1668 /* ~You take care now. Please.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #4836 /* ~Save Jaheira from Baron Ployer's curse.

It seems that Jaheira's fellow Harper friend, the merchant Belgrade, was killed by the same kind of curse that has been applied to Jaheira.  His body was found a couple of months previous in the east end of the slums... a better place than anywhere else to begin looking for Ployer.~ */ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 25 28 even though they appear after this state */
~OR(5)
!InParty("Jaheira")
Dead("Jaheira")
!See("Jaheira")
StateCheck("Jaheira",STATE_SLEEPING)
Global("BernardTalkedToJaheira","GLOBAL",1)~ THEN BEGIN 22 // from:
  SAY #17388 /* ~Ain't got much time for talking. It's business as usual 'round here. If you want service, just ask.~ */
  IF ~!Dead("Lehtinan")
Global("LehtinanCheap","GLOBAL",0)~ THEN REPLY #17429 /* ~I'll have a look at what's on tap here.~ */ DO ~StartStore("bernard",LastTalkedToBy())
~ EXIT
  IF ~~ THEN REPLY #17430 /* ~Nothing for me, thanks.~ */ GOTO 27
  IF ~Dead("Lehtinan")
Global("LehtinanCheap","GLOBAL",0)~ THEN REPLY #37863 /* ~Since Hendak has promised us a discount I'd like to see what you have on tap here.~ */ DO ~StartStore("bernard2",LastTalkedToBy())~ EXIT
  IF ~InPartySlot(LastTalkedToBy,0)
GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #45589 /* ~Maybe I could ask you a question or two?~ */ GOTO 31
  IF ~!Dead("Lehtinan")
Global("LehtinanCheap","GLOBAL",1)~ THEN REPLY #50098 /* ~Since Lehtinan has promised us a discount I'd like to see what you have on tap here.~ */ DO ~StartStore("bernard2",LastTalkedToBy())~ EXIT
END

IF ~~ THEN BEGIN 23 // from: 37.0
  SAY #17432 /* ~That is, unless the lady would like something special.~ */
  IF ~~ THEN EXTERN ~JAHEIRAJ~ 131
END

IF ~~ THEN BEGIN 24 // from:
  SAY #17434 /* ~Suit yourself. What of the rest of you?~ */
  IF ~!Dead("lehtinan")
Global("LehtinanCheap","GLOBAL",0)~ THEN REPLY #17435 /* ~I'll see what's on tap, thank you.~ */ DO ~StartStore("bernard",LastTalkedToBy())~ EXIT
  IF ~Dead("lehtinan")
Global("LehtinanCheap","GLOBAL",0)~ THEN REPLY #45612 /* ~I'll see what's on tap, thank you.~ */ DO ~StartStore("bernard2",LastTalkedToBy())~ EXIT
  IF ~InPartySlot(LastTalkedToBy,0)
GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #45613 /* ~Could I maybe ask you a question or two?~ */ GOTO 31
  IF ~Global("LehtinanCheap","GLOBAL",1)~ THEN REPLY #50101 /* ~I'll see what's on tap, please.~ */ DO ~StartStore("bernard2",LastTalkedToBy())~ EXIT
  IF ~~ THEN REPLY #17436 /* ~Nothing for me, thanks.~ */ GOTO 27
END

IF WEIGHT #2 ~OR(2)
Global("JaheiraAbandoned","GLOBAL",1)
Global("JaheiraTraitor","GLOBAL",1)
OR(2)
!InParty("Jaheira")
Dead("Jaheira")
Global("BernardCheckedAbandon","GLOBAL",0)
Global("ElminsterForgives","GLOBAL",0)~ THEN BEGIN 25 // from:
  SAY #17483 /* ~What'll I get for... hey, I know you; you know Jaheira.  I heard she betrayed the Harpers!  You was probably there; what happened?  Say it ain't so.~ */
  IF ~~ THEN REPLY #17484 /* ~It ain't so, Bernard, it ain't so. They were as corrupt as... well... as this place here.~ */ DO ~SetGlobal("BernardCheckedAbandon","GLOBAL",1)~ GOTO 26
  IF ~~ THEN REPLY #17485 /* ~She did what she had to do, just like we all have to. It isn't always pretty.~ */ DO ~SetGlobal("BernardCheckedAbandon","GLOBAL",1)~ GOTO 26
END

IF ~~ THEN BEGIN 26 // from: 25.1 25.0
  SAY #17487 /* ~I get's ya. The right move ain't always the popular one. Still, it's a shame ain't it? Wonder if it coulda turned out different. I wonder.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 27 // from: 24.4 22.1
  SAY #17486 /* ~Suit yourself.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 ~Global("JaheiraTraitor","GLOBAL",1)
InParty("Jaheira")
!Dead("Jaheira")
Global("ElminsterForgives","GLOBAL",0)
Global("BernardCheckedTraitor","GLOBAL",0)~ THEN BEGIN 28 // from:
  SAY #18636 /* ~Jaheira!, You shouldn't be showin' your face around where it ain't safe. Not that you ain't safe in my sight but...~ */
  IF ~~ THEN DO ~SetGlobal("BernardCheckedTraitor","GLOBAL",1)~ EXTERN ~JAHEIRAJ~ 185
END

IF ~~ THEN BEGIN 29 // from:
  SAY #18638 /* ~But I'm on good terms with Harpers and I don't want that to change. Word's got around about what happened. Jaheira... it ain't true, is it?~ */
  IF ~~ THEN EXTERN ~JAHEIRAJ~ 186
END

IF ~~ THEN BEGIN 30 // from:
  SAY #18640 /* ~Good enough fer me. Business as usual between you and me then.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 31 // from: 24.2 22.3
  SAY #45590 /* ~If you make it quick, sure.  Shoot.~ */
  IF ~~ THEN REPLY #45591 /* ~A friend of mine has been kidnapped by the Cowled Wizards.  Do you know where they keep their prisoners?~ */ GOTO 32
  IF ~~ THEN REPLY #45592 /* ~I've heard something about a war between the Shadow Thieves and someone else.  Do you know anything about that?~ */ GOTO 35
  IF ~!Dead("lehtinan")~ THEN REPLY #47117 /* ~Actually, maybe I'll just see what you have on tap.~ */ DO ~StartStore("bernard",LastTalkedToBy())~ EXIT
  IF ~Dead("lehtinan")~ THEN REPLY #47118 /* ~Actually, maybe I'll just see what you have on tap.~ */ DO ~StartStore("bernard2",LastTalkedToBy())~ EXIT
  IF ~~ THEN REPLY #45595 /* ~Actually, never mind.~ */ GOTO 34
END

IF ~~ THEN BEGIN 32 // from: 36.0 31.0
  SAY #45596 /* ~Nobody does, and the Council likes it that way.  All the magic-users caught are put out of sight and forgotten about... no matter what the wizards do to them.~ */
  IF ~~ THEN GOTO 33
END

IF ~~ THEN BEGIN 33 // from: 32.0
  SAY #45601 /* ~The Harpers might know.  If I were you, I would track them down here in the city.  Beware, though... their aid rarely comes without a price attached.~ */
  IF ~~ THEN REPLY #45608 /* ~Do you know anything about the Shadow Thieves and their war?~ */ GOTO 35
  IF ~!Dead("lehtinan")~ THEN REPLY #47119 /* ~Let me see what you have on tap, then.~ */ DO ~StartStore("bernard",LastTalkedToBy())~ EXIT
  IF ~Dead("lehtinan")~ THEN REPLY #47120 /* ~Let me see what you have on tap, then.~ */ DO ~StartStore("bernard2",LastTalkedToBy())~ EXIT
  IF ~~ THEN REPLY #45609 /* ~I guess that's it, then.~ */ GOTO 34
END

IF ~~ THEN BEGIN 34 // from: 36.3 33.3 31.4
  SAY #45603 /* ~Well, it's your copper, as they say.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 35 // from: 33.0 31.1
  SAY #45606 /* ~Only the whispers that come through here, which are hard to believe, really.  Most of them agree that the Shadow Thieves are at war with a new, rival guild.~ */
  IF ~~ THEN GOTO 36
END

IF ~~ THEN BEGIN 36 // from: 35.0
  SAY #45607 /* ~Beyond that, I'm not sure of the truth.  If you go to talk to Renal Bloodscalp, the head of the guild, be careful: many have been killed in his schemes.~ */
  IF ~~ THEN REPLY #45610 /* ~A friend of mine is being held captive by the Cowled Wizards.  Do you know anything about where they hold their prisoners?~ */ GOTO 32
  IF ~!Dead("lehtinan")~ THEN REPLY #47121 /* ~Let me see what you have on tap, then.~ */ DO ~StartStore("bernard",LastTalkedToBy())~ EXIT
  IF ~Dead("lehtinan")~ THEN REPLY #47122 /* ~Let me see what you have on tap, then.~ */ DO ~StartStore("bernard2",LastTalkedToBy())~ EXIT
  IF ~~ THEN REPLY #45611 /* ~That's it, then.~ */ GOTO 34
END

IF WEIGHT #5 ~InParty("Jaheira")
!Dead("Jaheira")
See("Jaheira")
!StateCheck("Jaheira",STATE_SLEEPING)
~ THEN BEGIN 37 // from:
  SAY #47116 /* ~Ain't got much time for talking. It's business as usual 'round here. If you want service, just ask.~ */
  IF ~~ THEN DO ~SetGlobal("BernardTalkedToJaheira","GLOBAL",1)~ GOTO 23
END
