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

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

IF WEIGHT #5 /* Triggers after states #: 20 22 23 24 25 even though they appear after this state */
~NumTimesTalkedTo(0)
ReactionGT(LastTalkedToBy(),NEUTRAL_UPPER)
!Dead("Montaron")
~ THEN BEGIN 0 // from:
  SAY #108 /* ~I am quite good at cowing even the strongest creatures with words and guile. What good am I?  What good are you?~ */
  IF ~~ THEN DO ~SetGlobal("SpokeToXzar","GLOBAL",1)
~ EXTERN ~MONTAR~ 0
END

IF WEIGHT #6 /* Triggers after states #: 20 22 23 24 25 even though they appear after this state */
~NumTimesTalkedTo(0)
ReactionGT(LastTalkedToBy(),HOSTILE_UPPER)
ReactionLT(LastTalkedToBy(),FRIENDLY_LOWER)
!Dead("Montaron")
~ THEN BEGIN 1 // from:
  SAY #109 /* ~So you return and our dark Haer' Dalis, his fetters shattered by your hands, has preceded you. Here is the gold I promised... Have you the gem he spoke of?~ [RAELIS17] */
  IF ~~ THEN DO ~SetGlobal("SpokeToXzar","GLOBAL",1)
~ EXTERN ~MONTAR~ 1
END

IF WEIGHT #7 /* Triggers after states #: 20 22 23 24 25 even though they appear after this state */
~NumTimesTalkedTo(0)
ReactionLT(LastTalkedToBy(),NEUTRAL_LOWER)
!Dead("Montaron")
~ THEN BEGIN 2 // from:
  SAY #110 /* ~No, Miss Raelis, but I shall soon return with it.~ */
  IF ~~ THEN EXTERN ~MONTAR~ 2
END

IF ~~ THEN BEGIN 3 // from:
  SAY #102 /* ~I am the person who's come here to kill you, no matter who you are or who you serve!~ */
  IF ~~ THEN REPLY #241 /* ~Which brings us back to where this whole tale began, that is to the planar stone you rescued from damned Mekrath's rubble.~ */ GOTO 7
  IF ~~ THEN REPLY #242 /* ~How? I don't understand.~ */ GOTO 4
  IF ~~ THEN REPLY #243 /* ~Of course, the planar stone and whatever it is that Raelis is summoning.~ */ GOTO 18
END

IF ~~ THEN BEGIN 4 // from: 3.1
  SAY #103 /* ~And who would be stronger than you? I would love to give them a taste of death as well!~ */
  IF ~~ THEN EXTERN ~MONTAR~ 3
END

IF ~~ THEN BEGIN 5 // from:
  SAY #104 /* ~Ahh, I see. You are a coward. Who has you cowed? Who is better than you?~ */
  IF ~~ THEN EXTERN ~MONTAR~ 4
END

IF ~~ THEN BEGIN 6 // from:
  SAY #217 /* ~See, there lies the inn I spoke of.  Miss Raelis' playhouse lies in its cellar. But until we carry Mekrath's jewel, there be little sense in entering.~ */
  IF ~~ THEN EXTERN ~MONTAR~ 5
END

IF ~~ THEN BEGIN 7 // from: 3.0
  SAY #218 /* ~Ah, the playhouse! It is in the basement of this inn... come, let us enter. Miss Raelis will be pleased to see the gifts we bring.~ [HAERDA82] */
  IF ~~ THEN DO ~GiveItem("POTN08",LastTalkedToBy)
~ EXTERN ~MONTAR~ 5
END

IF ~~ THEN BEGIN 8 // from:
  SAY #219 /* ~I have no problem resorting to violence. I just thought I would give you a chance.~ */
  IF ~~ THEN EXTERN ~MONTAR~ 6
END

IF ~~ THEN BEGIN 9 // from:
  SAY #220 /* ~You must talk sometimes.  You are obviously paid by someone, and had to reach some agreement with him or her.~ */
  IF ~~ THEN REPLY #245 /* ~Miss Raelis is playing the stone as we speak that our company might slip through our hunter's grasp and find another stage.  The play must go on, you know.~ */ GOTO 10
  IF ~~ THEN REPLY #246 /* ~I'm not interested in fighting extra-planar creatures... I'll be on my way, thank you.~ */ GOTO 11
  IF ~ReactionGT(LastTalkedToBy(),HOSTILE_UPPER)
~ THEN REPLY #247 /* ~We shall hold off these creatures as best as we are able.  Tell me when you find the right tunnel.~ */ GOTO 12
  IF ~ReactionLT(LastTalkedToBy(),NEUTRAL_LOWER)
~ THEN REPLY #248 /* ~You be little more than cowards and plenty less than friends, my hounds. Run then, with your tails between your legs... My blades are yours, Miss Raelis, as they have always been.~ */ GOTO 13
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #221 /* ~He no tell us, Stronger pay in meat and land! TorGal follow what good! You should have follow gold like other grrthed guards! Now you die!~ */
  IF ~~ THEN JOURNAL #3422 /* ~Inside the planar sphere.

It appears I have successfully assembled a golem, of sorts, which has run off to do battle with the nearby beholder.~ */ EXTERN ~MONTAR~ 10
END

