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

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

IF WEIGHT #2 /* Triggers after states #: 5 15 even though they appear after this state */
~  NumberOfTimesTalkedTo(0)
ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
~ THEN BEGIN 0 // from:
  SAY #8352 /* ~Good eve! I am quite sure I don't need to inform you of the rules of conduct while in the Blade and Stars. Rest assured that your stay will be uneventful and restful.~ */
  IF ~~ THEN REPLY #15404 /* ~What kind of services do you offer here?~ */ DO ~StartStore("inn0105",LastTalkedToBy(Myself))
~ EXIT
  IF ~~ THEN REPLY #15405 /* ~We'll make sure to obey your "rules."~ */ EXIT
END

IF WEIGHT #3 /* Triggers after states #: 5 15 even though they appear after this state */
~  NumberOfTimesTalkedTo(0)
ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN BEGIN 1 // from:
  SAY #8353 /* ~Hello. I trust you'll be behaving yourselves while here? We are somewhat less tolerant of unruly guests than more... unrestrained neighboring Inns.~ */
  IF ~~ THEN REPLY #15406 /* ~What kind of services do you have to offer?~ */ DO ~StartStore("inn0105",LastTalkedToBy(Myself))
~ EXIT
  IF ~~ THEN REPLY #15408 /* ~We're an unruly bunch, so we'd better be on our way.~ */ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 5 15 even though they appear after this state */
~  True()
~ THEN BEGIN 2 // from:
  SAY #8354 /* ~I'll tell you straight out: We do not cater to unruly guests, and if you disturb any of the other patrons, you will be asked to leave. If you press the matter, you will be "assisted" to the door. For the good of all concerned, I am sure you will not let it go that far.~ */
  IF ~~ THEN REPLY #15409 /* ~What kind of services do you have to offer?~ */ DO ~StartStore("inn0105",LastTalkedToBy(Myself))
~ EXIT
  IF ~~ THEN REPLY #15410 /* ~If you're going to be so rude, my companions will just take leave of this place!~ */ EXIT
END

IF ~~ THEN BEGIN 3 // from:
  SAY #8355 /* ~Welcome back. The Blade and Stars stands ready to provide what e'er ye need.~ */
  IF ~~ THEN DO ~StartStore("inn0105",LastTalkedToBy(Myself))
~ EXIT
END

IF ~~ THEN BEGIN 4 // from:
  SAY #8357 /* ~I fear we are not open to such as you. Begone, lest the house guards escort you.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~  Global("X#TBBGSEDBASI","GLOBAL",0)
InParty("tiax")
InMyArea("tiax")
!StateCheck("tiax",CD_STATE_NOTVALID)
~ THEN BEGIN 5 // from:
  SAY #45917 /* ~Oh no! You've outstayed your welcome here, Tiax. Thank you, find lodging somewhere else please, goodbye!~ */
  IF ~~ THEN EXTERN ~BTIAX~ 291
END

IF ~~ THEN BEGIN 6 // from:
  SAY #45919 /* ~If I have to summon the guard here, I will. You are no longer welcome in my inn.~ */
  IF ~~ THEN REPLY #45920 /* ~What is it, exactly, that Tiax has done?~ */ DO ~SetGlobal("X#TBBGSEDBASI","GLOBAL",1)
~ GOTO 7
  IF ~~ THEN REPLY #45921 /* ~He's welcome so long as I'm here. I'll not be thrown out on the streets by a lowly innkeep, and I have the power to back up my desire to stay.~ */ DO ~SetGlobal("X#TBBGSEDBASI","GLOBAL",1)
~ GOTO 12
  IF ~~ THEN REPLY #45922 /* ~Alright, alright, we get the message. Come on, Tiax, let's go.~ */ DO ~SetGlobal("X#TBBGSEDBASI","GLOBAL",1)
