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

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

IF WEIGHT #1 /* Triggers after states #: 2 even though they appear after this state */
~True()
~ THEN BEGIN 0 // from:
  SAY #26080 /* ~Have you need of my wares? They are the finest in all of Athkatla. At least for the price. If you need something, I will find it. I know many businesses.~ */
  IF ~~ THEN REPLY #26081 /* ~Thank you, I will take a look at what you have.~ */ DO ~StartStore("merchant",LastTalkedToBy())
~ EXIT
  IF ~Global("knowsmurders","GLOBAL",1)
Global("MurdersSolved","GLOBAL",0)~ THEN REPLY #45888 /* ~What do you know about the murders in the area?~ */ GOTO 16
  IF ~InPartySlot(LastTalkedToBy,0)
GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #45890 /* ~A friend of mine has been imprisoned by the Cowled Wizards.  Do you know, perhaps, where they might have taken her?~ */ GOTO 19
  IF ~GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #45891 /* ~What do you know about the war between the thieves' guilds here in the city?~ */ GOTO 22
  IF ~~ THEN REPLY #26082 /* ~Not today, thank you.~ */ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 12.4 12.2 6.0 2.6 0.4
  SAY #26083 /* ~As you wish. I will be here most days.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~OR(2)
Global("TalkedToHooker1","GLOBAL",1)
PartyHasItem("MISC5G")
!Global("TannerExposed","GLOBAL",1)~ THEN BEGIN 2 // from:
  SAY #26084 /* ~What can I do for you today. You seem a bit agitated. Anything you need?~ */
  IF ~PartyHasItem("MISC5G")
Global("MerchantHide","GLOBAL",0)
~ THEN REPLY #26086 /* ~I wish to know if you can identify this piece of leather. It is a little odd.~ */ DO ~TakePartyItem("MISC5G")~ GOTO 3
  IF ~Global("TalkedToHooker1","GLOBAL",1)
Global("TalkedToHooker2","GLOBAL",0)
!Global("GaveSmellyItems","GLOBAL",1)~ THEN REPLY #26087 /* ~What do you have that smells like guril berries?~ */ GOTO 8
  IF ~~ THEN REPLY #26402 /* ~Just your usual wares, thanks.~ */ DO ~StartStore("merchant",LastTalkedToBy())~ EXIT
  IF ~Global("knowsmurders","GLOBAL",1)
Global("MurdersSolved","GLOBAL",0)~ THEN REPLY #45904 /* ~What do you know about the murders in the area?~ */ GOTO 16
  IF ~InPartySlot(LastTalkedToBy,0)
GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #45905 /* ~I have a friend who's been imprisoned by the Cowled Wizards.  Any idea where that prison might be?~ */ GOTO 19
  IF ~GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #45906 /* ~I've heard a lot about a war between the thieves' guilds in the city.  Do you know anything about that?~ */ GOTO 22
  IF ~~ THEN REPLY #26085 /* ~No, thank you.~ */ GOTO 1
END

IF ~~ THEN BEGIN 3 // from: 12.3 12.1 2.0
  SAY #26088 /* ~Let me see. Hmm... looks quite thick indeed. Very rare, but I have seen it before. This is elephant hide. Good for strong armor, but I rarely see it.~ */
  IF ~~ THEN REPLY #26089 /* ~Elephant hide? Where would someone get such leather?~ */ GOTO 4
  IF ~~ THEN REPLY #26090 /* ~Elephant? I've never even seen an elephant. Could you be mistaken?~ */ GOTO 7
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #26091 /* ~The obvious answer would be 'from an elephant.'  No, you are not in a joking mood, are you. Well, there are perhaps a few places one might get such hide.~ */
  IF ~~ THEN GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 7.0 4.0
  SAY #26092 /* ~A tanner might see such hide on occasion, though it would be rare. Might be difficult to work with as well. I do not hear about such things all that often.~ */
  IF ~~ THEN DO ~SetGlobal("MerchantHide","GLOBAL",1)