IF ~~ THEN BEGIN 11 // from: 9.1
  SAY #222 /* ~You presents are worthless, we have what need! Stronger pay land and meat, so TorGal tell Rocksmash follow. You should have left like other rrrthed guards!~ */
  IF ~~ THEN EXTERN ~MONTAR~ 9
END

IF ~~ THEN BEGIN 12 // from: 9.2
  SAY #223 /* ~Your words are fancy like Stronger, but he pay in meat and land! You not strong in pay like him! Should have left with gold like other small grrthed guards!~ */
  IF ~~ THEN JOURNAL #3422 /* ~Inside the planar sphere.

It appears I have successfully assembled a golem, of sorts, which has run off to do battle with the nearby beholder.~ */ EXTERN ~MONTAR~ 7
END

IF ~~ THEN BEGIN 13 // from: 9.3
  SAY #224 /* ~I need no chance or words with grrthunks like you, we have Stronger to feed and land too! Why you not leaved with gold for other guards?! You stupid and die!~ */
  IF ~~ THEN EXTERN ~MONTAR~ 8
END

IF WEIGHT #8 /* Triggers after states #: 20 22 23 24 25 even though they appear after this state */
~GlobalTimerExpired("Xzar","GLOBAL")
Global("VisitNashkell","GLOBAL",1)
Global("Chapter","GLOBAL",1)
~ THEN BEGIN 14 // from:
  SAY #225 /* ~Why did you lie to me, Haer'Dalis?~ */
  IF ~~ THEN DO ~SetGlobal("VisitNashkell","GLOBAL",2)
SetGlobalTimer("Xzar","GLOBAL",ONE_DAY)
~ EXIT
END

IF WEIGHT #9 /* Triggers after states #: 20 22 23 24 25 even though they appear after this state */
~GlobalTimerExpired("Xzar","GLOBAL")
Global("VisitNashkell","GLOBAL",2)
Global("Chapter","GLOBAL",1)
~ THEN BEGIN 15 // from:
  SAY #226 /* ~Primes and planar jewels and -- and... What do you speak of, Haer'Dalis, for you have lost me.~ */
  IF ~~ THEN DO ~SetGlobal("VisitNashkell","GLOBAL",3)
SetGlobalTimer("Xzar","GLOBAL",ONE_DAY)
~ EXIT
END

IF ~~ THEN BEGIN 16 // from:
  SAY #227 /* ~What is Raelis summoning?~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #10 /* Triggers after states #: 20 22 23 24 25 even though they appear after this state */
~GlobalTimerExpired("Xzar","GLOBAL")
Global("VisitNashkell","GLOBAL",3)
Global("Chapter","GLOBAL",1)
!Dead("Montaron")
~ THEN BEGIN 17 // from:
  SAY #228 /* ~As our name denotes, we come from the city of Sigil which lies upon another plane of the multiverse or, more appropriately, upon a hub or node where many of the planes collide... Are you with me?~ */
  IF ~~ THEN DO ~SetGlobal("VisitNashkell","GLOBAL",4)
~ EXTERN ~MONTAR~ 9
END

IF ~~ THEN BEGIN 18 // from: 3.2
  SAY #244 /* ~I helped you then and shall help you again if I am able. Just tell me how.~ */
  IF ~~ THEN EXTERN ~MONTAR~ 9
END

IF ~~ THEN BEGIN 19 // from:
  SAY #4306 /* ~How were you wounded if not in a fight?~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 20 // from:
  SAY #6435 /* ~You feel lucky, punk?~ [SSWORD67] */
  IF ~~ THEN EXIT
END

IF WEIGHT #11 /* Triggers after states #: 22 23 24 25 even though they appear after this state */
~True()
~ THEN BEGIN 21 // from:
  SAY #15581 /* ~Can you perhaps tell me something of the Shadow Thieves here in Athkatla?~ */
  IF ~~ THEN REPLY #17825 /* ~If that is your wish, <CHARNAME>.  Reviane, suffice to say that Galvarey had an unhealthy interest in my compatriot.  You must trust me in this matter.~ */ DO ~ActionOverride("Montaron",JoinParty())
JoinParty()
~ EXIT
  IF ~~ THEN REPLY #17826 /* ~<CHARNAME> has proven that <PRO_HESHE> is not a slave to <PRO_HISHER> origins, just as Galvarey proved that calling oneself a Harper is not enough to make you one in your heart.~ */ EXIT
END

IF WEIGHT #1 ~False()~ THEN BEGIN 22 // from:
  SAY #15915 /* ~I am interested in purchasing weaponry, yes.  What do you have available?~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 ~False()~ THEN BEGIN 23 // from:
  SAY #15916 /* ~No, I'm not interested.  Excuse me.~ */
  IF ~~ THEN DO ~~ EXIT
END

IF WEIGHT #3 ~False()~ THEN BEGIN 24 // from:
  SAY #16044 /* ~Well met, <GABBER>, and a pearl to you.  Feel free to peruse my goods and ask questions, naturally.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 ~False()~ THEN BEGIN 25 // from:
  SAY #16045 /* ~Yes, show me what you have.~ */
  IF ~~ THEN DO ~~ EXIT
END
