// creator  : weidu.exe (version 23600)
// argument : BENTLY.DLG
// game     : .
// source   : ./override/BENTLY.DLG
// dialog   : lang\en_us/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)
~ THEN BEGIN 0 // from:
  SAY #1467 /* ~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 #15248 /* ~What do you have to sell?~ */ DO ~StartStore("friend",LastTalkedToBy(Myself))
~ UNSOLVED_JOURNAL #26875 /* ~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 #15249 /* ~Nothing for me today.~ */ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 2 4 9 even though they appear after this state */
~  True()
~ THEN BEGIN 1 // from:
  SAY #1468 /* ~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 #15251 /* ~What do you have to sell me?~ */ DO ~StartStore("friend",LastTalkedToBy(Myself))
~ UNSOLVED_JOURNAL #26876 /* ~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 #15252 /* ~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 #1469 /* ~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 ~~ THEN BEGIN 3 // from:
  SAY #1470 /* ~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 reopened. Some heroic folk dealt with whatever was plaguing the mine. So what can I do for ya?~ */
  IF ~~ THEN REPLY #15259 /* ~What do you have to sell me?~ */ DO ~StartStore("friend",LastTalkedToBy(Myself))
~ EXIT
  IF ~~ THEN REPLY #15260 /* ~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 #45863 /* ~Greetings, travelers, what can I do... YOU!!! Guards! GUARDS!!!~ */
  IF ~~ THEN DO ~SetGlobal("X#BentEld","GLOBAL",1)
~ EXTERN ~ELDOTJ~ 59
END

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

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #45866 /* ~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~ 60
END

IF ~~ THEN BEGIN 7 // from: ELDOTJ:60.0
  SAY #45867 /* ~Including the three bottles you made off with, when the trouble started.~ */
  IF ~~ THEN EXTERN ~ELDOTJ~ 61
END

IF ~~ THEN BEGIN 8 // from: ELDOTJ:61.0
  SAY #45868 /* ~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 #45869 /* ~You're back? Say what you want, and be quick about it!~ */
  IF ~~ THEN DO ~StartStore("X#FRIED2",LastTalkedToBy(Myself))
~ EXIT
END