~ UNSOLVED_JOURNAL #34269 /* ~Solve the 'skinner' murders in the Bridge District.

The merchant, Bel, identified the strange piece of leather as elephant hide.  Certainly difficult to find in this city, although Bel thought that a tanner might be able to get ahold of some.  He also mentioned that a circus was in town... while he didn't know if they had elephants or not, the circus animal tamer might also be one who could get such a hide.~ */ GOTO 14
END

IF ~~ THEN BEGIN 6 // from: 14.0
  SAY #26093 /* ~There's also a circus in town. I don't know if they have elephants, but the animal tamer would have certainly seen some in the past. Do you need anything else?~ */
  IF ~~ THEN REPLY #26094 /* ~No, that is all. Thank you.~ */ GOTO 1
  IF ~Global("TalkedToHooker1","GLOBAL",1)
Global("TalkedToHooker2","GLOBAL",0)
!Global("GaveSmellyItems","GLOBAL",1)~ THEN REPLY #26095 /* ~I also wanted to ask if you knew what would smell like guril berries.~ */ GOTO 8
END

IF ~~ THEN BEGIN 7 // from: 3.1
  SAY #26096 /* ~If you've never seen one then how would you know? I may not see it often, but such hide is hard to mistake. But there are very few places to get such hide.~ */
  IF ~~ THEN GOTO 5
END

IF ~~ THEN BEGIN 8 // from: 6.1 2.1
  SAY #26097 /* ~Locally?  Well, let me think. I know of three things with that smell. Guril berries are one, and the bark of the oak is similar. And solik berries, too.~ */
  IF ~~ THEN REPLY #26098 /* ~What would these things be used for locally?~ */ GOTO 9
  IF ~~ THEN REPLY #26099 /* ~Where would these be found? What good are they?~ */ GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.1 8.0
  SAY #26100 /* ~Well, I do a brisk business in guril berries. They are used in folk remedies, turned into topical salves for...*ahem*... intimate afflictions.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #26101 /* ~Oak bark is used to make tannin, I believe. Natural curative agent for working with skins. Been in use for centuries.~ */
  IF ~~ THEN GOTO 15
END

IF ~~ THEN BEGIN 11 // from: 15.0
  SAY #26102 /* ~Solik berries are used in a local bakery, for their signature mumbleberry pie. Very tasty, but they are closed now. It is the berry's off-season.~ */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #26103 /* ~I have some of each if you wish. Free of charge, because it's been a slow day. Was there anything else?~ */
  IF ~!PartyHasItem("MISC6C")
!PartyHasItem("MISC6D")
!PartyHasItem("MISC6E")~ THEN REPLY #26104 /* ~No, thank you.~ */ GOTO 13
  IF ~PartyHasItem("MISC5G")
PartyHasItem("MISC6C")
PartyHasItem("MISC6D")
PartyHasItem("MISC6E")
Global("MerchantHide","GLOBAL",0)~ THEN REPLY #26105 /* ~I wanted to ask about this leather, and where it might have come from.~ */ DO ~TakePartyItem("MISC5G")~ GOTO 3
  IF ~Global("TalkedToHooker2","GLOBAL",1)
~ THEN REPLY #26107 /* ~No, thank you.~ */ GOTO 1
  IF ~PartyHasItem("MISC5G")
!PartyHasItem("MISC6C")
!PartyHasItem("MISC6D")
!PartyHasItem("MISC6E")
Global("MerchantHide","GLOBAL",0)~ THEN REPLY #26108 /* ~I wanted to ask about this leather, and where it might have come from.~ */ DO ~GiveItem("MISC6C",LastTalkedToBy)
GiveItem("MISC6D",LastTalkedToBy)
GiveItem("MISC6E",LastTalkedToBy)
TakePartyItem("MISC5G")
SetGlobal("GaveSmellyItems","GLOBAL",1)~ GOTO 3
  IF ~PartyHasItem("MISC6C")
