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

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

IF WEIGHT #0 ~GlobalTimerExpired("Xzar","GLOBAL")
Global("VisitNashkell","GLOBAL",1)
Global("Chapter","GLOBAL",1)
~ THEN BEGIN 0 // from:
  SAY #16703 /* ~A slave?  Is such a thing allowed?~ */
  IF ~~ THEN DO ~SetGlobal("VisitNashkell","GLOBAL",2)
SetGlobalTimer("Xzar","GLOBAL",SIX_DAYS)~ EXIT
END

IF WEIGHT #1 ~GlobalTimerExpired("Xzar","GLOBAL")
Global("VisitNashkell","GLOBAL",2)
Global("Chapter","GLOBAL",1)
~ THEN BEGIN 1 // from:
  SAY #16704 /* ~I do not think that I --~ */
  IF ~~ THEN DO ~SetGlobal("VisitNashkell","GLOBAL",3)
SetGlobalTimer("Xzar","GLOBAL",SEVEN_DAYS)~ EXIT
END

IF WEIGHT #2 ~GlobalTimerExpired("Xzar","GLOBAL")
Global("VisitNashkell","GLOBAL",3)
Global("Chapter","GLOBAL",1)
!Dead("Montaron")
~ THEN BEGIN 2 // from:
  SAY #16705 /* ~Silence!  You are not to speak!  And as for you, my <LADYLORD>, if you wish to deal with my escorts, you must speak to me first.  Is that clear?~ */
  IF ~~ THEN DO ~SetGlobal("VisitNashkell","GLOBAL",4)~ EXTERN ~MONTAJ~ 4
END

IF WEIGHT #5 /* Triggers after states #: 5 6 even though they appear after this state */
~!InParty("Montaron")
~ THEN BEGIN 3 // from:
  SAY #16706 /* ~I see.  Perhaps I will do that.~ */
  IF ~~ THEN DO ~LeaveParty()
SetDialog("XzarP")
~ EXIT
END

IF WEIGHT #6 /* Triggers after states #: 5 6 even though they appear after this state */
~InParty("Montaron")
~ THEN BEGIN 4 // from:
  SAY #16708 /* ~And what if I want to speak to you?  Am I not supposed to get whatever I wish, here?~ */
  IF ~~ THEN DO ~ActionOverride("Montaron",ChangeAIScript("",DEFAULT))
ActionOverride("Montaron",LeaveParty())
ActionOverride("Montaron",SetDialog("MontaP"))
LeaveParty()
SetDialog("XzarP")
~ EXIT
END

IF WEIGHT #3 ~HappinessLT(Myself,0)
!InParty("Montaron")
~ THEN BEGIN 5 // from:
  SAY #16709 /* ~It, it is not for me to... I mean, my <LADYLORD>, I am only a --~ */
  IF ~~ THEN DO ~LeaveParty()
EscapeArea()
~ EXIT
END

IF WEIGHT #4 ~HappinessLT(Myself,0)
InParty("Montaron")
~ THEN BEGIN 6 // from:
  SAY #16710 /* ~Oh, I apologize.  Please excuse me.~ */
  IF ~~ THEN DO ~ActionOverride("Montaron",ChangeAIScript("",DEFAULT))
ActionOverride("Montaron",LeaveParty())
ActionOverride("Montaron",EscapeArea())
LeaveParty()
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 7 // from:
  SAY #16711 /* ~I hope your room pleases you, my Lady.  And I hope that I please you, as well.  Do you wish to spend the night?~ */
  IF ~~ THEN DO ~~ EXIT
END
