// creator  : weidu.exe (version 23600)
// argument : MONTAP.DLG
// game     : .
// source   : ./DATA/DIALOG.BIF
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

BEGIN ~MONTAP~

IF ~  !HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
Global("KickedOut","LOCALS",0)
!InParty("Xzar")
~ THEN BEGIN 0 // from:
  SAY #16063 /* ~As ye would have it. I likely would have put a dagger in ye eventually, but for now ye have been adequately useful.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
ChangeAIScript("",DEFAULT)
~ EXIT
END

IF ~  !HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
Global("KickedOut","LOCALS",0)
InParty("Xzar")
~ THEN BEGIN 1 // from:
  SAY #16064 /* ~As ye would have it. I likely would have put a dagger in ye eventually, but for now ye have been adequately useful. Come wizard, we are inseparable until the day ye die.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
ActionOverride("Xzar",ChangeAIScript("",DEFAULT))
ActionOverride("Xzar",LeaveParty())
ActionOverride("Xzar",SetDialogue("XZARP"))
ChangeAIScript("",DEFAULT)
~ EXIT
END

IF ~  HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
Global("KickedOut","LOCALS",0)
!InParty("Xzar")
~ THEN BEGIN 2 // from:
  SAY #16065 /* ~And good riddance to yer bad rubbish! I suggest ye sleep with one eye open from now on.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
ChangeAIScript("",DEFAULT)
EscapeArea()
~ EXIT
END

IF ~  HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY)
Global("KickedOut","LOCALS",0)
InParty("Xzar")
~ THEN BEGIN 3 // from:
  SAY #16066 /* ~And good riddance to yer bad rubbish! I suggest ye sleep with one eye open from now on. Come wizard! I'll not miss yer inevitable death by leavin' ye behind!~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
ActionOverride("Xzar",ChangeAIScript("",DEFAULT))
ActionOverride("Xzar",LeaveParty())
ActionOverride("Xzar",SetDialogue("XZARP"))
ActionOverride("Xzar",EscapeArea())
ChangeAIScript("",DEFAULT)
EscapeArea()
~ EXIT
END

IF ~  Global("KickedOut","LOCALS",1)
Dead("XZAR")
~ THEN BEGIN 4 // from:
  SAY #16067 /* ~I thought ye would eventually return this way. Need my services once again?~ */
  IF ~~ THEN REPLY #16072 /* ~Aye, that I do.~ */ GOTO 6
  IF ~~ THEN REPLY #16074 /* ~I have no need for you in my group at this time.~ */ GOTO 7
END

IF ~  Global("KickedOut","LOCALS",1)
!Dead("XZAR")
~ THEN BEGIN 5 // from:
  SAY #16068 /* ~I thought ye would eventually return this way. Need our services once again?~ */
  IF ~~ THEN REPLY #16073 /* ~Aye, that I do.~ */ GOTO 8
  IF ~~ THEN REPLY #16075 /* ~I have no need for you in my group at this time.~ */ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 4.0
  SAY #16069 /* ~A wise choice, indeed. Puts off me having to kill you by a few days at least.~ */
  IF ~~ THEN DO ~JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 5.1 4.1
  SAY #16070 /* ~Fine, but know this: If my blade does not work for ye, you'll likely end up with it against ye.~ */
  IF ~~ THEN DO ~ActionOverride("Xzar",ChangeAIScript("",DEFAULT))
ActionOverride("Xzar",LeaveParty())
ActionOverride("Xzar",SetDialogue("XzarP"))
~ EXIT
END

IF ~~ THEN BEGIN 8 // from: 5.0
  SAY #16071 /* ~A wise choice, indeed. Puts off me having to kill you by a few days at least. Move it wizard! I'll not have us delayed by your flitting about.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",0)
ActionOverride("Xzar",JoinParty())
JoinParty()
~ EXIT
END
