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

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

IF WEIGHT #3 /* Triggers after states #: 2 4 9 even though they appear after this state */
~RandomNum(2,1)
GlobalLT("Chapter","GLOBAL",4)
~ THEN BEGIN 0 // from:
  SAY #78348 /* ~Iron is the lifeblood of this whole region and it's sure painful when it gets scarce.  So what can I do for ya?~ */
  IF ~~ THEN REPLY #78349 /* ~What do you have to sell?~ */ DO ~StartStore("_FRIEND",LastTalkedToBy(Myself))
~ UNSOLVED_JOURNAL #78350 /* ~Troubles in the region

Bentley, the owner of the Friendly Arm inn, told us that the iron trade has slowed greatly over the past few weeks.~ */ EXIT
  IF ~~ THEN REPLY #76328 /* ~Nothing for me today.~ */ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 2 4 9 even though they appear after this state */
~RandomNum(2,2)
GlobalLT("Chapter","GLOBAL",3)
~ THEN BEGIN 1 // from:
  SAY #78352 /* ~None too many travelers have been through lately, what with the supposed troubles down south.  So what can I do for ya?~ */
  IF ~~ THEN REPLY #78353 /* ~What do you have to sell me?~ */ DO ~StartStore("_FRIEND",LastTalkedToBy(Myself))
~ UNSOLVED_JOURNAL #78354 /* ~Troubles in the region

Bentley told us that there has been some sort of trouble in the south.  Perhaps we should go to Nashkel?~ */ EXIT
  IF ~~ THEN REPLY #78355 /* ~Nothing today thank you.~ */ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 4 9 even though they appear after this state */
~ReactionLT(LastTalkedToBy(Myself),NEUTRAL_LOWER)
~ THEN BEGIN 2 // from:
  SAY #78356 /* ~Sorry, I'm right out of the cheap stuff.  So what can I do for ya?~ */
  IF ~~ THEN DO ~StartStore("_FRIEND",LastTalkedToBy(Myself))
~ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 4 9 even though they appear after this state */
~True()
~ THEN BEGIN 3 // from:
  SAY #78357 /* ~Things haven't been very busy as of late, with all the troubles in the south.  I've heard though, that the mines at Nashkel have been re-opened.  Some heroic folk dealt with whatever was plaguing the mine. So what can I do for ya?~ */
  IF ~~ THEN REPLY #78353 /* ~What do you have to sell me?~ */ DO ~StartStore("_FRIEND",LastTalkedToBy(Myself))
~ EXIT
  IF ~~ THEN REPLY #78358 /* ~Nothing for today.~ */ EXIT
END

IF WEIGHT #0 ~  InParty("eldoth")
InMyArea("eldoth")
!StateCheck("eldoth",CD_STATE_NOTVALID)
Global("X#BentEld","GLOBAL",0)
~ THEN BEGIN 4 // from:
  SAY #99216 /* ~Greetings, travelers, what can I do... YOU!!! Guards! GUARDS!!!~ */
  IF ~~ THEN DO ~SetGlobal("X#BentEld","GLOBAL",1)
~ EXTERN ~_ELDOTJ~ 54
END

IF ~~ THEN BEGIN 5 // from: _ELDOTJ:54.0
  SAY #99217 /* ~It is not a 'need'. It is my very great pleasure!~ */
  IF ~~ THEN REPLY #99218 /* ~Uh... anyone want to tell me what all the shouting's about?~ */ GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #99219 /* ~This... vagabond!... offered to "sing for his supper." We get little entertainment here, so I thought it worth the chance. HA! Within two insulting songs, he had the whole place in riot! Took me a fortnight to repair all the damage.~ */
  IF ~~ THEN EXTERN ~_ELDOTJ~ 55
END

IF ~~ THEN BEGIN 7 // from: _ELDOTJ:55.0
  SAY #99220 /* ~Including the three bottles you made off with, when the trouble started.~ */
  IF ~~ THEN EXTERN ~_ELDOTJ~ 56
END

IF ~~ THEN BEGIN 8 // from: _ELDOTJ:56.0
  SAY #40502 /* ~Hmph!~ */
  IF ~~ THEN DO ~StartStore("X#FRIED2",LastTalkedToBy(Myself))
~ EXIT
END

IF WEIGHT #1 ~  InParty("eldoth")
InMyArea("eldoth")
!StateCheck("eldoth",CD_STATE_NOTVALID)
GlobalGT("X#BentEld","GLOBAL",0)
~ THEN BEGIN 9 // from:
  SAY #99221 /* ~You’re back? Say what you want, and be quick about it!~ */
  IF ~~ THEN DO ~StartStore("X#FRIED2",LastTalkedToBy(Myself))
~ EXIT
END
