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

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

IF WEIGHT #0 ~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
InParty("xzar")
~ THEN BEGIN 0 // from:
  SAY #85236 /* ~Mmm... Xzar has spoken highly of you in his reports.~ */
  IF ~~ THEN REPLY #85237 /* ~Xzar is an addled fool.~ */ GOTO 1
  IF ~~ THEN REPLY #85238 /* ~Reports? What reports? Who are you?~ */ GOTO 3
  IF ~~ THEN REPLY #85239 /* ~Of course he has. Am I not among the finest beings to have ever trod the surface of the Realms?~ */ GOTO 4
  IF ~Global("X#GarNie","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GarNie","GLOBAL",1)~ EXTERN ~_GARRIJ~ 94
END

IF WEIGHT #3 /* Triggers after states #: 5 8 even though they appear after this state */
~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 1 // from: 0.0 _GARRIJ:94.0
  SAY #85240 /* ~Yes, but a necessary one and a useful tool, wouldn't you agree? Like yourselves, we are no friends of the Iron Throne. I have instructed Xzar to accompany you to the Iron Throne tower in the west end of the city. Even madness has its place, yes?~ */
  IF ~~ THEN REPLY #53928 /* ~Thank you for your assistance.~ */ GOTO 2
  IF ~~ THEN REPLY #85241 /* ~Xzar, Montaron, yourself, these men around you... Who am I dealing with, here?~ */ GOTO 3
END

IF WEIGHT #4 /* Triggers after states #: 5 8 even though they appear after this state */
~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 2 // from: 1.0
  SAY #85242 /* ~Keep to the shadows.~ */
  IF ~~ THEN DO ~ActionOverride("wheber",EscapeArea())
ActionOverride("oulam",EscapeArea())
ActionOverride("william",EscapeArea())
EscapeArea()
~ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 5 8 even though they appear after this state */
~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 3 // from: 1.1 0.1 _GARRIJ:94.1
  SAY #85243 /* ~Has Xzar not told you? Perhaps I have spoken too soon. We are the Zhentarim and I am Xzar's superior. He has been making regular reports to me about your party and the progress of your investigations into the iron crisis. Your work has been exemplary and of great service to our cause. Now go, purge this city of the Iron Throne's presence. They have become more than a nuisance to us... They have become a threat.~ */
  IF ~~ THEN DO ~ActionOverride("wheber",EscapeArea())
ActionOverride("oulam",EscapeArea())
ActionOverride("william",EscapeArea())
EscapeArea()
~ EXIT
END

IF WEIGHT #6 /* Triggers after states #: 5 8 even though they appear after this state */
~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 4 // from: 0.2 _GARRIJ:94.2
  SAY #85244 /* ~Yes, he did mention your arrogance... The Iron Throne is based in a tower in the city's west end. I have recommended to Xzar that you focus your investigations there. Now, please, leave us be. It is not wise to speak of these things as openly as we are now.~ */
  IF ~~ THEN DO ~ActionOverride("wheber",EscapeArea())
ActionOverride("oulam",EscapeArea())
ActionOverride("william",EscapeArea())
EscapeArea()
~ EXIT
END

IF WEIGHT #1 ~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
InParty("montaron")
~ THEN BEGIN 5 // from:
  SAY #85245 /* ~I see Montaron is with you but what of Xzar? By all that is dark, this does not bode well for our plans.~ */
  IF ~~ THEN REPLY #85246 /* ~What plans?~ */ GOTO 6
  IF ~~ THEN REPLY #71946 /* ~Who are you?~ */ GOTO 7
END

IF WEIGHT #7 /* Triggers after states #: 8 even though they appear after this state */
~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 6 // from: 5.0
  SAY #85247 /* ~Xzar did not have time to tell you, then... The Iron Throne has many enemies. I am one of them. Xzar was another. He had been making regular reports to me about your party and the progress of your investigations into the present crisis. When the last few reports didn't come, I assumed that the messengers had been forced to take a more lengthy route due to the bandit activity. But this, this is far worse. Alone, Montaron is of little use to us and you... I do not know if you can be trusted... Please, leave us be. It is time for us to revise our thinking on this entire matter.~ */
  IF ~~ THEN DO ~ActionOverride("wheber",EscapeArea())
ActionOverride("oulam",EscapeArea())
ActionOverride("william",EscapeArea())
EscapeArea()
~ EXIT
END

