///////////////////////////////////////////////////////////////////
// Dialogue for Xan
///////////////////////////////////////////////////////////////////
BEGIN MOXAN2

IF ~Global("mo_xan_followup","GLOBAL",0)
AreaCheck("ar1002")~ THEN BEGIN 0
  SAY @9013 = @9014 = @9015
  IF ~~ THEN REPLY @9016 GOTO 2  // Luck was on my side. Cloaked men gave me the distraction I needed to escape from the evil mage Irenicus.
  IF ~~ THEN REPLY @9017 GOTO 2  // It was a gloomier experience than your personality. We managed to break free from our captor and make our way to the streets of Athkatla.
  IF ~~ THEN REPLY @9018 GOTO 1  // The ordeal scars me, both physically and mentally. I'd rather move on from the memory.
END

IF ~~ THEN BEGIN 1
  SAY @9019 
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2
  SAY @9020
  IF ~~ THEN REPLY @9021 GOTO 3  // Not yet. Imoen has been taken, and I could use your help again to rescue her.
  IF ~~ THEN REPLY @9022 GOTO 3  // Indeed not. I do need a skilled mage at my side if you would be willing to lend your services again?
  IF ~~ THEN REPLY @9023 GOTO 4  // I must remain and can't have your hopeless demeanor weigh me down.
END

IF ~~ THEN BEGIN 3
  SAY @9024
  IF ~~ THEN DO ~SetGlobal("mo_xan_followup","GLOBAL",1)
  JoinParty()~ EXIT
END

IF ~~ THEN BEGIN 4
  SAY @9025
  IF ~~ THEN DO ~SetGlobal("mo_xan_followup","GLOBAL",1)~ EXIT
END

IF ~Global("mo_xan_followup","GLOBAL",1)
!InParty("Xan")~ THEN BEGIN 5
  SAY @9026
  IF ~~ THEN REPLY @9011 GOTO 4 // On second thought, I think our spirits would be higher without your assistance.
  IF ~~ THEN REPLY @9012 GOTO 3 // Yes, I require a skilled magic wielder at my side.
END