~ GOTO 13
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #45923 /* ~Oh, I'll tell you what he did! He nearly killed one of our guests, and damn near destroyed my inn!~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #45924 /* ~There was a peaceful group of merchants here not long ago, drinking and socializing, minding their own business. Then this little runt of a gnome barges in and demands immediate service, claiming that if he didn't get his drink fast enough he would "torture us for all eternity" when he "ruled all." One of the merchants cracked a joke, and the other merchants laughed; it was obviously meant in fun.~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #45925 /* ~Then, this...this psychotic, delusional gnome comes up and wallops him over the head with a mace!~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #45926 /* ~Fortunately, it only knocked him unconscious, but he wasn't done yet, oh no! The other merchants scattered, and yet he kept chasing them, swinging his mace and destroying half the common room in the process!~ */
  IF ~~ THEN EXTERN ~BTIAX~ 292
END

IF ~~ THEN BEGIN 11 // from:
  SAY #45928 /* ~Personally, I have to wonder at the sanity of anyone who would travel with this lunatic. To each his own, I suppose. However, I would suggest you kindly take him OUTside of my Inn, thank you!~ */
  IF ~~ THEN REPLY #45929 /* ~I'm terribly sorry for all the trouble he's caused. How much are the damages? I'll pay them for him.~ */ GOTO 14
  IF ~~ THEN REPLY #45930 /* ~You're throwing us out over a few whining merchants who can't handle a barroom brawl? Please. Serve us, or a mace over the head will seem like a blessing, when we're done with you.~ */ GOTO 12
  IF ~~ THEN REPLY #45931 /* ~Well, I can understand why you'd be upset. We'll just find someplace else to stay.~ */ GOTO 13
END

IF ~~ THEN BEGIN 12 // from: 11.1 6.1
  SAY #45932 /* ~I'll not be threatened in my own bar. Your welcome here has been worn out, just like your friend's has. Out! Out!~ */
  IF ~~ THEN DO ~SetGlobal("X#TBBGSEDBASITB","GLOBAL",1)
~ EXIT
END

IF ~~ THEN BEGIN 13 // from: 14.2 11.2 6.2
  SAY #45933 /* ~I'm glad you're more understanding than your diminutive friend. Have a nice day.~ */
  IF ~~ THEN DO ~SetGlobal("X#TBBGSEDBASITB","GLOBAL",1)
~ EXIT
END

IF ~~ THEN BEGIN 14 // from: 11.0
  SAY #45934 /* ~The total is 300 gold pieces. Take it or leave it, but until it's paid no one who travels with that gnome will be allowed to stay here.~ */
  IF ~  PartyGoldGT(300)
~ THEN REPLY #45935 /* ~I've got enough. Here, take the 300 and my apologies on behalf of Tiax.~ */ GOTO 16
  IF ~~ THEN REPLY #45936 /* ~300 gold!?! For a few broken glasses!? You're a cheat if there ever was one!~ */ GOTO 17
  IF ~~ THEN REPLY #45937 /* ~Too rich for my blood. Thank you, anyway, innkeep. We'll find someplace else to stay.~ */ GOTO 13
END

IF WEIGHT #1 ~  Global("X#TBBGSEDBASITB","GLOBAL",1)
InParty("tiax")
~ THEN BEGIN 15 // from:
  SAY #45938 /* ~I have no more to say to you. As long as that gnome is with you, you are unwelcome. Kindly step outside.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 16 // from: 14.0
  SAY #45939 /* ~Well, I'm happy to see there are still some honorable people left in the world. Why they would travel with HIM, I don't know. You're welcome to stay here so long as you keep the gnome on a short leash, and thank you for the help!~ */
  IF ~~ THEN DO ~ReputationInc(1)
StartStore("INN0105",LastTalkedToBy(Myself))
~ EXIT
END

IF ~~ THEN BEGIN 17 // from: 14.1
  SAY #45940 /* ~As I said, you can take it or leave it. Obviously, you've chosen to leave it. Kindly take your business elsewhere, please!~ */
  IF ~~ THEN DO ~SetGlobal("X#TBBGSEDBASITB","GLOBAL",1)
~ EXIT
END