IF WEIGHT #8 /* Triggers after states #: 8 even though they appear after this state */
~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 7 // from: 5.1
  SAY #85248 /* ~If Xzar were still with you, I would tell you more. Suffice to say that we are enemies of the Iron Throne and, for that reason, friends of yours. They are based in a tower on the west end of the city. I would urge you to focus your investigations there.~ */
  IF ~~ THEN DO ~ActionOverride("wheber",EscapeArea())
ActionOverride("oulam",EscapeArea())
ActionOverride("william",EscapeArea())
EscapeArea()
~ EXIT
END

IF WEIGHT #2 ~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
True()
~ THEN BEGIN 8 // from:
  SAY #85249 /* ~Oh look, what a cute little party... invading our space!  We were preparing a ritual, and you all but ruined it.~ */
  IF ~~ THEN REPLY #85250 /* ~What do you mean your space? This is a store and I'm a customer.~ */ GOTO 9
  IF ~~ THEN REPLY #85251 /* ~I'm sorry. Am I interrupting something?~ */ GOTO 12
END

IF WEIGHT #9 ~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 9 // from: 8.0
  SAY #85252 /* ~Thank you for that wonderful display of simian logic, now scram.~ */
  IF ~~ THEN REPLY #85253 /* ~What's a simian?~ */ GOTO 10
  IF ~~ THEN REPLY #85254 /* ~For your information, a number of important sociological and psychological theorists have posited that stores exist in an intermediate space, neither private nor public in nature but combining elements of both. Displays in store windows, for instance, can best be viewed as mental constructs projected onto the public consciousness as a means of engendering mass conformity derived solely from the supposedly private domain of consumer choice...~ */ GOTO 11
END

IF WEIGHT #10 ~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 10 // from: 9.0
  SAY #85255 /* ~A monkey, a moron, a chimp... Boys, put this one out of its misery.~ */
  IF ~~ THEN DO ~ActionOverride("oulam",Enemy())
ActionOverride("wheber",Enemy())
ActionOverride("william",Enemy())
Enemy()
~ EXIT
END

IF WEIGHT #11 ~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 11 // from: 9.1
  SAY #85256 /* ~Ack! It's enough to drive one mad... Make it stop, make it stop!~ */
  IF ~~ THEN DO ~ActionOverride("oulam",Enemy())
ActionOverride("wheber",Enemy())
ActionOverride("william",Enemy())
Enemy()
~ EXIT
END

IF WEIGHT #12 ~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 12 // from: 8.1
  SAY #85257 /* ~Like an extremely difficult spell, perchance? Yes, I would have to say that maybe you ARE interrupting something!~ */
  IF ~~ THEN REPLY #85258 /* ~I'm very, very sorry. I'll leave now.~ */ GOTO 13
  IF ~~ THEN REPLY #85259 /* ~Then go do it someplace a little more private.~ */ GOTO 14
END

IF WEIGHT #13 ~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 13 // from: 12.0
  SAY #85260 /* ~-Sigh- What does it matter, now? Do what you will...~ */
  IF ~~ THEN DO ~ActionOverride("wheber",EscapeArea())
ActionOverride("oulam",EscapeArea())
ActionOverride("william",EscapeArea())
EscapeArea()
~ EXIT
END

IF WEIGHT #14 ~  !Global("X#MontBoss","GLOBAL",1)
!Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 14 // from: 12.1
  SAY #85261 /* ~How about a fireball up your arse? Is that a little more private? Go ahead, let's see you interrupt this one!!~ */
  IF ~~ THEN DO ~ActionOverride("oulam",Enemy())
ActionOverride("wheber",Enemy())
ActionOverride("william",Enemy())
Enemy()
~ EXIT
END

IF WEIGHT #15 ~  Global("X#XzarBoss","GLOBAL",1)
~ THEN BEGIN 15 // from:
  SAY #98983 /* ~Xzar? I am amazed at your effrontery.~ */
  IF ~~ THEN DO ~SetGlobal("X#XzarBoss","GLOBAL",2)
~ EXTERN ~_XZARJ~ 92
END