PartyHasItem("MISC6D")
PartyHasItem("MISC6E")~ THEN REPLY #61158 /* ~No, thank you.~ */ GOTO 1
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #26106 /* ~As you wish. I will be here if you wish to return.~ */
  IF ~~ THEN DO ~GiveItem("MISC6C",LastTalkedToBy)
GiveItem("MISC6D",LastTalkedToBy)
GiveItem("MISC6E",LastTalkedToBy)
SetGlobal("GaveSmellyItems","GLOBAL",1)~ UNSOLVED_JOURNAL #34271 /* ~Solve the 'skinner' murders in the Bridge District.

Bel told me that there were three things that smelled like guril berries: guril berries, themselves, as well as oak bark and solik berries.  He gave me a sample of each... with which I can probably go back to Rose and get her to compare the odors.~ */ EXIT
END

IF ~~ THEN BEGIN 14 // from: 5.0
  SAY #37760 /* ~If you want to know more, you might speak to an actual tanner.  There's one not far from here... in the houses to the south.  Rejiek, if I remember his name.~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 15 // from: 10.0
  SAY #37761 /* ~There's a tanner, Rejiek Hidesman, who has his shop near here... he might have some tannin, I'm not sure.  Might be worth it to ask him.~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 16 // from: 2.3 0.1
  SAY #45892 /* ~Very little, aside from their rather gruesome nature.  My sources say the flaying is far too precise to be the fault of a simple creature.~ */
  IF ~Global("TalkedToInspector","GLOBAL",0)~ THEN GOTO 17
  IF ~Global("TalkedToInspector","GLOBAL",1)~ THEN GOTO 18
END

IF ~~ THEN BEGIN 17 // from: 16.0
  SAY #45893 /* ~One of the city's inspectors is near here.  A Lieutenant Aegisfield, as I recall.  Just off to the east, by the gate.  He would know far more than I.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 18 // from: 16.1
  SAY #45894 /* ~I hope Inspector Aegisfield finds the culprit soon.  In the Bridge district we've always been something of a family, and it pains me to see everyone full of paranoia now.  (sigh)~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 19 // from: 2.4 0.2
  SAY #45895 /* ~Ah.  Well, perhaps I misspoke myself.  I know many businesses, but not much about the magical business.  I'm afraid I can't help you very much on that point.~ */
  IF ~~ THEN GOTO 20
END

IF ~~ THEN BEGIN 20 // from: 19.0
  SAY #45896 /* ~But I can say that I've been told the Cowled Wizards keep a special prison for the mages they capture.  Off in the ocean, so the story goes.~ */
  IF ~~ THEN GOTO 21
END

IF ~~ THEN BEGIN 21 // from: 20.0
  SAY #45897 /* ~Too bad stories like those don't give out specifics, eh?  Like co-ordinates or names.  Best of luck, though, in tracking down your friend.  You'll need it.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 22 // from: 2.5 0.3
  SAY #45899 /* ~Only thieves could have a war in plain sight without leaving a trail of bodies, eh?  But if you know about the war, you probably know about who's involved.~ */
  IF ~~ THEN GOTO 23
END

IF ~~ THEN BEGIN 23 // from: 22.0
  SAY #45900 /* ~You got the Shadow Thieves on one hand and a new, upstart guild on the other.  The upstarts have one advantage... nobody knows anything about them.~ */
  IF ~~ THEN GOTO 24
END

IF ~~ THEN BEGIN 24 // from: 23.0
  SAY #45901 /* ~You can't even approach them.  They approach you,  their recruiters appearing out of nowhere.  I hear the upstarts have powerful, dark magic, too.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 25 // from: 24.0
  SAY #45902 /* ~And it makes sense, too.  What else could make the Shadow Thieves pause for more than a second.  Simple thief rivals would be squashed flat.~ */
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 26 // from: 25.0
  SAY #45903 /* ~Not to discount the Shadow Thieves, though.  They've got power enough in Athkatla to take on anyone... even the Cowled Wizards.  I'll just wait this out.~ */
  IF ~~ THEN EXIT
END
