///////////////////////////////////////////////////////////////////
// ToB Kickout Dialogue for the Xan
///////////////////////////////////////////////////////////////////
BEGIN MOXan25P

IF ~Global("KickedOut","LOCALS",0)~ THEN BEGIN 0
  SAY @9039
  IF ~~ THEN REPLY @9040 DO ~SetGlobal("KickedOut","LOCALS",0)
JoinParty()~ EXIT  // You are too adept in the arcane. Let us remain companions.
  IF ~AreaCheck("AR4500")~ THEN REPLY @9041 DO ~SetGlobal("KickedOut","LOCALS",1)
MoveToPointNoInterrupt([2403.1256])
Face(W)~ GOTO 1  // I need you to remain here, Xan.
  IF ~!AreaCheck("AR4500")
!AreaCheck("AR4000")
!AreaCheck("AR6200")~ THEN REPLY @9043 DO ~SetGlobal("KickedOut","LOCALS",1)
CreateVisualEffectObject("SPDIMNDR",Myself)
Wait(2)
MoveBetweenAreas("AR4500",[2403.1256],S)~ EXIT // I'm returning you to the pocket plane where you will wait for me.
  IF ~!AreaCheck("AR4500")
!AreaCheck("AR4000")
!AreaCheck("AR6200")~ THEN REPLY @9041 DO ~SetGlobal("KickedOut","LOCALS",1)~ EXIT  // I need you to remain here, Xan.
END

IF ~~ THEN BEGIN 1
  SAY @9042
  IF ~~ THEN DO ~~ EXIT
END