IF ~~ THEN BEGIN 16 // from: 36.0
  SAY #98984 /* ~However, <CHARNAME>, your presence puts a better face on the matter. I have gleaned enough of your activities - not from Xzar's miserable reports but from witnesses who gladly expounded upon your feats - that I am pleased. Indeed, I must say I am impressed... to a degree.~ */
  IF ~~ THEN REPLY #98985 /* ~I've a feeling I would be impressed in turn... if I knew who you are.~ */ GOTO 17
  IF ~~ THEN REPLY #98986 /* ~Ah. You would be the representative of the Zhentarim, I take it.~ */ GOTO 18
  IF ~~ THEN REPLY #98987 /* ~You are superior to Xzar? In what way? Not lunacy, I hope.~ */ GOTO 19
END

IF ~~ THEN BEGIN 17 // from: 16.0
  SAY #98988 /* ~Truly? Xzar has been more discrete that I had dared imagine. I am the Master of the Zhentarim upon the Sword Coast.~ */
  IF ~  InParty("montaron")
InMyArea("montaron")
!StateCheck("montaron",CD_STATE_NOTVALID)
~ THEN EXTERN ~_BMONTA~ 251
  IF ~  !InParty("montaron")
~ THEN GOTO 21
END

IF ~~ THEN BEGIN 18 // from: 16.1
  SAY #98989 /* ~*sighs* If I ever desire publicity on a matter, I need only tell Xzar and swear him to secrecy. Yes, I am the Master of Zhentarim on the Sword Coast.~ */
  IF ~  InParty("montaron")
InMyArea("montaron")
!StateCheck("montaron",CD_STATE_NOTVALID)
~ THEN EXTERN ~_BMONTA~ 251
  IF ~  !InParty("montaron")
~ THEN GOTO 21
END

IF ~~ THEN BEGIN 19 // from: 16.2
  SAY #98990 /* ~Hardly. Though I do not wonder at your warped judgment from such an example. Know then that I am Master of the Zhentarim on the Sword Coast.~ */
  IF ~  InParty("montaron")
InMyArea("montaron")
!StateCheck("montaron",CD_STATE_NOTVALID)
~ THEN EXTERN ~_BMONTA~ 251
  IF ~  !InParty("montaron")
~ THEN GOTO 21
END

IF ~~ THEN BEGIN 20 // from:
  SAY #98991 /* ~The obverse of your arithmetic is that the present want of involvement measures the scope of future opportunity. Do not forget that, halfling.~ */
  IF ~~ THEN GOTO 21
END

IF ~~ THEN BEGIN 21 // from: 20.0 19.1 18.1 17.1
  SAY #98992 /* ~As for you, <CHARNAME>, know that our common enemy here is no less a foe than the Iron Throne. From their hall in the western part of the city they yet conspire against us all. Put an end to their heinous crimes, and your reward shall be the high favor of the Zhentarim.~ */
  IF ~~ THEN EXTERN ~_XZARJ~ 59
END

IF WEIGHT #16 ~  Global("X#XzarBoss","GLOBAL",6)
~ THEN BEGIN 22 // from:
  SAY #98993 /* ~Your restraint, for one so young, is commendable, <CHARNAME>. At least, I hope it was restraint and not cowardice. Never mind. Go now and mete the same justice to the Iron Throne that we have delivered to the ... remains, there. And take the halfling with you, if you like.~ */
  IF ~~ THEN DO ~SetGlobal("X#XzarBoss","GLOBAL",12)
GiveGoldForce(5000)
ActionOverride("montaron",JoinParty())
ActionOverride("wheber",EscapeArea())
ActionOverride("oulam",EscapeArea())
ActionOverride("william",EscapeArea())
EscapeArea()
~ EXIT
END

IF WEIGHT #17 ~  Global("X#MontBoss","GLOBAL",1)
~ THEN BEGIN 23 // from:
  SAY #98994 /* ~Oho! 'Tis the halfling, Mountebank, if my eyes...~ */
  IF ~~ THEN DO ~SetGlobal("X#MontBoss","GLOBAL",2)
~ EXTERN ~_BMONTA~ 249
END

IF ~~ THEN BEGIN 24 // from:
  SAY #98995 /* ~Come now, this is a better tale. <CHARNAME>, poor Xzar spoke well of you, while able to do so, and witnesses to your deeds have been eloquent in your praise to our messengers. I bid you welcome here.~ */
  IF ~~ THEN REPLY #98996 /* ~I thank you, and would like to know what company I'm keeping.~ */ GOTO 28
  IF ~~ THEN REPLY #98997 /* ~Thank you. It is a pleasant change to meet a responsible representative of the Zhentarim.~ */ GOTO 29
  IF ~~ THEN REPLY #98998 /* ~So you're the head Zhent, huh? Seems the Thronies caught you napping here.~ */ GOTO 30
END

IF ~~ THEN BEGIN 25 // from:
  SAY #98999 /* ~Save your perky arithmetical sallies for the taproom, halfling, and attend.~ */
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 26 // from: 25.0
  SAY #98992 /* ~As for you, <CHARNAME>, know that our common enemy here is no less a foe than the Iron Throne. From their hall in the western part of the city they yet conspire against us all. Put an end to their heinous crimes, and your reward shall be the high favor of the Zhentarim.~ */
  IF ~~ THEN REPLY #99000 /* ~Seems to me a more tangible payment wouldn't be out of place.~ */ GOTO 27
  IF ~~ THEN REPLY #99001 /* ~My thanks. I could ask no more.~ */ GOTO 27
  IF ~~ THEN REPLY #99002 /* ~I look forward to finding out what that means precisely.~ */ GOTO 27
END

IF ~~ THEN BEGIN 27 // from: 26.2 26.1 26.0
  SAY #99003 /* ~The half-successful may expect nothing. Ask Xzar about that, should you meet him again. Succeed entirely, and you will not be disappointed.~ */
  IF ~~ THEN DO ~ActionOverride("wheber",EscapeArea())
ActionOverride("oulam",EscapeArea())
ActionOverride("william",EscapeArea())
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 28 // from: 24.0
  SAY #99004 /* ~Of course. I am Niemain, the Master of the Zhentarim on the Sword Coast.~ */
  IF ~~ THEN EXTERN ~_BMONTA~ 246
END

IF ~~ THEN BEGIN 29 // from: 24.1
  SAY #99006 /* ~Hmmm. Clearly, you knew poor Xzar... hem. Permit me, I am Niemain, the Master of the Zhentarim on the Sword Coast.~ */
  IF ~~ THEN EXTERN ~_BMONTA~ 247
END

IF ~~ THEN BEGIN 30 // from: 24.2
  SAY #99007 /* ~Hardly napping. A competitor simply pre-invested greater resources first in this barbarous land. It merely emphasizes the opportunities for a properly staffed... but you are not interested in our administrative tortuosities. I am Niemain, the Master of Zhentarim on the Sword Coast.~ */
  IF ~~ THEN EXTERN ~_BMONTA~ 248
END

IF ~~ THEN BEGIN 31 // from:
  SAY #99009 /* ~Whichever. What matters is that you seem to have lost our dear friend, Xzar, and substituted this riffraff in his stead.~ */
  IF ~~ THEN EXTERN ~_BMONTA~ 250
END

IF ~~ THEN BEGIN 32 // from:
  SAY #99081 /* ~Watch your tongue or lose it! Who are these people with you?~ */
  IF ~~ THEN EXTERN ~_XZARJ~ 93
END

IF ~~ THEN BEGIN 33 // from:
  SAY #99083 /* ~Xzar, I know *you* and Montaron... why did you introduce yourself and the halfling?~ */
  IF ~~ THEN EXTERN ~_XZARJ~ 94
  IF ~  !InParty("montaron")
~ THEN GOTO 35
  IF ~  InParty("montaron")
InMyArea("montaron")
Dead("montaron")
~ THEN GOTO 34
END

IF ~~ THEN BEGIN 34 // from: 33.2
  SAY #99084 /* ~Xzar, I know *you* and Montaron... appears to be not entirely with us. Why did you introduce yourself and the dead halfling?~ */
  IF ~~ THEN EXTERN ~_XZARJ~ 94
  IF ~  !InParty("montaron")
~ THEN GOTO 35
END

IF ~~ THEN BEGIN 35 // from: 34.1 33.1
  SAY #99085 /* ~Xzar, I know *you*, and Montaron... appears to be missing. Why did you introduce yourself and the absent halfling?~ */
  IF ~~ THEN EXTERN ~_XZARJ~ 94
END

IF ~~ THEN BEGIN 36 // from:
  SAY #99087 /* ~I am your superior! We will discuss your attitude and your performance more fully at a later date. Do be assured of that!~ */
  IF ~~ THEN GOTO 16
END
