BEGIN O#XAN25J

// Interjections

I_C_T AMASANA 1 O#XanAmasana1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @0
END

I_C_T AMMONK02 3 O#XanMonk1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @1
END

I_C_T AMSAEMON 0 O#XanSaemonMet11
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @2 
END

I_C_T AMSAEMON 44 O#XanSaemonDrug1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @3
END

I_C_T BALTH 29 O#XanBalthFanatic1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @2137
END

I_C_T BAZDRA01 0 O#XanDrakonis1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @4
END

I_C_T BAZDRA03 13 O#XanAbazigailDragonSlave1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @5
END

I_C_T BAZEYE01 12 O#XanEyestalkKobolds1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @6
END

I_C_T BAZMONK 2 O#XanMonkAbazigail1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @7
END

I_C_T2 BOTSMITH 152 O#XanCespenarNobody1
== O#XAN25J IF ~Name("O#Xan",LastTalkedToBy)~ THEN @8
END

I_C_T FINMEL01 4 O#XanMelissanPCPerished1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @9 
END

I_C_T HGNYA01 12 O#XanNyaleeIntro1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @10
END

I_C_T2 HGNYA01 28 O#XanNyaleeHasHeart1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @11
END

I_C_T ILLASERA 5 O#XanIllasera1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @12
END

I_C_T MARLOWE 34 O#XanSoulTrader1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @13
END

I_C_T2 MARLOWE 52 O#XanSoulTrader3
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @14
END

I_C_T SARBHA03 4 O#XanSaradushPrisonGirl1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @15
END

I_C_T2 SARBUL05 2 O#XanLetsKillPointyEars1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @16
END

I_C_T SARELF01 4 O#XanElvesSavedFromSoldiers1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @17
END

I_C_T SAREV25A 0 O#XanSarevokMet1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @18
END

I_C_T SARKIS01 22 O#XanKiser1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @20
END

I_C_T SARMAG01 8 O#XanSaradushMageFindTheGuy1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @21
END

I_C_T SARMAT01 9 O#XanMateo1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @22
END

I_C_T SARMEL01 50 O#XanMelissanYagaTemple1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @23
END

I_C_T SARMEL01 77 O#XanMelissanGiantDead1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @24
END

I_C_T2 SARPRO01 10 O#XanProstituteSaved1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @25
END

I_C_T SARPROVM 0 O#XanVamMProstitute1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @28
== SARPROVM IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @29
END

I_C_T SARTEM01 22 O#XanAffairRevealTemple1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @30
END

I_C_T SARTRO03 0 O#XanGronmirMen1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @31
END

I_C_T SARVAM01 2 O#XanSaradushVampire1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @32
END

I_C_T SARVIE01 6 O#XanMelissanViekang1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @33
END

I_C_T SOLAR 19 O#XanSolarCorellon1
== SOLAR IF ~Global("O#XanBondedPathAlive","GLOBAL",2)~ THEN @2182
END

EXTEND_BOTTOM FATESP 6 #2

+ ~!Dead("O#Xan") !InMyArea("O#Xan") Global("O#XanSummoned","GLOBAL",0) !Global("O#XanRT15","GLOBAL",2) !Global("O#XanBondedPathAlive","GLOBAL",2)~ + @34
DO ~CreateVisualEffect("SPPORTAL",[1999.1228])
Wait(2) 
CreateCreature("O#Xan25",[1999.1228],0) 
SetGlobal("O#XanSummoned","GLOBAL",1) 
SetGlobal("O#XanFriendship","GLOBAL",1)~ GOTO 8

+ ~!Dead("O#Xan") !InMyArea("O#Xan") Global("O#XanSummoned","GLOBAL",0) Global("O#XanRT15","GLOBAL",2)~ + @35
DO ~CreateVisualEffect("SPPORTAL",[1999.1228]) 
Wait(2) 
CreateCreature("O#Xan25",[1999.1228],0) 
SetGlobal("O#XanSummoned","GLOBAL",1)~ GOTO 8

+ ~!Dead("O#Xan") !InMyArea("O#Xan") Global("O#XanJoined","GLOBAL",0) Global("O#XanSummoned","GLOBAL",0) Gender(Player1,FEMALE) Race(Player1,ELF)~ + @35 
DO ~CreateVisualEffect("SPPORTAL",[1999.1228]) 
Wait(2) 
CreateCreature("O#Xan25",[1999.1228],0) 
SetGlobal("O#XanRT15","GLOBAL",2) 
SetGlobal("O#XanSummoned","GLOBAL",1)~ GOTO 8

+ ~Dead("O#Xan") Global("O#XanSummoned","GLOBAL",0) Global("O#XanMoonbladeExtinguished","GLOBAL",3)~ + @36 
DO ~SetGlobal("O#XanSummoned","GLOBAL",3)~ + O#XanFateSpirit1

+ ~!Dead("O#Xan") !InMyArea("O#Xan") Global("O#XanSummoned","GLOBAL",0) Global("O#XanJoined","GLOBAL",0) Gender(Player1,FEMALE) Race(Player1,ELF)~ + @2166
DO ~CreateVisualEffect("SPPORTAL",[1999.1228]) 
Wait(2)
CreateCreature("O#Xan25",[1999.1228],0)
SetGlobal("O#XanBondedPathAlive","GLOBAL",2)
SetGlobal("O#XanRomanceActive","GLOBAL",2)
SetGlobal("O#XanSummoned","GLOBAL",1)~ GOTO 8

+ ~!Dead("O#Xan") !InMyArea("O#Xan") Global("O#XanSummoned","GLOBAL",0) Global("O#XanJoined","GLOBAL",0) Gender(Player1,FEMALE) Race(Player1,ELF)~ + @36 
DO ~SetGlobal("O#XanMoonbladeExtinguished","GLOBAL",3)
SetGlobal("O#XanSummoned","GLOBAL",3)~ + O#XanFateSpirit1

END

CHAIN FATESP O#XanFateSpirit1
@37
= @398
EXIT

EXTEND_BOTTOM SARVOLO 9 #2
+ ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) !Global("O#XanRomanceActive","GLOBAL",2)~ + @38 + O#XanVoloBio1
+ ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanRomanceActive","GLOBAL",2)~ + @38 + O#XanVoloBio2
END

CHAIN SARVOLO O#XanVoloBio1
@39
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @40
EXTERN SARVOLO 9

CHAIN SARVOLO O#XanVoloBio2
@41
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @42
EXTERN SARVOLO 9

EXTEND_BOTTOM SAREV25A 41
IF ~InParty("O#Xan") Global("O#XanRT15","GLOBAL",2)~ EXTERN O#XAN25J O#XanSarevokFool1
END

CHAIN O#XAN25J O#XanSarevokFool1
@19
EXTERN SAREV25A 42

BEGIN O#SPIR1
BEGIN O#SPIR2
BEGIN O#SPIR3

EXTEND_BOTTOM HGWRA01 18
IF ~Global("O#XanRomanceActive","GLOBAL",2) InParty("O#Xan") See("O#Xan")~ DO ~SetGlobal("O#XanLovedOne","GLOBAL",6)~ EXTERN HGWRA01 O#XanWraith1
END

EXTEND_BOTTOM HGWRA01 24
IF ~Global("O#XanRomanceActive","GLOBAL",2)~ 
DO ~ClearAllActions() StartCutSceneMode() StartCutScene("O#Spir1")~ EXIT
END

CHAIN HGWRA01 O#XanWraith1
@43
== O#XAN25J @44
EXTERN HGWRA01 24

CHAIN 
IF ~Global("O#XanWraithSpirit1","GLOBAL",0)~ THEN O#SPIR1 O#XanWraithSpirit1
@45
DO ~SetGlobal("O#XanWraithSpirit1","GLOBAL",1)~
== BO#XAN25 @46 
== O#SPIR1 @47
DO ~ClearAllActions() StartCutSceneMode() StartCutScene("O#Spir2")~ 
EXIT

CHAIN 
IF ~Global("O#XanWraithSpirit2","GLOBAL",0)~ THEN O#SPIR2 O#XanWraithSpirit2
@48
DO ~SetGlobal("O#XanWraithSpirit2","GLOBAL",1)~
== BO#XAN25 @49 
== O#SPIR1 @50
DO ~ClearAllActions() StartCutSceneMode() StartCutScene("O#Spir3")~ 
EXIT

CHAIN 
IF ~Global("O#XanWraithSpirit3","GLOBAL",0)~ THEN O#SPIR3 O#XanWraithSpirit3
@51
DO ~SetGlobal("O#XanWraithSpirit3","GLOBAL",1)~
== O#SPIR1 @52
== BO#XAN25 @53
== O#SPIR2 @54
== BO#XAN25 @55
== O#SPIR3 @56
== O#SPIR2 @57
== O#SPIR1 @58
== O#SPIR2 @59
== O#SPIR3 @60
== O#SPIR2 @61
== O#SPIR1 @62
== BO#XAN25 @63
END
++ @64 EXTERN HGWRA01 25
++ @65 EXTERN HGWRA01 25
+ ~CheckStatGT(Player1,16,WIS)~ + @66 EXTERN HGWRA01 25
++ @67 EXTERN HGWRA01 25

I_C_T FINSOL01 27 O#XanSolarFriend1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) !Global("O#XanRomanceActive","GLOBAL",2)~ THEN @68 
END

EXTEND_BOTTOM FINSOL01 27
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) !Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarPers","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarPers","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarPers
END

EXTEND_BOTTOM FINSOL01 29
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) !Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarLeave","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarLeave","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarLeave
END

EXTEND_BOTTOM FINSOL01 30
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) !Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarLeave","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarLeave","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarLeave
END

EXTEND_BOTTOM FINSOL01 31
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) !Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarLeave","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarLeave","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarLeave
END

EXTEND_BOTTOM FINSOL01 32
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) !Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarStay","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarStay","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarStay
END

EXTEND_BOTTOM FINSOL01 27
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarPers","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarPers","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarPersB
END

EXTEND_BOTTOM FINSOL01 29
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarLeave","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarLeave","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarLeaveB
END

EXTEND_BOTTOM FINSOL01 30
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarLeave","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarLeave","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarLeaveB
END

EXTEND_BOTTOM FINSOL01 31
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarLeave","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarLeave","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarLeaveB
END

EXTEND_BOTTOM FINSOL01 32
IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanSolarStay","GLOBAL",0)~ DO ~SetGlobal("O#XanSolarStay","GLOBAL",1)~ EXTERN O#XAN25J O#XanSolarStayB
END



// Watcher's Keep interjections, ToB

I_C_T GORAPR 10 O#XanApprentice1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @69
END

I_C_T GORAPR 0 O#XanApprentice2
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @70
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @71
== GORAPR IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @72
END

I_C_T GORARC1 3 O#XanArchivist1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @73
== GORARC1 IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @74
END

I_C_T GORBAT1 7 O#XanLawfulEvilDemon1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @75
END

I_C_T GORCAMB 17 O#XanCambion1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @76
END

I_C_T GORCAR 18 O#XanCarston1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @77
== GORCAR IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @78 
END

I_C_T GORCHR 7 O#XanChromaticDemon1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @79
== GORCHR IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @80
END

I_C_T GORCHR 13 O#XanChromaticDemon2
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @81
END

I_C_T GORDEMO 1 O#XanImprisonedOneMet1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @82
DO ~SetGlobal("O#XanSpokeToDemogorgon","GLOBAL",1)~
END

I_C_T GORDEMO 18 O#XanImprisonedOneDeceit1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @83
END

I_C_T GORDEMO 24 O#XanImprisonedOneFailed1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @84
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @85
END

I_C_T GORGIT 2 O#XanGithyanki1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @86
END

I_C_T GORIMP01 4 O#XanImpDeadWizards1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @87
END

I_C_T GORMAD1 1 O#XanYakmanLonely1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @2163
END

I_C_T GORMAD1 3 O#XanYakmanLonely3
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @2163
END

I_C_T GORMAD1 4 O#XanYakmanLonely4
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @2163
END

I_C_T GORMAD1 5 O#XanYakmanLonely5
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @2163
END

I_C_T GORMAD1 34 O#XanTamorlinRestored1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @2164
== GORMAD1 IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @2165
END

I_C_T GORODR1 35 O#XanOdrenSurprise1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @90
== GORODR1 IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @91
END

I_C_T GORODR1 50 O#XanOdrenFoolishness1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @92
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @93
END

I_C_T GORODR1 53 O#XanOdrenDemogorgonActually1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @94
END

I_C_T GORPOL1 1 O#XanMetKnightsOfTheVigil1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @95
END

I_C_T GORPOL1 8 O#XanGreatHorrorsOdren1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @96
END

I_C_T GORSAL 6 O#XanSaladrexAmusing1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @97
END

I_C_T GORSUC01 6 O#XanKissSuccubus1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7) OR(2) Global("O#XanRomanceActive","GLOBAL",1) Global("O#XanRomanceActive","GLOBAL",2)~ THEN @98
END

I_C_T GORTAN1 4 O#XanTanarri1
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalGT("Chapter","GLOBAL",7)~ THEN @99
END



// Watcher's Keep interjections, SoA

I_C_T GORAPR 10 O#XanApprentice1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @69
END

I_C_T GORAPR 0 O#XanApprentice2
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @70
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @71
== GORAPR IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @72
END

I_C_T GORARC1 3 O#XanArchivist1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @73
== GORARC1 IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @74
END

I_C_T GORBAT1 7 O#XanLawfulEvilDemon1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @75
END

I_C_T GORCAMB 17 O#XanCambion1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @76
END

I_C_T GORCAR 18 O#XanCarston1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @77
== GORCAR IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @78 
END

I_C_T GORCHR 7 O#XanChromaticDemon1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @79
== GORCHR IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @80
END

I_C_T GORCHR 13 O#XanChromaticDemon2
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @81
END

I_C_T GORDEMO 1 O#XanImprisonedOneMet1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @82
DO ~SetGlobal("O#XanSpokeToDemogorgon","GLOBAL",1)~
END

I_C_T GORDEMO 18 O#XanImprisonedOneDeceit1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @83
END

I_C_T GORDEMO 24 O#XanImprisonedOneFailed1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @84
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @85
END

I_C_T GORGIT 2 O#XanGithyanki1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @86
END

I_C_T GORIMP01 4 O#XanImpDeadWizards1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @87
END

I_C_T GORMAD1 1 O#XanYakmanLonely1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @2163
END

I_C_T GORMAD1 3 O#XanYakmanLonely3
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @2163
END

I_C_T GORMAD1 4 O#XanYakmanLonely4
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @2163
END

I_C_T GORMAD1 5 O#XanYakmanLonely5
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @2163
END

I_C_T GORMAD1 34 O#XanTamorlinRestored1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @2164
== GORMAD1 IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @2165
END

I_C_T GORODR1 35 O#XanOdrenSurprise1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @90
== GORODR1 IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @91
END

I_C_T GORODR1 50 O#XanOdrenFoolishness1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @92
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @93
END

I_C_T GORODR1 53 O#XanOdrenDemogorgonActually1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @94
END

I_C_T GORPOL1 1 O#XanMetKnightsOfTheVigil1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @95
END

I_C_T GORPOL1 8 O#XanGreatHorrorsOdren1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @96
END

I_C_T GORSAL 6 O#XanSaladrexAmusing1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @97
END

I_C_T GORSUC01 6 O#XanKissSuccubus1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8) OR(2) Global("O#XanRomanceActive","GLOBAL",1) Global("O#XanRomanceActive","GLOBAL",2)~ THEN @98
END

I_C_T GORTAN1 4 O#XanTanarri1
== O#XANJ IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) GlobalLT("Chapter","GLOBAL",8)~ THEN @99
END



// Encounter with Ricar

CHAIN IF WEIGHT #-1 ~Global("O#XanEncounterToB3","GLOBAL",2)~ THEN O#RICAR O#XanE3
@3745
DO ~SetGlobal("O#XanEncounterToB3","GLOBAL",3)~
== O#RICAR @3746
== O#XAN25J @3747
== O#RICAR @3748
== O#RICAR @3749
END
++ @3750 + O#XanE3.0
++ @3751 + O#XanE3.1
++ @3752 + O#XanE3.1
++ @3753 + O#XanE3.0

CHAIN O#RICAR O#XanE3.0
@3754
END
IF ~~ EXTERN O#RICAR O#XanE3.1

CHAIN O#RICAR O#XanE3.1
@3755
== O#XAN25J @3756
== O#RICAR IF ~Global("O#XanRomanceActive","GLOBAL",2)~ THEN @3757
== O#RICAR IF ~!Global("O#XanRomanceActive","GLOBAL",2)~ THEN @3758
== O#RICAR @3759
== O#RICAR IF ~ReputationGT(Player1,9)~ THEN @3760
== O#XAN25J IF ~ReputationGT(Player1,9)~ THEN @3761
== O#RICAR IF ~ReputationGT(Player1,9)~ THEN @3762
== O#RICAR IF ~Global("O#XanToBDemandBack","GLOBAL",1)~ THEN @3763
== O#XAN25J IF ~Global("O#XanToBDemandBack","GLOBAL",1)~ THEN @3764
== O#RICAR IF ~Global("O#XanToBDemandBack","GLOBAL",1)~ THEN @3765
== O#XAN25J IF ~Global("O#XanToBDemandBack","GLOBAL",1)~ THEN @3766
== O#XAN25J IF ~Global("O#XanToBDemandBack","GLOBAL",1)~ THEN @3767
== O#RICAR IF ~Global("O#XanBondedPathAlive","GLOBAL",2)~ THEN @3768
== O#XAN25J IF ~Global("O#XanBondedPathAlive","GLOBAL",2)~ THEN @3769
== O#XAN25J IF ~Global("O#XanBondedPathAlive","GLOBAL",2)~ THEN @3770
== O#RICAR @3771
== O#RICAR @3772
== O#XAN25J @3773
END
IF ~PartyHasItem("CLCK05")~ EXTERN O#RICAR O#XanE3.CLCK02
IF ~!PartyHasItem("CLCK05")~ EXTERN O#RICAR O#XanE3.CLCK05

CHAIN O#RICAR O#XanE3.CLCK05
@3774
DO ~GiveItemCreate("CLCK05",Player1,1,0,0)~
END
IF ~~ EXTERN O#RICAR O#XanE3.CLCK

CHAIN O#RICAR O#XanE3.CLCK02
@3812
DO ~GiveItemCreate("CLCK02",Player1,1,0,0)~
END
IF ~~ EXTERN O#RICAR O#XanE3.CLCK

CHAIN O#RICAR O#XanE3.CLCK
@3775
END
++ @3776 EXTERN O#RICAR O#XanE3.2
++ @3777 EXTERN O#RICAR O#XanE3.2
++ @3778 EXTERN O#RICAR O#XanE3.2
++ @3779 EXTERN O#RICAR O#XanE3.2
++ @3780 EXTERN O#RICAR O#XanE3.2
++ @3781 EXTERN O#RICAR O#XanE3.2
 
CHAIN O#RICAR O#XanE3.2
@3782
== O#XAN25J @3783
== O#RICAR @3784
DO ~EscapeArea()~ 
EXIT

CHAIN O#XAN25J O#XanEA3.8
@3785
== MINSC25J IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN @3786
== O#XAN25J IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN @3787
== MINSC25J IF ~InParty("Minsc") InMyArea("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN @3786
== O#XAN25J @3788
EXIT



// Quest

BEGIN O#SIENE
BEGIN O#KHALID
BEGIN O#MERC
BEGIN O#EZARA
BEGIN O#RUAVEL
BEGIN O#NAILYN

CHAIN IF ~OR(3) !InParty("O#Xan") !InMyArea("O#Xan") StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanSieneAppeared","GLOBAL",1)~ THEN O#SIENE O#XanSiene0
@1546
EXIT

CHAIN IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanSieneAppeared","GLOBAL",1)~ THEN O#SIENE O#XanSiene1
@1547
DO ~SetGlobal("O#XanSieneAppeared","GLOBAL",2)~
= @1548
== O#XAN25J @1549
== O#SIENE @1550
== O#SIENE @1551
== MINSC25J IF ~InParty("Minsc") InMyArea("Minsc")~ THEN @1552
== AERIE25J IF ~InParty("Aerie") InMyArea("Aerie")~ THEN @1553
== KORGA25J IF ~InParty("Korgan") InMyArea("Korgan")~ THEN @1554
== IMOEN25J IF ~InParty("Imoen2") InMyArea("Imoen2")~ THEN @1555
== SAREV25J IF ~InParty("Sarevok") InMyArea("Sarevok")~ THEN @1556
== O#XAN25J @1557
== O#SIENE @1558
== O#XAN25J @1559
END
++ @1560 EXTERN O#SIENE O#XanSiene2
++ @1561 EXTERN O#SIENE O#XanSiene2
++ @1562 EXTERN O#SIENE O#XanSiene2
+ ~Global("O#XanRomanceActive","GLOBAL",2)~ + @1563 EXTERN O#XAN25J O#XanSiene3
++ @1564 EXTERN O#SIENE O#XanSiene4
++ @1565 EXTERN O#SIENE O#XanSiene4

CHAIN O#SIENE O#XanSiene2
@1566
END
IF ~~ EXTERN O#SIENE O#XanSiene2.2

CHAIN IF ~OR(3) !InParty("O#Xan") !InMyArea("O#Xan") StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanSieneAppeared","GLOBAL",2)~ THEN O#SIENE O#XanSiene2.1
@1567
EXIT

CHAIN O#SIENE O#XanSiene2.2
@1568
DO ~SetGlobal("O#XanSieneAppeared","GLOBAL",3)
EraseJournalEntry(@1509)
ClearAllActions()
StartCutSceneMode()
StartCutScene("O#Cut1a")~
EXIT

CHAIN IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID) Global("O#XanSieneAppeared","GLOBAL",2)~ THEN O#SIENE O#XanSiene2.3
@1569
END
++ @1570 EXTERN O#SIENE O#XanSiene2.2
++ @1571 EXTERN O#SIENE O#XanSiene2.4

CHAIN O#SIENE O#XanSiene2.4
@1572
EXIT

CHAIN O#XAN25J O#XanSiene3
@1573
END
++ @1574 EXTERN O#SIENE O#XanSiene4
++ @1575 EXTERN O#SIENE O#XanSiene4
++ @1576 EXTERN O#SIENE O#XanSiene2
++ @1577 EXTERN O#SIENE O#XanSiene2

CHAIN O#SIENE O#XanSiene4
@1578
== O#SIENE @1579
== O#SIENE @1580
DO ~AddJournalEntry(@1509,QUEST)~
EXIT

CHAIN IF ~Global("O#XanSieneAppeared","GLOBAL",4)~ THEN O#KHALID O#XanKhalid1
@1581
DO ~SetGlobal("O#XanSieneAppeared","GLOBAL",5)~
== O#SIENE @1582
== O#XAN25J @1583
== O#KHALID @1584
END
++ @1585 EXTERN O#KHALID O#XanKhalid3
++ @1586 EXTERN O#KHALID O#XanKhalid3
++ @1587 EXTERN O#KHALID O#XanKhalid3
++ @1588 EXTERN O#KHALID O#XanKhalid2
++ @1589 EXTERN O#KHALID O#XanKhalid2

CHAIN O#KHALID O#XanKhalid2
@1590
END
IF ~~ EXTERN O#KHALID O#XanKhalid3

CHAIN O#KHALID O#XanKhalid3
@1591
== SAREV25J IF ~InParty("Sarevok") InMyArea("Sarevok")~ THEN @1592
== MINSC25J IF ~InParty("Minsc") InMyArea("Minsc")~ THEN @1593
== O#XAN25J @1594
== JAHEI25J IF ~InParty("Jaheira") InMyArea("Jaheira")~ THEN @1595
== O#KHALID IF ~InParty("Jaheira") InMyArea("Jaheira")~ THEN @1596
== JAHEI25J IF ~InParty("Jaheira") InMyArea("Jaheira")~ THEN @1597
== O#KHALID IF ~InParty("Jaheira") InMyArea("Jaheira")~ THEN @1598
== O#KHALID @1599
END
++ @1600 EXTERN O#KHALID O#XanKhalid4
++ @1601 EXTERN O#KHALID O#XanKhalid4
++ @1602 EXTERN O#KHALID O#XanKhalid4
++ @1603 EXTERN O#KHALID O#XanKhalid5
++ @1604 EXTERN O#KHALID O#XanKhalid6

CHAIN O#KHALID O#XanKhalid4
@1605
== O#XAN25J @1606
== O#KHALID @1607
== O#SIENE @1608
== O#KHALID @1609 
END
IF ~~ EXTERN O#KHALID O#XanKhalid5

CHAIN O#KHALID O#XanKhalid5
@1610
= @1611
== O#XAN25J @1612
== O#KHALID @1613
== O#SIENE @1614
== O#KHALID @1615
== O#XAN25J @1616
== O#XAN25J @1617
== O#XAN25J @1618
== O#XAN25J @1619
== O#XAN25J @1620
== O#KHALID @1621
END
++ @1622 DO ~SetGlobal("O#XanOfferTheyCantRefuse","GLOBAL",1)~ EXTERN O#KHALID O#XanKhalid8
++ @1623 EXTERN O#KHALID O#XanKhalid9
++ @1624 EXTERN O#KHALID O#XanKhalid10
++ @1625 EXTERN O#XAN25J O#XanKhalid11
++ @1626 EXTERN O#KHALID O#XanKhalid12
++ @1627 EXTERN O#KHALID O#XanKhalid7

CHAIN O#KHALID O#XanKhalid6
@1628
== O#SIENE @1629
== O#XAN25J @1630
END
++ @1631 EXTERN O#KHALID O#XanKhalid7
++ @1632 EXTERN O#KHALID O#XanKhalid5
++ @1633 EXTERN O#KHALID O#XanKhalid4

CHAIN O#KHALID O#XanKhalid7
@1634
== O#XAN25J @1635
== O#SIENE @1636
== O#KHALID @1637
DO ~SetGlobal("O#XanSieneAppeared","GLOBAL",6)
AddJournalEntry(@1510,QUEST_DONE)
ReputationInc(-2)
ActionOverride("O#Ezara",DestroySelf())
ActionOverride("O#Ruavel",DestroySelf())
ActionOverride("O#Nailyn",DestroySelf())
ActionOverride("O#Vel",DestroySelf())
ActionOverride("O#Khalid",DestroySelf())
ActionOverride("O#Merc",DestroySelf())
ActionOverride("O#Merc1",DestroySelf())
ActionOverride("O#Merc2",DestroySelf())~
EXIT

CHAIN O#KHALID O#XanKhalid8
@1638
== O#MERC @1639
END
+ ~PartyGoldGT(2999)~ + @1640 EXTERN O#MERC O#XanKhalid8.1
+ ~PartyGoldGT(5999)~ + @1641 EXTERN O#MERC O#XanKhalid8.2
+ ~PartyGoldGT(8999)~ + @1642 EXTERN O#MERC O#XanKhalid8.3
+ ~PartyGoldGT(14999)~ + @1643 EXTERN O#MERC O#XanKhalid8.4
++ @1644 EXTERN O#KHALID O#XanKhalid13
++ @1645 EXTERN O#KHALID O#XanKhalid13

CHAIN O#MERC O#XanKhalid8.1
@1646
== O#KHALID @1647
END
IF ~~ EXTERN O#KHALID O#XanKhalid13

CHAIN O#MERC O#XanKhalid8.2
@1648
= @1649
== O#KHALID @1650
== O#MERC @1651
DO ~TakePartyGold(6000)
DestroyGold(6000)
SetGlobal("O#XanSieneAppeared","GLOBAL",7)
AddJournalEntry(@1521,QUEST_DONE)
ActionOverride("O#Merc",EscapeArea())
ActionOverride("O#Merc1",EscapeArea())
ActionOverride("O#Merc2",EscapeArea())~
EXIT

CHAIN O#MERC O#XanKhalid8.3
@1652
= @1649
== O#KHALID @1650
== O#MERC @1651
DO ~TakePartyGold(9000)
DestroyGold(9000)
SetGlobal("O#XanSieneAppeared","GLOBAL",7)
AddJournalEntry(@1521,QUEST_DONE)
ActionOverride("O#Merc",EscapeArea())
ActionOverride("O#Merc1",EscapeArea())
ActionOverride("O#Merc2",EscapeArea())~
EXIT

CHAIN O#MERC O#XanKhalid8.4
@1653
= @1649
== O#KHALID @1650
== O#MERC @1654
DO ~TakePartyGold(15000)
DestroyGold(15000)
AddJournalEntry(@1521,QUEST_DONE)
SetGlobal("O#XanSieneAppeared","GLOBAL",7)
ActionOverride("O#Merc",EscapeArea())
ActionOverride("O#Merc1",EscapeArea())
ActionOverride("O#Merc2",EscapeArea())~
EXIT

CHAIN IF ~Global("O#XanSieneAppeared","GLOBAL",7) Global("O#XanSlaversLeftAlone","GLOBAL",1)~ THEN O#KHALID O#XanKhalid8.5
@1655
== O#KHALID @1656
DO ~ActionOverride("O#Vel",DestroySelf())
ActionOverride("O#Khalid",DestroySelf())~
EXIT

CHAIN O#KHALID O#XanKhalid9
@1657
= @1658
= @1659
== KORGA25J IF ~InParty("Korgan") InMyArea("Korgan")~ THEN @1660
== JAHEI25J IF ~InParty("Jaheira") InMyArea("Jaheira")~ THEN @1661
== O#XAN25J @1662
== O#KHALID @1663
== O#KHALID @1664
DO ~SetGlobal("O#XanSieneAppeared","GLOBAL",8)
SetGlobal("O#XanPCexchanged","GLOBAL",1)
ClearAllActions()
StartCutSceneMode()
StartCutScene("O#Cut1b")~
EXIT

CHAIN O#KHALID O#XanKhalid10
@1665
== O#XAN25J @1666
END 
++ @1667 EXTERN O#XAN25J O#XanKhalid10.1
++ @1668 EXTERN O#XAN25J O#XanKhalid10.1
++ @1669 EXTERN O#XAN25J O#XanKhalid10.2
++ @1670 EXTERN O#XAN25J O#XanKhalid10.3

CHAIN O#XAN25J O#XanKhalid10.1
@1671
= @1672
END
IF ~~ EXTERN O#KHALID O#XanKhalid10.4

CHAIN O#XAN25J O#XanKhalid10.2
@1673
END
IF ~~ EXTERN O#KHALID O#XanKhalid10.4

CHAIN O#XAN25J O#XanKhalid10.3
@1674
END
IF ~~ EXTERN O#KHALID O#XanKhalid10.4

CHAIN O#KHALID O#XanKhalid10.4
@1675
DO ~SetGlobal("O#XanSieneAppeared","GLOBAL",9)
AddJournalEntry(@1519,QUEST)
SetGlobal("O#XanSlaversLeftAlone","GLOBAL",1)
ClearAllActions()
StartCutSceneMode()
StartCutScene("O#Cut1c")~
EXIT

CHAIN O#XAN25J O#XanKhalid11
@1676
= @1677
= @1678
DO ~SetGlobal("O#XanFailsCharmSlavers","GLOBAL",1)
ActionOverride("O#Xan",PlayDead(30))~
EXIT

CHAIN IF ~Global("O#XanFailsCharmSlavers","GLOBAL",2) Global("O#XanSieneAppeared","GLOBAL",5)~ THEN O#KHALID O#XanKhalid11.1
@1679
== O#KHALID @1680
END
IF ~~ EXTERN O#KHALID O#XanKhalid13

CHAIN O#KHALID O#XanKhalid12
@1681
== O#SIENE @1682
DO ~SetGlobal("O#XanSieneAppeared","GLOBAL",10)
AddJournalEntry(@1520,QUEST_DONE)
ActionOverride("O#Ezara",Kill(Myself))
ActionOverride("O#Ruavel",Kill(Myself))
ActionOverride("O#Nailyn",Kill(Myself))
ActionOverride("O#Khalid",Enemy())
ActionOverride("O#Vel",Enemy())
ActionOverride("O#Merc",Enemy())
ActionOverride("O#Merc1",Enemy())
ActionOverride("O#Merc2",Enemy())~
EXIT

CHAIN O#KHALID O#XanKhalid13
@1683
END
+ ~!Global("O#XanOfferTheyCantRefuse","GLOBAL",1)~ + @1801 DO ~SetGlobal("O#XanOfferTheyCantRefuse","GLOBAL",1)~ EXTERN O#KHALID O#XanKhalid8
++ @1684 EXTERN O#KHALID O#XanKhalid9
++ @1685 EXTERN O#KHALID O#XanKhalid10
+ ~!Global("O#XanFailsCharmSlavers","GLOBAL",2)~ + @1686 EXTERN O#XAN25J O#XanKhalid11
++ @1687 EXTERN O#KHALID O#XanKhalid12
++ @1627 EXTERN O#KHALID O#XanKhalid7

CHAIN IF ~Global("O#XanSieneAppeared","GLOBAL",8) Global("O#XanPCTransported","GLOBAL",0)~ THEN O#KHALID O#XanKhalid14
@1688
== O#KHALID IF ~Gender(Player1,FEMALE)~ THEN @1689
== O#MERC IF ~Gender(Player1,FEMALE)~ THEN @1690
== O#KHALID IF ~Gender(Player1,FEMALE)~ THEN @1691
== O#KHALID IF ~Gender(Player1,FEMALE)~ THEN @1692
== O#MERC IF ~Gender(Player1,FEMALE)~ THEN @1693
== O#KHALID @1694
END
++ @1695 EXTERN O#KHALID O#XanKhalid14.1
++ @1696 EXTERN O#KHALID O#XanKhalid14.2
+ ~Gender(Player1,FEMALE)~ + @1697 EXTERN O#KHALID O#XanKhalid14.3
++ @1698 EXTERN O#KHALID O#XanKhalid14.2
++ @1699 EXTERN O#KHALID O#XanKhalid14.4
++ @1700 EXTERN O#KHALID O#XanKhalid14.2

CHAIN O#KHALID O#XanKhalid14.1
@1701
END
IF ~~ EXTERN O#KHALID O#XanKhalid14.5

CHAIN O#KHALID O#XanKhalid14.2
@1702
END
IF ~~ EXTERN O#KHALID O#XanKhalid14.5

CHAIN O#KHALID O#XanKhalid14.3
@1703
END
IF ~~ EXTERN O#KHALID O#XanKhalid14.5

CHAIN O#KHALID O#XanKhalid14.4
@1704
END
IF ~~ EXTERN O#KHALID O#XanKhalid14.5

CHAIN O#KHALID O#XanKhalid14.5
@1705
== O#MERC @1706
DO ~SetGlobal("O#XanPCTransported","GLOBAL",1)
ClearAllActions()
StartCutSceneMode()
StartCutScene("O#Cut1d")~
EXIT

CHAIN IF ~Global("O#XanSieneAppeared","GLOBAL",9)~ THEN O#MERC O#XanKhalid15
@1707
= @1708
== JAHEI25J IF ~InParty("Jaheira") InMyArea("Jaheira")~ THEN @1709
== KORGA25J IF ~InParty("Korgan") InMyArea("Korgan")~ THEN @1710
== VICON25J IF ~InParty("Viconia") InMyArea("Viconia")~ THEN @1711
== EDWIN25J IF ~InParty("Edwin") InMyArea("Edwin")~ THEN @1712
== IMOEN25J IF ~InParty("Imoen2") InMyArea("Imoen2")~ THEN @1713
== O#MERC @1714
END
+ ~PartyGoldGT(19999)~ + @1715 EXTERN O#MERC O#XanKhalid15.1
+ ~PartyGoldGT(4999)~ + @1716 EXTERN O#MERC O#XanKhalid15.2
+ ~OR(3) CheckStatGT(Player1,14,INT) CheckStatGT(Player1,14,WIS) CheckStatGT(Player1,14,CHR)~ + @1717 EXTERN O#MERC O#XanKhalid15.3
+ ~CheckStatLT(Player1,15,INT) CheckStatLT(Player1,15,WIS) CheckStatLT(Player1,15,CHR)~ + @1718 EXTERN O#MERC O#XanKhalid15.4
++ @1719 EXTERN O#MERC O#XanKhalid15.4
+ ~PartyGoldLT(20000)~ + @1720 EXTERN O#MERC O#XanKhalid15.5
++ @1721 EXTERN O#MERC O#XanKhalid15.4

CHAIN O#MERC O#XanKhalid15.1
@1722
= @1723
DO ~SetGlobal("O#XanexchangedTransported","GLOBAL",1)
TakePartyGold(20000)
DestroyGold(20000)
AddJournalEntry(@1518,QUEST_DONE)
EraseJournalEntry(@1519)
EscapeArea()~
EXIT

CHAIN O#MERC O#XanKhalid15.2
@1724
= @1725
= @1726
= @1727
DO ~SetGlobal("O#XanexchangedTransported","GLOBAL",1)
TakePartyGold(5000)
DestroyGold(5000)
AddJournalEntry(@1517,QUEST_DONE)
EraseJournalEntry(@1519)
EscapeArea()~
EXIT

CHAIN O#MERC O#XanKhalid15.3
@1728
= @1729
= @1730
DO ~SetGlobal("O#XanexchangedTransported","GLOBAL",1)
AddJournalEntry(@1516,QUEST_DONE)
EraseJournalEntry(@1519)
EscapeArea()~
EXIT

CHAIN O#MERC O#XanKhalid15.4
@1731
END
+ ~PartyGoldGT(19999)~ + @1732 EXTERN O#MERC O#XanKhalid15.1
+ ~PartyGoldGT(4999)~ + @1733 EXTERN O#MERC O#XanKhalid15.2
+ ~OR(3) CheckStatGT(Player1,14,INT) CheckStatGT(Player1,14,WIS) CheckStatGT(Player1,14,CHR)~ + @1734 EXTERN O#MERC O#XanKhalid15.3
++ @1735 EXTERN O#MERC O#XanKhalid15.6
++ @1736 EXTERN O#MERC O#XanKhalid15.6

CHAIN O#MERC O#XanKhalid15.5
@1737
END 
IF ~~ EXTERN O#MERC O#XanKhalid15.4

CHAIN O#MERC O#XanKhalid15.6
@1738
DO ~SetGlobalTimer("O#XanexchangedEscapedTimer","GLOBAL",ONE_DAY)
SetGlobal("O#XanexchangedEscaped","GLOBAL",1)
AddJournalEntry(@1515,QUEST_DONE)
EraseJournalEntry(@1519)
EscapeArea()~
EXIT

CHAIN IF ~OR(2) Global("O#XanSieneAppeared","GLOBAL",7) Global("O#XanSieneAppeared","GLOBAL",9)~ THEN O#SIENE O#XanSiene5
@1739
== O#RUAVEL @1740
== O#EZARA @1741
== O#NAILYN @1742
== O#XAN25J IF ~Global("O#XanSieneAppeared","GLOBAL",7)~ THEN @1743
== O#SIENE @1744
== O#NAILYN @1745
== O#EZARA @1746
== O#XAN25J IF ~Global("O#XanSieneAppeared","GLOBAL",7)~ THEN @1747
== O#SIENE @1748
== O#NAILYN @1749
== O#SIENE @1750
== O#SIENE @1751
== O#EZARA @1752
== O#RUAVEL @1753
== O#NAILYN @1754
DO ~SetGlobal("O#XanToBFirstPartDone","GLOBAL",1)
ReputationInc(1)
AddExperienceParty(50000)
GiveItemCreate("BOOT01",Player1,1,0,0)
ActionOverride("O#Siene",DestroySelf())
ActionOverride("O#Ezara",DestroySelf())
ActionOverride("O#Nailyn",DestroySelf())
ActionOverride("O#Ruavel",DestroySelf())
AddJournalEntry(@1514,QUEST_DONE)~
EXIT

CHAIN IF ~Global("O#XanToBFirstPartDone","GLOBAL",5)~ THEN O#KHALID O#XanKhalid16
@1755
== O#XAN25J IF ~InParty("O#Xan") InMyArea("O#Xan") !StateCheck("O#Xan",CD_STATE_NOTVALID)~ THEN @1756 DO ~SetGlobal("O#XanToBQuestComplete1","GLOBAL",1)~
== JAHEI25J IF ~InParty("Jaheira") InMyArea("Jaheira") !StateCheck("Jaheira",CD_STATE_NOTVALID)~ THEN @1802
== O#KHALID @1757
DO ~SetGlobal("O#XanToBFirstPartDone","GLOBAL",6)
ActionOverride("O#Khalid",Enemy())
ActionOverride("O#Vel",Enemy())
ActionOverride("O#Merc",Enemy())
ActionOverride("O#Merc1",Enemy())
ActionOverride("O#Merc2",Enemy())
EraseJournalEntry(@1523)
AddJournalEntry(@1513,QUEST_DONE)~
EXIT

CHAIN IF ~Global("O#XanSieneAppeared","GLOBAL",6)~ THEN O#SIENE O#XanSiene6.1
@1758
= @1759
DO ~AddJournalEntry(@1511,QUEST_DONE)
ActionOverride("O#Siene",EscapeArea())~
EXIT

CHAIN IF ~Global("O#XanSieneAppeared","GLOBAL",10)~ THEN O#SIENE O#XanSiene6.2
@1760
= @1761
= @1762
= @1763
DO ~AddJournalEntry(@1512,QUEST_DONE)
ActionOverride("O#Siene",EscapeArea())~
EXIT

CHAIN IF WEIGHT #-1 
~OR(2)
GlobalGT("O#XanexchangedTransported","GLOBAL",1)
GlobalGT("O#XanPCTransported","GLOBAL",1)
Global("O#XanReactionAmkethW1","GLOBAL",0)~ THEN AMINTM01 O#XanReactionAmketh1
@1796
DO ~SetGlobal("O#XanReactionAmkethW1","GLOBAL",1)~
EXIT

CHAIN IF WEIGHT #-1 
~OR(2)
GlobalGT("O#XanexchangedTransported","GLOBAL",1)
GlobalGT("O#XanPCTransported","GLOBAL",1)
Global("O#XanReactionAmkethB1","GLOBAL",0)~ THEN AMINTB01 O#XanReactionAmketh2
@1797
DO ~SetGlobal("O#XanReactionAmkethB1","GLOBAL",1)~
EXIT

CHAIN IF WEIGHT #-1 ~Global("O#XanToBQuestComplete1","GLOBAL",2)~ THEN O#XAN25J O#XanToBQuestComplete1
@1798
= @1799
== JAHEI25J IF ~InParty("Jaheira") InMyArea("Jaheira") !StateCheck("Jaheira",CD_STATE_NOTVALID)~ THEN @1803
== O#XAN25J @1800
DO ~SetGlobal("O#XanToBQuestComplete1","GLOBAL",3)~
EXIT



APPEND O#XAN25J

// Entering the camp of Yaga-Shura's army

IF ~Global("O#XanYagaArmyTalk1","GLOBAL",1)~ O#XanYSA1
SAY @1888
= @1889
= @1890
IF ~~ DO ~SetGlobal("O#XanYagaArmyTalk1","GLOBAL",2)~ EXIT
END

// PH Talk 3

IF ~Global("O#XanToBPhysical1","GLOBAL",4)~ O#XanPH3
SAY @1979 
++ @1980 DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",5)~ + O#XanPH3.0
+ ~Global("O#XanHangoverSneakOut","GLOBAL",1)~ + @1981 DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",5)~ + O#XanPH3.2
+ ~!Global("O#XanHangoverSneakOut","GLOBAL",1)~ + @1981 DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",5)~ + O#XanPH3.3
++ @1982 DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",5)~ + O#XanPH3.1
++ @1983 DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",5)~ + O#XanPH3.4
++ @1984 DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",5)~ + O#XanPH3.5
END

IF ~~ O#XanPH3.0
SAY @1985
IF ~~ + O#XanPH3.1
END

IF ~~ O#XanPH3.1
SAY @1986
= @1987
++ @1988 + O#XanPH3.6
++ @1989 + O#XanPH3.7
++ @1990 + O#XanPH3.8
END

IF ~~ O#XanPH3.2
SAY @1991
= @1992
IF ~~ + O#XanPH3.1
END

IF ~~ O#XanPH3.3
SAY @1993
IF ~~ + O#XanPH3.1
END

IF ~~ O#XanPH3.4
SAY @1994 
= @1995
IF ~~ + O#XanPH3.1
END

IF ~~ O#XanPH3.5
SAY @1996
IF ~~ + O#XanPH3.1
END

IF ~~ O#XanPH3.6
SAY @1997
IF ~~ + O#XanPH3.9
END

IF ~~ O#XanPH3.7
SAY @1998
IF ~~ + O#XanPH3.9
END

IF ~~ O#XanPH3.8
SAY @1999
IF ~~ + O#XanPH3.9
END

IF ~~ O#XanPH3.9
SAY @2000
++ @2001 + O#XanPH3.10
++ @2002 + O#XanPH3.11
++ @2003 + O#XanPH3.12
++ @2004 + O#XanPH3.13
++ @2005 + O#XanPH3.14
++ @2006 + O#XanPH3.15
++ @2007 + O#XanPH3.16
END

IF ~~ O#XanPH3.10
SAY @2008
= @2009
IF ~~ + O#XanPH3.17
END

IF ~~ O#XanPH3.11
SAY @2010
= @2011
IF ~~ EXIT
END

IF ~~ O#XanPH3.12
SAY @2012
IF ~~ + O#XanPH3.17
END

IF ~~ O#XanPH3.13
SAY @2013
= @2014
IF ~~ + O#XanPH3.17
END

IF ~~ O#XanPH3.14
SAY @2015
IF ~~ + O#XanPH3.17
END

IF ~~ O#XanPH3.15
SAY @2016
IF ~~ + O#XanPH3.17
END

IF ~~ O#XanPH3.16
SAY @2017
= @2018
IF ~~ EXIT
END

IF ~~ O#XanPH3.17
SAY @2019
IF ~~ EXIT
END

// Quest dialogues

// 1.

IF ~Global("O#XanPCTransported","GLOBAL",2)~ O#XanRE1
SAY @1457 
++ @1458 DO ~SetGlobal("O#XanPCTransported","GLOBAL",3)~ + O#XanRE1.1
++ @1459 DO ~SetGlobal("O#XanPCTransported","GLOBAL",3)~ + O#XanRE1.2
++ @1460 DO ~SetGlobal("O#XanPCTransported","GLOBAL",3)~ + O#XanRE1.3
++ @1461 DO ~SetGlobal("O#XanPCTransported","GLOBAL",3)~ + O#XanRE1.4
END

IF ~~ O#XanRE1.1
SAY @1462
IF ~~ + O#XanRE1.5
END

IF ~~ O#XanRE1.2
SAY @1463
IF ~~ + O#XanRE1.5
END

IF ~~ O#XanRE1.3
SAY @1464
IF ~~ + O#XanRE1.5
END

IF ~~ O#XanRE1.4
SAY @1465
IF ~~ + O#XanRE1.5
END

IF ~~ O#XanRE1.5
SAY @1466
= @1467
= @1468
++ @1469 + O#XanRE1.6
++ @1470 + O#XanRE1.7
++ @1471 + O#XanRE1.8
++ @1472 + O#XanRE1.9
END

IF ~~ O#XanRE1.6
SAY @1473
IF ~~ + O#XanRE1.10
END

IF ~~ O#XanRE1.7
SAY @1474
IF ~~ + O#XanRE1.10
END

IF ~~ O#XanRE1.8
SAY @1475
IF ~~ + O#XanRE1.10
END

IF ~~ O#XanRE1.9
SAY @1476
IF ~~ + O#XanRE1.10
END

IF ~~ O#XanRE1.10
SAY @1477
IF ~~ DO ~SetGlobal("O#XanToBFirstPartDone","GLOBAL",1)
AddJournalEntry(@1522,QUEST_DONE)
ReputationInc(1)
AddXPObject(Player1,100000)
AddExperienceParty(50000)
GiveItemCreate("BOOT01","O#XAN",1,0,0)~ EXIT
END

// 2.

IF ~Global("O#XanToBFirstPartDone","GLOBAL",3)~ O#XanRE2
SAY @1478 
++ @1479 DO ~SetGlobal("O#XanToBFirstPartDone","GLOBAL",4)~ + O#XanRE2.1
++ @1480 DO ~SetGlobal("O#XanToBFirstPartDone","GLOBAL",4)~ + O#XanRE2.0
++ @1482 DO ~SetGlobal("O#XanToBFirstPartDone","GLOBAL",4)~ + O#XanRE2.1
END
 
IF ~~ O#XanRE2.0
SAY @1483
= @1484 
IF ~~ + O#XanRE2.1
END

IF ~~ O#XanRE2.1
SAY @1485
IF ~~ + O#XanRE2.2
END

IF ~~ O#XanRE2.2
SAY @1486
++ @1487 + O#XanRE2.2.1
++ @1488 + O#XanRE2.2.2
++ @1489 + O#XanRE2.2.3
++ @1490 + O#XanRE2.2.4
END

IF ~~ O#XanRE2.2.1
SAY @1491
IF ~~ + O#XanRE2.2.2
END

IF ~~ O#XanRE2.2.2
SAY @1492
= @1493
IF ~~ DO ~AddJournalEntry(@1523,QUEST)~ EXIT
END

IF ~~ O#XanRE2.2.3
SAY @1494
IF ~~ + O#XanRE2.2.2
END

IF ~~ O#XanRE2.2.4
SAY @1495
IF ~~ + O#XanRE2.2.2
END

// Moonblade's improvement

IF ~Global("O#XanMoonbladeImprove","GLOBAL",2)~ O#XanMIToB2
SAY @2138 
++ @2139 DO ~SetGlobal("O#XanMoonbladeImprove","GLOBAL",3)~ + O#XanMIToB2.1
++ @2140 DO ~SetGlobal("O#XanMoonbladeImprove","GLOBAL",3)~ + O#XanMIToB2.2
++ @2141 DO ~SetGlobal("O#XanMoonbladeImprove","GLOBAL",3)~ + O#XanMIToB2.3
++ @2142 DO ~SetGlobal("O#XanMoonbladeImprove","GLOBAL",3)~ + O#XanMIToB2.4
END

IF ~~ O#XanMIToB2.1
SAY @2143
IF ~~ + O#XanMIToB2.5
END

IF ~~ O#XanMIToB2.2
SAY @2144
IF ~~ + O#XanMIToB2.5
END

IF ~~ O#XanMIToB2.3
SAY @2145
IF ~~ + O#XanMIToB2.5
END

IF ~~ O#XanMIToB2.4
SAY @2146
IF ~~ + O#XanMIToB2.5
END

IF ~~ O#XanMIToB2.5
SAY @2147
= @2148
IF ~~ EXIT
END



// Throne of Bhaal

IF ~~ O#XanSolarPers
SAY @100 
= @101 
= @102 
= @103 
= @104 
COPY_TRANS FINSOL01 27
END

IF ~~ O#XanSolarLeave
SAY @105 
= @106 
= @107 
= @108 
COPY_TRANS FINSOL01 29
END

IF ~~ O#XanSolarStay
SAY @109 
COPY_TRANS FINSOL01 32
END

IF ~~ O#XanSolarPersB
SAY @2167
++ @2168 + O#XanSolarPersB0
++ @2169 + O#XanSolarPersB1
++ @2170 + O#XanSolarPersB2
++ @2171 + O#XanSolarPersB2
END

IF ~~ O#XanSolarPersB0
SAY @2172
IF ~~ + O#XanSolarPersB2
END

IF ~~ O#XanSolarPersB1
SAY @2173
IF ~~ + O#XanSolarPersB2
END

IF ~~ O#XanSolarPersB2
SAY @2174
= @2175
COPY_TRANS FINSOL01 27
END

IF ~~ O#XanSolarStayB
SAY @2176
++ @3684 + O#XanSolarStayB1
++ @3685 + O#XanSolarStayB2
++ @3686 + O#XanSolarStayB3
END

IF ~~ O#XanSolarStayB1
SAY @3687
IF ~~ + O#XanSolarStayB3
END

IF ~~ O#XanSolarStayB2
SAY @3688
IF ~~ + O#XanSolarStayB3
END

IF ~~ O#XanSolarStayB3
SAY @3689
= @3690
= @3691
COPY_TRANS FINSOL01 32
END

IF ~~ O#XanSolarLeaveB
SAY @2177
= @2178
= @2179
= @2180
COPY_TRANS FINSOL01 29
END



// ToB bonded talks

// 1.

IF ~Global("O#XanBonTalk","GLOBAL",2)~ O#XanBT1
SAY @2183 
++ @2184 DO ~SetGlobal("O#XanBonTalk","GLOBAL",3) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT1.a
++ @2185 DO ~SetGlobal("O#XanBonTalk","GLOBAL",3) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT1.b
++ @2186 DO ~SetGlobal("O#XanBonTalk","GLOBAL",3) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT1.0
++ @2187 DO ~SetGlobal("O#XanBonTalk","GLOBAL",3) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT1.b
END

IF ~~ O#XanBT1.0
SAY @2188
IF ~~ + O#XanBT1.1
END

IF ~~ O#XanBT1.a
SAY @2189
= @2190
IF ~~ + O#XanBT1.1
END

IF ~~ O#XanBT1.b
SAY @2191
IF ~~ + O#XanBT1.1
END

IF ~~ O#XanBT1.1
SAY @2192
++ @2193 + O#XanBT1.2
++ @2194 + O#XanBT1.2
++ @2195 + O#XanBT1.3
++ @2196 + O#XanBT1.4
++ @2197 + O#XanBT1.2
END

IF ~~ O#XanBT1.2
SAY @2198
= @2199
IF ~~ + O#XanBT1.5
END

IF ~~ O#XanBT1.3
SAY @2200
IF ~~ + O#XanBT1.5
END

IF ~~ O#XanBT1.4
SAY @2201
IF ~~ + O#XanBT1.5
END

IF ~~ O#XanBT1.5
SAY @2202
= @2203
= @2204
++ @2205 + O#XanBT1.6
++ @2206 + O#XanBT1.7
++ @2207 + O#XanBT1.9
++ @2208 + O#XanBT1.8
END

IF ~~ O#XanBT1.6
SAY @2209
IF ~~ + O#XanBT1.9
END

IF ~~ O#XanBT1.7
SAY @2210
IF ~~ + O#XanBT1.9
END

IF ~~ O#XanBT1.8
SAY @2211
IF ~~ + O#XanBT1.9
END

IF ~~ O#XanBT1.9
SAY @2212
= @2213
IF ~~ EXIT
END

// 2.

IF ~Global("O#XanBonTalk","GLOBAL",4)~ O#XanBT2
SAY @2214 
++ @2215 DO ~SetGlobal("O#XanBonTalk","GLOBAL",5) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT2.3
++ @2216 DO ~SetGlobal("O#XanBonTalk","GLOBAL",5) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT2.1
++ @2217 DO ~SetGlobal("O#XanBonTalk","GLOBAL",5) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT2.3
++ @2218 DO ~SetGlobal("O#XanBonTalk","GLOBAL",5) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT2.2
END

IF ~~ O#XanBT2.1
SAY @2219
IF ~~ + O#XanBT2.3
END

IF ~~ O#XanBT2.2
SAY @2220
= @2221
IF ~~ + O#XanBT2.3
END

IF ~~ O#XanBT2.3
SAY @2222
= @2223
= @2224
++ @2225 + O#XanBT2.5
++ @2226 + O#XanBT2.5
++ @2227 + O#XanBT2.5
++ @2228 + O#XanBT2.5
++ @2229 + O#XanBT2.4
END

IF ~~ O#XanBT2.4
SAY @2230
IF ~~ + O#XanBT2.5
END

IF ~~ O#XanBT2.5
SAY @2231
= @2232
= @2233
= @2234
++ @2235 + O#XanBT2.9
++ @2236 + O#XanBT2.10
++ @2237 + O#XanBT2.6
++ @2238 + O#XanBT2.7
++ @2239 + O#XanBT2.8
END

IF ~~ O#XanBT2.6
SAY @2240
IF ~~ + O#XanBT2.10
END

IF ~~ O#XanBT2.7
SAY @2241
= @2242
IF ~~ + O#XanBT2.10
END

IF ~~ O#XanBT2.8
SAY @2243
IF ~~ + O#XanBT2.10
END

IF ~~ O#XanBT2.9
SAY @2244
IF ~~ + O#XanBT2.10
END

IF ~~ O#XanBT2.10
SAY @2245
= @2246
= @2247
= @2248
++ @2249 + O#XanBT2.11
++ @2250 + O#XanBT2.11
++ @2251 + O#XanBT2.11
++ @2252 + O#XanBT2.12
++ @2253 + O#XanBT2.12
END

IF ~~ O#XanBT2.11
SAY @2254
= @2255
= @2256
= @2257
= @2258
IF ~~ EXIT
END

IF ~~ O#XanBT2.12
SAY @2259
IF ~~ + O#XanBT2.11
END

// 3.

IF ~Global("O#XanBonTalk","GLOBAL",6)~ O#XanBT3
SAY @2260 
++ @2261 DO ~SetGlobal("O#XanBonTalk","GLOBAL",7) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT3.1 
++ @2262 DO ~SetGlobal("O#XanBonTalk","GLOBAL",7) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT3.1 
++ @2263 DO ~SetGlobal("O#XanBonTalk","GLOBAL",7) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT3.1 
END

IF ~~ O#XanBT3.1
SAY @2264
IF ~Dead("Sarevok")~ + O#XanBT3.1b
IF ~!Dead("Sarevok")~ + O#XanBT3.1a
END

IF ~~ O#XanBT3.1a
SAY @2265
IF ~~ + O#XanBT3.1b
END

IF ~~ O#XanBT3.1b
SAY @2266
= @2267
= @2268
++ @2269 + O#XanBT3.2
++ @2270 + O#XanBT3.2
++ @2271 + O#XanBT3.2
END

IF ~~ O#XanBT3.2
SAY @2272
= @2273
= @2274
= @2275
++ @2276 + O#XanBT3.2a
++ @2277 + O#XanBT3.4
++ @2278 + O#XanBT3.4a
++ @2279 + O#XanBT3.3
END

IF ~~ O#XanBT3.2a
SAY @2280
IF ~~ + O#XanBT3.5
END

IF ~~ O#XanBT3.3
SAY @2281
IF ~~ + O#XanBT3.5
END

IF ~~ O#XanBT3.4
SAY @2282
IF ~~ + O#XanBT3.5
END

IF ~~ O#XanBT3.4a
SAY @2283
IF ~~ + O#XanBT3.5
END

IF ~~ O#XanBT3.5
SAY @2284
= @2285
= @2286
++ @2287 + O#XanBT3.6
++ @2288 + O#XanBT3.5a
++ @2289 + O#XanBT3.6
++ @2290 + O#XanBT3.6
END

IF ~~ O#XanBT3.5a
SAY @2291
IF ~~ + O#XanBT3.6
END

IF ~~ O#XanBT3.6
SAY @2292
= @2293
= @2294
++ @2295 + O#XanBT3.8
++ @2296 + O#XanBT3.7
++ @2297 + O#XanBT3.9
++ @2298 + O#XanBT3.10
END

IF ~~ O#XanBT3.7
SAY @2299
= @2300
IF ~~ + O#XanBT3.10
END

IF ~~ O#XanBT3.8
SAY @2301
= @2302
IF ~~ + O#XanBT3.10
END

IF ~~ O#XanBT3.9
SAY @2303
IF ~~ + O#XanBT3.10
END

IF ~~ O#XanBT3.10
SAY @2304
IF ~~ EXIT
END

// 4.

IF ~Global("O#XanBonTalk","GLOBAL",8)~ O#XanBT4
SAY @2305 
++ @2306 DO ~SetGlobal("O#XanBonTalk","GLOBAL",9) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT4.0
++ @2307 DO ~SetGlobal("O#XanBonTalk","GLOBAL",9) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT4.1
++ @2308 DO ~SetGlobal("O#XanBonTalk","GLOBAL",9) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT4.3
++ @2309 DO ~SetGlobal("O#XanBonTalk","GLOBAL",9) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT4.3
++ @2310 DO ~SetGlobal("O#XanBonTalk","GLOBAL",9) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT4.2
END

IF ~~ O#XanBT4.0
SAY @2311
++ @2312 + O#XanBT4.1
++ @2313 + O#XanBT4.1
++ @2314 + O#XanBT4.2
END

IF ~~ O#XanBT4.1
SAY @2315
++ @2316 + O#XanBT4.1a
++ @2317 + O#XanBT4.1a
++ @2318 + O#XanBT4.1a
++ @2319 + O#XanBT4.1c
++ @2320 + O#XanBT4.1b
END

IF ~~ O#XanBT4.1a
SAY @2321
IF ~~ + O#XanBT4.1c
END

IF ~~ O#XanBT4.1b
SAY @2322
IF ~~ + O#XanBT4.1c
END

IF ~~ O#XanBT4.1c
SAY @2323
= @2324
IF ~~ + O#XanBT4.5
END

IF ~~ O#XanBT4.2
SAY @2325
++ @2326 + O#XanBT4.4
++ @2327 + O#XanBT4.4
++ @2328 + O#XanBT4.5
END

IF ~~ O#XanBT4.3
SAY @2329
= @2330
++ @2331 + O#XanBT4.1
++ @2332 + O#XanBT4.1
++ @2333 + O#XanBT4.1
END

IF ~~ O#XanBT4.4
SAY @2334
IF ~~ + O#XanBT4.5
END

IF ~~ O#XanBT4.5
SAY @2335
++ @2336 + O#XanBT4.6
++ @2337 + O#XanBT4.7
++ @2338 + O#XanBT4.6
++ @2339 + O#XanBT4.6
END

IF ~~ O#XanBT4.6
SAY @2340
= @2341
++ @2342 + O#XanBT4.9
++ @2331 + O#XanBT4.9
++ @2343 + O#XanBT4.9
++ @2344 + O#XanBT4.9
++ @2345 + O#XanBT4.9
END

IF ~~ O#XanBT4.7
SAY @2346
++ @2347 + O#XanBT4.8
++ @2348 + O#XanBT4.8
++ @2349 + O#XanBT4.6
END

IF ~~ O#XanBT4.8
SAY @2350
IF ~~ + O#XanBT4.6
END

IF ~~ O#XanBT4.9
SAY @2351
= @2352
IF ~~ EXIT
END
 
// 5.

IF ~Global("O#XanBonTalk","GLOBAL",10)~ O#XanBT5
SAY @2353 
++ @2354 DO ~SetGlobal("O#XanBonTalk","GLOBAL",11) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT5.1 
++ @2355 DO ~SetGlobal("O#XanBonTalk","GLOBAL",11) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT5.1
++ @2356 DO ~SetGlobal("O#XanBonTalk","GLOBAL",11) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT5.1 
++ @2357 DO ~SetGlobal("O#XanBonTalk","GLOBAL",11) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT5.1
END

IF ~~ O#XanBT5.1
SAY @2358
= @2359
= @2360
++ @2361 + O#XanBT5.2
++ @2362 + O#XanBT5.2
++ @2363 + O#XanBT5.1b
++ @2364 + O#XanBT5.1a
END

IF ~~ O#XanBT5.1a
SAY @2365
IF ~~+ O#XanBT5.2
END

IF ~~ O#XanBT5.1b
SAY @2366
IF ~~+ O#XanBT5.2
END

IF ~~ O#XanBT5.2
SAY @2367
= @2368
= @2369
++ @2370 + O#XanBT5.3
++ @2371 + O#XanBT5.3
++ @2372 + O#XanBT5.4
++ @2373 + O#XanBT5.5
++ @2374 + O#XanBT5.6
END

IF ~~ O#XanBT5.3
SAY @2375
IF ~~ + O#XanBT5.7
END

IF ~~ O#XanBT5.4
SAY @2376
IF ~~ + O#XanBT5.7
END

IF ~~ O#XanBT5.5
SAY @2377
IF ~~ + O#XanBT5.7
END

IF ~~ O#XanBT5.6
SAY @2378
IF ~~ + O#XanBT5.7
END

IF ~~ O#XanBT5.7
SAY @2379
++ @2380 + O#XanBT5.8
++ @2381 + O#XanBT5.9
++ @2382 + O#XanBT5.10
++ @2383 + O#XanBT5.11
++ @2384 + O#XanBT5.12
+ ~NumInParty(2)~ + @2385 + O#XanBT5.7a
END

IF ~~ O#XanBT5.7a
SAY @2386
IF ~~ + O#XanBT5.13
END

IF ~~ O#XanBT5.8
SAY @2387
IF ~~ + O#XanBT5.13
END

IF ~~ O#XanBT5.9
SAY @2388
= @2389
= @2390
IF ~~ + O#XanBT5.13
END

IF ~~ O#XanBT5.10
SAY @2391
IF ~~ + O#XanBT5.13
END

IF ~~ O#XanBT5.11
SAY @2392
IF ~~ + O#XanBT5.13
END

IF ~~ O#XanBT5.12
SAY @2393
IF ~~ + O#XanBT5.13
END

IF ~~ O#XanBT5.13
SAY @2394
= @2395
IF ~~ EXIT
END

// 6.

IF ~Global("O#XanBonTalk","GLOBAL",12)~ O#XanBT6
SAY @2396 
++ @2397 DO ~SetGlobal("O#XanBonTalk","GLOBAL",13) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT6.1 
++ @2398 DO ~SetGlobal("O#XanBonTalk","GLOBAL",13) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT6.1 
++ @2399 DO ~SetGlobal("O#XanBonTalk","GLOBAL",13) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT6.1 
++ @2400 DO ~SetGlobal("O#XanBonTalk","GLOBAL",13) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT6.1 
END

IF ~~ O#XanBT6.1
SAY @2401
= @2402
= @2403
++ @2404 + O#XanBT6.2
++ @2405 + O#XanBT6.4
++ @2406 + O#XanBT6.3
++ @2407 + O#XanBT6.3
++ @2408 + O#XanBT6.4
END

IF ~~ O#XanBT6.2
SAY @2409
IF ~~ +O#XanBT6.4
END

IF ~~ O#XanBT6.3
SAY @2410
IF ~~ +O#XanBT6.4
END

IF ~~ O#XanBT6.4
SAY @2411
= @2412 
++ @2413 + O#XanBT6.5
++ @2414 + O#XanBT6.4b
++ @2415 + O#XanBT6.4a
++ @2416 + O#XanBT6.4b
END

IF ~~ O#XanBT6.4a
SAY @2417
IF ~~ +O#XanBT6.5
END

IF ~~ O#XanBT6.4b
SAY @2418 
IF ~~ +O#XanBT6.5
END

IF ~~ O#XanBT6.5
SAY @2419
= @2420
= @2421
= @2422
++ @2423 + O#XanBT6.6
++ @2424 + O#XanBT6.7
++ @2425 + O#XanBT6.8
++ @2426 + O#XanBT6.9
END

IF ~~ O#XanBT6.6
SAY @2427
IF ~~ + O#XanBT6.10
END

IF ~~ O#XanBT6.7
SAY @2428
= @2429
IF ~~ + O#XanBT6.10
END

IF ~~ O#XanBT6.8
SAY @2430
IF ~~ + O#XanBT6.10
END

IF ~~ O#XanBT6.9
SAY @2431
IF ~~ + O#XanBT6.10
END

IF ~~ O#XanBT6.10
SAY @2432
= @2433
= @2434
= @2435
= @2436
IF ~~ EXIT
END

// 7.

IF ~Global("O#XanBonTalk","GLOBAL",14)~ O#XanBT7
SAY @2437 
++ @2438 DO ~SetGlobal("O#XanBonTalk","GLOBAL",15) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT7.2
++ @2439 DO ~SetGlobal("O#XanBonTalk","GLOBAL",15) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT7.1
++ @2440 DO ~SetGlobal("O#XanBonTalk","GLOBAL",15) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT7.5
++ @2441 DO ~SetGlobal("O#XanBonTalk","GLOBAL",15) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT7.3
++ @2442 DO ~SetGlobal("O#XanBonTalk","GLOBAL",15) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT7.5
++ @2443 DO ~SetGlobal("O#XanBonTalk","GLOBAL",15) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT7.4
++ @2444 DO ~SetGlobal("O#XanBonTalk","GLOBAL",15) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT7.0
END

IF ~~ O#XanBT7.0
SAY @2445
IF ~~ + O#XanBT7.5
END

IF ~~ O#XanBT7.1
SAY @2446
IF ~~ + O#XanBT7.5
END

IF ~~ O#XanBT7.2
SAY @2447
IF ~~ + O#XanBT7.5
END

IF ~~ O#XanBT7.3
SAY @2448
IF ~~ + O#XanBT7.5
END

IF ~~ O#XanBT7.4
SAY @2449
IF ~~ + O#XanBT7.5
END

IF ~~ O#XanBT7.5
SAY @2450
++ @2451 + O#XanBT7.7
++ @2452 + O#XanBT7.7
++ @2453 + O#XanBT7.7
++ @2454 + O#XanBT7.6
++ @2455 + O#XanBT7.5a
++ @2456 + O#XanBT7.5b
END

IF ~~ O#XanBT7.5a
SAY @2457
IF ~~ + O#XanBT7.7
END

IF ~~ O#XanBT7.5b
SAY @2458
IF ~~ EXIT
END

IF ~~ O#XanBT7.6
SAY @2459
IF ~~ + O#XanBT7.7
END

IF ~~ O#XanBT7.7
SAY @2460
= @2461
= @2462
= @2463
++ @2464 + O#XanBT7.10
++ @2465 + O#XanBT7.9
++ @2466 + O#XanBT7.8
++ @2467 + O#XanBT7.10
++ @2468 + O#XanBT7.10
++ @2469 + O#XanBT7.10
++ @2470 + O#XanBT7.7a
END

IF ~~ O#XanBT7.7a
SAY @2471
IF ~~ EXIT
END

IF ~~ O#XanBT7.8
SAY @2472
IF ~~ + O#XanBT7.10
END

IF ~~ O#XanBT7.9
SAY @2473
IF ~~ + O#XanBT7.10
END

IF ~~ O#XanBT7.10
SAY @2474
= @2475
= @2476
IF ~~ EXIT
END

// 8.

IF ~Global("O#XanBonTalk","GLOBAL",16)~ O#XanBT8
SAY @2477 
++ @2478 DO ~SetGlobal("O#XanBonTalk","GLOBAL",17) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT8.00
++ @2479 DO ~SetGlobal("O#XanBonTalk","GLOBAL",17) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT8.0
++ @2480 DO ~SetGlobal("O#XanBonTalk","GLOBAL",17) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT8.00
++ @2481 DO ~SetGlobal("O#XanBonTalk","GLOBAL",17) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT8.00
++ @2482 DO ~SetGlobal("O#XanBonTalk","GLOBAL",17) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT8.00
++ @2483 DO ~SetGlobal("O#XanBonTalk","GLOBAL",17) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT8.0
END

IF ~~ O#XanBT8.00
SAY @2484
IF ~~ + O#XanBT8.0
END

IF ~~ O#XanBT8.0
SAY @2485
= @2486
= @2487
++ @2488 + O#XanBT8.1
++ @2489 + O#XanBT8.1
++ @2490 + O#XanBT8.1
END

IF ~~ O#XanBT8.1
SAY @2491
= @2492
= @2493
++ @2494 + O#XanBT8.2
++ @2495 + O#XanBT8.3
++ @2496 + O#XanBT8.4
++ @2497 + O#XanBT8.5
++ @2498 + O#XanBT8.5
++ @2499 + O#XanBT8.6
END

IF ~~ O#XanBT8.2
SAY @2500
IF ~~ EXIT
END

IF ~~ O#XanBT8.3
SAY @2501
IF ~~ EXIT
END

IF ~~ O#XanBT8.4
SAY @2502
IF ~~ + O#XanBT8.2
END

IF ~~ O#XanBT8.5
SAY @2503
IF ~~ EXIT
END

IF ~~ O#XanBT8.6
SAY @2504
IF ~~ EXIT
END

// 9.

IF ~Global("O#XanBonTalk","GLOBAL",18)~ O#XanBT9
SAY @2505 
++ @2506 DO ~SetGlobal("O#XanBonTalk","GLOBAL",19) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT9.0
++ @2507 DO ~SetGlobal("O#XanBonTalk","GLOBAL",19) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT9.1
++ @2508 DO ~SetGlobal("O#XanBonTalk","GLOBAL",19) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT9.0
++ @2509 DO ~SetGlobal("O#XanBonTalk","GLOBAL",19) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT9.0
++ @2510 DO ~SetGlobal("O#XanBonTalk","GLOBAL",19) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT9.0
++ @2511 DO ~SetGlobal("O#XanBonTalk","GLOBAL",19) RealSetGlobalTimer("O#XanToBBondedTimer","GLOBAL",2000)~ + O#XanBT9.a
END 

IF ~~ O#XanBT9.0
SAY @2512
IF ~~ + O#XanBT9.1
END

IF ~~ O#XanBT9.a
SAY @2513
IF ~~ + O#XanBT9.1
END

IF ~~ O#XanBT9.1
SAY @2514
= @2515
= @2516
= @2517
++ @2518 + O#XanBT9.2
++ @2519 + O#XanBT9.1a
END

IF ~~ O#XanBT9.1a
SAY @2520
++ @2521 + O#XanBT9.2
++ @2522 + O#XanBT9.1b
++ @2523 + O#XanBT9.1b
END

IF ~~ O#XanBT9.1b
SAY @2524
IF ~~ EXIT
END

IF ~~ O#XanBT9.2
SAY @2525
++ @2526 + O#XanBT9.3
++ @2527 + O#XanBT9.2b
++ @2528 + O#XanBT9.2b
++ @2529 + O#XanBT9.2a
++ @2530 + O#XanBT9.2a
END

IF ~~ O#XanBT9.2a
SAY @2531
IF ~~ + O#XanBT9.2c
END

IF ~~ O#XanBT9.2b
SAY @2532
IF ~~ + O#XanBT9.2c
END

IF ~~ O#XanBT9.2c
SAY @2533
IF ~~ + O#XanBT9.18
END

IF ~~ O#XanBT9.3
SAY @2534
++ @2535 + O#XanBT9.3b
++ @2536 + O#XanBT9.3b
++ @2537 + O#XanBT9.4
++ @2538 + O#XanBT9.4
++ @2539 + O#XanBT9.5
++ @2540 + O#XanBT9.5
++ @2541 + O#XanBT9.6
++ @2542 + O#XanBT9.6
++ @2543 + O#XanBT9.7
++ @2544 + O#XanBT9.7
++ @2545 + O#XanBT9.8
++ @2546 + O#XanBT9.8
++ @2547 + O#XanBT9.9
++ @2548 + O#XanBT9.9
++ @2549 + O#XanBT9.3a
END

IF ~~ O#XanBT9.3a
SAY @2550
IF ~~ + O#XanBT9.10
END

IF ~~ O#XanBT9.3b
SAY @2551
IF ~~ + O#XanBT9.10
END

IF ~~ O#XanBT9.4
SAY @2552
IF ~~ + O#XanBT9.10
END

IF ~~ O#XanBT9.5
SAY @2553
IF ~~ + O#XanBT9.10
END

IF ~~ O#XanBT9.6
SAY @2554
IF ~~ + O#XanBT9.10
END

IF ~~ O#XanBT9.7
SAY @2555
IF ~~ + O#XanBT9.10
END

IF ~~ O#XanBT9.8
SAY @2556 
IF ~~ + O#XanBT9.10
END

IF ~~ O#XanBT9.9
SAY @2557
IF ~~ + O#XanBT9.10
END

IF ~~ O#XanBT9.10
SAY @2558
++ @2559 + O#XanBT9.11
++ @2560 + O#XanBT9.12
++ @2561 + O#XanBT9.13
++ @2562 + O#XanBT9.14
++ @2563 + O#XanBT9.14
++ @2564 + O#XanBT9.15
++ @2565 + O#XanBT9.13
++ @2566 + O#XanBT9.16
++ @2567 + O#XanBT9.17
END

IF ~~ O#XanBT9.11
SAY @2568
IF ~~ + O#XanBT9.18
END

IF ~~ O#XanBT9.12
SAY @2569
IF ~~ + O#XanBT9.18
END

IF ~~ O#XanBT9.13
SAY @2570
IF ~~ + O#XanBT9.18
END

IF ~~ O#XanBT9.14
SAY @2571
IF ~~ + O#XanBT9.18
END

IF ~~ O#XanBT9.15
SAY @2572
IF ~~ EXIT
END

IF ~~ O#XanBT9.16
SAY @2573
IF ~~ + O#XanBT9.18
END

IF ~~ O#XanBT9.17
SAY @2574
IF ~~ + O#XanBT9.18
END

IF ~~ O#XanBT9.18
SAY @2575
= @2576
= @2577
++ @2578 + O#XanBT9.20
++ @2579 + O#XanBT9.19
++ @2580 + O#XanBT9.20
++ @2581 + O#XanBT9.21
++ @2582 + O#XanBT9.22
END

IF ~~ O#XanBT9.19
SAY @2583
= @2584
IF ~~ EXIT
END

IF ~~ O#XanBT9.20
SAY @2585
IF ~~ EXIT
END

IF ~~ O#XanBT9.21
SAY @2586
IF ~~ EXIT
END

IF ~~ O#XanBT9.22
SAY @2587
IF ~~ EXIT
END

// 10.

IF ~Global("O#XanBonTalk","GLOBAL",20)~ O#XanBT10
SAY @2588 
++ @2589 DO ~SetGlobal("O#XanBonTalk","GLOBAL",21)~ + O#XanBT10.2
++ @2590 DO ~SetGlobal("O#XanBonTalk","GLOBAL",21)~ + O#XanBT10.1
++ @2591 DO ~SetGlobal("O#XanBonTalk","GLOBAL",21)~ + O#XanBT10.1
++ @2592 DO ~SetGlobal("O#XanBonTalk","GLOBAL",21)~ + O#XanBT10.1
++ @2593 DO ~SetGlobal("O#XanBonTalk","GLOBAL",21)~ +O#XanBT10.3
END

IF ~~ O#XanBT10.1
SAY @2594
IF ~~ + O#XanBT10.4
END

IF ~~ O#XanBT10.2
SAY @2595
IF ~~ + O#XanBT10.4
END

IF ~~ O#XanBT10.3
SAY @2596
++ @2597 + O#XanBT10.4
++ @2598 + O#XanBT10.4
++ @2599 + O#XanBT10.4
END

IF ~~ O#XanBT10.4
SAY @2600
++ @2601 + O#XanBT10.5
++ @2602 + O#XanBT10.5
++ @2603 + O#XanBT10.5
++ @2604 + O#XanBT10.6
++ @2605 + O#XanBT10.6
END

IF ~~ O#XanBT10.5
SAY @2606
IF ~~ + O#XanBT10.6
END

IF ~~ O#XanBT10.6
SAY @2607
= @2608
++ @2609 + O#XanBT10.7
++ @2610 + O#XanBT10.7
++ @2611 + O#XanBT10.7a
++ @2612 + O#XanBT10.8
++ @2613 + O#XanBT10.9
END

IF ~~ O#XanBT10.7
SAY @2614
IF ~~ + O#XanBT10.10
END

IF ~~ O#XanBT10.7a
SAY @2615
IF ~~ + O#XanBT10.10
END

IF ~~ O#XanBT10.8
SAY @2616
IF ~~ + O#XanBT10.10
END

IF ~~ O#XanBT10.9
SAY @2617
++ @2618 + O#XanBT10.10
++ @2619 + O#XanBT10.10
++ @2620 + O#XanBT10.10
++ @2621 + O#XanBT10.10
END

IF ~~ O#XanBT10.10
SAY @2622 
= @2623
= @2624
IF ~~ EXIT
END



// Cyric, fourth challenge, bonded

 IF ~Global("O#XanBondedTalkGods","GLOBAL",2)~ O#XanBCyr1
SAY @2625 
+ ~Global("RE_CyricSex","GLOBAL",1)~ + @2626 DO ~SetGlobal("O#XanBondedTalkGods","GLOBAL",3)~ + O#XanBCyr1.0
+ ~Global("RE_CyricSex","GLOBAL",1)~ + @2627 DO ~SetGlobal("O#XanBondedTalkGods","GLOBAL",3)~ + O#XanBCyr1.0
+ ~!Global("RE_CyricSex","GLOBAL",1)~ + @2628 DO ~SetGlobal("O#XanBondedTalkGods","GLOBAL",3)~ + O#XanBCyr1.1
++ @2629 DO ~SetGlobal("O#XanBondedTalkGods","GLOBAL",3)~ + O#XanBCyr1.00
++ @2630 DO ~SetGlobal("O#XanBondedTalkGods","GLOBAL",3)~ + O#XanBCyr1.1
++ @2631 DO ~SetGlobal("O#XanBondedTalkGods","GLOBAL",3)~ + O#XanBCyr1.1
END

IF ~~ O#XanBCyr1.0
SAY @2632
IF ~~ + O#XanBCyr1.1
END

IF ~~ O#XanBCyr1.00
SAY @2633
IF ~~ + O#XanBCyr1.1
END

IF ~~ O#XanBCyr1.1
SAY @2634
= @2635
= @2636
++ @2637 + O#XanBCyr1.3
++ @2638 + O#XanBCyr1.3
++ @2639 + O#XanBCyr1.3
++ @2640 + O#XanBCyr1.2
++ @2641 + O#XanBCyr1.2
END

IF ~~ O#XanBCyr1.2
SAY @2642
IF ~~ + O#XanBCyr1.4
END

IF ~~ O#XanBCyr1.3
SAY @2643
++ @2644 + O#XanBCyr1.5
++ @2645 + O#XanBCyr1.5
++ @2646 + O#XanBCyr1.7
++ @2647 + O#XanBCyr1.7
END

IF ~~ O#XanBCyr1.4
SAY @2648
= @2649
= @2650
++ @2651 + O#XanBCyr1.4a
++ @2652 + O#XanBCyr1.4b
++ @2653 + O#XanBCyr1.4c
++ @2654 + O#XanBCyr1.4d
END

IF ~~ O#XanBCyr1.4a
SAY @2655
IF ~~ + O#XanBCyr1.8
END

IF ~~ O#XanBCyr1.4b
SAY @2656
IF ~~ + O#XanBCyr1.8
END

IF ~~ O#XanBCyr1.4c
SAY @2657
IF ~~ + O#XanBCyr1.8
END

IF ~~ O#XanBCyr1.4d
SAY @2658
IF ~~ + O#XanBCyr1.8
END

IF ~~ O#XanBCyr1.5
SAY @2659
= @2660
++ @2661 + O#XanBCyr1.6
++ @2662 + O#XanBCyr1.4
END

IF ~~ O#XanBCyr1.6
SAY @2663
= @2664
= @2665
++ @2666 + O#XanBCyr1.6a
++ @2667 + O#XanBCyr1.6b
++ @2668 + O#XanBCyr1.6c
++ @2669 + O#XanBCyr1.6d
END

IF ~~ O#XanBCyr1.6a
SAY @2670
= @2671
= @2672
= @2673
++ @2674 + O#XanBCyr1.6e
++ @2675 + O#XanBCyr1.6e
++ @2676 + O#XanBCyr1.6e
++ @2677 + O#XanBCyr1.6e
END

IF ~~ O#XanBCyr1.6e
SAY @2678
= @2679
= @2680
++ @2681 + O#XanBCyr1.8
++ @2682 + O#XanBCyr1.8
++ @2683 + O#XanBCyr1.6f
END

IF ~~ O#XanBCyr1.6f
SAY @2684
IF ~~ EXIT
END

IF ~~ O#XanBCyr1.6b
SAY @2685
++ @2686 + O#XanBCyr1.6a
++ @2687 + O#XanBCyr1.6bb
++ @2688 + O#XanBCyr1.6bb
END

IF ~~ O#XanBCyr1.6bb
SAY @2689
++ @2690 + O#XanBCyr1.6c
++ @2691 + O#XanBCyr1.6a
++ @2692 + O#XanBCyr1.6dd
END

IF ~~ O#XanBCyr1.6c
SAY @2693
++ @2694 + O#XanBCyr1.6a
++ @2695 + O#XanBCyr1.6d
END

IF ~~ O#XanBCyr1.6d
SAY @2696
= @2697
++ @2698 + O#XanBCyr1.6a
++ @2699 + O#XanBCyr1.6dd
++ @2700 + O#XanBCyr1.6dd
++ @2701 + O#XanBCyr1.6dd
END 

IF ~~ O#XanBCyr1.6dd
SAY @2702
IF ~~ + O#XanBCyr1.8
END

IF ~~ O#XanBCyr1.7
SAY @2703
IF ~~ + O#XanBCyr1.4
END

IF ~~ O#XanBCyr1.8
SAY @2704
= @2705
= @2706
IF ~~ EXIT
END



// After fourth challenge, PartyRested(), vision from Corellon, all paths

IF ~Global("O#XanTalkCorellon","GLOBAL",2)~ O#XanBCor1
SAY @2707 
IF ~~ DO ~SetGlobal("O#XanTalkCorellon","GLOBAL",3) AddXPObject("O#Xan",100000)~ + O#XanBCor1.1
END

IF ~~ O#XanBCor1.1
SAY @2708
++ @2709 + O#XanBCor1.4
++ @2710 + O#XanBCor1.2
++ @2711 + O#XanBCor1.3
END

IF ~~ O#XanBCor1.2
SAY @2712
IF ~~ + O#XanBCor1.4
END

IF ~~ O#XanBCor1.3
SAY @2713
IF ~~ + O#XanBCor1.4
END

IF ~~ O#XanBCor1.4
SAY @2714
= @2715
= @2716
= @2717
= @2718
++ @2719 + O#XanBCor1.5
++ @2720 + O#XanBCor1.5
++ @2721 + O#XanBCor1.5
++ @2722 + O#XanBCor1.5
END

IF ~~ O#XanBCor1.5
SAY @2723
= @2724
++ @2725 + O#XanBCor1.6
+ ~Global("O#XanRomanceActive","GLOBAL",2)~ + @2726 + O#XanBCor1.7
++ @2727 + O#XanBCor1.8
+ ~Global("O#XanRomanceFuture","GLOBAL",1)~ + @2728 + O#XanBCor1.9
++ @2729 + O#XanBCor1.10
END

IF ~~ O#XanBCor1.6
SAY @2730
IF ~~ + O#XanBCor1.10
END

IF ~~ O#XanBCor1.7
SAY @2731
IF ~~ + O#XanBCor1.10
END

IF ~~ O#XanBCor1.8
SAY @2732
IF ~~ + O#XanBCor1.10
END

IF ~~ O#XanBCor1.9
SAY @2733
IF ~~ + O#XanBCor1.10
END

IF ~~ O#XanBCor1.10
SAY @2734
+ ~OR(2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRomanceFuture","GLOBAL",1)~ + @2735 + O#XanBCor1.11
+ ~!Global("O#XanRomanceActive","GLOBAL",2) !Global("O#XanRomanceFuture","GLOBAL",1)~ + @2735 + O#XanBCor1.12
+ ~OR(2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRomanceFuture","GLOBAL",1)~ + @2736 + O#XanBCor1.11
+ ~!Global("O#XanRomanceActive","GLOBAL",2) !Global("O#XanRomanceFuture","GLOBAL",1)~ + @2736 + O#XanBCor1.12
+ ~OR(2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRomanceFuture","GLOBAL",1)~ + @2737 + O#XanBCor1.11
+ ~!Global("O#XanRomanceActive","GLOBAL",2) !Global("O#XanRomanceFuture","GLOBAL",1)~ + @2737 + O#XanBCor1.12
+ ~OR(2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRomanceFuture","GLOBAL",1)~ + @2738 + O#XanBCor1.11
+ ~!Global("O#XanRomanceActive","GLOBAL",2) !Global("O#XanRomanceFuture","GLOBAL",1)~ + @2738 + O#XanBCor1.12
END

IF ~~ O#XanBCor1.11
SAY @2739
= @2740
IF ~~ + O#XanBCor1.13
END

IF ~~ O#XanBCor1.12
SAY @2741
= @2742
++ @2743 + O#XanBCor1.12a
++ @2744 + O#XanBCor1.12b
++ @2745 + O#XanBCor1.12c
++ @2746 + O#XanBCor1.12d
END

IF ~~ O#XanBCor1.12a
SAY @2747
IF ~~ + O#XanBCor1.13
END

IF ~~ O#XanBCor1.12b
SAY @2748
IF ~~ + O#XanBCor1.13
END

IF ~~ O#XanBCor1.12c
SAY @2749
IF ~~ + O#XanBCor1.13
END

IF ~~ O#XanBCor1.12d
SAY @2750
= @2751
IF ~~ + O#XanBCor1.13
END

IF ~~ O#XanBCor1.13
SAY @2752
= @2753
IF ~OR(2) Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRomanceFuture","GLOBAL",1)~ + O#XanBCor1.14
IF ~!Global("O#XanRomanceActive","GLOBAL",2) !Global("O#XanRomanceFuture","GLOBAL",1)~ + O#XanBCor1.15
END

IF ~~ O#XanBCor1.14
SAY @2754
= @2755
IF ~~ EXIT
END

IF ~~ O#XanBCor1.15
SAY @2756
IF ~~ EXIT
END



// The very end

IF ~Global("O#XanBondedTalkFinale","GLOBAL",1)~ O#XanBTF1
SAY @2757 
++ @2758 DO ~SetGlobal("O#XanBondedTalkFinale","GLOBAL",2)~ + O#XanBTF1.2
++ @2759 DO ~SetGlobal("O#XanBondedTalkFinale","GLOBAL",2)~ + O#XanBTF1.1
++ @2760 DO ~SetGlobal("O#XanBondedTalkFinale","GLOBAL",2)~ + O#XanBTF1.0
++ @2761 DO ~SetGlobal("O#XanBondedTalkFinale","GLOBAL",2)~ + O#XanBTF1.2
END

IF ~~ O#XanBTF1.0
SAY @2762
++ @2763 + O#XanBTF1.00
++ @2764 + O#XanBTF1.00
++ @2765 + O#XanBTF1.00
END 

IF ~~ O#XanBTF1.00
SAY @2766
IF ~~ + O#XanBTF1.2
END

IF ~~ O#XanBTF1.1
SAY @2767
IF ~~ + O#XanBTF1.2
END

IF ~~ O#XanBTF1.2
SAY @2768
= @2769
= @2770
++ @2771 + O#XanBTF1.6
++ @2772 + O#XanBTF1.6
++ @2773 + O#XanBTF1.5
++ @2774 + O#XanBTF1.3
++ @2775 + O#XanBTF1.6
++ @2776 + O#XanBTF1.4
END

IF ~~ O#XanBTF1.3
SAY @2777
IF ~~ + O#XanBTF1.6
END

IF ~~ O#XanBTF1.4
SAY @2778
IF ~~ + O#XanBTF1.6
END

IF ~~ O#XanBTF1.5
SAY @2779
++ @2780 + O#XanBTF1.5a
++ @2781 + O#XanBTF1.6
++ @2782 + O#XanBTF1.6
END

IF ~~ O#XanBTF1.5a
SAY @2783
IF ~~ + O#XanBTF1.6
END

IF ~~ O#XanBTF1.6
SAY @2784
= @2785
= @2786
++ @2787 + O#XanBTF1.7
++ @2788 + O#XanBTF1.7
++ @2789 + O#XanBTF1.7
++ @2682 + O#XanBTF1.7
END

IF ~~ O#XanBTF1.7
SAY @2790
= @2791
= @2792
++ @2793 + O#XanBTF1.9
++ @2794 + O#XanBTF1.8
++ @2795 + O#XanBTF1.9
++ @2796 + O#XanBTF1.9
++ @2797 + O#XanBTF1.10
END

IF ~~ O#XanBTF1.8
SAY @2798
IF ~~ + O#XanBTF1.10
END

IF ~~ O#XanBTF1.9
SAY @2799
IF ~~ + O#XanBTF1.10
END

IF ~~ O#XanBTF1.10
SAY @2800
= @2801
++ @2618 DO ~RestParty()~ EXIT
++ @2802 DO ~RestParty()~ EXIT
++ @2803 + O#XanBTF1.11
++ @2804 + O#XanBTF1.12
END

IF ~~ O#XanBTF1.11
SAY @2805
= @2806
IF ~~ EXIT
END

IF ~~ O#XanBTF1.12
SAY @2807
IF ~~ EXIT
END



// Night talks

// 1. At rest after Gorion's Wraith, romance/bonded

IF ~Global("O#XanToBNightTalk1","GLOBAL",1)~ O#XanH1
SAY @3813 
++ @3814 DO ~SetGlobal("O#XanToBNightTalk1","GLOBAL",2)~ + O#XanH1.1
++ @3815 DO ~SetGlobal("O#XanToBNightTalk1","GLOBAL",2)~ + O#XanH1.00
END

IF ~~ O#XanH1.00
SAY @3816
IF ~~ DO ~RestParty()~ EXIT
END

IF ~~ O#XanH1.0
SAY @3817
= @3818
IF ~~ DO ~RestParty()~ EXIT
END

IF ~~ O#XanH1.1
SAY @3819
= @3820
++ @3821 + O#XanH1.2
++ @3822 + O#XanH1.0
END

IF ~~ O#XanH1.2
SAY @3823
++ @3824 + O#XanH1.4
++ @3825 + O#XanH1.4
++ @3826 + O#XanH1.3
END

IF ~~ O#XanH1.3
SAY @3827
IF ~~ + O#XanH1.4
END

IF ~~ O#XanH1.4
SAY @3828
= @3829
= @3830
= @3831
+ ~Global("O#XanBondedPathAlive","GLOBAL",2)~ + @3832 + O#XanH1.6
+ ~!Global("O#XanBondedPathAlive","GLOBAL",2)~ + @3832 + O#XanH1.6nb
++ @3833 + O#XanH1.7
++ @3834 + O#XanH1.5
END

IF ~~ O#XanH1.5
SAY @3835
IF ~~ + O#XanH1.hair
END

IF ~~ O#XanH1.6
SAY @3836
IF ~~ + O#XanH1.6g
END

IF ~~ O#XanH1.6nb
SAY @4272
IF ~~ + O#XanH1.6g
END

IF ~~ O#XanH1.6g
SAY @3837
++ @3838 + O#XanH1.6a
++ @3839 + O#XanH1.6a
++ @3840 + O#XanH1.6a
END

IF ~~ O#XanH1.6a
SAY @3841
= @3842
IF ~~ + O#XanH1.hair
END

IF ~~ O#XanH1.7
SAY @3843
++ @3844 + O#XanH1.7a
++ @3845 + O#XanH1.7a
++ @3846 + O#XanH1.7a
++ @3847 + O#XanH1.7b
END

IF ~~ O#XanH1.7a
SAY @3848
IF ~~ + O#XanH1.hair
END

IF ~~ O#XanH1.7b
SAY @3849
= @3850
IF ~~ + O#XanH1.7a
END

IF ~~ O#XanH1.hair
SAY @3851
++ @3852 + O#XanH1.8
++ @3853 + O#XanH1.8
++ @3854 + O#XanH1.end
END

IF ~~ O#XanH1.8
SAY @3855
= @3856
= @3857
++ @3858 + O#XanH1.end
++ @3859 + O#XanH1.end
END

IF ~~ O#XanH1.end
SAY @3860
= @3861
= @3862
IF ~~ DO ~RestParty()~ EXIT
END



// 2. At rest, bonded, night, outdoors, not in Saradush

IF ~Global("O#XanToBNightTalk2","GLOBAL",1)~ O#XanH2
SAY @3863 
IF ~~ DO ~SetGlobal("O#XanToBNightTalk2","GLOBAL",2)~ + O#XanH2.1
END

IF ~~ O#XanH2.1
SAY @3864
++ @3865 + O#XanH2.2
++ @3866 + O#XanH2.3
++ @3867 + O#XanH2.4
END

IF ~~ O#XanH2.2
SAY @3868
IF ~~ + O#XanH2.5
END

IF ~~ O#XanH2.3
SAY @3869
IF ~~ + O#XanH2.5
END

IF ~~ O#XanH2.4
SAY @3870
IF ~~ + O#XanH2.5
END

IF ~~ O#XanH2.5
SAY @3871
++ @3872 + O#XanH2.6
++ @3873 + O#XanH2.6
++ @3874 + O#XanH2.5a
END

IF ~~ O#XanH2.5a
SAY @3875
IF ~~ + O#XanH2.6
END

IF ~~ O#XanH2.6
SAY @3876
= @3877
++ @3878 + O#XanH2.7
++ @3879 + O#XanH2.7
END

IF ~~ O#XanH2.7
SAY @3880
= @3881
++ @3882 + O#XanH2.8
++ @3883 + O#XanH2.8
++ @3884 + O#XanH2.sleep
END

IF ~~ O#XanH2.sleep
SAY @3885
IF ~~ DO ~RestParty()~ EXIT
END

IF ~~ O#XanH2.8
SAY @3886
++ @3887 + O#XanH2.9
++ @3888 + O#XanH2.9
++ @3889 + O#XanH2.9
++ @3890 + O#XanH2.9
++ @3891 + O#XanH2.sleep
END

IF ~~ O#XanH2.9
SAY @3892
++ @3893 + O#XanH2.10
++ @3894 + O#XanH2.11
++ @3895 + O#XanH2.12
++ @3896 + O#XanH2.sleep
END

IF ~~ O#XanH2.10
SAY @3897
IF ~~ + O#XanH2.end
END

IF ~~ O#XanH2.11
SAY @3898
IF ~~ + O#XanH2.end
END

IF ~~ O#XanH2.12
SAY @3899
IF ~~ + O#XanH2.end
END

IF ~~ O#XanH2.end
SAY @3900
++ @3901 + O#XanH2.end2
++ @3902 + O#XanH2.end2
++ @3903 + O#XanH2.end2
END

IF ~~ O#XanH2.end2
SAY @3904
IF ~~ DO ~RestParty()~ EXIT
END



// 3. At rest, bonded, night, outdoors, after visiting the Watcher's Keep but not outside it, Chapter 9

IF ~Global("O#XanToBNightTalk3","GLOBAL",1)~ O#XanH3
SAY @3905 
IF ~~ DO ~SetGlobal("O#XanToBNightTalk3","GLOBAL",2)~ + O#XanH3.1
END

IF ~~ O#XanH3.0
SAY @3906
++ @3907 + O#XanH3.5
++ @3908 + O#XanH3.00
END

IF ~~ O#XanH3.00
SAY @3909
IF ~~ DO ~SetGlobal("O#XanToBNightTalk3","GLOBAL",3) RestParty()~ EXIT
END

IF ~~ O#XanH3.1
SAY @3910
++ @3911 + O#XanH3.2
++ @3912 + O#XanH3.3
++ @3913 + O#XanH3.3
++ @3914 + O#XanH3.0
END

IF ~~ O#XanH3.2
SAY @3915
IF ~~ + O#XanH3.3
END

IF ~~ O#XanH3.3
SAY @3916
++ @3917 + O#XanH3.4
++ @3918 + O#XanH3.3a
++ @3919 + O#XanH3.4
END

IF ~~ O#XanH3.3a
SAY @3920
IF ~~ + O#XanH3.4
END

IF ~~ O#XanH3.4
SAY @3921
++ @3922 + O#XanH3.5
++ @3923 + O#XanH3.5
++ @3924 + O#XanH3.0
END

IF ~~ O#XanH3.5
SAY @3925
IF ~~ DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("O#Drm4a")~ EXIT
END

IF ~Global("O#XanToBNightTalk3","GLOBAL",2)~ O#XanH3.6
SAY @3926
IF ~~ DO ~SetGlobal("O#XanToBNightTalk3","GLOBAL",3)~ + O#XanH3.6a
END

IF ~~ O#XanH3.6a
SAY @3927
++ @3928 + O#XanH3.7
++ @3929 + O#XanH3.7
END

IF ~~ O#XanH3.7
SAY @3930
++ @3931 + O#XanH3.8
++ @3932 + O#XanH3.8a
++ @3933 + O#XanH3.9
END

IF ~~ O#XanH3.8
SAY @3934
IF ~~ + O#XanH3.10
END

IF ~~ O#XanH3.8a
SAY @3935
IF ~~ + O#XanH3.10
END

IF ~~ O#XanH3.9
SAY @3936
IF ~~ + O#XanH3.10
END

IF ~~ O#XanH3.10
SAY @3937
= @3938
= @3939
++ @3940 + O#XanH3.11
++ @3941 + O#XanH3.12
++ @3942 + O#XanH3.13
++ @3943 + O#XanH3.13
++ @3944 + O#XanH3.14
++ @3945 + O#XanH3.15
END

IF ~~ O#XanH3.11
SAY @3946
IF ~~ + O#XanH3.15
END

IF ~~ O#XanH3.12
SAY @3947
IF ~~ + O#XanH3.15
END

IF ~~ O#XanH3.13
SAY @3948
IF ~~ + O#XanH3.15
END

IF ~~ O#XanH3.14
SAY @3949
IF ~~ + O#XanH3.15
END

IF ~~ O#XanH3.15
SAY @3950
++ @3951 + O#XanH3.16
++ @3952 + O#XanH3.16
++ @3953 + O#XanH3.16
END

IF ~~ O#XanH3.16
SAY @3954
= @3955
= @3956
++ @3957 + O#XanH3.17
++ @3958 + O#XanH3.17
++ @3959 + O#XanH3.17
END

IF ~~ O#XanH3.17
SAY @3960
++ @3961 + O#XanH3.love
++ @3962 + O#XanH3.love
++ @3963 + O#XanH3.18
++ @3964 + O#XanH3.end
END

IF ~~ O#XanH3.love
SAY @3965
= @3966
= @3967
++ @3968 + O#XanH3.love1
++ @3969 + O#XanH3.love1
++ @3970 + O#XanH3.love2
END

IF ~~ O#XanH3.love1
SAY @3971
= @3972
= @3973
= @3974
++ @3975 + O#XanH3.love3
++ @3976 + O#XanH3.end
++ @3977 + O#XanH3.end
END

IF ~~ O#XanH3.love3
SAY @3978
IF ~~ + O#XanH3.end
END

IF ~~ O#XanH3.love2
SAY @3979
IF ~~ + O#XanH3.end
END

IF ~~ O#XanH3.18
SAY @3980
= @3981
= @3982
IF ~~ + O#XanH3.end
END

IF ~~ O#XanH3.end
SAY @3983
= @3984
IF ~~ DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("O#Drm4b")~ EXIT
END



// 4. At rest after Sendai or Abazigail, romance/bonded

IF ~Global("O#XanToBNightTalk4","GLOBAL",1)~ O#XanH4
SAY @3985 
++ @3986 DO ~SetGlobal("O#XanToBNightTalk4","GLOBAL",2)~ + O#XanH4.1
++ @3987 DO ~SetGlobal("O#XanToBNightTalk4","GLOBAL",2)~ + O#XanH4.2
++ @3988 DO ~SetGlobal("O#XanToBNightTalk4","GLOBAL",2)~ + O#XanH4.2
++ @3989 DO ~SetGlobal("O#XanToBNightTalk4","GLOBAL",2)~ + O#XanH4.0
END

IF ~~ O#XanH4.0
SAY @3990
IF ~~ DO ~RestParty()~ EXIT
END

IF ~~ O#XanH4.1
SAY @3991
IF ~~ + O#XanH4.2
END

IF ~~ O#XanH4.2
SAY @3992
= @3993
IF ~!Dead("Sendai")~ + O#XanH4.2a
IF ~Dead("Sendai")~ + O#XanH4.2s
END

IF ~~ O#XanH4.2a
SAY @3994
IF ~~ + O#XanH4.3
END

IF ~~ O#XanH4.2s
SAY @3995
IF ~~ + O#XanH4.3
END

IF ~~ O#XanH4.3
SAY @3996
++ @3997 + O#XanH4.4
++ @3998 + O#XanH4.4
+ ~!NumInParty(2)~ + @3999 + O#XanH4.4
++ @4000 + O#XanH4.4
END

IF ~~ O#XanH4.4
SAY @4001
= @4002
++ @4003 + O#XanH4.5
++ @4004 + O#XanH4.5
++ @4005 + O#XanH4.5
++ @4006 + O#XanH4.5
++ @4007 + O#XanH4.5
END

IF ~~ O#XanH4.5
SAY @4008
= @4009
++ @4010 + O#XanH4.6
++ @4011 + O#XanH4.9
++ @4012 + O#XanH4.7
++ @4013 + O#XanH4.8
END

IF ~~ O#XanH4.6
SAY @4014
IF ~~ + O#XanH4.9
END

IF ~~ O#XanH4.7
SAY @4015
IF ~~ + O#XanH4.9
END

IF ~~ O#XanH4.8
SAY @4016
IF ~~ + O#XanH4.9
END

IF ~~ O#XanH4.9
SAY @4017
= @4018
++ @4019 + O#XanH4.10
++ @4020 + O#XanH4.10
++ @4021 + O#XanH4.10
++ @4022 + O#XanH4.10
++ @4023 + O#XanH4.10
END

IF ~~ O#XanH4.10
SAY @4024
++ @4025 + O#XanH4.11
++ @4026 + O#XanH4.12
++ @4027 + O#XanH4.13
++ @4028 + O#XanH4.11
++ @4029 + O#XanH4.15
END

IF ~~ O#XanH4.11
SAY @4030
IF ~~ + O#XanH4.14
END

IF ~~ O#XanH4.12
SAY @4031
IF ~~ + O#XanH4.14
END

IF ~~ O#XanH4.13
SAY @4032
IF ~~ + O#XanH4.14
END

IF ~~ O#XanH4.14
SAY @4033
++ @4034 + O#XanH4.15
++ @4035 + O#XanH4.16
++ @4036 + O#XanH4.17
++ @4037 + O#XanH4.18
END

IF ~~ O#XanH4.15
SAY @4038
IF ~~ + O#XanH4.end
END

IF ~~ O#XanH4.16
SAY @4039
IF ~~ + O#XanH4.end
END

IF ~~ O#XanH4.17
SAY @4040
IF ~~ + O#XanH4.end
END

IF ~~ O#XanH4.18
SAY @4041
IF ~~ + O#XanH4.end
END

IF ~~ O#XanH4.end
SAY @4042
= @4043
= @4044
IF ~~ DO ~RestParty()~ EXIT
END



// 5. At rest after Yaga-Shura's death, romance/bonded

IF ~Global("O#XanToBNightTalk5","GLOBAL",1)~ O#XanH5
SAY @4046 
++ @4047 DO ~SetGlobal("O#XanToBNightTalk5","GLOBAL",2)~ + O#XanH5.0
++ @4048 DO ~SetGlobal("O#XanToBNightTalk5","GLOBAL",2)~ + O#XanH5.0
++ @4049 DO ~SetGlobal("O#XanToBNightTalk5","GLOBAL",2)~ + O#XanH5.00
++ @4050 DO ~SetGlobal("O#XanToBNightTalk5","GLOBAL",2)~ + O#XanH5.00
END

IF ~~ O#XanH5.0
SAY @4051
IF ~Global("O#XanToBRR5","GLOBAL",1)~ + O#XanH5.0y
IF ~!Global("O#XanToBRR5","GLOBAL",1)~ + O#XanH5.0n
END

IF ~~ O#XanH5.00
SAY @4052
IF ~Global("O#XanToBRR5","GLOBAL",1)~ + O#XanH5.0y
IF ~!Global("O#XanToBRR5","GLOBAL",1)~ + O#XanH5.0n
END

IF ~~ O#XanH5.0y
SAY @4053
IF ~~ + O#XanH5.1
END

IF ~~ O#XanH5.0n
SAY @4054
IF ~~ + O#XanH5.1
END

IF ~~ O#XanH5.1
SAY @4055
++ @4056 + O#XanH5.2
++ @4057 + O#XanH5.3
++ @4058 + O#XanH5.4
++ @4059 + O#XanH5.5
++ @4060 + O#XanH5.2
++ @4242 + O#XanH5.1a
END

IF ~~ O#XanH5.1a
SAY @4243
IF ~~ DO ~RestParty()~ EXIT
END

IF ~~ O#XanH5.2
SAY @4061
IF ~~ + O#XanH5.6
END

IF ~~ O#XanH5.3
SAY @4062
IF ~~ + O#XanH5.6
END

IF ~~ O#XanH5.4
SAY @4063
IF ~~ + O#XanH5.6
END

IF ~~ O#XanH5.5
SAY @4064
IF ~~ + O#XanH5.6
END

IF ~~ O#XanH5.6
SAY @4065
= @4066
= @4067
= @4068
++ @4069+ O#XanH5.7
++ @4070 + O#XanH5.7
++ @4071 + O#XanH5.7
END

IF ~~ O#XanH5.7
SAY @4072
++ @4073 + O#XanH5.8
++ @4074 + O#XanH5.8
END

IF ~~ O#XanH5.8
SAY @4075
= @4076
= @4077
++ @4078 + O#XanH5.9
++ @4079 + O#XanH5.9
++ @4080 + O#XanH5.9
END

IF ~~ O#XanH5.9
SAY @4081
= @4082
++ @4083 + O#XanH5.10
++ @4084 + O#XanH5.10
END

IF ~~ O#XanH5.10
SAY @4085
= @4086
= @4087
++ @4088 + O#XanH5.12
++ @4089 + O#XanH5.11
++ @4090 + O#XanH5.11
++ @4091 + O#XanH5.11
END

IF ~~ O#XanH5.11
SAY @4092
IF ~~ + O#XanH5.12
END

IF ~~ O#XanH5.12
SAY @4093
++ @4094 + O#XanH5.13
++ @4095 + O#XanH5.13
++ @4096 + O#XanH5.13
++ @4097 + O#XanH5.14
END

IF ~~ O#XanH5.13
SAY @4098
= @4099
IF ~~ + O#XanH5.15
END

IF ~~ O#XanH5.14
SAY @4100
IF ~~ + O#XanH5.15
END 

IF ~~ O#XanH5.15
SAY @4101
= @4102
= @4103
++ @4104 + O#XanH5.16
++ @4105 + O#XanH5.16
++ @4106 + O#XanH5.16
++ @4107 + O#XanH5.16
++ @4108 + O#XanH5.16
END

IF ~~ O#XanH5.16
SAY @4109
= @4110
++ @4111 DO ~RestParty()~ EXIT
++ @4112 DO ~RestParty()~ EXIT
++ @4113 DO ~RestParty()~ EXIT
++ @4114 DO ~RestParty()~ EXIT
END



// 6. At rest in a tavern, bonded, Saradush or Amkethran, AR5003 or AR5501

IF ~Global("O#XanToBNightTalk6","GLOBAL",1)~ O#XanH6
SAY @4244
++ @4245 DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("O#Drm5a")~ EXIT
++ @4246 DO ~SetGlobal("O#XanToBNightTalk6","GLOBAL",3) RestParty()~ EXIT
END

IF ~Global("O#XanToBNightTalk6","GLOBAL",2)~ O#XanH6.room
SAY @4153 
IF ~~ DO ~SetGlobal("O#XanToBNightTalk6","GLOBAL",3)~ + O#XanH6.000
END

IF ~~ O#XanH6.000
SAY @4154
++ @4155 + O#XanH6.0
++ @4156 + O#XanH6.0
++ @4157 + O#XanH6.00
++ @4158 + O#XanH6.1
END

IF ~~ O#XanH6.00
SAY @4159
IF ~~ + O#XanH6.2
END

IF ~~ O#XanH6.0
SAY @4160
IF ~~ + O#XanH6.2
END

IF ~~ O#XanH6.1
SAY @4161
IF ~~ + O#XanH6.2
END

IF ~~ O#XanH6.2
SAY @4162
= @4163
++ @4164 + O#XanH6.3
++ @4165 + O#XanH6.4
++ @4166 + O#XanH6.5
END

IF ~~ O#XanH6.3
SAY @4167
IF ~~ + O#XanH6.6
END

IF ~~ O#XanH6.4
SAY @4168
IF ~~ + O#XanH6.6
END

IF ~~ O#XanH6.5
SAY @4169
IF ~~ + O#XanH6.6
END

IF ~~ O#XanH6.6
SAY @4170
++ @4171 + O#XanH6.7
++ @4172 + O#XanH6.7
++ @4173 + O#XanH6.7
++ @4174 + O#XanH6.7
++ @4175 + O#XanH6.7
END

IF ~~ O#XanH6.7
SAY @4176
= @4177
= @4178
++ @4179 + O#XanH6.8
++ @4180 + O#XanH6.8
++ @4181 + O#XanH6.8
++ @4182 + O#XanH6.8
END

IF ~~ O#XanH6.8
SAY @4183
++ @4184 + O#XanH6.9
++ @4185 + O#XanH6.8a
++ @4186 + O#XanH6.14
++ @4187 + O#XanH6.10
++ @4188 + O#XanH6.11
++ @4189 + O#XanH6.12
END

IF ~~ O#XanH6.8a
SAY @4190
IF ~~ + O#XanH6.14
END

IF ~~ O#XanH6.9
SAY @4191
IF ~~ + O#XanH6.14
END

IF ~~ O#XanH6.10
SAY @4192
IF ~~ + O#XanH6.14
END

IF ~~ O#XanH6.11
SAY @4193
++ @4194 + O#XanH6.15
++ @4195 + O#XanH6.14
++ @4196 + O#XanH6.13
END

IF ~~ O#XanH6.12
SAY @4197
IF ~~ + O#XanH6.14
END

IF ~~ O#XanH6.13
SAY @4198
++ @4199 + O#XanH6.15
++ @4200 + O#XanH6.ask
++ @4201 + O#XanH6.sleep
END

IF ~~ O#XanH6.14
SAY @4202
++ @4203 + O#XanH6.15
++ @4204 + O#XanH6.15
++ @4205 + O#XanH6.13
++ @4206 + O#XanH6.ask
END

IF ~~ O#XanH6.ask
SAY @4207
= @4208
++ @4209 + O#XanH6.15
++ @4210 + O#XanH6.15
++ @4211 + O#XanH6.sleep
++ @4212 + O#XanH6.sleep
END

IF ~~ O#XanH6.15
SAY @4213
= @4214
= @4215
= @4216
= @4217
= @4218
++ @4219 + O#XanH6.16
++ @4220 + O#XanH6.16
++ @4221 + O#XanH6.17
END

IF ~~ O#XanH6.16
SAY @4222
IF ~~ + O#XanH6.17
END

IF ~~ O#XanH6.17
SAY @4223
++ @4224 + O#XanH6.sleep
++ @4225 + O#XanH6.sleep
++ @4226 + O#XanH6.sleep
++ @4227 + O#XanH6.sleep1
++ @4228 + O#XanH6.sleep1
END

IF ~~ O#XanH6.sleep
SAY @4229
= @4230
= @4231
= @4232
= @4233
= @4234
= @4235
++ @4236 + O#XanH6.sleep1
++ @4237 + O#XanH6.sleep1
++ @4238 + O#XanH6.sleep1
++ @4239 + O#XanH6.sleep1
END

IF ~~ O#XanH6.sleep1
SAY @4240
= @4241
IF ~~ DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("O#Drm6b")~ EXIT
END



// Xan-initiated flirts, non-bonded

IF
~!Global("O#XanBondedPathAlive","GLOBAL",2)
Global("O#XanRomanceActive","GLOBAL",2)
Global("O#XanToBFlirtsStarted","GLOBAL",1)~ O#XanTF
SAY @111 
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",1)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF1
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",1)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF2
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",1)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF3
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",2)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF4
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",2)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF5
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",2)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF6
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",3)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF7
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",3)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF8
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",3)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF9
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",4)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF10
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",4)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF11
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",4)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF12
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",5)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF13
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",5)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF14
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",5)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF15
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",6)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF16
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",6)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF17
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",6)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF18
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",7)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF19
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",7)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF20
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",7)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF21
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",8)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF22
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",8)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF23
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",8)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF24
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",9)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF25
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",9)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF26
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",9)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF27
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",10)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF28
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",10)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF29
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",10)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF30
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",11)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF31
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",11)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF32
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",11)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF33
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",12)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF34
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",12)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF35
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",12)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF36
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",13)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF37
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",13)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF38
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",13)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF39
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",14)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF40
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",14)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF41
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",14)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanTF42
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",15)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",2)~ + O#XanTF43
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",15)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",2)~ + O#XanTF44
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",15)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",2)~ + O#XanTF45
END

IF ~~ O#XanTF1
SAY @112
IF ~~ EXIT
END

IF ~~ O#XanTF2
SAY @113
IF ~~ EXIT
END

IF ~~ O#XanTF3
SAY @114
= @115
IF ~~ EXIT
END

IF ~~ O#XanTF4
SAY @116
= @117
IF ~~ EXIT
END

IF ~~ O#XanTF5
SAY @118
IF ~~ EXIT
END

IF ~~ O#XanTF6
SAY @119
IF ~~ EXIT
END

IF ~~ O#XanTF7
SAY @120
= @121
IF ~~ EXIT
END

IF ~~ O#XanTF8
SAY @122
= @123
IF ~~ EXIT
END

IF ~~ O#XanTF9
SAY @124
IF ~~ EXIT
END

IF ~~ O#XanTF10
SAY @125
IF ~~ EXIT
END

IF ~~ O#XanTF11
SAY @126
= @127
IF ~~ EXIT
END

IF ~~ O#XanTF12
SAY @128
= @129
IF ~~ EXIT
END

IF ~~ O#XanTF13
SAY @130
= @131
IF ~~ EXIT
END

IF ~~ O#XanTF14
SAY @132
IF ~~ EXIT
END

IF ~~ O#XanTF15
SAY @133
IF ~~ EXIT
END

IF ~~ O#XanTF16
SAY @134
= @135
= @136
= @137
IF ~~ EXIT
END

IF ~~ O#XanTF17
SAY @138
IF ~~ EXIT
END

IF ~~ O#XanTF18
SAY @139
IF ~~ EXIT
END

IF ~~ O#XanTF19
SAY @140
= @141
IF ~~ EXIT
END

IF ~~ O#XanTF20
SAY @142
= @143
IF ~~ EXIT
END

IF ~~ O#XanTF21
SAY @144
= @145
= @146
IF ~~ EXIT
END

IF ~~ O#XanTF22
SAY @147
= @148
IF ~~ EXIT
END

IF ~~ O#XanTF23
SAY @149
= @150
IF ~~ EXIT
END

IF ~~ O#XanTF24
SAY @151
= @152
IF ~~ EXIT
END

IF ~~ O#XanTF25
SAY @1524
IF ~~ EXIT
END

IF ~~ O#XanTF26
SAY @1525
IF ~~ EXIT
END

IF ~~ O#XanTF27
SAY @1526
IF ~~ EXIT
END

IF ~~ O#XanTF28
SAY @1527
IF ~~ EXIT
END

IF ~~ O#XanTF29
SAY @1528
IF ~~ EXIT
END

IF ~~ O#XanTF30
SAY @1529
IF ~~ EXIT
END

IF ~~ O#XanTF31
SAY @1530
IF ~~ EXIT
END

IF ~~ O#XanTF32
SAY @1531
IF ~~ EXIT
END

IF ~~ O#XanTF33
SAY @1532
IF ~~ EXIT
END

IF ~~ O#XanTF34
SAY @1533
IF ~~ EXIT
END

IF ~~ O#XanTF35
SAY @1534
IF ~~ EXIT
END

IF ~~ O#XanTF36
SAY @1535
IF ~~ EXIT
END

IF ~~ O#XanTF37
SAY @1536
IF ~~ EXIT
END

IF ~~ O#XanTF38
SAY @1537
IF ~~ EXIT
END

IF ~~ O#XanTF39
SAY @1538
IF ~~ EXIT
END

IF ~~ O#XanTF40
SAY @1539
IF ~~ EXIT
END

IF ~~ O#XanTF41
SAY @1540
IF ~~ EXIT
END

IF ~~ O#XanTF42
SAY @1541
IF ~~ EXIT
END

IF ~~ O#XanTF43
SAY @1542
IF ~~ EXIT
END

IF ~~ O#XanTF44
SAY @1543
IF ~~ EXIT
END

IF ~~ O#XanTF45
SAY @1544
= @1545
IF ~~ EXIT
END



// Xan-initiated flirts, bonded path

IF
~Global("O#XanBondedPathAlive","GLOBAL",2)
Global("O#XanRomanceActive","GLOBAL",2)
Global("O#XanToBFlirtsStarted","GLOBAL",1)~ O#XanRF
SAY @2181
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",1)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF1
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",1)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF2
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",1)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF3
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",2)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF4
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",2)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF5
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",2)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF6
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",3)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF7
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",3)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF8
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",3)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF9
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",4)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF10
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",4)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF11
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",4)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF12
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",5)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF13
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",5)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF14
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",5)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF15
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",6)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF16
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",6)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF17
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",6)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF18
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",7)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF19
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",7)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF20
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",7)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF21
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",8)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF22
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",8)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF23
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",8)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF24
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",9)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF25
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",9)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF26
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",9)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF27
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",10)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF28
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",10)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF29
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",10)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF30
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",11)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF31
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",11)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF32
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",11)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF33
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",12)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF34
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",12)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF35
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",12)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF36
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",13)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF37
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",13)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF38
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",13)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF39
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",14)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF40
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",14)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF41
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",14)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",0) RealSetGlobalTimer("O#XanToBFlirtTimer","GLOBAL",2222)~ + O#XanRF42
IF ~RandomNum(3,1) Global("O#XanToBFlirtCounter","GLOBAL",15)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",2)~ + O#XanRF43
IF ~RandomNum(3,2) Global("O#XanToBFlirtCounter","GLOBAL",15)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",2)~ + O#XanRF44
IF ~RandomNum(3,3) Global("O#XanToBFlirtCounter","GLOBAL",15)~ DO ~SetGlobal("O#XanToBFlirtsStarted","GLOBAL",2)~ + O#XanRF45
END

IF ~~ O#XanRF1
SAY @2808
IF ~~ EXIT
END

IF ~~ O#XanRF2
SAY @2809
IF ~~ EXIT
END

IF ~~ O#XanRF3
SAY @2810
IF ~~ EXIT
END

IF ~~ O#XanRF4
SAY @2811
IF ~~ EXIT
END

IF ~~ O#XanRF5
SAY @2812
IF ~~ EXIT
END

IF ~~ O#XanRF6
SAY @2813
++ @2814 + O#XanRF6.1
++ @2815 + O#XanRF6.1
++ @2816 + O#XanRF6.1
++ @2310 EXIT
END

IF ~~ O#XanRF6.1
SAY @2817
IF ~~ EXIT
END

IF ~~ O#XanRF7
SAY @2818
IF ~~ EXIT
END

IF ~~ O#XanRF8
SAY @2819
= @2820
IF ~~ EXIT
END

IF ~~ O#XanRF9
SAY @2821
IF ~~ EXIT
END

IF ~~ O#XanRF10
SAY @2822
IF ~~ EXIT
END

IF ~~ O#XanRF11
SAY @2823
IF ~~ EXIT
END

IF ~~ O#XanRF12
SAY @2824
IF ~~ EXIT
END

IF ~~ O#XanRF13
SAY @2825
= @2826
IF ~~ EXIT
END

IF ~~ O#XanRF14
SAY @2827
IF ~~ EXIT
END

IF ~~ O#XanRF15
SAY @2828
= @2829
IF ~~ EXIT
END

IF ~~ O#XanRF16
SAY @2830
= @2831
IF ~~ EXIT
END

IF ~~ O#XanRF17
SAY @2832
IF ~~ EXIT
END

IF ~~ O#XanRF18
SAY @2833
IF ~~ EXIT
END

IF ~~ O#XanRF19
SAY @2834
IF ~~ EXIT
END

IF ~~ O#XanRF20
SAY @2835
IF ~~ EXIT
END

IF ~~ O#XanRF21
SAY @2836
IF ~~ EXIT
END

IF ~~ O#XanRF22
SAY @2837
++ @2838 + O#XanRF22.1
++ @2839 EXIT
END

IF ~~ O#XanRF22.1
SAY @2840
IF ~~ EXIT
END

IF ~~ O#XanRF23
SAY @2841
= @2842
IF ~~ EXIT
END

IF ~~ O#XanRF24
SAY @2843
= @2844
IF ~~ EXIT
END

IF ~~ O#XanRF25
SAY @2845
IF ~~ EXIT
END

IF ~~ O#XanRF26
SAY @2846
IF ~~ EXIT
END

IF ~~ O#XanRF27
SAY @2847
= @2848
IF ~~ EXIT
END

IF ~~ O#XanRF28
SAY @2849
IF ~~ EXIT
END

IF ~~ O#XanRF29
SAY @2850
IF ~~ EXIT
END

IF ~~ O#XanRF30
SAY @2851
IF ~~ EXIT
END

IF ~~ O#XanRF31
SAY @2852
++ @2853 + O#XanRF31.1
++ @2854 + O#XanRF31.1
END

IF ~~ O#XanRF31.1
SAY @2855
= @2856
IF ~~ EXIT
END

IF ~~ O#XanRF32
SAY @2857
= @2858
IF ~~ EXIT
END

IF ~~ O#XanRF33
SAY @2859
= @2860
IF ~~ EXIT
END

IF ~~ O#XanRF34
SAY @2861
IF ~~ EXIT
END

IF ~~ O#XanRF35
SAY @2862
= @2863
IF ~~ EXIT
END

IF ~~ O#XanRF36
SAY @2864
++ @2838 + O#XanRF36.1
++ @2865 + O#XanRF36.0
END

IF ~~ O#XanRF36.0
SAY @2866
IF ~~ EXIT
END

IF ~~ O#XanRF36.1
SAY @2867
= @2868
IF ~~ EXIT
END

IF ~~ O#XanRF37
SAY @2869
= @2870
IF ~~ EXIT
END

IF ~~ O#XanRF38
SAY @2871
= @2872
IF ~~ EXIT
END

IF ~~ O#XanRF39
SAY @2873
IF ~~ EXIT
END

IF ~~ O#XanRF40
SAY @2874
= @2875
IF ~~ EXIT
END

IF ~~ O#XanRF41
SAY @2876
= @2877
= @2313
IF ~~ EXIT
END

IF ~~ O#XanRF42
SAY @2878
= @2879
IF ~~ EXIT
END

IF ~~ O#XanRF43
SAY @2880
IF ~~ EXIT
END

IF ~~ O#XanRF44
SAY @2881
= @2882
= @2883
IF ~~ EXIT
END

IF ~~ O#XanRF45
SAY @2884
= @2885
= @2886
IF ~~ EXIT
END



// PLAYER-INITIATED DIALOGUES



// Chapter 10

IF ~Global("Chapter","GLOBAL",10)~ O#XanToBThronePID1
SAY @153
= @154
IF ~~ EXIT
END



// PID, ToB, Romance

IF ~IsGabber(Player1) 
Global("O#XanRomanceActive","GLOBAL",2)
!Global("O#XanBondedPathAlive","GLOBAL",2)~ O#XanFlirtsForToB
SAY @406 
+ ~RandomNum(10,1)~ + @413 + O#XanN7.1
+ ~RandomNum(10,2)~ + @413 + O#XanN7.2
+ ~RandomNum(10,3)~ + @413 + O#XanN7.3
+ ~RandomNum(10,4)~ + @413 + O#XanN7.4
+ ~RandomNum(10,5)~ + @413 + O#XanN7.5
+ ~RandomNum(10,6)~ + @413 + O#XanN7.6
+ ~RandomNum(10,7)~ + @413 + O#XanN7.7
+ ~RandomNum(10,8)~ + @413 + O#XanN7.8
+ ~RandomNum(10,9)~ + @413 + O#XanN7.9
+ ~RandomNum(10,10)~ + @413 + O#XanN7.10
+ ~RandomNum(10,1)~ + @407 + O#XanN1.1
+ ~RandomNum(10,2)~ + @407 + O#XanN1.2
+ ~RandomNum(10,3)~ + @407 + O#XanN1.3
+ ~RandomNum(10,4)~ + @407 + O#XanN1.4
+ ~RandomNum(10,5)~ + @407 + O#XanN1.5
+ ~RandomNum(10,6)~ + @407 + O#XanN1.6
+ ~RandomNum(10,7)~ + @407 + O#XanN1.7
+ ~RandomNum(10,8)~ + @407 + O#XanN1.8
+ ~RandomNum(10,9)~ + @407 + O#XanN1.9
+ ~RandomNum(10,10)~ + @407 + O#XanN1.10
+ ~RandomNum(10,1)~ + @418 + O#XanN12.1
+ ~RandomNum(10,2)~ + @418 + O#XanN12.2
+ ~RandomNum(10,3)~ + @418 + O#XanN12.3
+ ~RandomNum(10,4)~ + @418 + O#XanN12.4
+ ~RandomNum(10,5)~ + @418 + O#XanN12.5
+ ~RandomNum(10,6)~ + @418 + O#XanN12.6
+ ~RandomNum(10,7)~ + @418 + O#XanN12.7
+ ~RandomNum(10,8)~ + @418 + O#XanN12.8
+ ~RandomNum(10,9)~ + @418 + O#XanN12.9 
+ ~RandomNum(10,10)~ + @418 + O#XanN12.10
+ ~RandomNum(10,1)~ + @416 + O#XanN10.1
+ ~RandomNum(10,2)~ + @416 + O#XanN10.2
+ ~RandomNum(10,3)~ + @416 + O#XanN10.3
+ ~RandomNum(10,4)~ + @416 + O#XanN10.4
+ ~RandomNum(10,5)~ + @416 + O#XanN10.5
+ ~RandomNum(10,6)~ + @416 + O#XanN10.6
+ ~RandomNum(10,7)~ + @416 + O#XanN10.7
+ ~RandomNum(10,8)~ + @416 + O#XanN10.8
+ ~RandomNum(10,9)~ + @416 + O#XanN10.9
+ ~RandomNum(10,10)~ + @416 + O#XanN10.10
+ ~RandomNum(10,1)~ + @409 + O#XanN3.1
+ ~RandomNum(10,2)~ + @409 + O#XanN3.2
+ ~RandomNum(10,3)~ + @409 + O#XanN3.3
+ ~RandomNum(10,4)~ + @409 + O#XanN3.4
+ ~RandomNum(10,5)~ + @409 + O#XanN3.5
+ ~RandomNum(10,6)~ + @409 + O#XanN3.6
+ ~RandomNum(10,7)~ + @409 + O#XanN3.7
+ ~RandomNum(10,8)~ + @409 + O#XanN3.8
+ ~RandomNum(10,9)~ + @409 + O#XanN3.9
+ ~RandomNum(10,10)~ + @409 + O#XanN3.10
+ ~RandomNum(10,1)~ + @408 + O#XanN2.1
+ ~RandomNum(10,2)~ + @408 + O#XanN2.2
+ ~RandomNum(10,3)~ + @408 + O#XanN2.3
+ ~RandomNum(10,4)~ + @408 + O#XanN2.4
+ ~RandomNum(10,5)~ + @408 + O#XanN2.5
+ ~RandomNum(10,6)~ + @408 + O#XanN2.6
+ ~RandomNum(10,7)~ + @408 + O#XanN2.7
+ ~RandomNum(10,8)~ + @408 + O#XanN2.8
+ ~RandomNum(10,9)~ + @408 + O#XanN2.9
+ ~RandomNum(10,10)~ + @408 + O#XanN2.10
+ ~RandomNum(10,1)~ + @412 + O#XanN6.1
+ ~RandomNum(10,2)~ + @412 + O#XanN6.2
+ ~RandomNum(10,3)~ + @412 + O#XanN6.3
+ ~RandomNum(10,4)~ + @412 + O#XanN6.4
+ ~RandomNum(10,5)~ + @412 + O#XanN6.5
+ ~RandomNum(10,6)~ + @412 + O#XanN6.6
+ ~RandomNum(10,7)~ + @412 + O#XanN6.7
+ ~RandomNum(10,8)~ + @412 + O#XanN6.8
+ ~RandomNum(10,9)~ + @412 + O#XanN6.9
+ ~RandomNum(10,10)~ + @412 + O#XanN6.10
+ ~RandomNum(10,1)~ + @410 + O#XanN4.1
+ ~RandomNum(10,2)~ + @410 + O#XanN4.2
+ ~RandomNum(10,3)~ + @410 + O#XanN4.3
+ ~RandomNum(10,4)~ + @410 + O#XanN4.4
+ ~RandomNum(10,5)~ + @410 + O#XanN4.5
+ ~RandomNum(10,6)~ + @410 + O#XanN4.6
+ ~RandomNum(10,7)~ + @410 + O#XanN4.7
+ ~RandomNum(10,8)~ + @410 + O#XanN4.8
+ ~RandomNum(10,9)~ + @410 + O#XanN4.9
+ ~RandomNum(10,10)~ + @410 + O#XanN4.10
+ ~RandomNum(10,1)~ + @414 + O#XanN8.1
+ ~RandomNum(10,2)~ + @414 + O#XanN8.2
+ ~RandomNum(10,3)~ + @414 + O#XanN8.3
+ ~RandomNum(10,4)~ + @414 + O#XanN8.4
+ ~RandomNum(10,5)~ + @414 + O#XanN8.5
+ ~RandomNum(10,6)~ + @414 + O#XanN8.6
+ ~RandomNum(10,7)~ + @414 + O#XanN8.7
+ ~RandomNum(10,8)~ + @414 + O#XanN8.8
+ ~RandomNum(10,9)~ + @414 + O#XanN8.9
+ ~RandomNum(10,10)~ + @414 + O#XanN8.10
+ ~RandomNum(10,1)~ + @411 + O#XanN5.1
+ ~RandomNum(10,2)~ + @411 + O#XanN5.2
+ ~RandomNum(10,3)~ + @411 + O#XanN5.3
+ ~RandomNum(10,4)~ + @411 + O#XanN5.4
+ ~RandomNum(10,5)~ + @411 + O#XanN5.5
+ ~RandomNum(10,6)~ + @411 + O#XanN5.6
+ ~RandomNum(10,7)~ + @411 + O#XanN5.7
+ ~RandomNum(10,8)~ + @411 + O#XanN5.8
+ ~RandomNum(10,9)~ + @411 + O#XanN5.9
+ ~RandomNum(10,10)~ + @411 + O#XanN5.10
+ ~RandomNum(10,1) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.1
+ ~RandomNum(10,2) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.2
+ ~RandomNum(10,3) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.3
+ ~RandomNum(10,4) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.4
+ ~RandomNum(10,5) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.5
+ ~RandomNum(10,6) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.6
+ ~RandomNum(10,7) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.7
+ ~RandomNum(10,8) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.8
+ ~RandomNum(10,9) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.9
+ ~RandomNum(10,10) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @415 + O#XanN9.10
+ ~RandomNum(10,1) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.1
+ ~RandomNum(10,2) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.2
+ ~RandomNum(10,3) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.3
+ ~RandomNum(10,4) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.4
+ ~RandomNum(10,5) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.5
+ ~RandomNum(10,6) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.6
+ ~RandomNum(10,7) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.7
+ ~RandomNum(10,8) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.8
+ ~RandomNum(10,9) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.9
+ ~RandomNum(10,10) GlobalGT("O#XanToBPhysical1","GLOBAL",2)~ + @417 + O#XanN11.10
++ @419 + O#XanToBRomanceReaction
++ @420 + O#XanToBPIDTalk
++ @421 EXIT
END

IF ~~ O#XanN1.1
SAY @422
IF ~~ EXIT
END

IF ~~ O#XanN1.2
SAY @423
IF ~~ EXIT
END

IF ~~ O#XanN1.3
SAY @424
= @425
IF ~~ EXIT
END

IF ~~ O#XanN1.4
SAY @426
= @427
IF ~~ EXIT
END

IF ~~ O#XanN1.5
SAY @428
= @429
IF ~~ EXIT
END

IF ~~ O#XanN1.6
SAY @430
= @431
= @432
IF ~~ EXIT
END

IF ~~ O#XanN1.7
SAY @433
IF ~~ EXIT
END

IF ~~ O#XanN1.8
SAY @434
= @435
IF ~~ EXIT
END

IF ~~ O#XanN1.9
SAY @436
IF ~~ EXIT
END

IF ~~ O#XanN1.10
SAY @437
IF ~~ EXIT
END

IF ~~ O#XanN2.1
SAY @438
IF ~~ EXIT
END

IF ~~ O#XanN2.2
SAY @439
= @440
IF ~~ EXIT
END

IF ~~ O#XanN2.3
SAY @441
IF ~~ EXIT
END

IF ~~ O#XanN2.4
SAY @442
IF ~~ EXIT
END

IF ~~ O#XanN2.5
SAY @443
= @444
IF ~~ EXIT
END

IF ~~ O#XanN2.6
SAY @445
= @446
= @447
IF ~~ EXIT
END

IF ~~ O#XanN2.7
SAY @448
IF ~~ EXIT
END

IF ~~ O#XanN2.8
SAY @449
IF ~~ EXIT
END

IF ~~ O#XanN2.9
SAY @450
IF ~~ EXIT
END

IF ~~ O#XanN2.10
SAY @451
= @452
IF ~~ EXIT
END

IF ~~ O#XanN3.1
SAY @453
IF ~~ EXIT
END

IF ~~ O#XanN3.2
SAY @454
= @455
IF ~~ EXIT
END

IF ~~ O#XanN3.3
SAY @456
IF ~~ EXIT
END

IF ~~ O#XanN3.4
SAY @457
= @458
= @459
IF ~~ EXIT
END

IF ~~ O#XanN3.5
SAY @460
IF ~~ EXIT
END

IF ~~ O#XanN3.6
SAY @461
= @462
= @463
= @464
IF ~~ EXIT
END

IF ~~ O#XanN3.7
SAY @465
IF ~~ EXIT
END

IF ~~ O#XanN3.8
SAY @466 
= @467
= @468
IF ~~ EXIT
END

IF ~~ O#XanN3.9
SAY @469
IF ~~ EXIT
END

IF ~~ O#XanN3.10
SAY @470
= @471
IF ~~ EXIT
END

IF ~~ O#XanN4.1
SAY @472
= @473
IF ~~ EXIT
END

IF ~~ O#XanN4.2
SAY @474
= @475
IF ~~ EXIT
END

IF ~~ O#XanN4.3
SAY @476
= @477
IF ~~ EXIT
END

IF ~~ O#XanN4.4
SAY @478
IF ~~ EXIT
END

IF ~~ O#XanN4.5
SAY @479
= @480
IF ~~ EXIT
END

IF ~~ O#XanN4.6
SAY @481
= @482
IF ~~ EXIT
END

IF ~~ O#XanN4.7
SAY @483
= @484
IF ~~ EXIT
END

IF ~~ O#XanN4.8
SAY @485
= @486
IF ~~ EXIT
END

IF ~~ O#XanN4.9
SAY @487
IF ~~ EXIT
END

IF ~~ O#XanN4.10
SAY @488
IF ~~ EXIT
END

IF ~~ O#XanN5.1
SAY @489
IF ~~ EXIT
END

IF ~~ O#XanN5.2
SAY @490
IF ~~ EXIT
END

IF ~~ O#XanN5.3
SAY @491
IF ~~ EXIT
END

IF ~~ O#XanN5.4
SAY @492
= @493
IF ~~ EXIT
END

IF ~~ O#XanN5.5
SAY @494
IF ~~ EXIT
END

IF ~~ O#XanN5.6
SAY @495
= @496
IF ~~ EXIT
END

IF ~~ O#XanN5.7
SAY @497
IF ~~ EXIT
END

IF ~~ O#XanN5.8
SAY @498
IF ~~ EXIT
END

IF ~~ O#XanN5.9
SAY @499
IF ~~ EXIT
END

IF ~~ O#XanN5.10
SAY @500
= @501
IF ~~ EXIT
END

IF ~~ O#XanN6.1
SAY @502
IF ~~ EXIT
END

IF ~~ O#XanN6.2
SAY @503
IF ~~ EXIT
END

IF ~~ O#XanN6.3
SAY @504
IF ~~ EXIT
END

IF ~~ O#XanN6.4
SAY @505
IF ~~ EXIT
END

IF ~~ O#XanN6.5
SAY @506
IF ~~ EXIT
END

IF ~~ O#XanN6.6
SAY @507
IF ~~ EXIT
END

IF ~~ O#XanN6.7
SAY @508
IF ~~ EXIT
END

IF ~~ O#XanN6.8
SAY @509
IF ~~ EXIT
END

IF ~~ O#XanN6.9
SAY @510
= @511
= @512
= @513
IF ~~ EXIT
END

IF ~~ O#XanN6.10
SAY @514
IF ~~ EXIT
END

IF ~~ O#XanN7.1
SAY @515
IF ~~ EXIT
END

IF ~~ O#XanN7.2
SAY @516
IF ~~ EXIT
END

IF ~~ O#XanN7.3
SAY @517
= @518
IF ~~ EXIT
END

IF ~~ O#XanN7.4
SAY @519
= @520
= @521
= @522
IF ~~ EXIT
END

IF ~~ O#XanN7.5
SAY @523
= @524
IF ~~ EXIT
END

IF ~~ O#XanN7.6
SAY @525
= @526
IF ~~ EXIT
END

IF ~~ O#XanN7.7
SAY @527
= @528
IF ~~ EXIT
END

IF ~~ O#XanN7.8
SAY @529
= @530
IF ~~ EXIT
END

IF ~~ O#XanN7.9
SAY @531
= @532
IF ~~ EXIT
END

IF ~~ O#XanN7.10
SAY @533
IF ~~ EXIT
END

IF ~~ O#XanN8.1
SAY @534
= @535
++ @536 + O#XanN8.1.1
++ @537 + O#XanN8.1.1
++ @538 + O#XanN8.1.1
++ @539 + O#XanN8.1.1
++ @540 + O#XanN8.1.1
++ @541 + O#XanN8.1.1
END

IF ~~ O#XanN8.1.1
SAY @542
= @543
IF ~~ EXIT
END

IF ~~ O#XanN8.2
SAY @544
IF ~~ EXIT
END

IF ~~ O#XanN8.3
SAY @545
IF ~~ EXIT
END

IF ~~ O#XanN8.4
SAY @546
IF ~~ EXIT
END

IF ~~ O#XanN8.5
SAY @547
IF ~~ EXIT
END

IF ~~ O#XanN8.6
SAY @548
IF ~~ EXIT
END

IF ~~ O#XanN8.7
SAY @549
= @550
IF ~~ EXIT
END

IF ~~ O#XanN8.8
SAY @551
IF ~~ EXIT
END

IF ~~ O#XanN8.9
SAY @552
IF ~~ EXIT
END

IF ~~ O#XanN8.10
SAY @553
= @554
IF ~~ EXIT
END

IF ~~ O#XanN9.1
SAY @555
= @556
= @557
IF ~~ EXIT
END

IF ~~ O#XanN9.2
SAY @558
= @559
IF ~~ EXIT
END

IF ~~ O#XanN9.3
SAY @560
IF ~~ EXIT
END

IF ~~ O#XanN9.4
SAY @561
IF ~~ EXIT
END

IF ~~ O#XanN9.5
SAY @562
IF ~~ EXIT
END

IF ~~ O#XanN9.6
SAY @563
IF ~~ EXIT
END

IF ~~ O#XanN9.7
SAY @564
IF ~~ EXIT
END

IF ~~ O#XanN9.8
SAY @483
= @565
IF ~~ EXIT
END

IF ~~ O#XanN9.9
SAY @566
= @567
IF ~~ EXIT
END

IF ~~ O#XanN9.10
SAY @568
= @569
IF ~~ EXIT
END

IF ~~ O#XanN10.1
SAY @570
= @571
IF ~~ EXIT
END

IF ~~ O#XanN10.2
SAY @572
IF ~~ EXIT
END

IF ~~ O#XanN10.3
SAY @573
= @574
= @575
IF ~~ EXIT
END

IF ~~ O#XanN10.4
SAY @576
= @577
IF ~~ EXIT
END

IF ~~ O#XanN10.5
SAY @578
= @579
= @580
= @581
IF ~~ EXIT
END

IF ~~ O#XanN10.6
SAY @582
= @583
= @584
= @585
IF ~~ EXIT
END

IF ~~ O#XanN10.7
SAY @586
IF ~~ EXIT
END

IF ~~ O#XanN10.8
SAY @587
= @588
IF ~~ EXIT
END

IF ~~ O#XanN10.9
SAY @589
IF ~~ EXIT
END

IF ~~ O#XanN10.10
SAY @590
IF ~~ EXIT
END

IF ~~ O#XanN11.1
SAY @591
IF ~~ EXIT
END

IF ~~ O#XanN11.2
SAY @592
= @593
IF ~~ EXIT
END

IF ~~ O#XanN11.3
SAY @594
IF ~~ EXIT
END

IF ~~ O#XanN11.4
SAY @595
= @596
IF ~~ EXIT
END

IF ~~ O#XanN11.5
SAY @597
= @598
IF ~~ EXIT
END

IF ~~ O#XanN11.6
SAY @599
= @600
IF ~~ EXIT
END

IF ~~ O#XanN11.7
SAY @601
= @602
= @603
IF ~~ EXIT
END

IF ~~ O#XanN11.8
SAY @483
= @604
IF ~~ EXIT
END

IF ~~ O#XanN11.9
SAY @605
IF ~~ EXIT
END

IF ~~ O#XanN11.10
SAY @606
IF ~~ EXIT
END

IF ~~ O#XanN12.1
SAY @607
IF ~~ EXIT
END

IF ~~ O#XanN12.2
SAY @608
= @609
IF ~~ EXIT
END

IF ~~ O#XanN12.3
SAY @610
= @611
IF ~~ EXIT
END

IF ~~ O#XanN12.4
SAY @612
= @613
= @614
IF ~~ EXIT
END

IF ~~ O#XanN12.5
SAY @615
= @616
= @617
IF ~~ EXIT
END

IF ~~ O#XanN12.6
SAY @618
= @619
= @620
IF ~~ EXIT
END

IF ~~ O#XanN12.7
SAY @621
= @622
IF ~~ EXIT
END

IF ~~ O#XanN12.8
SAY @623
= @624
IF ~~ EXIT
END

IF ~~ O#XanN12.9
SAY @625
= @626
= @627
IF ~~ EXIT
END

IF ~~ O#XanN12.10
SAY @628
= @629
IF ~~ EXIT
END



// PID, ToB, Romance, bonded

IF ~IsGabber(Player1) 
Global("O#XanRomanceActive","GLOBAL",2)
Global("O#XanBondedPathAlive","GLOBAL",2)~ O#XanFlirtsForToB1
SAY @2887 
+ ~RandomNum(10,1)~ + @2888 + O#XanR1.1
+ ~RandomNum(10,2)~ + @2888 + O#XanR1.2
+ ~RandomNum(10,3)~ + @2888 + O#XanR1.3
+ ~RandomNum(10,4)~ + @2888 + O#XanR1.4
+ ~RandomNum(10,5)~ + @2888 + O#XanR1.5
+ ~RandomNum(10,6)~ + @2888 + O#XanR1.6
+ ~RandomNum(10,7)~ + @2888 + O#XanR1.7
+ ~RandomNum(10,8)~ + @2888 + O#XanR1.8
+ ~RandomNum(10,9)~ + @2888 + O#XanR1.9
+ ~RandomNum(10,10)~ + @2888 + O#XanR1.10
+ ~RandomNum(10,1)~ + @2889 + O#XanR2.1
+ ~RandomNum(10,2)~ + @2889 + O#XanR2.2
+ ~RandomNum(10,3)~ + @2889 + O#XanR2.3
+ ~RandomNum(10,4)~ + @2889 + O#XanR2.4
+ ~RandomNum(10,5)~ + @2889 + O#XanR2.5
+ ~RandomNum(10,6)~ + @2889 + O#XanR2.6
+ ~RandomNum(10,7)~ + @2889 + O#XanR2.7
+ ~RandomNum(10,8)~ + @2889 + O#XanR2.8
+ ~RandomNum(10,9)~ + @2889 + O#XanR2.9
+ ~RandomNum(10,10)~ + @2889 + O#XanR2.10
+ ~RandomNum(10,1)~ + @2890 + O#XanR3.1
+ ~RandomNum(10,2)~ + @2890 + O#XanR3.2
+ ~RandomNum(10,3)~ + @2890 + O#XanR3.3
+ ~RandomNum(10,4)~ + @2890 + O#XanR3.4
+ ~RandomNum(10,5)~ + @2890 + O#XanR3.5
+ ~RandomNum(10,6)~ + @2890 + O#XanR3.6
+ ~RandomNum(10,7)~ + @2890 + O#XanR3.7
+ ~RandomNum(10,8)~ + @2890 + O#XanR3.8
+ ~RandomNum(10,9)~ + @2890 + O#XanR3.9
+ ~RandomNum(10,10)~ + @2890 + O#XanR3.10
+ ~RandomNum(10,1)~ + @2891 + O#XanR4.1
+ ~RandomNum(10,2)~ + @2891 + O#XanR4.2
+ ~RandomNum(10,3)~ + @2891 + O#XanR4.3
+ ~RandomNum(10,4)~ + @2891 + O#XanR4.4
+ ~RandomNum(10,5)~ + @2891 + O#XanR4.5
+ ~RandomNum(10,6)~ + @2891 + O#XanR4.6
+ ~RandomNum(10,7)~ + @2891 + O#XanR4.7
+ ~RandomNum(10,8)~ + @2891 + O#XanR4.8
+ ~RandomNum(10,9)~ + @2891 + O#XanR4.9
+ ~RandomNum(10,10)~ + @2891 + O#XanR4.10
+ ~RandomNum(10,1)~ + @2892 + O#XanR5.1
+ ~RandomNum(10,2)~ + @2892 + O#XanR5.2
+ ~RandomNum(10,3)~ + @2892 + O#XanR5.3
+ ~RandomNum(10,4)~ + @2892 + O#XanR5.4
+ ~RandomNum(10,5)~ + @2892 + O#XanR5.5
+ ~RandomNum(10,6)~ + @2892 + O#XanR5.6
+ ~RandomNum(10,7)~ + @2892 + O#XanR5.7
+ ~RandomNum(10,8)~ + @2892 + O#XanR5.8
+ ~RandomNum(10,9)~ + @2892 + O#XanR5.9
+ ~RandomNum(10,10)~ + @2892 + O#XanR5.10
+ ~RandomNum(10,1)~ + @2893 + O#XanR6.1
+ ~RandomNum(10,2)~ + @2893 + O#XanR6.2
+ ~RandomNum(10,3)~ + @2893 + O#XanR6.3
+ ~RandomNum(10,4)~ + @2893 + O#XanR6.4
+ ~RandomNum(10,5)~ + @2893 + O#XanR6.5
+ ~RandomNum(10,6)~ + @2893 + O#XanR6.6
+ ~RandomNum(10,7)~ + @2893 + O#XanR6.7
+ ~RandomNum(10,8)~ + @2893 + O#XanR6.8
+ ~RandomNum(10,9)~ + @2893 + O#XanR6.9
+ ~RandomNum(10,10)~ + @2893 + O#XanR6.10
+ ~RandomNum(10,1)~ + @2894 + O#XanR7.1
+ ~RandomNum(10,2)~ + @2894 + O#XanR7.2
+ ~RandomNum(10,3)~ + @2894 + O#XanR7.3
+ ~RandomNum(10,4)~ + @2894 + O#XanR7.4
+ ~RandomNum(10,5)~ + @2894 + O#XanR7.5
+ ~RandomNum(10,6)~ + @2894 + O#XanR7.6
+ ~RandomNum(10,7)~ + @2894 + O#XanR7.7
+ ~RandomNum(10,8)~ + @2894 + O#XanR7.8
+ ~RandomNum(10,9)~ + @2894 + O#XanR7.9
+ ~RandomNum(10,10)~ + @2894 + O#XanR7.10
+ ~RandomNum(10,1)~ + @2895 + O#XanR8.1
+ ~RandomNum(10,2)~ + @2895 + O#XanR8.2
+ ~RandomNum(10,3)~ + @2895 + O#XanR8.3
+ ~RandomNum(10,4)~ + @2895 + O#XanR8.4
+ ~RandomNum(10,5)~ + @2895 + O#XanR8.5
+ ~RandomNum(10,6)~ + @2895 + O#XanR8.6
+ ~RandomNum(10,7)~ + @2895 + O#XanR8.7
+ ~RandomNum(10,8)~ + @2895 + O#XanR8.8
+ ~RandomNum(10,9)~ + @2895 + O#XanR8.9
+ ~RandomNum(10,10)~ + @2895 + O#XanR8.10
+ ~RandomNum(10,1)~ + @2896 + O#XanR9.1
+ ~RandomNum(10,2)~ + @2896 + O#XanR9.2
+ ~RandomNum(10,3)~ + @2896 + O#XanR9.3
+ ~RandomNum(10,4)~ + @2896 + O#XanR9.4
+ ~RandomNum(10,5)~ + @2896 + O#XanR9.5
+ ~RandomNum(10,6)~ + @2896 + O#XanR9.6
+ ~RandomNum(10,7)~ + @2896 + O#XanR9.7
+ ~RandomNum(10,8)~ + @2896 + O#XanR9.8
+ ~RandomNum(10,9)~ + @2896 + O#XanR9.9
+ ~RandomNum(10,10)~ + @2896 + O#XanR9.10
+ ~RandomNum(10,1) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.1
+ ~RandomNum(10,2) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.2
+ ~RandomNum(10,3) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.3
+ ~RandomNum(10,4) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.4
+ ~RandomNum(10,5) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.5
+ ~RandomNum(10,6) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.6
+ ~RandomNum(10,7) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.7
+ ~RandomNum(10,8) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.8
+ ~RandomNum(10,9) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.9
+ ~RandomNum(10,10) GlobalGT("O#XanBonTalk","GLOBAL",8)~ + @2897 + O#XanR10.10
+ ~RandomNum(10,1)~ + @2898 + O#XanR11.1
+ ~RandomNum(10,2)~ + @2898 + O#XanR11.2
+ ~RandomNum(10,3)~ + @2898 + O#XanR11.3
+ ~RandomNum(10,4)~ + @2898 + O#XanR11.4
+ ~RandomNum(10,5)~ + @2898 + O#XanR11.5
+ ~RandomNum(10,6)~ + @2898 + O#XanR11.6
+ ~RandomNum(10,7)~ + @2898 + O#XanR11.7
+ ~RandomNum(10,8)~ + @2898 + O#XanR11.8
+ ~RandomNum(10,9)~ + @2898 + O#XanR11.9
+ ~RandomNum(10,10)~ + @2898 + O#XanR11.10
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,1)~ + @2899 + O#XanR12.1
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,2)~ + @2899 + O#XanR12.2
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,3)~ + @2899 + O#XanR12.3
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,4)~ + @2899 + O#XanR12.4
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,5)~ + @2899 + O#XanR12.5
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,6)~ + @2899 + O#XanR12.6
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,7)~ + @2899 + O#XanR12.7
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,8)~ + @2899 + O#XanR12.8
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,9)~ + @2899 + O#XanR12.9
+ ~Global("Chapter","GLOBAL",9) RandomNum(10,10)~ + @2899 + O#XanR12.10
++ @420 + O#XanToBPIDTalk
++ @421 EXIT
END

IF ~~ O#XanR1.1
SAY @2900
IF ~~ EXIT
END

IF ~~ O#XanR1.2
SAY @2901
IF ~~ EXIT
END

IF ~~ O#XanR1.3
SAY @2902
IF ~~ EXIT
END

IF ~~ O#XanR1.4
SAY @2903
IF ~~ EXIT
END

IF ~~ O#XanR1.5
SAY @2904
IF ~~ EXIT
END

IF ~~ O#XanR1.6
SAY @2905
IF ~~ EXIT
END

IF ~~ O#XanR1.7
SAY @2906
IF ~~ EXIT
END

IF ~~ O#XanR1.8
SAY @2907
IF ~~ EXIT
END

IF ~~ O#XanR1.9
SAY @2908
IF ~~ EXIT
END

IF ~~ O#XanR1.10
SAY @2909
IF ~~ EXIT
END

IF ~~ O#XanR2.1
SAY @2910
= @2911
IF ~~ EXIT
END

IF ~~ O#XanR2.2
SAY @2912
IF ~~ EXIT
END

IF ~~ O#XanR2.3
SAY @2913
IF ~~ EXIT
END

IF ~~ O#XanR2.4
SAY @2914
IF ~~ EXIT
END

IF ~~ O#XanR2.5
SAY @2915
IF ~~ EXIT
END

IF ~~ O#XanR2.6
SAY @2916
IF ~~ EXIT
END

IF ~~ O#XanR2.7
SAY @2917
IF ~~ EXIT
END

IF ~~ O#XanR2.8
SAY @2918
IF ~~ EXIT
END

IF ~~ O#XanR2.9
SAY @2919
IF ~~ EXIT
END

IF ~~ O#XanR2.10
SAY @2920
IF ~~ EXIT
END

IF ~~ O#XanR3.1
SAY @2921
IF ~~ EXIT
END

IF ~~ O#XanR3.2
SAY @2922
IF ~~ EXIT
END

IF ~~ O#XanR3.3
SAY @2923
IF ~~ EXIT
END

IF ~~ O#XanR3.4
SAY @2924
= @2925
IF ~~ EXIT
END

IF ~~ O#XanR3.5
SAY @2926
IF ~~ EXIT
END

IF ~~ O#XanR3.6
SAY @2927
= @2928
IF ~~ EXIT
END

IF ~~ O#XanR3.7
SAY @2929
IF ~~ EXIT
END

IF ~~ O#XanR3.8
SAY @2930
= @2931
IF ~~ EXIT
END

IF ~~ O#XanR3.9
SAY @2932
= @2933
IF ~~ EXIT
END

IF ~~ O#XanR3.10
SAY @2934 
= @2935
= @2936
IF ~~ EXIT
END

IF ~~ O#XanR4.1
SAY @2937
IF ~~ EXIT
END

IF ~~ O#XanR4.2
SAY @2938
IF ~~ EXIT
END

IF ~~ O#XanR4.3
SAY @2939
IF ~~ EXIT
END

IF ~~ O#XanR4.4
SAY @2940
IF ~~ EXIT
END

IF ~~ O#XanR4.5
SAY @2941
IF ~~ EXIT
END

IF ~~ O#XanR4.6
SAY @2942
IF ~~ EXIT
END

IF ~~ O#XanR4.7
SAY @2943
= @2944
IF ~~ EXIT
END

IF ~~ O#XanR4.8
SAY @2945
= @2946
IF ~~ EXIT
END

IF ~~ O#XanR4.9
SAY @2947
IF ~~ EXIT
END

IF ~~ O#XanR4.10
SAY @2948
IF ~~ EXIT
END

IF ~~ O#XanR5.1
SAY @2949
IF ~~ EXIT
END

IF ~~ O#XanR5.2
SAY @2950
IF ~~ EXIT
END

IF ~~ O#XanR5.3
SAY @2951
IF ~~ EXIT
END

IF ~~ O#XanR5.4
SAY @2952
IF ~~ EXIT
END

IF ~~ O#XanR5.5
SAY @2953
IF ~~ EXIT
END

IF ~~ O#XanR5.6
SAY @2954
IF ~~ EXIT
END

IF ~~ O#XanR5.7
SAY @2955
IF ~~ EXIT
END

IF ~~ O#XanR5.8
SAY @2956
= @2957
IF ~~ EXIT
END

IF ~~ O#XanR5.9
SAY @2958
IF ~~ EXIT
END

IF ~~ O#XanR5.10
SAY @2959
IF ~~ EXIT
END

IF ~~ O#XanR6.1
SAY @2960
IF ~~ EXIT
END

IF ~~ O#XanR6.2
SAY @2961
IF ~~ EXIT
END

IF ~~ O#XanR6.3
SAY @2962
IF ~~ EXIT
END

IF ~~ O#XanR6.4
SAY @2963
IF ~~ EXIT
END

IF ~~ O#XanR6.5
SAY @2964
IF ~~ EXIT
END

IF ~~ O#XanR6.6
SAY @2965
IF ~~ EXIT
END

IF ~~ O#XanR6.7
SAY @2966
IF ~~ EXIT
END

IF ~~ O#XanR6.8
SAY @2967
IF ~~ EXIT
END

IF ~~ O#XanR6.9
SAY @2968
IF ~~ EXIT
END

IF ~~ O#XanR6.10
SAY @2969
IF ~~ EXIT
END

IF ~~ O#XanR7.1
SAY @2970
IF ~~ EXIT
END

IF ~~ O#XanR7.2
SAY @2971
IF ~~ EXIT
END

IF ~~ O#XanR7.3
SAY @2972
IF ~~ EXIT
END

IF ~~ O#XanR7.4
SAY @2973
IF ~~ EXIT
END

IF ~~ O#XanR7.5
SAY @2974
IF ~~ EXIT
END

IF ~~ O#XanR7.6
SAY @2975
IF ~~ EXIT
END

IF ~~ O#XanR7.7
SAY @2976
IF ~~ EXIT
END

IF ~~ O#XanR7.8
SAY @2977
IF ~~ EXIT
END

IF ~~ O#XanR7.9
SAY @2978
IF ~~ EXIT
END

IF ~~ O#XanR7.10
SAY @2979
IF ~~ EXIT
END

IF ~~ O#XanR8.1
SAY @2980
IF ~~ EXIT
END

IF ~~ O#XanR8.2
SAY @2981
IF ~~ EXIT
END

IF ~~ O#XanR8.3
SAY @2982
IF ~~ EXIT
END

IF ~~ O#XanR8.4
SAY @2983
IF ~~ EXIT
END

IF ~~ O#XanR8.5
SAY @2984
IF ~~ EXIT
END

IF ~~ O#XanR8.6
SAY @2985
IF ~~ EXIT
END

IF ~~ O#XanR8.7
SAY @2986
IF ~~ EXIT
END

IF ~~ O#XanR8.8
SAY @2987
IF ~~ EXIT
END

IF ~~ O#XanR8.9
SAY @2988
IF ~~ EXIT
END

IF ~~ O#XanR8.10
SAY @2989
IF ~~ EXIT
END

IF ~~ O#XanR9.1
SAY @2990
IF ~~ EXIT
END

IF ~~ O#XanR9.2
SAY @2991
IF ~~ EXIT
END

IF ~~ O#XanR9.3
SAY @2992
IF ~~ EXIT
END

IF ~~ O#XanR9.4
SAY @2993
IF ~~ EXIT
END

IF ~~ O#XanR9.5
SAY @2994
IF ~~ EXIT
END

IF ~~ O#XanR9.6
SAY @2995
IF ~~ EXIT
END

IF ~~ O#XanR9.7
SAY @2996
IF ~~ EXIT
END

IF ~~ O#XanR9.8
SAY @2997
IF ~~ EXIT
END

IF ~~ O#XanR9.9
SAY @2998
IF ~~ EXIT
END

IF ~~ O#XanR9.10
SAY @2999
IF ~~ EXIT
END

IF ~~ O#XanR10.1
SAY @3000
IF ~~ EXIT
END

IF ~~ O#XanR10.2
SAY @3001
IF ~~ EXIT
END

IF ~~ O#XanR10.3
SAY @3002
= @3003
IF ~~ EXIT
END

IF ~~ O#XanR10.4
SAY @3004
++ @3005 + O#XanR10.4a
++ @3006 + O#XanR10.4a
++ @3007 + O#XanR10.4a
++ @3008 EXIT
END

IF ~~ O#XanR10.4a
SAY @3009
IF ~~ EXIT
END

IF ~~ O#XanR10.5
SAY @3010
IF ~~ EXIT
END

IF ~~ O#XanR10.6
SAY @3011
IF ~~ EXIT
END

IF ~~ O#XanR10.7
SAY @3012
IF ~~ EXIT
END

IF ~~ O#XanR10.8
SAY @3013
IF ~~ EXIT
END

IF ~~ O#XanR10.9
SAY @3014
IF ~~ EXIT
END

IF ~~ O#XanR10.10
SAY @3015
IF ~~ EXIT
END

IF ~~ O#XanR11.1
SAY @3016
IF ~~ EXIT
END

IF ~~ O#XanR11.2
SAY @3017
IF ~~ EXIT
END

IF ~~ O#XanR11.3
SAY @3018
IF ~~ EXIT
END

IF ~~ O#XanR11.4
SAY @3019
IF ~~ EXIT
END

IF ~~ O#XanR11.5
SAY @3020
IF ~~ EXIT
END

IF ~~ O#XanR11.6
SAY @3021
IF ~~ EXIT
END

IF ~~ O#XanR11.7
SAY @3022
IF ~~ EXIT
END

IF ~~ O#XanR11.8
SAY @3023
IF ~~ EXIT
END

IF ~~ O#XanR11.9
SAY @3024
IF ~~ EXIT
END

IF ~~ O#XanR11.10
SAY @3025
= @3026
IF ~~ EXIT
END

IF ~~ O#XanR12.1
SAY @3027
IF ~~ EXIT
END

IF ~~ O#XanR12.2
SAY @3028
IF ~~ EXIT
END

IF ~~ O#XanR12.3
SAY @3029
IF ~~ EXIT
END

IF ~~ O#XanR12.4
SAY @3030
IF ~~ EXIT
END

IF ~~ O#XanR12.5
SAY @3031
IF ~~ EXIT
END

IF ~~ O#XanR12.6
SAY @3032
IF ~~ EXIT
END

IF ~~ O#XanR12.7
SAY @3033
IF ~~ EXIT
END

IF ~~ O#XanR12.8
SAY @3034
IF ~~ EXIT
END

IF ~~ O#XanR12.9
SAY @3035
IF ~~ EXIT
END

IF ~~ O#XanR12.10
SAY @3036
IF ~~ EXIT
END



// PID, ToB, friendship

IF ~IsGabber(Player1) 
Global("O#XanFriendship","GLOBAL",1)~ O#XanFriendshipForToB
SAY @630 
+ ~RandomNum(5,1)~ + @631 + O#XanV1.1
+ ~RandomNum(5,2)~ + @631 + O#XanV1.2
+ ~RandomNum(5,3)~ + @631 + O#XanV1.3
+ ~RandomNum(5,4)~ + @631 + O#XanV1.4
+ ~RandomNum(5,5)~ + @631 + O#XanV1.5
+ ~RandomNum(5,1)~ + @632 + O#XanV2.1
+ ~RandomNum(5,2)~ + @632 + O#XanV2.2
+ ~RandomNum(5,3)~ + @632 + O#XanV2.3
+ ~RandomNum(5,4)~ + @632 + O#XanV2.4
+ ~RandomNum(5,5)~ + @632 + O#XanV2.5
+ ~RandomNum(5,1)~ + @633 + O#XanV3.1
+ ~RandomNum(5,2)~ + @633 + O#XanV3.2
+ ~RandomNum(5,3)~ + @633 + O#XanV3.3
+ ~RandomNum(5,4)~ + @633 + O#XanV3.4
+ ~RandomNum(5,5)~ + @633 + O#XanV3.5
+ ~RandomNum(5,1)~ + @634 + O#XanV4.1
+ ~RandomNum(5,2)~ + @634 + O#XanV4.2
+ ~RandomNum(5,3)~ + @634 + O#XanV4.3
+ ~RandomNum(5,4)~ + @634 + O#XanV4.4
+ ~RandomNum(5,5)~ + @634 + O#XanV4.5
+ ~RandomNum(5,1)~ + @635 + O#XanV5.1
+ ~RandomNum(5,2)~ + @635 + O#XanV5.2
+ ~RandomNum(5,3)~ + @635 + O#XanV5.3
+ ~RandomNum(5,4)~ + @635 + O#XanV5.4
+ ~RandomNum(5,5)~ + @635 + O#XanV5.5
+ ~RandomNum(5,1)~ + @636 + O#XanV6.1
+ ~RandomNum(5,2)~ + @636 + O#XanV6.2
+ ~RandomNum(5,3)~ + @636 + O#XanV6.3
+ ~RandomNum(5,4)~ + @636 + O#XanV6.4
+ ~RandomNum(5,5)~ + @636 + O#XanV6.5
+ ~RandomNum(5,1)~ + @637 + O#XanV7.1
+ ~RandomNum(5,2)~ + @637 + O#XanV7.2
+ ~RandomNum(5,3)~ + @637 + O#XanV7.3
+ ~RandomNum(5,4)~ + @637 + O#XanV7.4
+ ~RandomNum(5,5)~ + @637 + O#XanV7.5
+ ~RandomNum(5,1)~ + @638 + O#XanV8.1
+ ~RandomNum(5,2)~ + @638 + O#XanV8.2
+ ~RandomNum(5,3)~ + @638 + O#XanV8.3
+ ~RandomNum(5,4)~ + @638 + O#XanV8.4
+ ~RandomNum(5,5)~ + @638 + O#XanV8.5
+ ~RandomNum(5,1)~ + @639 + O#XanV9.1
+ ~RandomNum(5,2)~ + @639 + O#XanV9.2
+ ~RandomNum(5,3)~ + @639 + O#XanV9.3
+ ~RandomNum(5,4)~ + @639 + O#XanV9.4
+ ~RandomNum(5,5)~ + @639 + O#XanV9.5
+ ~Gender(Player1,FEMALE) RandomNum(5,1)~ + @640 + O#XanV10.1
+ ~Gender(Player1,FEMALE) RandomNum(5,2)~ + @640 + O#XanV10.2
+ ~Gender(Player1,FEMALE) RandomNum(5,3)~ + @640 + O#XanV10.3
+ ~Gender(Player1,FEMALE) RandomNum(5,4)~ + @640 + O#XanV10.4
+ ~Gender(Player1,FEMALE) RandomNum(5,5)~ + @640 + O#XanV10.5
+ ~RandomNum(5,1)~ + @641 + O#XanV11.1
+ ~RandomNum(5,2)~ + @641 + O#XanV11.2
+ ~RandomNum(5,3)~ + @641 + O#XanV11.3
+ ~RandomNum(5,4)~ + @641 + O#XanV11.4
+ ~RandomNum(5,5)~ + @641 + O#XanV11.5
++ @419 + O#XanToBFriendReaction
++ @420 + O#XanToBPIDTalk
++ @421 EXIT
END

IF ~~ O#XanV1.1
SAY @642
IF ~~ EXIT
END

IF ~~ O#XanV1.2
SAY @643
IF ~~ EXIT
END

IF ~~ O#XanV1.3
SAY @644
IF ~~ EXIT
END

IF ~~ O#XanV1.4
SAY @645
IF ~~ EXIT
END

IF ~~ O#XanV1.5
SAY @646
IF ~~ EXIT
END

IF ~~ O#XanV2.1
SAY @647
IF ~~ EXIT
END

IF ~~ O#XanV2.2
SAY @648
IF ~~ EXIT
END

IF ~~ O#XanV2.3
SAY @649
IF ~~ EXIT
END

IF ~~ O#XanV2.4
SAY @650
IF ~~ EXIT
END

IF ~~ O#XanV2.5
SAY @651
IF ~~ EXIT
END

IF ~~ O#XanV3.1
SAY @652
= @653
IF ~~ EXIT
END

IF ~~ O#XanV3.2
SAY @654
IF ~~ EXIT
END

IF ~~ O#XanV3.3
SAY @655
IF ~~ EXIT
END

IF ~~ O#XanV3.4
SAY @656
IF ~~ EXIT
END

IF ~~ O#XanV3.5
SAY @657
IF ~~ EXIT
END

IF ~~ O#XanV4.1
SAY @658
= @659
IF ~~ EXIT
END

IF ~~ O#XanV4.2
SAY @660
IF ~~ EXIT
END

IF ~~ O#XanV4.3
SAY @661
IF ~~ EXIT
END

IF ~~ O#XanV4.4
SAY @662
IF ~~ EXIT
END

IF ~~ O#XanV4.5
SAY @663
IF ~~ EXIT
END

IF ~~ O#XanV5.1
SAY @664
IF ~~ EXIT
END

IF ~~ O#XanV5.2
SAY @665
IF ~~ EXIT
END

IF ~~ O#XanV5.3
SAY @666
IF ~~ EXIT
END

IF ~~ O#XanV5.4
SAY @667
IF ~~ EXIT
END

IF ~~ O#XanV5.5
SAY @668
IF ~~ EXIT
END

IF ~~ O#XanV6.1
SAY @669
= @670
IF ~~ EXIT
END

IF ~~ O#XanV6.2
SAY @671
IF ~~ EXIT
END

IF ~~ O#XanV6.3
SAY @672
IF ~~ EXIT
END

IF ~~ O#XanV6.4
SAY @673
IF ~~ EXIT
END

IF ~~ O#XanV6.5
SAY @674
IF ~~ EXIT
END

IF ~~ O#XanV7.1
SAY @675
IF ~~ EXIT
END

IF ~~ O#XanV7.2
SAY @676
IF ~~ EXIT
END

IF ~~ O#XanV7.3
SAY @677
= @678
IF ~~ EXIT
END

IF ~~ O#XanV7.4
SAY @679
IF ~~ EXIT
END

IF ~~ O#XanV7.5
SAY @680
IF ~~ EXIT
END

IF ~~ O#XanV8.1
SAY @681
IF ~~ EXIT
END

IF ~~ O#XanV8.2
SAY @682
IF ~~ EXIT
END

IF ~~ O#XanV8.3
SAY @683
IF ~~ EXIT
END

IF ~~ O#XanV8.4
SAY @684
IF ~~ EXIT
END

IF ~~ O#XanV8.5
SAY @685
= @686
IF ~~ EXIT
END

IF ~~ O#XanV9.1
SAY @687
IF ~~ EXIT
END

IF ~~ O#XanV9.2
SAY @688
IF ~~ EXIT
END

IF ~~ O#XanV9.3
SAY @689
= @690
IF ~~ EXIT
END

IF ~~ O#XanV9.4
SAY @691
IF ~~ EXIT
END

IF ~~ O#XanV9.5
SAY @692
= @693
IF ~~ EXIT
END

IF ~~ O#XanV10.1
SAY @694
IF ~~ EXIT
END

IF ~~ O#XanV10.2
SAY @695
IF ~~ EXIT
END

IF ~~ O#XanV10.3
SAY @696
IF ~~ EXIT
END

IF ~~ O#XanV10.4
SAY @697
IF ~~ EXIT
END

IF ~~ O#XanV10.5
SAY @698
IF ~~ EXIT
END

IF ~~ O#XanV11.1
SAY @699
IF ~~ EXIT
END

IF ~~ O#XanV11.2
SAY @700
IF ~~ EXIT
END

IF ~~ O#XanV11.3
SAY @701
IF ~~ EXIT
END

IF ~~ O#XanV11.4
SAY @702
IF ~~ EXIT
END

IF ~~ O#XanV11.5
SAY @703
IF ~~ EXIT
END



// PID, ToB, dialogues for friendship and romance

IF ~~ O#XanToBPIDTalk
SAY @704
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("RE_LaranSexToB","GLOBAL",1) Global("RE_LaranSexToBXan","GLOBAL",0)~ + @2152 DO ~SetGlobal("RE_LaranSexToBXan","GLOBAL",1)~ + O#XanRELaranToB
+ ~Global("O#XanMoonbladeImprove","GLOBAL",0) OR(2) PartyHasItem("O#XanMB") PartyHasItem("O#XanMS")~ + @2149 DO ~SetGlobal("O#XanMoonbladeImprove","GLOBAL",2)~ + O#XanMIToB1
+ ~Global("O#XanToBChosen","GLOBAL",0) Global("Chapter","GLOBAL",9)~ + @3037 DO ~SetGlobal("O#XanToBChosen","GLOBAL",1)~ + O#XanCh1
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR1","GLOBAL",0)~ + @3038 DO ~SetGlobal("O#XanToBRR1","GLOBAL",1)~ + O#XanRO1
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR2","GLOBAL",0)~ + @3039 DO ~SetGlobal("O#XanToBRR2","GLOBAL",1)~ + O#XanRO2
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR3","GLOBAL",0)~ + @3040 DO ~SetGlobal("O#XanToBRR3","GLOBAL",1)~ + O#XanRO3
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9) Global("O#XanToBRR4","GLOBAL",0)~ + @3041 DO ~SetGlobal("O#XanToBRR4","GLOBAL",1)~ + O#XanRO4
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9) Global("O#XanToBRR5","GLOBAL",0)~ + @3042 DO ~SetGlobal("O#XanToBRR5","GLOBAL",1)~ + O#XanRO5
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR6","GLOBAL",0)~ + @3043 DO ~SetGlobal("O#XanToBRR6","GLOBAL",1)~ + O#XanRO6
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9) Global("O#XanToBRR7","GLOBAL",0)~ + @3044 DO ~SetGlobal("O#XanToBRR7","GLOBAL",1)~ + O#XanRO7
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR8","GLOBAL",0)~ + @3045 DO ~SetGlobal("O#XanToBRR8","GLOBAL",1)~ + O#XanRO8
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR8","GLOBAL",1)~ + @3046 DO ~SetGlobal("O#XanToBRR8","GLOBAL",2)~ + O#XanRO9
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9) Global("O#XanToBRR8","GLOBAL",2)~ + @3047 DO ~SetGlobal("O#XanToBRR8","GLOBAL",3)~ + O#XanRO10
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR11","GLOBAL",0)~ + @3048 DO ~SetGlobal("O#XanToBRR11","GLOBAL",1)~ + O#XanRO11
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR12","GLOBAL",0)~ + @3049 DO ~SetGlobal("O#XanToBRR12","GLOBAL",1)~ + O#XanRO12
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR13","GLOBAL",0) Global("O#XanSolarCorellon1","GLOBAL",1)~ + @3050 DO ~SetGlobal("O#XanToBRR13","GLOBAL",1)~ + O#XanRO13
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR14","GLOBAL",0)~ + @3051 DO ~SetGlobal("O#XanToBRR14","GLOBAL",1)~ + O#XanRO14
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("O#XanToBRR15","GLOBAL",0)~ + @3052 DO ~SetGlobal("O#XanToBRR15","GLOBAL",1)~ + O#XanRO15
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9) Global("O#XanToBRR16","GLOBAL",0)~ + @3053 DO ~SetGlobal("O#XanToBRR16","GLOBAL",1)~ + O#XanRO16
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9) Global("O#XanToBRR17","GLOBAL",0)~ + @3054 DO ~SetGlobal("O#XanToBRR17","GLOBAL",1)~ + O#XanRO17
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9) Global("O#XanToBRR18","GLOBAL",0)~ + @3055 DO ~SetGlobal("O#XanToBRR18","GLOBAL",1)~ + O#XanRO18
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9) Global("O#XanToBRR19","GLOBAL",0)~ + @3056 DO ~SetGlobal("O#XanToBRR19","GLOBAL",1)~ + O#XanRO19
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9) Global("O#XanToBRR20","GLOBAL",0)~ + @3057 DO ~SetGlobal("O#XanToBRR20","GLOBAL",1)~ + O#XanRO20
+ ~Global("O#XanRomanceActive","GLOBAL",2) GlobalGT("O#XanUnTalk","GLOBAL",8) Global("O#XanToBBond1","GLOBAL",0)~ + @1893 DO ~SetGlobal("O#XanToBBond1","GLOBAL",1)~ + O#XanBO1
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanToBRant1","GLOBAL",0)~ + @1894 DO ~SetGlobal("O#XanToBRant1","GLOBAL",1)~ + O#XanRA1
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanToBRant2","GLOBAL",0)~ + @1895 DO ~SetGlobal("O#XanToBRant2","GLOBAL",1)~ + O#XanRA2
+ ~OR(2) Global("O#XanToBRant1","GLOBAL",1) Global("O#XanToBRant2","GLOBAL",1) GlobalGT("O#XanUnTalk","GLOBAL",6)~ + @2103 DO ~SetGlobal("O#XanToBRant1","GLOBAL",2) SetGlobal("O#XanToBRant2","GLOBAL",2)~ + O#XanRA3
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP1","GLOBAL",0)~ + @705 DO ~SetGlobal("O#XanPP1","GLOBAL",1)~ + O#XanPP1
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP2","GLOBAL",0)~ + @706 DO ~SetGlobal("O#XanPP2","GLOBAL",1)~ + O#XanPP2
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP3","GLOBAL",0)~ + @707 DO ~SetGlobal("O#XanPP3","GLOBAL",1)~ + O#XanPP3
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP4","GLOBAL",0)~ + @708 DO ~SetGlobal("O#XanPP4","GLOBAL",1)~ + O#XanPP4
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP5","GLOBAL",0)~ + @709 DO ~SetGlobal("O#XanPP5","GLOBAL",1)~ + O#XanPP5
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP6","GLOBAL",0)~ + @710 DO ~SetGlobal("O#XanPP6","GLOBAL",1)~ + O#XanPP6
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP7","GLOBAL",0)~ + @711 DO ~SetGlobal("O#XanPP7","GLOBAL",1)~ + O#XanPP7
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP8","GLOBAL",0)~ + @712 DO ~SetGlobal("O#XanPP8","GLOBAL",1)~ + O#XanPP8
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP9","GLOBAL",0) Global("Chapter","GLOBAL",9)~ + @713 DO ~SetGlobal("O#XanPP9","GLOBAL",1)~ + O#XanPP9
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP10","GLOBAL",0) Global("Chapter","GLOBAL",9)~ + @714 DO ~SetGlobal("O#XanPP10","GLOBAL",1)~ + O#XanPP10
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2) Global("O#XanPP11","GLOBAL",0)~ + @1387 DO ~SetGlobal("O#XanPP11","GLOBAL",1)~ + O#XanPP11
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD1","GLOBAL",0) !InParty("lrirenic")~ + @715 DO ~SetGlobal("O#XanDD1","GLOBAL",1)~ + O#XanDD1
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD2","GLOBAL",0)~ + @716 DO ~SetGlobal("O#XanDD2","GLOBAL",1)~ + O#XanDD2
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD3","GLOBAL",0)~ + @717 DO ~SetGlobal("O#XanDD3","GLOBAL",1)~ + O#XanDD3
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD4","GLOBAL",0)~ + @718 DO ~SetGlobal("O#XanDD4","GLOBAL",1)~ + O#XanDD4
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD5","GLOBAL",0)~ + @719 DO ~SetGlobal("O#XanDD5","GLOBAL",1)~ + O#XanDD5
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD6","GLOBAL",0)~ + @720 DO ~SetGlobal("O#XanDD6","GLOBAL",1)~ + O#XanDD6
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD7","GLOBAL",0)~ + @721 DO ~SetGlobal("O#XanDD7","GLOBAL",1)~ + O#XanDD7
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD8","GLOBAL",0)~ + @722 DO ~SetGlobal("O#XanDD8","GLOBAL",1)~ + O#XanDD8
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD9","GLOBAL",0) Global("Chapter","GLOBAL",9)~ + @723 DO ~SetGlobal("O#XanDD9","GLOBAL",1)~ + O#XanDD9
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD10","GLOBAL",0) Global("Chapter","GLOBAL",9)~ + @724 DO ~SetGlobal("O#XanDD10","GLOBAL",1)~ + O#XanDD10
+ ~Global("O#XanFriendship","GLOBAL",1) Global("O#XanDD11","GLOBAL",0)~ + @1386 DO ~SetGlobal("O#XanDD11","GLOBAL",1)~ + O#XanDD11
+ ~Global("O#XanToBErevain","GLOBAL",0)~ + @1804 DO ~SetGlobal("O#XanToBErevain","GLOBAL",1)~ + O#XanEr1.0
+ ~Global("O#XanToBMother","GLOBAL",0) GlobalGT("TalkedToSolar","GLOBAL",1)~ + @1857 DO ~SetGlobal("O#XanToBMother","GLOBAL",1)~ + O#XanMo1.0
+ ~Global("O#XanToBDemandBack","GLOBAL",0) !Global("O#XanBondedPathAlive","GLOBAL",2) Global("Chapter","GLOBAL",9)~ + @1805 DO ~SetGlobal("O#XanToBDemandBack","GLOBAL",1) RealSetGlobalTimer("O#XanToBRicarTimer","GLOBAL",500)~ + O#XanLe1.0
+ ~Global("O#XanEncounterToB3","GLOBAL",3)~ + @3744 DO ~SetGlobal("O#XanEncounterToB3","GLOBAL",4)~ + O#XanEA3
+ ~InParty("Sarevok") Global("O#XanSarPID1","GLOBAL",0) Alignment("Sarevok",MASK_EVIL)~ + @725 DO ~SetGlobal("O#XanSarPID1","GLOBAL",1)~ + O#XanPIDSarevok1
+ ~InParty("Sarevok") Global("O#XanSarPID2","GLOBAL",0) !Alignment("Sarevok",MASK_EVIL)~ + @726 DO ~SetGlobal("O#XanSarPID2","GLOBAL",1)~ + O#XanPIDSarevok2
+ ~Global("O#XanDD12","GLOBAL",0) Global("O#XanFriendship","GLOBAL",1) Global("O#XanRomanceFuture","GLOBAL",1)~ + @1319 DO ~SetGlobal("O#XanDD12","GLOBAL",1)~ + O#XanDD12
+ ~Global("O#XanDD13","GLOBAL",0) Global("O#XanFriendship","GLOBAL",1) Global("O#XanRomanceFuture","GLOBAL",1)~ + @1320 DO ~SetGlobal("O#XanDD13","GLOBAL",1)~ + O#XanDD13
+ ~Global("O#XanDD14","GLOBAL",0) Global("O#XanFriendship","GLOBAL",1) Global("Chapter","GLOBAL",9) Global("O#XanRomanceFuture","GLOBAL",1)~ + @4045 DO ~SetGlobal("O#XanDD14","GLOBAL",1)~ + O#XanDD14
+ ~GlobalGT("O#XanToBFirstPartDone","GLOBAL",0) Global("O#XanToBQT1","GLOBAL",0)~ + @1764 DO ~SetGlobal("O#XanToBQT1","GLOBAL",1)~ + O#XanToBQT1
+ ~Dead("O#Ezara") Global("O#XanToBQT2","GLOBAL",0)~ + @1764 DO ~SetGlobal("O#XanToBQT2","GLOBAL",1)~ + O#XanToBQT2
+ ~Global("O#XanRomanceActive","GLOBAL",2) GlobalGT("O#XanUnTalk","GLOBAL",4) GlobalLT("O#XanHangoverTalk","GLOBAL",2) Global("O#XanToBPhysical1","GLOBAL",0)~ + @1891 DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",1)~ + O#XanPH1.0
+ ~Global("O#XanRomanceActive","GLOBAL",2) GlobalGT("O#XanUnTalk","GLOBAL",4) GlobalGT("O#XanHangoverTalk","GLOBAL",1) Global("O#XanToBPhysical1","GLOBAL",0)~ + @1891 DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",1)~ + O#XanPH1.1
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanToBPhysical1","GLOBAL",1)~ + @1892 DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",2)~ + O#XanPH2
+ ~InParty("lrirenic") Global("O#XanIrenToBPID1","GLOBAL",0)~ + @3692 DO ~SetGlobal("O#XanIrenToBPID1","GLOBAL",1)~ + O#XanIrenToBPid1
+ ~InParty("lrirenic") !Alignment("lrirenic",MASK_EVIL) Global("O#XanIrenToBPID2","GLOBAL",0)~ + @3693 DO ~SetGlobal("O#XanIrenToBPID2","GLOBAL",1)~ + O#XanIrenToBPid2
+ ~Global("O#XanBreakElvenBondToB","GLOBAL",0)~ + @4248 DO ~SetGlobal("O#XanBreakElvenBondToB","GLOBAL",1)~ + O#XanEB1
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanToBFlirtsDisabled","GLOBAL",0)~ + @727 DO ~SetGlobal("O#XanToBFlirtsDisabled","GLOBAL",1)~ + O#XanFlirtMani
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanToBFlirtsDisabled","GLOBAL",1)~ + @728 DO ~SetGlobal("O#XanToBFlirtsDisabled","GLOBAL",0)~ + O#XanFlirtMani
+ ~Global("O#XanFriendship","GLOBAL",1)~ + @729 DO ~SetGlobal("O#XanFriendship","GLOBAL",3)~ + O#XanEndF
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanRT15","GLOBAL",2)~ + @730 DO ~SetGlobal("O#XanRomanceActive","GLOBAL",3)~ + O#XanEndR
++ @731 EXIT
END

IF ~~ O#XanEndF
SAY @732
IF ~~ EXIT
END

IF ~~ O#XanEndR
SAY @733
IF ~~ EXIT
END

IF ~~ O#XanFlirtMani
SAY @734
IF ~~ EXIT
END



// Breaking an elven bond

IF ~~ O#XanEB1
SAY @4249
++ @4250 + O#XanEB1.1
++ @4251 + O#XanEB1.1
++ @4252 + O#XanEB1.1
END

IF ~~ O#XanEB1.1
SAY @4253
++ @4254 + O#XanEB1.2
++ @4255 + O#XanEB1.2
END

IF ~~ O#XanEB1.2
SAY @4256
= @4257
++ @4258 + O#XanEB1.3
++ @4259 + O#XanEB1.5
++ @4260 + O#XanEB1.4
END

IF ~~ O#XanEB1.3
SAY @4261 
IF ~~ + O#XanEB1.5
END

IF ~~ O#XanEB1.4
SAY @4262
= @4263
IF ~~ + O#XanEB1.5
END

IF ~~ O#XanEB1.5
SAY @4264
= @4265
++ @4266 + O#XanEB1.6
++ @4267 + O#XanEB1.6
++ @4268 + O#XanEB1.5a
END

IF ~~ O#XanEB1.5a
SAY @4269
IF ~~ EXIT
END

IF ~~ O#XanEB1.6
SAY @4270
= @4271
IF ~~ EXIT
END

// Moonblade improves in ToB

IF ~~ O#XanMIToB1
SAY @2150
= @2151
IF ~PartyHasItem("O#XanMB")~ DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("O#XanMB")~ EXIT
IF ~PartyHasItem("O#XanMS")~ DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("O#XanMS")~ EXIT
END

// PID, Romance, dialogues

// 1.

IF ~~ O#XanPP1
SAY @735
++ @736 + O#XanPP1.0
++ @737 + O#XanPP1.1
++ @738 + O#XanPP1.1
END

IF ~~ O#XanPP1.0
SAY @739
IF ~~ + O#XanPP1.1
END

IF ~~ O#XanPP1.1
SAY @740
++ @741 + O#XanPP1.2
++ @742 + O#XanPP1.3
++ @743 + O#XanPP1.2
END

IF ~~ O#XanPP1.3
SAY @744
= @745
= @746
= @747
= @748
= @749
= @750
++ @751 + O#XanPP1.4
++ @752 + O#XanPP1.5
++ @753 + O#XanPP1.6
++ @754 + O#XanPP1.7
++ @755 + O#XanPP1.8
++ @756 + O#XanPP1.9
END

IF ~~ O#XanPP1.4
SAY @757
IF ~~ + O#XanPP1.8
END

IF ~~ O#XanPP1.5
SAY @758
IF ~~ + O#XanPP1.8
END

IF ~~ O#XanPP1.6
SAY @759
IF ~~ EXIT
END

IF ~~ O#XanPP1.7
SAY @760
= @761
IF ~~ EXIT
END

IF ~~ O#XanPP1.8
SAY @762
IF ~~ EXIT
END

IF ~~ O#XanPP1.9
SAY @763
IF ~~ + O#XanPP1.8
END

IF ~~ O#XanPP1.2
SAY @764
++ @765 + O#XanPP1.12
++ @766 + O#XanPP1.3
++ @767 + O#XanPP1.11
++ @768 + O#XanPP1.10
END

IF ~~ O#XanPP1.10
SAY @769
IF ~~ EXIT
END

IF ~~ O#XanPP1.11
SAY @770
IF ~~ + O#XanPP1.3
END

IF ~~ O#XanPP1.12
SAY @771
++ @772 + O#XanPP1.10
++ @773 + O#XanPP1.3
END



// 2.

IF ~~ O#XanPP2
SAY @774
++ @775 + O#XanPP2.1
++ @776 + O#XanPP2.2
++ @777 + O#XanPP2.3
++ @778 + O#XanPP2.4
++ @779 + O#XanPP2.5
END

IF ~~ O#XanPP2.1
SAY @780 
IF ~~ + O#XanPP2.3
END

IF ~~ O#XanPP2.2
SAY @781
IF ~~ + O#XanPP2.3
END

IF ~~ O#XanPP2.3
SAY @782
++ @783 + O#XanPP2.6
++ @784 + O#XanPP2.7
++ @785 + O#XanPP2.8
++ @786 + O#XanPP2.9
END

IF ~~ O#XanPP2.4
SAY @787
IF ~~ + O#XanPP2.3
END

IF ~~ O#XanPP2.5
SAY @788
IF ~~ + O#XanPP2.3
END

IF ~~ O#XanPP2.6
SAY @789
IF ~~ + O#XanPP2.10
END

IF ~~ O#XanPP2.7
SAY @790
IF ~~ + O#XanPP2.10
END

IF ~~ O#XanPP2.8
SAY @791
IF ~~ + O#XanPP2.10
END

IF ~~ O#XanPP2.9
SAY @792
IF ~~ + O#XanPP2.10
END

IF ~~ O#XanPP2.10
SAY @793
++ @794 + O#XanPP2.11
++ @795 + O#XanPP2.11
++ @796 + O#XanPP2.11
END

IF ~~ O#XanPP2.11
SAY @797
= @798
= @799
IF ~~ EXIT
END



// 3.

IF ~~ O#XanPP3
SAY @800
++ @801 + O#XanPP3.1
++ @802 + O#XanPP3.2
++ @803 + O#XanPP3.3
END

IF ~~ O#XanPP3.1
SAY @804
IF ~~ + O#XanPP3.3
END

IF ~~ O#XanPP3.2
SAY @805
IF ~~ + O#XanPP3.3
END

IF ~~ O#XanPP3.3
SAY @806
++ @807 + O#XanPP3.4
++ @808 + O#XanPP3.5
++ @809 + O#XanPP3.6
++ @810 + O#XanPP3.7
++ @811 + O#XanPP3.4
END

IF ~~ O#XanPP3.4
SAY @812
= @813
++ @809 + O#XanPP3.6
++ @810 + O#XanPP3.7
++ @808 + O#XanPP3.5
++ @814 + O#XanPP3.6
END

IF ~~ O#XanPP3.5
SAY @815 
IF ~~ + O#XanPP3.8
END

IF ~~ O#XanPP3.6
SAY @816
= @817
IF ~~ EXIT
END

IF ~~ O#XanPP3.7
SAY @818
IF ~~ + O#XanPP3.8
END

IF ~~ O#XanPP3.8
SAY @819
IF ~~ EXIT
END



// 4.

IF ~~ O#XanPP4
SAY @820
++ @821 + O#XanPP4.1
++ @822 + O#XanPP4.1
++ @823 + O#XanPP4.2
++ @824 + O#XanPP4.2
++ @825 + O#XanPP4.3
END

IF ~~ O#XanPP4.1
SAY @826
++ @827 + O#XanPP4.4
++ @828 + O#XanPP4.4
++ @829 + O#XanPP4.4
END

IF ~~ O#XanPP4.2
SAY @830
IF ~~ + O#XanPP4.4
END

IF ~~ O#XanPP4.3
SAY @831
IF ~~ + O#XanPP4.4
END

IF ~~ O#XanPP4.4
SAY @832
= @833
= @834
= @835
= @836
= @837
++ @838 + O#XanPP4.5
++ @839 + O#XanPP4.6
++ @840 + O#XanPP4.7
++ @841 + O#XanPP4.8
END

IF ~~ O#XanPP4.5
SAY @842
IF ~~ + O#XanPP4.8
END

IF ~~ O#XanPP4.6
SAY @843
= @844
IF ~~ + O#XanPP4.9
END

IF ~~ O#XanPP4.7
SAY @845
IF ~~ + O#XanPP4.9
END

IF ~~ O#XanPP4.8
SAY @846
IF ~~ + O#XanPP4.9
END

IF ~~ O#XanPP4.9
SAY @847
IF ~~ EXIT
END



// 5.

IF ~~ O#XanPP5
SAY @848
++ @849 + O#XanPP5.1
++ @850 + O#XanPP5.2
++ @851 + O#XanPP5.3
++ @852 + O#XanPP5.4
END

IF ~~ O#XanPP5.1
SAY @853
IF ~~ + O#XanPP5.5
END

IF ~~ O#XanPP5.2
SAY @854
IF ~~ + O#XanPP5.5
END

IF ~~ O#XanPP5.3
SAY @855
IF ~~ + O#XanPP5.5
END

IF ~~ O#XanPP5.4
SAY @856
IF ~~ + O#XanPP5.5
END

IF ~~ O#XanPP5.5
SAY @857
= @858
++ @859 + O#XanPP5.6
++ @860 + O#XanPP5.7
++ @861 + O#XanPP5.8
++ @862 + O#XanPP5.9
END

IF ~~ O#XanPP5.6
SAY @863
IF ~~ + O#XanPP5.10
END

IF ~~ O#XanPP5.7
SAY @864
IF ~~ + O#XanPP5.10
END

IF ~~ O#XanPP5.8
SAY @865
IF ~~ + O#XanPP5.10
END

IF ~~ O#XanPP5.9
SAY @866
IF ~~ + O#XanPP5.10
END

IF ~~ O#XanPP5.10
SAY @867
= @868
= @869
++ @870 + O#XanPP5.11
++ @871 + O#XanPP5.12
++ @872 + O#XanPP5.13
++ @873 + O#XanPP5.14
++ @874 + O#XanPP5.15
END

IF ~~ O#XanPP5.11
SAY @875
IF ~~ + O#XanPP5.16
END

IF ~~ O#XanPP5.12
SAY @876
IF ~~ + O#XanPP5.16
END

IF ~~ O#XanPP5.13
SAY @877
IF ~~ + O#XanPP5.16
END

IF ~~ O#XanPP5.14
SAY @878
IF ~~ + O#XanPP5.17
END

IF ~~ O#XanPP5.15
SAY @879
IF ~~ + O#XanPP5.17
END

IF ~~ O#XanPP5.16
SAY @880
= @881
IF ~~ + O#XanPP5.17
END

IF ~~ O#XanPP5.17
SAY @882
= @883
= @884
= @885
++ @886 + O#XanPP5.18
++ @887 + O#XanPP5.18
++ @888 + O#XanPP5.19
++ @889 + O#XanPP5.19
++ @890 + O#XanPP5.20
END

IF ~~ O#XanPP5.18
SAY @891
IF ~~ EXIT
END

IF ~~ O#XanPP5.19
SAY @755
IF ~~ EXIT
END

IF ~~ O#XanPP5.20
SAY @892
IF ~~ EXIT
END



// 6.

IF ~~ O#XanPP6
SAY @893
= @894
++ @895 + O#XanPP6.1
++ @896 + O#XanPP6.2
++ @897 + O#XanPP6.3
++ @898 + O#XanPP6.4
END

IF ~~ O#XanPP6.1
SAY @899
IF ~~ + O#XanPP6.5
END

IF ~~ O#XanPP6.2
SAY @900
IF ~~ + O#XanPP6.5
END

IF ~~ O#XanPP6.3
SAY @901
IF ~~ + O#XanPP6.5
END

IF ~~ O#XanPP6.4
SAY @902
IF ~~ + O#XanPP6.5
END

IF ~~ O#XanPP6.5
SAY @903
++ @904 + O#XanPP6.6
++ @905 + O#XanPP6.7
++ @906 + O#XanPP6.8
++ @907 + O#XanPP6.9
END

IF ~~ O#XanPP6.6
SAY @908
IF ~~ + O#XanPP6.10
END

IF ~~ O#XanPP6.7
SAY @909
IF ~~ + O#XanPP6.10
END

IF ~~ O#XanPP6.8
SAY @554
= @910
++ @911 + O#XanPP6.8.1
++ @912 + O#XanPP6.8.2
++ @913 + O#XanPP6.8.2
END

IF ~~ O#XanPP6.8.1
SAY @914
IF ~~ EXIT
END

IF ~~ O#XanPP6.8.2
SAY @483
= @915
IF ~~ EXIT
END

IF ~~ O#XanPP6.9
SAY @916
IF ~~ + O#XanPP6.10
END

IF ~~ O#XanPP6.10
SAY @917
IF ~~ EXIT
END



// 7.

IF ~~ O#XanPP7
SAY @918
++ @919 + O#XanPP7.1
++ @920 + O#XanPP7.1
++ @921 + O#XanPP7.1
END

IF ~~ O#XanPP7.1
SAY @922
++ @923 + O#XanPP7.2
++ @924 + O#XanPP7.2
++ @925 + O#XanPP7.2
++ @912 + O#XanPP7.2
END

IF ~~ O#XanPP7.2
SAY @926
++ @927 + O#XanPP7.3
++ @928 + O#XanPP7.3
++ @929 + O#XanPP7.3
++ @930 + O#XanPP7.4
++ @931 + O#XanPP7.4
++ @932 + O#XanPP7.4
END

IF ~~ O#XanPP7.3
SAY @933
IF ~~ EXIT
END

IF ~~ O#XanPP7.4
SAY @934
IF ~~ EXIT
END



// 8.

IF ~~ O#XanPP8
SAY @935
++ @936 + O#XanPP8.1
++ @937 + O#XanPP8.2
++ @938 + O#XanPP8.3
++ @939 + O#XanPP8.4
END

IF ~~ O#XanPP8.1
SAY @940
= @941
IF ~~ + O#XanPP8.5
END

IF ~~ O#XanPP8.2
SAY @942
IF ~~ + O#XanPP8.5
END

IF ~~ O#XanPP8.3
SAY @943
IF ~~ + O#XanPP8.5
END

IF ~~ O#XanPP8.4
SAY @944
IF ~~ + O#XanPP8.5
END

IF ~~ O#XanPP8.5
SAY @945
++ @946 + O#XanPP8.6
++ @947 + O#XanPP8.7
++ @948 + O#XanPP8.7
++ @949 + O#XanPP8.8
++ @950 + O#XanPP8.9
END

IF ~~ O#XanPP8.6
SAY @951 
IF ~~ + O#XanPP8.10
END

IF ~~ O#XanPP8.7
SAY @952 
IF ~~ + O#XanPP8.10
END

IF ~~ O#XanPP8.8
SAY @953 
IF ~~ + O#XanPP8.10
END

IF ~~ O#XanPP8.9
SAY @954 
IF ~~ + O#XanPP8.10
END

IF ~~ O#XanPP8.10
SAY @955 
++ @956 + O#XanPP8.11
++ @957 + O#XanPP8.12
++ @958 + O#XanPP8.12
++ @959 + O#XanPP8.13
++ @960 + O#XanPP8.14
END

IF ~~ O#XanPP8.11
SAY @961
IF ~~ EXIT
END

IF ~~ O#XanPP8.12
SAY @962
IF ~~ EXIT
END

IF ~~ O#XanPP8.13
SAY @963
IF ~~ EXIT
END

IF ~~ O#XanPP8.14
SAY @964
IF ~~ EXIT
END



// 9.

IF ~~ O#XanPP9
SAY @965
++ @966 + O#XanPP9.1
++ @967 + O#XanPP9.2
++ @968 + O#XanPP9.3
END

IF ~~ O#XanPP9.1
SAY @969
++ @970 + O#XanPP9.1.1
++ @971 + O#XanPP9.1.2
++ @972 + O#XanPP9.4
END

IF ~~ O#XanPP9.1.1
SAY @973
IF ~~ + O#XanPP9.4
END

IF ~~ O#XanPP9.1.2
SAY @974
IF ~~ + O#XanPP9.4
END

IF ~~ O#XanPP9.2
SAY @975
IF ~~ + O#XanPP9.4
END

IF ~~ O#XanPP9.3
SAY @976
IF ~~ + O#XanPP9.4
END

IF ~~ O#XanPP9.4
SAY @977
= @978
++ @979 + O#XanPP9.5
++ @980 + O#XanPP9.6
++ @981 + O#XanPP9.7
END

IF ~~ O#XanPP9.5
SAY @982 
IF ~~ + O#XanPP9.8
END

IF ~~ O#XanPP9.6
SAY @983 
IF ~~ + O#XanPP9.8
END

IF ~~ O#XanPP9.7
SAY @622 
IF ~~ + O#XanPP9.8
END

IF ~~ O#XanPP9.8
SAY @984
= @985
IF ~~ EXIT
END



// 10.

IF ~~ O#XanPP10
SAY @986
++ @987 + O#XanPP10.1
++ @988 + O#XanPP10.2
++ @989 + O#XanPP10.3
++ @990 + O#XanPP10.4
++ @991 + O#XanPP10.2
END

IF ~~ O#XanPP10.1
SAY @992
IF ~~ + O#XanPP10.5
END

IF ~~ O#XanPP10.2
SAY @993
IF ~~ + O#XanPP10.4
END

IF ~~ O#XanPP10.3
SAY @994
IF ~~ + O#XanPP10.5
END

IF ~~ O#XanPP10.4
SAY @995
++ @996 + O#XanPP10.6
++ @997 + O#XanPP10.7
++ @998 + O#XanPP10.8
++ @999 + O#XanPP10.3
++ @1000 + O#XanPP10.9
END

IF ~~ O#XanPP10.5
SAY @1001
= @1002
= @1003
= @1004
= @1005
= @1006
= @1007
= @1008
= @1009
= @1010
= @1011
++ @1012 + O#XanPP10.11
++ @1013 + O#XanPP10.12
++ @1014 + O#XanPP10.13
++ @1015 + O#XanPP10.14
END

IF ~~ O#XanPP10.6
SAY @1016
IF ~~ + O#XanPP10.10
END

IF ~~ O#XanPP10.7
SAY @1017
IF ~~ + O#XanPP10.10
END

IF ~~ O#XanPP10.8
SAY @1018
= @1019
IF ~~ EXIT
END

IF ~~ O#XanPP10.9
SAY @1020
= @1021
IF ~~ EXIT
END

IF ~~ O#XanPP10.10
SAY @1022
IF ~~ EXIT
END

IF ~~ O#XanPP10.11
SAY @1023
IF ~~ + O#XanPP10.10
END

IF ~~ O#XanPP10.12
SAY @1024
IF ~~ EXIT
END

IF ~~ O#XanPP10.13
SAY @1025
IF ~~ + O#XanPP10.10
END

IF ~~ O#XanPP10.14
SAY @1026
IF ~~ + O#XanPP10.10
END



// 11.

IF ~~ O#XanPP11
SAY @1388
++ @1389 + O#XanPP11.1
++ @1390 + O#XanPP11.2
++ @1391 + O#XanPP11.3
END

IF ~~ O#XanPP11.1
SAY @1392
++ @1393 + O#XanPP11.4
++ @1394 + O#XanPP11.5
++ @1395 + O#XanPP11.5
END

IF ~~ O#XanPP11.2
SAY @1396
IF ~~ + O#XanPP11.5
END

IF ~~ O#XanPP11.3
SAY @1397
IF ~~ + O#XanPP11.5
END

IF ~~ O#XanPP11.4
SAY @1398
IF ~~ + O#XanPP11.5
END

IF ~~ O#XanPP11.5
SAY @1399
++ @1400 + O#XanPP11.6
++ @1401 + O#XanPP11.7
++ @1402 + O#XanPP11.6
++ @1403 + O#XanPP11.8
END

IF ~~ O#XanPP11.6
SAY @1404
IF ~~ + O#XanPP11.9
END

IF ~~ O#XanPP11.7
SAY @1405
IF ~~ + O#XanPP11.9
END

IF ~~ O#XanPP11.8
SAY @1406
IF ~~ + O#XanPP11.9
END

IF ~~ O#XanPP11.9
SAY @1407
++ @1408 + O#XanPP11.10
++ @1409 + O#XanPP11.10
++ @1410 + O#XanPP11.11
++ @1411 + O#XanPP11.12
END

IF ~~ O#XanPP11.10
SAY @1412
IF ~~ EXIT
END

IF ~~ O#XanPP11.11
SAY @1413
IF ~~ EXIT
END

IF ~~ O#XanPP11.12
SAY @1414
IF ~~ EXIT
END



// PID, Friendship, dialogues

// 1.

IF ~~ O#XanDD1
SAY @1027
++ @1028 + O#XanDD1.1
++ @1029 + O#XanDD1.1
++ @1030 + O#XanDD1.0
++ @1031 + O#XanDD1.3
++ @1032 + O#XanDD1.2
++ @1033 + O#XanDD1.4
END

IF ~~ O#XanDD1.0
SAY @1034
++ @1035 + O#XanDD1.1
++ @1036 + O#XanDD1.1
++ @1037 + O#XanDD1.1
++ @1038 + O#XanDD1.2
++ @1039 + O#XanDD1.2
END

IF ~~ O#XanDD1.1
SAY @1040
IF ~~ + O#XanDD1.4
END

IF ~~ O#XanDD1.2
SAY @1041
IF ~~ + O#XanDD1.4
END

IF ~~ O#XanDD1.3
SAY @1042
IF ~~ + O#XanDD1.4
END

IF ~~ O#XanDD1.4
SAY @1043
= @1044
++ @1045 + O#XanDD1.5
++ @1046 + O#XanDD1.6
++ @1047 + O#XanDD1.7
++ @1048 + O#XanDD1.8
++ @1049 + O#XanDD1.9
END

IF ~~ O#XanDD1.5
SAY @1050
IF ~~ + O#XanDD1.8
END

IF ~~ O#XanDD1.6
SAY @1051
IF ~~ + O#XanDD1.8
END

IF ~~ O#XanDD1.7
SAY @1052
IF ~~ + O#XanDD1.8
END

IF ~~ O#XanDD1.8
SAY @1053
= @1054
IF ~~ EXIT
END

IF ~~ O#XanDD1.9
SAY @1055
IF ~~ + O#XanDD1.8
END



// 2.

IF ~~ O#XanDD2
SAY @1056
++ @821 + O#XanDD2.1
++ @1057 + O#XanDD2.2
++ @1058 + O#XanDD2.1
++ @1059 + O#XanDD2.1
END

IF ~~ O#XanDD2.1
SAY @1060
++ @1061 + O#XanDD2.4
++ @1062 + O#XanDD2.4
++ @1063 + O#XanDD2.3
END

IF ~~ O#XanDD2.2
SAY @1064
IF ~~ + O#XanDD2.4
END

IF ~~ O#XanDD2.3
SAY @1065
IF ~~ + O#XanDD2.4
END

IF ~~ O#XanDD2.4
SAY @1066
++ @1067 + O#XanDD2.5
++ @1068 + O#XanDD2.6
++ @1069 + O#XanDD2.6
++ @1070 + O#XanDD2.7
END

IF ~~ O#XanDD2.5
SAY @1071
IF ~~ EXIT
END

IF ~~ O#XanDD2.6
SAY @1072
IF ~~ EXIT
END

IF ~~ O#XanDD2.7
SAY @1073
IF ~~ EXIT
END



// 3.

IF ~~ O#XanDD3
SAY @1074
++ @1075 + O#XanDD3.2
++ @1076 + O#XanDD3.2
++ @1077 + O#XanDD3.3
++ @1078 + O#XanDD3.4
++ @1079 + O#XanDD3.1
END

IF ~~ O#XanDD3.1
SAY @1080
IF ~~ EXIT
END

IF ~~ O#XanDD3.2
SAY @1081
++ @1082 + O#XanDD3.5
++ @1083 + O#XanDD3.5
++ @1084 + O#XanDD3.3
++ @1085 + O#XanDD3.6
END

IF ~~ O#XanDD3.3
SAY @1086
+ ~Gender(Player1,FEMALE)~ + @1087 + O#XanDD3.7
+ ~Gender(Player1,FEMALE)~ + @1088 + O#XanDD3.7
++ @1089 + O#XanDD3.6
++ @1090 + O#XanDD3.8
++ @1091 + O#XanDD3.8
END

IF ~~ O#XanDD3.4
SAY @1092
= @1093
IF ~~ EXIT
END

IF ~~ O#XanDD3.5
SAY @1094
= @1095
IF ~~ EXIT
END

IF ~~ O#XanDD3.6
SAY @1096
IF ~~ EXIT
END

IF ~~ O#XanDD3.7
SAY @1097
= @1098
++ @1099 + O#XanDD3.9
++ @1100 + O#XanDD3.9
// + ~!Race(Player1,ELF)~ + @1101 + O#XanDD3.9
++ @1101 + O#XanDD3.10
END

IF ~~ O#XanDD3.8
SAY @1102
= @1103
IF ~~ EXIT
END

IF ~~ O#XanDD3.9
SAY @1104
IF ~~ EXIT
END

IF ~~ O#XanDD3.10
SAY @1105
++ @1106 + O#XanDD3.9
++ @1107 + O#XanDD3.11
++ @1108 + O#XanDD3.11
END

IF ~~ O#XanDD3.11
SAY @1109
= @1110
= @1111
= @1112
= @1113
IF ~~ DO ~SetGlobal("O#XanRomanceFuture","GLOBAL",1)~ EXIT
END



// 4.

IF ~~ O#XanDD4
SAY @1114
++ @1115 + O#XanDD4.1
++ @1116 + O#XanDD4.2
++ @1117 + O#XanDD4.5
END

IF ~~ O#XanDD4.1
SAY @1118
++ @1119 + O#XanDD4.5
++ @1120 + O#XanDD4.3
++ @1121 + O#XanDD4.4
END

IF ~~ O#XanDD4.2
SAY @1122
IF ~~ + O#XanDD4.1
END

IF ~~ O#XanDD4.3
SAY @1123
IF ~~ + O#XanDD4.11
END

IF ~~ O#XanDD4.4
SAY @1124
IF ~~ + O#XanDD4.5
END

IF ~~ O#XanDD4.5
SAY @1125
++ @1126 + O#XanDD4.6
++ @1127 + O#XanDD4.7
++ @1128 + O#XanDD4.8
++ @1129 + O#XanDD4.9
++ @1130 + O#XanDD4.10
END

IF ~~ O#XanDD4.6
SAY @1131
IF ~~ + O#XanDD4.11
END

IF ~~ O#XanDD4.7
SAY @1132
= @1133
IF ~~ + O#XanDD4.11
END

IF ~~ O#XanDD4.8
SAY @1134
IF ~~ + O#XanDD4.11
END

IF ~~ O#XanDD4.9
SAY @1135
IF ~~ + O#XanDD4.11
END

IF ~~ O#XanDD4.10
SAY @1136
IF ~~ + O#XanDD4.11
END

IF ~~ O#XanDD4.11
SAY @1137
++ @1138 + O#XanDD4.12
++ @1139 + O#XanDD4.13
++ @912 + O#XanDD4.14
++ @1106 + O#XanDD4.15
++ @1140 + O#XanDD4.16
END

IF ~~ O#XanDD4.12
SAY @1141
IF ~~ EXIT
END

IF ~~ O#XanDD4.13
SAY @1142
= @1143
IF ~~ EXIT
END

IF ~~ O#XanDD4.14
SAY @1144
= @1145
IF ~~ EXIT
END

IF ~~ O#XanDD4.15
SAY @1146
IF ~~ EXIT
END

IF ~~ O#XanDD4.16
SAY @1147
IF ~~ EXIT
END



// 5.

IF ~~ O#XanDD5
SAY @1148
++ @1149 + O#XanDD5.1
++ @1150 + O#XanDD5.2
++ @1151 + O#XanDD5.3
++ @1152 + O#XanDD5.4
++ @1153 + O#XanDD5.5
++ @1154 + O#XanDD5.6
END

IF ~~ O#XanDD5.1
SAY @1155
= @1156
= @1157
= @1158
IF ~~ + O#XanDD5
END

IF ~~ O#XanDD5.2
SAY @1159
= @1160
= @1161
= @1162
IF ~~ + O#XanDD5
END

IF ~~ O#XanDD5.3
SAY @1163
= @1164
IF ~~ + O#XanDD5
END

IF ~~ O#XanDD5.4
SAY @1165
= @1166
= @1167
IF ~~ + O#XanDD5
END

IF ~~ O#XanDD5.5
SAY @1168
= @1169
= @1170
= @1171
IF ~~ + O#XanDD5
END

IF ~~ O#XanDD5.6
SAY @1172
IF ~~ EXIT
END



// 6.

IF ~~ O#XanDD6
SAY @1173
++ @1174 + O#XanDD6.1
++ @1175 + O#XanDD6.2
++ @1176 + O#XanDD6.3
++ @1177 + O#XanDD6.4
END

IF ~~ O#XanDD6.1
SAY @1178
IF ~~ + O#XanDD6.5
END

IF ~~ O#XanDD6.2
SAY @1179
IF ~~ + O#XanDD6.5
END

IF ~~ O#XanDD6.3
SAY @1180
IF ~~ + O#XanDD6.5
END

IF ~~ O#XanDD6.4
SAY @1181
IF ~~ + O#XanDD6.5
END

IF ~~ O#XanDD6.5
SAY @1182
++ @1183 + O#XanDD6.6
++ @1184 + O#XanDD6.7
++ @1185 + O#XanDD6.8
++ @1186 + O#XanDD6.9
END

IF ~~ O#XanDD6.6
SAY @1187
IF ~~ + O#XanDD6.10
END

IF ~~ O#XanDD6.7
SAY @1188
= @1189
IF ~~ + O#XanDD6.10
END

IF ~~ O#XanDD6.8
SAY @1190
IF ~~ + O#XanDD6.10
END

IF ~~ O#XanDD6.9
SAY @1191
IF ~~ + O#XanDD6.10
END

IF ~~ O#XanDD6.10
SAY @1192
IF ~~ EXIT
END



// 7.

IF ~~ O#XanDD7
SAY @1193
++ @911 + O#XanDD7.1
++ @1194 + O#XanDD7.1
++ @1195 + O#XanDD7.0
END

IF ~~ O#XanDD7.0
SAY @1196
IF ~~ EXIT
END

IF ~~ O#XanDD7.1
SAY @1197
= @1198
++ @1199 + O#XanDD7.3
++ @1200 + O#XanDD7.2
++ @1201 + O#XanDD7.2
++ @1202 + O#XanDD7.3
END

IF ~~ O#XanDD7.2
SAY @1203
IF ~~ + O#XanDD7.3
END

IF ~~ O#XanDD7.3
SAY @1204
= @1205
++ @1206 + O#XanDD7.4
++ @1207 + O#XanDD7.4
++ @1208 + O#XanDD7.5
++ @1209 + O#XanDD7.5
END

IF ~~ O#XanDD7.4
SAY @1210
IF ~~ EXIT
END

IF ~~ O#XanDD7.5
SAY @1211
IF ~~ EXIT
END



// 8.

IF ~~ O#XanDD8
SAY @1212
++ @1213 + O#XanDD8.1
++ @1214 + O#XanDD8.2
++ @1215 + O#XanDD8.1
++ @1216 + O#XanDD8.2
END

IF ~~ O#XanDD8.1
SAY @1217
IF ~~ + O#XanDD8.2
END

IF ~~ O#XanDD8.2
SAY @1218
= @1219
++ @1220 + O#XanDD8.3
++ @1221 + O#XanDD8.4
++ @1222 + O#XanDD8.5
++ @1223 + O#XanDD8.6
END
 
IF ~~ O#XanDD8.3
SAY @1224
IF ~~ + O#XanDD8.7
END

IF ~~ O#XanDD8.4
SAY @1225
IF ~~ + O#XanDD8.7
END

IF ~~ O#XanDD8.5
SAY @1226
IF ~~ + O#XanDD8.7
END

IF ~~ O#XanDD8.6
SAY @1227
IF ~~ + O#XanDD8.7
END

IF ~~ O#XanDD8.7
SAY @1228
= @1229
++ @1230 + O#XanDD8.8
++ @1231 + O#XanDD8.9
++ @1232 + O#XanDD8.8
++ @1233 + O#XanDD8.9
END

IF ~~ O#XanDD8.8
SAY @1234
IF ~~ EXIT
END

IF ~~ O#XanDD8.9
SAY @1235
IF ~~ EXIT
END



// 9.

IF ~~ O#XanDD9
SAY @1236
++ @1237 + O#XanDD9.1
++ @1238 + O#XanDD9.2
++ @1239 + O#XanDD9.3
END

IF ~~ O#XanDD9.1
SAY @1240
IF ~~ + O#XanDD9.4
END

IF ~~ O#XanDD9.2
SAY @1241
IF ~~ + O#XanDD9.4
END

IF ~~ O#XanDD9.3
SAY @1242
IF ~~ + O#XanDD9.4
END

IF ~~ O#XanDD9.4
SAY @1243
++ @1244 + O#XanDD9.5
++ @1245 + O#XanDD9.6
++ @1246 + O#XanDD9.7
++ @1247 + O#XanDD9.8
++ @1248 + O#XanDD9.9
END

IF ~~ O#XanDD9.5
SAY @1249 
IF ~~ + O#XanDD9.10
END

IF ~~ O#XanDD9.6
SAY @1250
= @1251
IF ~~ + O#XanDD9.10
END

IF ~~ O#XanDD9.7
SAY @1252 
IF ~~ + O#XanDD9.10
END

IF ~~ O#XanDD9.8
SAY @1253
= @1254
IF ~~ + O#XanDD9.10
END

IF ~~ O#XanDD9.9
SAY @1255
IF ~~ + O#XanDD9.10
END

IF ~~ O#XanDD9.10
SAY @1256 
++ @1257 + O#XanDD9.11
++ @1258 + O#XanDD9.12
++ @1259 + O#XanDD9.13
++ @1260 + O#XanDD9.14
END

IF ~~ O#XanDD9.11
SAY @1261
= @1262
IF ~~ EXIT
END

IF ~~ O#XanDD9.12
SAY @1263
IF ~~ EXIT
END

IF ~~ O#XanDD9.13
SAY @1264
IF ~~ EXIT
END

IF ~~ O#XanDD9.14
SAY @1265
IF ~~ EXIT
END



// 10.

IF ~~ O#XanDD10
SAY @1266
++ @1267 + O#XanDD10.1
++ @1268 + O#XanDD10.1
++ @1269 + O#XanDD10.2
++ @1270 + O#XanDD10.3
++ @1271 + O#XanDD10.4
END

IF ~~ O#XanDD10.1
SAY @1272
IF ~~ + O#XanDD10.5
END

IF ~~ O#XanDD10.2
SAY @1273
IF ~~ + O#XanDD10.5
END

IF ~~ O#XanDD10.3
SAY @1274
IF ~~ + O#XanDD10.5
END

IF ~~ O#XanDD10.4
SAY @1275
IF ~~ + O#XanDD10.5
END

IF ~~ O#XanDD10.5
SAY @1276
++ @1277 + O#XanDD10.6
++ @1278 + O#XanDD10.7
++ @1279 + O#XanDD10.8
++ @1280 + O#XanDD10.9
END

IF ~~ O#XanDD10.6
SAY @911
IF ~~ + O#XanDD10.10
END

IF ~~ O#XanDD10.7
SAY @1281 
IF ~~ + O#XanDD10.10
END

IF ~~ O#XanDD10.8
SAY @1282
IF ~~ + O#XanDD10.10
END

IF ~~ O#XanDD10.9
SAY @1283
IF ~~ + O#XanDD10.10
END

IF ~~ O#XanDD10.10
SAY @1284
= @1285
IF ~~ EXIT
END



// 11.

IF ~~ O#XanDD11
SAY @1415
+ ~Gender(Player1,FEMALE)~ + @1416 + O#XanDD11.1E
// + ~Gender(Player1,FEMALE) !Race(Player1,ELF)~ + @1416 + O#XanDD11.1NE
++ @1417 + O#XanDD11.1
++ @1418 + O#XanDD11.2
++ @1419 + O#XanDD11.3
END

IF ~~ O#XanDD11.1
SAY @1420
IF ~~ + O#XanDD11.9
END

IF ~~ O#XanDD11.2
SAY @1421
IF ~~ + O#XanDD11.9
END

IF ~~ O#XanDD11.3
SAY @1422
IF ~~ + O#XanDD11.9
END

/*
IF ~~ O#XanDD11.1NE
SAY @1423
= @1424
++ @1425 + O#XanDD11.4
++ @1426 + O#XanDD11.4
++ @1427 + O#XanDD11.4
++ @1428 + O#XanDD11.4
++ @1429 + O#XanDD11.5
END

IF ~~ O#XanDD11.4
SAY @1430
IF ~~ EXIT
END

IF ~~ O#XanDD11.5
SAY @1429
IF ~~ EXIT
END
*/

IF ~~ O#XanDD11.1E
SAY @1431
= @1432
++ @1433 + O#XanDD11.6
++ @1434 + O#XanDD11.6
++ @1435 + O#XanDD11.7
++ @1436 + O#XanDD11.7
++ @1437 + O#XanDD11.8
++ @1438 + O#XanDD11.1EE
END

IF ~~ O#XanDD11.1EE
SAY @1439
IF ~~ + O#XanDD11.6
END

IF ~~ O#XanDD11.6
SAY @1440
++ @1441 + O#XanDD11.7
++ @1442 + O#XanDD11.7
++ @1443 + O#XanDD11.8
++ @1444 + O#XanDD11.8
END

IF ~~ O#XanDD11.7
SAY @1445
= @1446
= @1447
IF ~~ DO ~SetGlobal("O#XanRomanceFuture","GLOBAL",1)~ EXIT
END

IF ~~ O#XanDD11.8
SAY @1448
IF ~~ EXIT
END

IF ~~ O#XanDD11.9
SAY @1449
++ @1450 + O#XanDD11.10
++ @1451 + O#XanDD11.11
++ @1452 + O#XanDD11.12
END

IF ~~ O#XanDD11.10
SAY @1453
IF ~~ + O#XanDD11.13
END

IF ~~ O#XanDD11.11
SAY @1454
IF ~~ + O#XanDD11.13
END

IF ~~ O#XanDD11.12
SAY @1455
IF ~~ + O#XanDD11.13
END

IF ~~ O#XanDD11.13
SAY @1456
IF ~~ EXIT
END



// 12.

IF ~~ O#XanDD12
SAY @1321
++ @1322 + O#XanDD12.1
++ @1323 + O#XanDD12.2
++ @1324 + O#XanDD12.3
++ @1325 + O#XanDD12.4
END

IF ~~ O#XanDD12.1
SAY @1326
IF ~~ + O#XanDD12.5
END

IF ~~ O#XanDD12.2
SAY @1327
IF ~~ + O#XanDD12.5
END

IF ~~ O#XanDD12.3
SAY @1328
IF ~~ + O#XanDD12.5
END

IF ~~ O#XanDD12.4
SAY @1329
IF ~~ + O#XanDD12.5
END

IF ~~ O#XanDD12.5
SAY @1330
++ @1331 + O#XanDD12.6
++ @1332 + O#XanDD12.7
++ @1333 + O#XanDD12.8
++ @1334 + O#XanDD12.9
END

IF ~~ O#XanDD12.6
SAY @1335
IF ~~ + O#XanDD12.10
END

IF ~~ O#XanDD12.7
SAY @1336
IF ~~ + O#XanDD12.10
END

IF ~~ O#XanDD12.8
SAY @1337
IF ~~ + O#XanDD12.10
END

IF ~~ O#XanDD12.9
SAY @1338
IF ~~ EXIT
END

IF ~~ O#XanDD12.10
SAY @1339
++ @1340 + O#XanDD12.11
++ @1341 + O#XanDD12.12
++ @1342 + O#XanDD12.13
++ @1343 + O#XanDD12.14
END

IF ~~ O#XanDD12.11
SAY @1344
= @1345
IF ~~ + O#XanDD12.12
END

IF ~~ O#XanDD12.12
SAY @1346
IF ~~ EXIT
END

IF ~~ O#XanDD12.13
SAY @1347
= @1348
IF ~~ EXIT
END

IF ~~ O#XanDD12.14
SAY @1349
IF ~~ + O#XanDD12.12
END



// 13.

IF ~~ O#XanDD13
SAY @1350
++ @1351 + O#XanDD13.1
++ @1352 + O#XanDD13.2
++ @1353 + O#XanDD13.3
END

IF ~~ O#XanDD13.1
SAY @1354
IF ~~ + O#XanDD13.4
END

IF ~~ O#XanDD13.2
SAY @1355
IF ~~ + O#XanDD13.4
END

IF ~~ O#XanDD13.3
SAY @1356
IF ~~ + O#XanDD13.4
END

IF ~~ O#XanDD13.4
SAY @1357
= @1358
= @1359
++ @1360 + O#XanDD13.5
++ @1361 + O#XanDD13.6
++ @1362 + O#XanDD13.7
++ @1363 + O#XanDD13.8
END

IF ~~ O#XanDD13.5
SAY @1364
IF ~~ + O#XanDD13.9
END

IF ~~ O#XanDD13.6
SAY @1365
= @1366
IF ~~ + O#XanDD13.9
END

IF ~~ O#XanDD13.7
SAY @1367
IF ~~ + O#XanDD13.9
END

IF ~~ O#XanDD13.8
SAY @1368
IF ~~ + O#XanDD13.9
END

IF ~~ O#XanDD13.9
SAY @1369
= @1370
++ @1371 + O#XanDD13.10
++ @1372 + O#XanDD13.10
++ @1373 + O#XanDD13.10
END 

IF ~~ O#XanDD13.10
SAY @1374
= @1375
= @1376
++ @1377 + O#XanDD13.11
++ @1378 + O#XanDD13.12
++ @1379 + O#XanDD13.13
END

IF ~~ O#XanDD13.11
SAY @1380
IF ~~ EXIT
END

IF ~~ O#XanDD13.12
SAY @1381
= @1382
IF ~~ EXIT
END

IF ~~ O#XanDD13.13
SAY @1383
= @1384
= @1385
IF ~~ EXIT
END



// 14.

IF ~~ O#XanDD14
SAY @4115
++ @4116 + O#XanDD14.1
++ @4117 + O#XanDD14.1
++ @4118 + O#XanDD14.1
++ @4119 + O#XanDD14.1
++ @4120 + O#XanDD14.0
END

IF ~~ O#XanDD14.0
SAY @4121
IF ~~ + O#XanDD14.1
END

IF ~~ O#XanDD14.1
SAY @4122
++ @4123 + O#XanDD14.2
++ @4124 + O#XanDD14.2
++ @4125 + O#XanDD14.2
END

IF ~~ O#XanDD14.2
SAY @4126
= @4127
= @4128
++ @4129 + O#XanDD14.3
++ @4130 + O#XanDD14.3
++ @4131 + O#XanDD14.3
++ @4132 + O#XanDD14.3
END

IF ~~ O#XanDD14.3
SAY @4133
++ @4134 + O#XanDD14.5
++ @4135 + O#XanDD14.4
++ @4136 + O#XanDD14.5
++ @4137 + O#XanDD14.5
END

IF ~~ O#XanDD14.4
SAY @4138
IF ~~ + O#XanDD14.5
END

IF ~~ O#XanDD14.5
SAY @4139
= @4140
= @4141
= @4142
IF ~Race(Player1,Elf)~ + O#XanDD14.5e
IF ~!Race(Player1,Elf)~ + O#XanDD14.5ne
END

IF ~~ O#XanDD14.5e
SAY @4143
= @4144
IF ~~ + O#XanDD14.6
END

IF ~~ O#XanDD14.5ne
SAY @4145
= @4146
IF ~~ + O#XanDD14.6
END

IF ~~ O#XanDD14.6
SAY @4147
++ @4148 + O#XanDD14.7
++ @4149 + O#XanDD14.7
++ @4150 + O#XanDD14.7
END

IF ~~ O#XanDD14.7
SAY @4151
= @4152
IF ~~ EXIT
END



// Erevain talk

IF ~~ O#XanEr1.0
SAY @1806
++ @1807 + O#XanEr1.1
++ @1808 + O#XanEr1.2
++ @1809 + O#XanEr1.3
END

IF ~~ O#XanEr1.1
SAY @1810
IF ~~ + O#XanEr1.4
END

IF ~~ O#XanEr1.2
SAY @1811
IF ~~ + O#XanEr1.4
END

IF ~~ O#XanEr1.3
SAY @1812
IF ~~ + O#XanEr1.4
END

IF ~~ O#XanEr1.4
SAY @1813
= @1814
= @1815
= @1816
= @1817
= @1818
= @1819
= @1820
++ @1821 + O#XanEr1.5
++ @1822 + O#XanEr1.6
++ @1823 + O#XanEr1.7
END

IF ~~ O#XanEr1.5
SAY @1824
IF ~~ + O#XanEr1.6
END

IF ~~ O#XanEr1.6
SAY @1825
IF ~~ EXIT
END

IF ~~ O#XanEr1.7
SAY @1826
IF ~~ + O#XanEr1.6
END

// Mother talk

IF ~~ O#XanMo1.0
SAY @1858
= @1859
++ @1860 + O#XanMo1.1
++ @1861 + O#XanMo1.1
++ @1862 + O#XanMo1.1
END

IF ~~ O#XanMo1.1
SAY @1863
= @1864
++ @1865 + O#XanMo1.2
++ @1866 + O#XanMo1.4
++ @1867 + O#XanMo1.4
++ @1868 + O#XanMo1.3
END

IF ~~ O#XanMo1.2
SAY @1866
IF ~~ + O#XanMo1.4
END

IF ~~ O#XanMo1.3
SAY @1869
= @1870
IF ~~ EXIT
END

IF ~~ O#XanMo1.4
SAY @1871
= @1872
= @1873
= @1874
= @1858
= @1875
++ @1876 + O#XanMo1.5
++ @1877 + O#XanMo1.6
++ @1878 + O#XanMo1.7
++ @1879 + O#XanMo1.8
END

IF ~~ O#XanMo1.5
SAY @1880
IF ~~ + O#XanMo1.9
END

IF ~~ O#XanMo1.6
SAY @1881
IF ~~ + O#XanMo1.9
END

IF ~~ O#XanMo1.7
SAY @1882
IF ~~ + O#XanMo1.9
END

IF ~~ O#XanMo1.8
SAY @1883
IF ~~ + O#XanMo1.9
END

IF ~~ O#XanMo1.9
SAY @1884
= @1885 
IF ~~ EXIT
END

// Letter talk

IF ~~ O#XanLe1.0
SAY @1827
++ @1828 + O#XanLe1.1
++ @1829 + O#XanLe1.2
++ @1830 + O#XanLe1.3
END

IF ~~ O#XanLe1.1
SAY @1831
IF ~~ + O#XanLe1.4
END

IF ~~ O#XanLe1.2
SAY @1832
IF ~~ + O#XanLe1.4
END

IF ~~ O#XanLe1.3
SAY @1833
IF ~~ + O#XanLe1.4
END

IF ~~ O#XanLe1.4
SAY @1834
= @1835
++ @1836 + O#XanLe1.5
++ @1837 + O#XanLe1.5
++ @1838 + O#XanLe1.5
++ @1839 + O#XanLe1.5
END

IF ~~ O#XanLe1.5
SAY @1840
++ @1841 + O#XanLe1.7
++ @1842 + O#XanLe1.7
++ @1843 + O#XanLe1.6
++ @1844 + O#XanLe1.7
END

IF ~~ O#XanLe1.6
SAY @1845
IF ~~ + O#XanLe1.7
END

IF ~~ O#XanLe1.7
SAY @1846
++ @1847 + O#XanLe1.8
++ @1848 + O#XanLe1.9
++ @1849 + O#XanLe1.10
+ ~Global("O#XanRomanceActive","GLOBAL",2)~ + @1850 + O#XanLe1.11
END

IF ~~ O#XanLe1.8
SAY @1851
IF ~~ + O#XanLe1.12
END

IF ~~ O#XanLe1.9
SAY @1852
IF ~~ + O#XanLe1.12
END

IF ~~ O#XanLe1.10
SAY @1853
IF ~~ + O#XanLe1.12
END

IF ~~ O#XanLe1.11
SAY @1854
IF ~~ + O#XanLe1.12
END

IF ~~ O#XanLe1.12
SAY @1855
= @1856
IF ~~ EXIT
END

// After meeting Ricar

IF ~~ O#XanEA3
SAY @3789
++ @3790 + O#XanEA3.1
++ @3791 + O#XanEA3.0
++ @3792 + O#XanEA3.1
END

IF ~~ O#XanEA3.0
SAY @3793
IF ~~ + O#XanEA3.2
END

IF ~~ O#XanEA3.1
SAY @3794
IF ~~ + O#XanEA3.2
END

IF ~~ O#XanEA3.2
SAY @3795
++ @3796 + O#XanEA3.3
++ @3797 + O#XanEA3.4
++ @3798 + O#XanEA3.5
END

IF ~~ O#XanEA3.3
SAY @3799
IF ~~ + O#XanEA3.4
END

IF ~~ O#XanEA3.4
SAY @3800
IF ~~ + O#XanEA3.5
END

IF ~~ O#XanEA3.5
SAY @3801
+ ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2)~ + @3802 + O#XanEA3.6
+ ~Global("O#XanRomanceActive","GLOBAL",2)~ + @3803 + O#XanEA3.7
++ @3804 + O#XanEA3.10
++ @3805 + O#XanEA3.8
++ @3806 + O#XanEA3.9
END

IF ~~ O#XanEA3.6
SAY @3807
IF ~~ + O#XanEA3.10
END

IF ~~ O#XanEA3.7
SAY @3808
IF ~~ + O#XanEA3.10
END

IF ~~ O#XanEA3.9
SAY @3809
IF ~~ + O#XanEA3.10
END

IF ~~ O#XanEA3.10
SAY @3810
IF ~~ EXIT
IF ~Global("O#XanRomanceActive","GLOBAL",2)~ + O#XanEA3.11
END

IF ~~ O#XanEA3.11
SAY @3811
IF ~~ EXIT
END

// PH Talk 1

IF ~~ O#XanPH1.0
SAY @1896
++ @1897 + O#XanPH1.3
++ @1898 + O#XanPH1.00
++ @1899 + O#XanPH1.000
++ @1900 + O#XanPH1.0000
END

IF ~~ O#XanPH1.00
SAY @1901
IF ~~ + O#XanPH1.3
END

IF ~~ O#XanPH1.000
SAY @1902
IF ~~ + O#XanPH1.3
END

IF ~~ O#XanPH1.0000
SAY @1903
IF ~~ + O#XanPH1.3
END

IF ~~ O#XanPH1.1
SAY @1904
++ @1905 + O#XanPH1.2
++ @1906 + O#XanPH1.2
++ @1907 + O#XanPH1.3
++ @1908 + O#XanPH1.3
END

IF ~~ O#XanPH1.2
SAY @1909
IF ~~ + O#XanPH1.3
END

IF ~~ O#XanPH1.3
SAY @1910
= @1911
= @1912
++ @1913 + O#XanPH1.4
++ @1914 + O#XanPH1.4
++ @1915 + O#XanPH1.5
++ @1916 + O#XanPH1.6
++ @1917 + O#XanPH1.7
++ @1918 + O#XanPH1.8
END

IF ~~ O#XanPH1.4
SAY @1919
IF ~~ + O#XanPH1.9
END

IF ~~ O#XanPH1.5
SAY @1920
IF ~~ + O#XanPH1.9
END

IF ~~ O#XanPH1.6
SAY @1921
IF ~~ + O#XanPH1.9
END

IF ~~ O#XanPH1.7
SAY @1922
IF ~~ + O#XanPH1.9
END

IF ~~ O#XanPH1.8
SAY @1923
++ @1924 + O#XanPH1.11
++ @1925 + O#XanPH1.6
++ @1926 + O#XanPH1.10
END

IF ~~ O#XanPH1.9
SAY @1927
IF ~~ EXIT
END

IF ~~ O#XanPH1.10
SAY @1928
IF ~~ + O#XanPH1.9
END

IF ~~ O#XanPH1.11
SAY @1929
IF ~~ EXIT
END

// PH Talk 2

IF ~~ O#XanPH2
SAY @1930
++ @1931 + O#XanPH2.1
++ @1932 + O#XanPH2.2
++ @1933 + O#XanPH2.3
++ @1934 + O#XanPH2.4
++ @1935 + O#XanPH2.4
END

IF ~~ O#XanPH2.1
SAY @1936
= @1937
IF ~~ + O#XanPH2.2
END

IF ~~ O#XanPH2.2
SAY @1938
++ @1939 + O#XanPH2.5
++ @1940 + O#XanPH2.5
++ @1941 + O#XanPH2.6
++ @1942 + O#XanPH2.6
++ @1943 + O#XanPH2.7
++ @1944 + O#XanPH2.7
END

IF ~~ O#XanPH2.3
SAY @1945
IF ~~ + O#XanPH2.2
END
 
IF ~~ O#XanPH2.4
SAY @1946
IF ~~ + O#XanPH2.2
END

IF ~~ O#XanPH2.5
SAY @1947
IF ~~ + O#XanPH2.8
END

IF ~~ O#XanPH2.6
SAY @1948
= @1949
IF ~~ + O#XanPH2.8
END

IF ~~ O#XanPH2.7
SAY @1950
++ @1951 + O#XanPH2.9
++ @1952 + O#XanPH2.9
++ @1953 + O#XanPH2.10
END

IF ~~ O#XanPH2.8
SAY @1954
++ @1955 + O#XanPH2.11
++ @1956 + O#XanPH2.11
++ @1957 + O#XanPH2.14
++ @1958 + O#XanPH2.12
++ @1959 + O#XanPH2.12
++ @1960 + O#XanPH2.13
END

IF ~~ O#XanPH2.9
SAY @1961
= @1962
= @1963
= @1964
= @1965
= @1966
= @1967
= @1968
IF ~~ DO ~RestParty()~ EXIT
END 

IF ~~ O#XanPH2.10
SAY @1969
IF ~~ DO ~RestParty()~ EXIT
END

IF ~~ O#XanPH2.11
SAY @1970
IF ~~ DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",3) RestParty()~ EXIT
END

IF ~~ O#XanPH2.12
SAY @1971
IF ~~ + O#XanPH2.7
END

IF ~~ O#XanPH2.13
SAY @1972
IF ~~ + O#XanPH2.9
END

IF ~~ O#XanPH2.14
SAY @1973
++ @1974 + O#XanPH2.11
++ @1975 + O#XanPH2.15
++ @1976 + O#XanPH2.12
++ @1977 + O#XanPH2.7
END

IF ~~ O#XanPH2.15
SAY @1978
IF ~~ DO ~SetGlobal("O#XanToBPhysical1","GLOBAL",3) RestParty()~ EXIT
END

// Elven bond: answer

IF ~~ O#XanBO1
SAY @2020
= @2021
= @2022
IF ~~ EXIT
END

// Rants
// 1.

IF ~~ O#XanRA1
SAY @2023
++ @2024 + O#XanRA1.2
++ @2025 + O#XanRA1.2
++ @2026 + O#XanRA1.0
++ @2027 + O#XanRA1.0
END

IF ~~ O#XanRA1.0
SAY @2028
++ @2029 + O#XanRA1.2
++ @2030 + O#XanRA1.2
++ @2031 + O#XanRA1.00
END

IF ~~ O#XanRA1.00
SAY @2032
IF ~~ EXIT
END

IF ~~ O#XanRA1.2
SAY @2033
++ @2034 + O#XanRA1.3
++ @2035 + O#XanRA1.3
++ @2036 + O#XanRA1.3
+ ~Global("O#XanYoshimoBetrayal","GLOBAL",0)~ + @2037 + O#XanRA1.3
+ ~Global("O#XanYoshimoBetrayal","GLOBAL",1)~ + @2038 + O#XanRA1.3
++ @2039 + O#XanRA1.3
END

IF ~~ O#XanRA1.3
SAY @2040
++ @2041 + O#XanRA1.4
++ @2042 + O#XanRA1.4
++ @2043 + O#XanRA1.4
++ @2044 + O#XanRA1.4
END

IF ~~ O#XanRA1.4
SAY @2045
++ @2046 + O#XanRA1.5
++ @2047 + O#XanRA1.5
++ @2048 + O#XanRA1.5
++ @2049 + O#XanRA1.5
END

IF ~~ O#XanRA1.5
SAY @2050
++ @2051 + O#XanRA1.6
++ @2052 + O#XanRA1.6
++ @2053 + O#XanRA1.6
++ @2054 + O#XanRA1.6
END

IF ~~ O#XanRA1.6
SAY @2055
= @2056
= @2057
= @2058
= @2059
= @2006
++ @2060 + O#XanRA1.7
++ @2061 + O#XanRA1.7
++ @2062 + O#XanRA1.8
++ @2063 + O#XanRA1.8
END

IF ~~ O#XanRA1.7
SAY @2064
= @2065
IF ~~ EXIT
END

IF ~~ O#XanRA1.8
SAY @2066
= @2067
IF ~~ EXIT
END

// 2.

IF ~~ O#XanRA2
SAY @2068
++ @2069 + O#XanRA2.1
++ @2070 + O#XanRA2.2
++ @2071 + O#XanRA2.0
END

IF ~~ O#XanRA2.0
SAY @2072
IF ~~ EXIT
END

IF ~~ O#XanRA2.1
SAY @2073
++ @2074 + O#XanRA2.3
++ @2075 + O#XanRA2.3
++ @2076 + O#XanRA2.3
END

IF ~~ O#XanRA2.2
SAY @2077
++ @2074 + O#XanRA2.3
++ @2075 + O#XanRA2.3
++ @2076 + O#XanRA2.3
END

IF ~~ O#XanRA2.3
SAY @2078
= @2079
= @2080
= @2081
++ @2082 + O#XanRA2.4
++ @2083 + O#XanRA2.4
++ @2084 + O#XanRA2.5
++ @2085 + O#XanRA2.5
++ @2086 + O#XanRA2.6
END

IF ~~ O#XanRA2.4
SAY @2087
IF ~~ + O#XanRA2.7
END

IF ~~ O#XanRA2.5
SAY @2088
= @2089
= @2090
IF ~~ + O#XanRA2.7
END

IF ~~ O#XanRA2.6
SAY @2091
= @2092
= @2093
IF ~~ + O#XanRA2.7
END

IF ~~ O#XanRA2.7
SAY @2094
++ @2095 + O#XanRA2.8
++ @2096 + O#XanRA2.8
++ @2097 + O#XanRA2.9
++ @2098 + O#XanRA2.9
END

IF ~~ O#XanRA2.8
SAY @2099
IF ~~ EXIT
END

IF ~~ O#XanRA2.9
SAY @2100
IF ~~ EXIT
END

// 3.

IF ~~ O#XanRA3
SAY @2104
++ @2105 + O#XanRA3.1
++ @2106 + O#XanRA3.1
++ @2107 + O#XanRA3.2
++ @2108 + O#XanRA3.3
END 

IF ~~ O#XanRA3.1
SAY @2109
IF ~~ + O#XanRA3.3
END

IF ~~ O#XanRA3.2
SAY @2110
IF ~~ + O#XanRA3.3
END

IF ~~ O#XanRA3.3
SAY @2111
= @2112
++ @2113 + O#XanRA3.4
++ @2114 + O#XanRA3.5
++ @2115 + O#XanRA3.6
++ @2116 + O#XanRA3.7
END

IF ~~ O#XanRA3.4
SAY @2117
IF ~~ + O#XanRA3.8
END

IF ~~ O#XanRA3.5
SAY @2118
IF ~~ + O#XanRA3.8
END

IF ~~ O#XanRA3.6
SAY @2119
IF ~~ + O#XanRA3.8
END

IF ~~ O#XanRA3.7
SAY @2120
= @2121
IF ~~ + O#XanRA3.8
END

IF ~~ O#XanRA3.8
SAY @2122
++ @2123 + O#XanRA3.9
++ @2124 + O#XanRA3.10
++ @2125 + O#XanRA3.11
++ @2126 + O#XanRA3.12
++ @2127 + O#XanRA3.13
END

IF ~~ O#XanRA3.9
SAY @2128
= @2129
IF ~~ EXIT
END

IF ~~ O#XanRA3.10
SAY @2130
= @2131
IF ~~ EXIT
END

IF ~~ O#XanRA3.11
SAY @2132
= @2133
IF ~~ EXIT
END
 
IF ~~ O#XanRA3.12
SAY @2134
IF ~~ + O#XanRA3.14
END

IF ~~ O#XanRA3.13
SAY @2135
IF ~~ + O#XanRA3.14
END

IF ~~ O#XanRA3.14
SAY @2136
IF ~~ EXIT
END

// Sarevok talks

// 1.

IF ~~ O#XanPIDSarevok1
SAY @1286
++ @997 + O#XanPIDS1.1
++ @1287 + O#XanPIDS1.2
++ @1288 + O#XanPIDS1.1
++ @1289 + O#XanPIDS1.3
END

IF ~~ O#XanPIDS1.1
SAY @1290
IF ~~ + O#XanPIDS1.3
END

IF ~~ O#XanPIDS1.2
SAY @1291
IF ~~ + O#XanPIDS1.3
END

IF ~~ O#XanPIDS1.3
SAY @1292
= @1293
= @1294
++ @1295 + O#XanPIDS1.4
++ @1296 + O#XanPIDS1.5
++ @1297 + O#XanPIDS1.6
++ @1298 + O#XanPIDS1.7
END

IF ~~ O#XanPIDS1.4
SAY @1299
IF ~~ + O#XanPIDS1.8
END

IF ~~ O#XanPIDS1.5
SAY @1300
IF ~~ + O#XanPIDS1.8
END

IF ~~ O#XanPIDS1.6
SAY @1301
IF ~~ + O#XanPIDS1.8
END

IF ~~ O#XanPIDS1.7
SAY @1302
IF ~~ + O#XanPIDS1.8
END

IF ~~ O#XanPIDS1.8
SAY @1303
= @1304
IF ~~ EXIT
END

// 2.

IF ~~ O#XanPIDSarevok2
SAY @1305
++ @1306 + O#XanPIDS2.3
++ @1307 + O#XanPIDS2.3
++ @1308 + O#XanPIDS2.1
++ @1309 + O#XanPIDS2.2
END

IF ~~ O#XanPIDS2.1
SAY @1310
IF ~~ + O#XanPIDS2.3
END

IF ~~ O#XanPIDS2.2
SAY @1311
IF ~~ + O#XanPIDS2.3
END

IF ~~ O#XanPIDS2.3
SAY @1312
++ @1313 + O#XanPIDS2.4
++ @1314 + O#XanPIDS2.5
++ @1315 + O#XanPIDS2.4
++ @1316 + O#XanPIDS2.5
END

IF ~~ O#XanPIDS2.4
SAY @1317
IF ~~ + O#XanPIDS2.5
END

IF ~~ O#XanPIDS2.5
SAY @1318
IF ~~ EXIT
END

// Quest-related conversation

IF ~~ O#XanToBQT2
SAY @1496
= @1497
++ @1498 + O#XanToBQT2.1
++ @1499 + O#XanToBQT2.2
++ @1500 + O#XanToBQT2.3
++ @1501 + O#XanToBQT2.4
++ @1502 + O#XanToBQT2.5
END

IF ~~ O#XanToBQT2.1
SAY @1503
IF ~~ + O#XanToBQT2.6
END

IF ~~ O#XanToBQT2.2
SAY @1504
IF ~~ + O#XanToBQT2.6
END

IF ~~ O#XanToBQT2.3
SAY @1505
IF ~~ + O#XanToBQT2.6
END

IF ~~ O#XanToBQT2.4
SAY @1506
IF ~~ EXIT
END

IF ~~ O#XanToBQT2.5
SAY @1507
IF ~~ + O#XanToBQT2.6
END

IF ~~ O#XanToBQT2.6
SAY @1508
IF ~~ EXIT
END

IF ~~ O#XanToBQT1
SAY @1765
++ @1766 + O#XanToBQT1.0
++ @1767 + O#XanToBQT1.0
++ @1768 + O#XanToBQT1.0
++ @1769 + O#XanToBQT1.0
++ @1770 + O#XanToBQT1.0
END

IF ~~ O#XanToBQT1.0
SAY @1771
= @1772
= @1773
= @1774
= @1775 
++ @1776 + O#XanToBQT1.1
++ @1777 + O#XanToBQT1.2
++ @1778 + O#XanToBQT1.3
++ @1779 + O#XanToBQT1.4
END

IF ~~ O#XanToBQT1.1
SAY @1780
IF ~~ + O#XanToBQT1.5
END

IF ~~ O#XanToBQT1.2
SAY @1781
IF ~~ + O#XanToBQT1.5
END

IF ~~ O#XanToBQT1.3
SAY @1782
IF ~~ + O#XanToBQT1.5
END

IF ~~ O#XanToBQT1.4
SAY @1783
IF ~~ + O#XanToBQT1.5
END

IF ~~ O#XanToBQT1.5
SAY @1784
= @1785
++ @1786 + O#XanToBQT1.6
++ @1787 + O#XanToBQT1.6
++ @1788 + O#XanToBQT1.7
++ @1789 + O#XanToBQT1.7
++ @1790 + O#XanToBQT1.8
END

IF ~~ O#XanToBQT1.6
SAY @1791
IF ~~ + O#XanToBQT1.9
END

IF ~~ O#XanToBQT1.7
SAY @1792
IF ~~ + O#XanToBQT1.9
END

IF ~~ O#XanToBQT1.8
SAY @1793
IF ~~ + O#XanToBQT1.7
END

IF ~~ O#XanToBQT1.9
SAY @1794
= @1795
IF ~~ EXIT
END



// Chosen of <CHARNAME>, all paths

IF ~~ O#XanCh1
SAY @3058
IF ~!Global("O#XanRomanceActive","GLOBAL",2)~ + O#XanCh1.0
IF ~Global("O#XanRomanceActive","GLOBAL",2)~ + O#XanCh1.1
END

IF ~~ O#XanCh1.0
SAY @3059
+ ~Dead("Imoen2")~ + @3060 + O#XanCh1.0a
++ @3061 + O#XanCh1.0b
+ ~!Dead("Imoen2")~ + @3062 + O#XanCh1.0b
++ @3063 + O#XanCh1.0b
++ @3064 + O#XanCh1.0b
END

IF ~~ O#XanCh1.0a
SAY @3065
IF ~~ + O#XanCh1.0b
END

IF ~~ O#XanCh1.0b
SAY @3066
= @3067
++ @3068 + O#XanCh1.0c
++ @3069 + O#XanCh1.0c
++ @3070 + O#XanCh1.0c
++ @3071 + O#XanCh1.0c
END

IF ~~ O#XanCh1.0c
SAY @3072
= @3073
= @3074
IF ~~ EXIT
END

IF ~~ O#XanCh1.1
SAY @3075
++ @3076 + O#XanCh1.2
++ @3077 + O#XanCh1.2
++ @3078 + O#XanCh1.2
++ @3079 + O#XanCh1.2
END

IF ~~ O#XanCh1.2
SAY @3080
IF ~Global("O#XanRomanceActive","GLOBAL",2) !Global("O#XanBondedPathAlive","GLOBAL",2)~ + O#XanCh1.3
IF ~Global("O#XanRomanceActive","GLOBAL",2) Global("O#XanBondedPathAlive","GLOBAL",2)~ + O#XanCh1.4
END

IF ~~ O#XanCh1.3
SAY @3081
++ @3082 + O#XanCh1.3a
++ @3083 + O#XanCh1.3a
++ @3084 + O#XanCh1.3a
END

IF ~~ O#XanCh1.3a
SAY @3085
= @3086
++ @3087 + O#XanCh1.3b
++ @3088 + O#XanCh1.3c
++ @3089 + O#XanCh1.3d
END

IF ~~ O#XanCh1.3b
SAY @3090
IF ~~ + O#XanCh1.3e
END

IF ~~ O#XanCh1.3c
SAY @3091
IF ~~ + O#XanCh1.3e
END

IF ~~ O#XanCh1.3d
SAY @3092
IF ~~ + O#XanCh1.3e
END

IF ~~ O#XanCh1.3e
SAY @3093
= @3094
IF ~~ EXIT
END

IF ~~ O#XanCh1.4
SAY @3095
++ @3096 + O#XanCh1.5
++ @3097 + O#XanCh1.6
++ @3098 + O#XanCh1.7
++ @2313 + O#XanCh1.8
END

IF ~~ O#XanCh1.5
SAY @3099
IF ~~ + O#XanCh1.9
END

IF ~~ O#XanCh1.6
SAY @3100
IF ~~ + O#XanCh1.9
END

IF ~~ O#XanCh1.7
SAY @3101
IF ~~ + O#XanCh1.9
END

IF ~~ O#XanCh1.8
SAY @3102
IF ~~ + O#XanCh1.9
END

IF ~~ O#XanCh1.9
SAY @3103
= @3104
= @3105
= @3106
= @2313
++ @3102 + O#XanCh1.10
++ @3107 + O#XanCh1.10
++ @3108 + O#XanCh1.11
++ @3109 + O#XanCh1.11
++ @3110 + O#XanCh1.12
END

IF ~~ O#XanCh1.10
SAY @3111
= @3112
IF ~~ + O#XanCh1.11
END

IF ~~ O#XanCh1.11
SAY @3113
IF ~~ + O#XanCh1.13
END

IF ~~ O#XanCh1.12
SAY @3114
++ @3115 + O#XanCh1.13
++ @3116 + O#XanCh1.14
++ @3117 + O#XanCh1.10
++ @3118 + O#XanCh1.11
END

IF ~~ O#XanCh1.13
SAY @3119
IF ~~ EXIT
END

IF ~~ O#XanCh1.14
SAY @3120
= @3121
IF ~~ + O#XanCh1.11
END


// Bonded player-initiated talks

// 1.

IF ~~ O#XanRO1
SAY @3122
= @3123
++ @3124 + O#XanRO1.1
++ @3125 + O#XanRO1.1
++ @3126 + O#XanRO1.1
++ @3127 + O#XanRO1.1
++ @3128 + O#XanRO1.0
END

IF ~~ O#XanRO1.0
SAY @3129
IF ~~ + O#XanRO1.1
END

IF ~~ O#XanRO1.1
SAY @3130
= @3131
= @3132
= @3133
= @3134
++ @3135 + O#XanRO1.2
++ @3136 + O#XanRO1.3
++ @3137 + O#XanRO1.4
++ @3138 + O#XanRO1.4
++ @3139 + O#XanRO1.5
++ @3140 + O#XanRO1.6
END

IF ~~ O#XanRO1.2
SAY @3141
= @3142
= @3143
IF ~~ + O#XanRO1.7
END

IF ~~ O#XanRO1.3
SAY @3144
= @3145
IF ~~ + O#XanRO1.7
END

IF ~~ O#XanRO1.4
SAY @3146
= @3147
= @3148
IF ~~ + O#XanRO1.7
END

IF ~~ O#XanRO1.5
SAY @3149
IF ~~ EXIT
END

IF ~~ O#XanRO1.6
SAY @3150
IF ~~ + O#XanRO1.7
END

IF ~~ O#XanRO1.7
SAY @3151
++ @3152 + O#XanRO1.8
++ @3153 + O#XanRO1.8
++ @3154 + O#XanRO1.8
++ @3155 + O#XanRO1.8
++ @3115 + O#XanRO1.8
END

IF ~~ O#XanRO1.8
SAY @3156
= @3157
IF ~~ EXIT
END

// 2.

IF ~~ O#XanRO2
SAY @3158
++ @3159 + O#XanRO2.0
++ @3160 + O#XanRO2.1
++ @3161 + O#XanRO2.1
++ @3162 + O#XanRO2.1
++ @3163 + O#XanRO2.1
++ @3164 + O#XanRO2.1
END

IF ~~ O#XanRO2.0
SAY @3165
IF ~~ + O#XanRO2.1
END

IF ~~ O#XanRO2.1
SAY @3166
++ @3167 + O#XanRO2.2
++ @3168 + O#XanRO2.2
++ @3169 + O#XanRO2.3
++ @3170 + O#XanRO2.3
++ @3171 + O#XanRO2.3
++ @3172 + O#XanRO2.2
END

IF ~~ O#XanRO2.2
SAY @3173
IF ~~ + O#XanRO2.4
END

IF ~~ O#XanRO2.3
SAY @3174
IF ~~ + O#XanRO2.4
END

IF ~~ O#XanRO2.4
SAY @3175
++ @3176 + O#XanRO2.5
++ @3177 + O#XanRO2.5
++ @3178 + O#XanRO2.5
++ @3179 + O#XanRO2.5
END

IF ~~ O#XanRO2.5
SAY @3180
= @3181
IF ~~ EXIT
END

// 3.

IF ~~ O#XanRO3
SAY @3182
++ @3183 + O#XanRO3.0
++ @3184 + O#XanRO3.0
++ @3185 + O#XanRO3.0
++ @3186 + O#XanRO3.0
++ @3187 + O#XanRO3.0
++ @3188 + O#XanRO3.0
END

IF ~~ O#XanRO3.0
SAY @3189
= @3190
++ @3191 + O#XanRO3.1
++ @3192 + O#XanRO3.00
++ @3193 + O#XanRO3.1
END

IF ~~ O#XanRO3.1
SAY @3194
IF ~~ + O#XanRO3.00
END

IF ~~ O#XanRO3.00
SAY @3195
= @3196
= @3197
++ @3198 + O#XanRO3.2
++ @3199 + O#XanRO3.2
++ @3115 + O#XanRO3.2
++ @3200 + O#XanRO3.2
END

IF ~~ O#XanRO3.2
SAY @3201
= @3202
IF ~~ EXIT
END

// 4.

IF ~~ O#XanRO4
SAY @3203
++ @3204 + O#XanRO4.1
++ @3205 + O#XanRO4.1
++ @3206 + O#XanRO4.1
++ @3207 + O#XanRO4.1
++ @3208 + O#XanRO4.1
END

IF ~~ O#XanRO4.1
SAY @3209
= @3210
++ @3211 + O#XanRO4.3
++ @3212 + O#XanRO4.3
++ @3213 + O#XanRO4.2
++ @3214 + O#XanRO4.2
END

IF ~~ O#XanRO4.2
SAY @3215
IF ~~ + O#XanRO4.4
END

IF ~~ O#XanRO4.3
SAY @3216
IF ~~ + O#XanRO4.4
END

IF ~~ O#XanRO4.4
SAY @3217
++ @3218 + O#XanRO4.5
++ @3219 + O#XanRO4.6
++ @3220 + O#XanRO4.7
++ @3221 + O#XanRO4.6
END

IF ~~ O#XanRO4.5
SAY @3222
IF ~~ + O#XanRO4.8
END

IF ~~ O#XanRO4.6
SAY @3223
= @3224
IF ~~ + O#XanRO4.8
END

IF ~~ O#XanRO4.7
SAY @3225
= @3226
IF ~~ + O#XanRO4.8
END

IF ~~ O#XanRO4.8
SAY @3227
++ @3228 + O#XanRO4.9
++ @3229 + O#XanRO4.10
++ @3230 + O#XanRO4.11
END

IF ~~ O#XanRO4.9
SAY @3231
IF ~~ + O#XanRO4.12
END

IF ~~ O#XanRO4.10
SAY @3232
IF ~~ + O#XanRO4.12
END

IF ~~ O#XanRO4.11
SAY @3233
IF ~~ + O#XanRO4.12
END

IF ~~ O#XanRO4.12
SAY @3234
= @3235
IF ~~ EXIT
END

// 5.

IF ~~ O#XanRO5
SAY @3236
= @3237
= @3238
++ @3239 + O#XanRO5.1
++ @3240 + O#XanRO5.2
++ @3241 + O#XanRO5.3
++ @3242 + O#XanRO5.4
END

IF ~~ O#XanRO5.1
SAY @3243
IF ~~ + O#XanRO5.4
END

IF ~~ O#XanRO5.2
SAY @3244
IF ~~ + O#XanRO5.4
END

IF ~~ O#XanRO5.3
SAY @3245
IF ~~ + O#XanRO5.4
END

IF ~~ O#XanRO5.4
SAY @3246
= @3247
++ @3248 + O#XanRO5.5
++ @3249 + O#XanRO5.6
++ @3250 + O#XanRO5.7
++ @3251 + O#XanRO5.8
++ @3252 + O#XanRO5.5
END

IF ~~ O#XanRO5.5
SAY @3253
IF ~~ + O#XanRO5.9
END

IF ~~ O#XanRO5.6
SAY @3254
IF ~~ + O#XanRO5.9
END

IF ~~ O#XanRO5.7
SAY @3255
IF ~~ + O#XanRO5.9
END

IF ~~ O#XanRO5.8
SAY @3256
IF ~~ + O#XanRO5.9
END

IF ~~ O#XanRO5.9
SAY @3257
= @3258
IF ~~ EXIT
END

// 6.

IF ~~ O#XanRO6
SAY @3259
++ @3260 + O#XanRO6.0
++ @3261 + O#XanRO6.1
++ @3262 + O#XanRO6.1
++ @3263 + O#XanRO6.1
++ @2782 + O#XanRO6.1
END

IF ~~ O#XanRO6.0
SAY @3264
IF ~~ + O#XanRO6.1
END

IF ~~ O#XanRO6.1
SAY @3265
++ @3266 + O#XanRO6.3
++ @3267 + O#XanRO6.3
++ @3268 + O#XanRO6.2
++ @3269 + O#XanRO6.3
END

IF ~~ O#XanRO6.2
SAY @3270
IF ~~ + O#XanRO6.3
END

IF ~~ O#XanRO6.3
SAY @3271
= @3272
= @3273
= @3274
= @3275
= @3276
++ @3277 + O#XanRO6.6
++ @3278 + O#XanRO6.4
++ @3279 + O#XanRO6.6
++ @3280 + O#XanRO6.6
++ @3281 + O#XanRO6.5
END

IF ~~ O#XanRO6.4
SAY @3282
IF ~~ + O#XanRO6.6
END

IF ~~ O#XanRO6.5
SAY @3283
IF ~~ + O#XanRO6.6
END

IF ~~ O#XanRO6.6
SAY @3284
= @3285
= @3286
++ @3287 + O#XanRO6.8
++ @3288 + O#XanRO6.8
++ @3289 + O#XanRO6.7
END

IF ~~ O#XanRO6.7
SAY @3290
IF ~~ + O#XanRO6.8
END

IF ~~ O#XanRO6.8
SAY @3291
= @3292
++ @3293 + O#XanRO6.9
++ @3294 + O#XanRO6.10
++ @3295 + O#XanRO6.11
++ @3296 + O#XanRO6.12
END

IF ~~ O#XanRO6.9
SAY @3297
IF ~~ + O#XanRO6.12
END

IF ~~ O#XanRO6.10
SAY @3298
IF ~~ + O#XanRO6.12
END

IF ~~ O#XanRO6.11
SAY @3299
IF ~~ + O#XanRO6.12
END

IF ~~ O#XanRO6.12
SAY @3300
= @3301
IF ~~ EXIT
END

// 7.

IF ~~ O#XanRO7
SAY @3302
++ @3303 + O#XanRO7.1
++ @3304 + O#XanRO7.2
++ @3305 + O#XanRO7.3
++ @3306 + O#XanRO7.4
END

IF ~~ O#XanRO7.1
SAY @3307
IF ~~ + O#XanRO7.4
END

IF ~~ O#XanRO7.2
SAY @3308
IF ~~ + O#XanRO7.4
END

IF ~~ O#XanRO7.3
SAY @3309
IF ~~ + O#XanRO7.4
END

IF ~~ O#XanRO7.4
SAY @3310
= @3311
++ @3312 + O#XanRO7.5
++ @3313 + O#XanRO7.6
+ ~InParty("Sarevok")~ + @3314 + O#XanRO7.7
++ @3315 + O#XanRO7.8
END

IF ~~ O#XanRO7.5
SAY @3316
IF ~~ + O#XanRO7.9
END

IF ~~ O#XanRO7.6
SAY @3317
IF ~~ + O#XanRO7.9
END

IF ~~ O#XanRO7.7
SAY @3318
IF ~~ + O#XanRO7.9
END
 
IF ~~ O#XanRO7.8
SAY @3319
IF ~~ + O#XanRO7.9
END

IF ~~ O#XanRO7.9
SAY @3320
= @3321
= @3322
++ @3323 + O#XanRO7.10
++ @3324 + O#XanRO7.10
++ @3325 + O#XanRO7.10
++ @3326 + O#XanRO7.10
END

IF ~~ O#XanRO7.10
SAY @3327
= @3328
++ @3329 + O#XanRO7.11
++ @3330 + O#XanRO7.12
++ @3331 + O#XanRO7.13
END

IF ~~ O#XanRO7.11
SAY @3332
IF ~~ + O#XanRO7.14
END

IF ~~ O#XanRO7.12
SAY @3333
IF ~~ + O#XanRO7.14
END

IF ~~ O#XanRO7.13
SAY @3334
IF ~~ + O#XanRO7.14
END

IF ~~ O#XanRO7.14
SAY @3335
= @3336
IF ~~ EXIT
END

// 8. 

IF ~~ O#XanRO8
SAY @3337
= @3338
= @3339
= @3340
= @3341
= @3342
= @3343
= @3344
= @3345
= @3346
= @3347
= @3348
++ @3349 + O#XanRO8.0
++ @3350 + O#XanRO8.1
++ @3351 + O#XanRO8.1
END

IF ~~ O#XanRO8.0
SAY @3352 
IF ~~ + O#XanRO8.1
END

IF ~~ O#XanRO8.1
SAY @3353
IF ~~ EXIT
END

// 9.

IF ~~ O#XanRO9
SAY @3354
= @3355
= @3356
= @3357
= @3358
++ @3359 + O#XanRO9.1
++ @3360 + O#XanRO9.1
++ @3361 + O#XanRO9.1
++ @3362 + O#XanRO9.0
END

IF ~~ O#XanRO9.0
SAY @3363
IF ~~ + O#XanRO9.2
END

IF ~~ O#XanRO9.1
SAY @3364
IF ~~ + O#XanRO9.2
END

IF ~~ O#XanRO9.2
SAY @3365
= @3366
= @3367
++ @3368 + O#XanRO9.4
++ @3369 + O#XanRO9.5
++ @3370 + O#XanRO9.3
++ @3371 + O#XanRO9.6
END

IF ~~ O#XanRO9.3
SAY @3372
IF ~~ + O#XanRO9.6
END

IF ~~ O#XanRO9.4
SAY @3373
IF ~~ + O#XanRO9.6
END

IF ~~ O#XanRO9.5
SAY @3374
IF ~~ + O#XanRO9.6
END

IF ~~ O#XanRO9.6
SAY @3375
= @3376
= @3377
= @3378
= @3379
++ @3380 + O#XanRO9.7
++ @3381 + O#XanRO9.7
++ @3382 + O#XanRO9.7
++ @3383 + O#XanRO9.7
END

IF ~~ O#XanRO9.7
SAY @3384
= @3385
= @3386
= @3387
IF ~~ EXIT
END

// 10.

IF ~~ O#XanRO10
SAY @3388
= @3389
= @3390
++ @3005 + O#XanRO10.1
++ @3391 + O#XanRO10.1
++ @3392 + O#XanRO10.00
++ @3393 + O#XanRO10.0
END

IF ~~ O#XanRO10.0
SAY @3394
IF ~~ + O#XanRO10.1
END

IF ~~ O#XanRO10.00
SAY @3395
= @3396
IF ~~ + O#XanRO10.1
END

IF ~~ O#XanRO10.1
SAY @3397
= @3398
= @3399
= @3400
++ @3401 + O#XanRO10.2
++ @3402 + O#XanRO10.2
++ @3403 + O#XanRO10.2
END

IF ~~ O#XanRO10.2
SAY @3404
= @3405
= @3406
= @3407
= @3408
= @3409
++ @3410 + O#XanRO10.2a
++ @3411 + O#XanRO10.2a
++ @3412 + O#XanRO10.2a
END

IF ~~ O#XanRO10.2a
SAY @3413
= @3414
= @3415
= @3416
= @3417
++ @3418 + O#XanRO10.3
++ @3419 + O#XanRO10.3
++ @3420 + O#XanRO10.3
++ @3421 + O#XanRO10.3
END

IF ~~ O#XanRO10.3
SAY @3422
= @3423
= @3424
= @3425
IF ~~ EXIT
END

// 11.

IF ~~ O#XanRO11
SAY @3426
= @3427
= @3428
++ @3429 + O#XanRO11.1
++ @3430 + O#XanRO11.1
++ @3431 + O#XanRO11.1
++ @3432 + O#XanRO11.0
++ @3433 + O#XanRO11.1
END

IF ~~ O#XanRO11.0
SAY @3434
= @3435
IF ~~ + O#XanRO11.1
END

IF ~~ O#XanRO11.1
SAY @3436
= @3437
= @3438
= @3439
++ @3440 + O#XanRO11.2
++ @3441 + O#XanRO11.3
++ @3442 + O#XanRO11.4
++ @3443 + O#XanRO11.5
END

IF ~~ O#XanRO11.2
SAY @3444
IF ~~ + O#XanRO11.6
END

IF ~~ O#XanRO11.3
SAY @3445
IF ~~ + O#XanRO11.6
END

IF ~~ O#XanRO11.4
SAY @3446
IF ~~ + O#XanRO11.6
END

IF ~~ O#XanRO11.5
SAY @3447
IF ~~ + O#XanRO11.6
END

IF ~~ O#XanRO11.6
SAY @3448
= @3449
++ @3450 + O#XanRO11.8
++ @3451 + O#XanRO11.7
++ @3452 + O#XanRO11.7
++ @3453 + O#XanRO11.6a
END

IF ~~ O#XanRO11.6a
SAY @3454
IF ~~ + O#XanRO11.8
END

IF ~~ O#XanRO11.7
SAY @3455
IF ~~ + O#XanRO11.8
END

IF ~~ O#XanRO11.8
SAY @3456
= @3457
IF ~~ EXIT
END

// 12.

IF ~~ O#XanRO12
SAY @3458
++ @3459 + O#XanRO12.3
++ @3460 + O#XanRO12.2
++ @3461 + O#XanRO12.0
++ @3462 + O#XanRO12.1
++ @3463 + O#XanRO12.4
END

IF ~~ O#XanRO12.0
SAY @3464
IF ~~ + O#XanRO12.4
END

IF ~~ O#XanRO12.1
SAY @3465
IF ~~ + O#XanRO12.4
END

IF ~~ O#XanRO12.2
SAY @3466
IF ~~ + O#XanRO12.4
END

IF ~~ O#XanRO12.3
SAY @3467
IF ~~ + O#XanRO12.4
END

IF ~~ O#XanRO12.4
SAY @3468
= @3469
= @3470
= @3471
++ @3472 + O#XanRO12.5
++ @3473 + O#XanRO12.5a
++ @3474 + O#XanRO12.6
END

IF ~~ O#XanRO12.5
SAY @3475
IF ~~ + O#XanRO12.6
END

IF ~~ O#XanRO12.5a
SAY @3476
IF ~~ + O#XanRO12.6
END

IF ~~ O#XanRO12.6
SAY @3477
++ @3478 + O#XanRO12.8
++ @3479 + O#XanRO12.7
END

IF ~~ O#XanRO12.7
SAY @3480
IF ~~ EXIT
END

IF ~~ O#XanRO12.8
SAY @3481
= @3482 
= @3483
++ @3484 + O#XanRO12.10
++ @3485 + O#XanRO12.10
++ @3486 + O#XanRO12.9
END

IF ~~ O#XanRO12.9
SAY @3487
IF ~~ + O#XanRO12.11
END

IF ~~ O#XanRO12.10
SAY @3488
IF ~~ + O#XanRO12.11
END

IF ~~ O#XanRO12.11
SAY @3489
IF ~~ EXIT
END

// 13.

IF ~~ O#XanRO13
SAY @3490
= @3491
++ @3450 + O#XanRO13.1
++ @3492 + O#XanRO13.1
++ @3493 + O#XanRO13.1
END

IF ~~ O#XanRO13.1
SAY @3494
= @3495
= @3496
++ @3497 + O#XanRO13.2
++ @3498 + O#XanRO13.3
++ @3499 + O#XanRO13.3
++ @3500 + O#XanRO13.1a
END

IF ~~ O#XanRO13.1a
SAY @3501
IF ~~ + O#XanRO13.3
END

IF ~~ O#XanRO13.2
SAY @3502
IF ~~ + O#XanRO13.3
END

IF ~~ O#XanRO13.3
SAY @3503
++ @3504 + O#XanRO13.4
++ @3505 + O#XanRO13.7
++ @3506 + O#XanRO13.5
++ @3507 + O#XanRO13.6
END

IF ~~ O#XanRO13.4
SAY @3508
= @3509
IF ~~ + O#XanRO13.7
END

IF ~~ O#XanRO13.5
SAY @3510
IF ~~ + O#XanRO13.7
END

IF ~~ O#XanRO13.6
SAY @3511
= @3512
IF ~~ EXIT
END

IF ~~ O#XanRO13.7
SAY @3513
= @3514
IF ~~ EXIT
END

// 14.

IF ~~ O#XanRO14
SAY @3515
++ @3516 + O#XanRO14.1
++ @3517 + O#XanRO14.0
++ @3518 + O#XanRO14.1
++ @3519 + O#XanRO14.0
END

IF ~~ O#XanRO14.0
SAY @3520
IF ~~ + O#XanRO14.1
END

IF ~~ O#XanRO14.1
SAY @3521
= @3522
++ @3523 + O#XanRO14.2
++ @3524 + O#XanRO14.2
++ @3525 + O#XanRO14.2
END

IF ~~ O#XanRO14.2
SAY @3526
= @3527
++ @3528 + O#XanRO14.3
++ @3529 + O#XanRO14.4
++ @3530 + O#XanRO14.4
++ @3531 + O#XanRO14.4
END

IF ~~ O#XanRO14.3
SAY @3532
IF ~~ + O#XanRO14.4
END

IF ~~ O#XanRO14.4
SAY @3533
= @3534
= @3535
= @3536
= @3537
++ @3538 + O#XanRO14.4a
++ @3539 + O#XanRO14.4a
++ @3540 + O#XanRO14.4a
END

IF ~~ O#XanRO14.4a
SAY @3541
= @3542
= @3543
= @3544
= @3545
++ @3546 + O#XanRO14.5
++ @3547 + O#XanRO14.5
++ @3548 + O#XanRO14.6
++ @3549 + O#XanRO14.7
END

IF ~~ O#XanRO14.5
SAY @3550
= @3551
++ @3552 + O#XanRO14.8
++ @3553 + O#XanRO14.8
++ @3554 + O#XanRO14.8
++ @2682 + O#XanRO14.9
END

IF ~~ O#XanRO14.6
SAY @3555
IF ~~ + O#XanRO14.5
END

IF ~~ O#XanRO14.7
SAY @3556
IF ~~ + O#XanRO14.5
END

IF ~~ O#XanRO14.8
SAY @3557
= @3558
IF ~~ EXIT
END

IF ~~ O#XanRO14.9
SAY @2875
IF ~~ + O#XanRO14.8
END

// 15.

IF ~~ O#XanRO15
SAY @3559
++ @3560 + O#XanRO15.1
++ @3561 + O#XanRO15.1
++ @3562 + O#XanRO15.1
++ @3563 + O#XanRO15.1
END

IF ~~ O#XanRO15.1
SAY @3564
= @3565 
= @3566
= @3567
++ @3568 + O#XanRO15.3
++ @3569 + O#XanRO15.3
++ @3570 + O#XanRO15.2
++ @3571 + O#XanRO15.2
END

IF ~~ O#XanRO15.2
SAY @3572
IF ~~ + O#XanRO15.3
END

IF ~~ O#XanRO15.3
SAY @3573
= @3574
++ @3575 + O#XanRO15.5
++ @3576 + O#XanRO15.5
++ @3577 + O#XanRO15.4
END

IF ~~ O#XanRO15.4
SAY @3578
IF ~~ + O#XanRO15.5
END

IF ~~ O#XanRO15.5
SAY @3579
= @3580
IF ~~ EXIT
END

// 16.

IF ~~ O#XanRO16
SAY @3581
= @3582
++ @3583 + O#XanRO16.1
++ @3584 + O#XanRO16.1
++ @3585 + O#XanRO16.1
END

IF ~~ O#XanRO16.1
SAY @3586
= @3587
= @3588
++ @3589 + O#XanRO16.2
++ @3590 + O#XanRO16.2
++ @3591 + O#XanRO16.2
++ @3592 + O#XanRO16.2
END

IF ~~ O#XanRO16.2
SAY @3593
++ @3594 + O#XanRO16.5
++ @3595 + O#XanRO16.4
++ @3596 + O#XanRO16.5
++ @3597 + O#XanRO16.3
++ @3598 + O#XanRO16.5
END

IF ~~ O#XanRO16.3
SAY @3599
IF ~~ + O#XanRO16.5
END

IF ~~ O#XanRO16.4
SAY @3600
IF ~~ + O#XanRO16.5
END

IF ~~ O#XanRO16.5
SAY @3601
= @3602
IF ~~ EXIT
END

// 17.

IF ~~ O#XanRO17
SAY @3603
++ @3604 + O#XanRO17.1
++ @3605 + O#XanRO17.1
++ @3606 + O#XanRO17.1
END

IF ~~ O#XanRO17.1
SAY @3607
= @3608
= @3609
++ @3610 + O#XanRO17.2
++ @3611 + O#XanRO17.2
++ @3612 + O#XanRO17.2
END

IF ~~ O#XanRO17.2
SAY @3613
IF ~~ EXIT
END

// 18.

IF ~~ O#XanRO18
SAY @3614
++ @3615 + O#XanRO18.1
++ @3616 + O#XanRO18.0
++ @3617 + O#XanRO18.00
END

IF ~~ O#XanRO18.0
SAY @3618
IF ~~ + O#XanRO18.1
END

IF ~~ O#XanRO18.00
SAY @3619
IF ~~ + O#XanRO18.1
END

IF ~~ O#XanRO18.1
SAY @3620
= @3621
= @3622
= @3623
++ @3624 + O#XanRO18.2a
++ @3625 + O#XanRO18.2
++ @3626 + O#XanRO18.3
END

IF ~~ O#XanRO18.2
SAY @3627
IF ~~ + O#XanRO18.3
END

IF ~~ O#XanRO18.2a
SAY @3628
IF ~~ + O#XanRO18.3
END

IF ~~ O#XanRO18.3
SAY @3629
= @3630
= @3631
++ @3632 + O#XanRO18.5
++ @3633 + O#XanRO18.6
++ @3634 + O#XanRO18.6
++ @3635 + O#XanRO18.4
END

IF ~~ O#XanRO18.4
SAY @3636
= @3637
IF ~~ + O#XanRO18.6
END

IF ~~ O#XanRO18.5
SAY @3638
IF ~~ + O#XanRO18.6
END

IF ~~ O#XanRO18.6
SAY @3639
++ @3640 + O#XanRO18.7
++ @3641 + O#XanRO18.7
++ @3642 + O#XanRO18.7
END

IF ~~ O#XanRO18.7
SAY @3643 
= @3644
IF ~~ EXIT
END

// 19.

IF ~~ O#XanRO19
SAY @3645
++ @3646 + O#XanRO19.1
++ @3647 + O#XanRO19.1
++ @3648 + O#XanRO19.1
END

IF ~~ O#XanRO19.1
SAY @3649
= @3650
= @3651
++ @3652 + O#XanRO19.2
++ @3653 + O#XanRO19.2
++ @3654 + O#XanRO19.2
END

IF ~~ O#XanRO19.2
SAY @3655
++ @3656 + O#XanRO19.3
++ @3657 + O#XanRO19.3
++ @3658 + O#XanRO19.3
++ @3659 + O#XanRO19.3
++ @3660 + O#XanRO19.3
END

IF ~~ O#XanRO19.3
SAY @3661
IF ~~ EXIT
END

// 20.

IF ~~ O#XanRO20
SAY @3662
++ @3663 + O#XanRO20.1
++ @3664 + O#XanRO20.1
++ @3665 + O#XanRO20.0
END

IF ~~ O#XanRO20.0
SAY @3666
IF ~~ + O#XanRO20.1
END

IF ~~ O#XanRO20.1
SAY @3667
= @3668
= @3669
= @3670
++ @3671 + O#XanRO20.2
++ @3672 + O#XanRO20.2
++ @3673 + O#XanRO20.3
END

IF ~~ O#XanRO20.2
SAY @3674
IF ~~ + O#XanRO20.3
END

IF ~~ O#XanRO20.3
SAY @3675
= @3676
++ @3677 + O#XanRO20.4
++ @3678 + O#XanRO20.5
++ @3679 + O#XanRO20.5
++ @3680 + O#XanRO20.6
END

IF ~~ O#XanRO20.4
SAY @3681
IF ~~ EXIT
END

IF ~~ O#XanRO20.5
SAY @3682
IF ~~ EXIT
END

IF ~~ O#XanRO20.6
SAY @3683
IF ~~ EXIT
END



// Xan-PC: PC-initiated talks about Irenicus

// 1.

IF ~~ O#XanIrenToBPid1
SAY @3694
= @3695
++ @3696 + O#XanIrenToBPid1.2
++ @3697 + O#XanIrenToBPid1.1
++ @3698 + O#XanIrenToBPid1.a
++ @3699 + O#XanIrenToBPid1.0
END

IF ~~ O#XanIrenToBPid1.0
SAY @3700
IF ~~ + O#XanIrenToBPid1.2
END

IF ~~ O#XanIrenToBPid1.a
SAY @3701
IF ~~ + O#XanIrenToBPid1.2
END

IF ~~ O#XanIrenToBPid1.1
SAY @3702
= @3703
IF ~~ + O#XanIrenToBPid1.2
END

IF ~~ O#XanIrenToBPid1.2
SAY @3704
++ @3705 + O#XanIrenToBPid1.3
++ @3706 + O#XanIrenToBPid1.4
++ @3707 + O#XanIrenToBPid1.5
++ @3708 + O#XanIrenToBPid1.6
++ @3709 + O#XanIrenToBPid1.7
+ ~InParty("Sarevok")~ + @3710 + O#XanIrenToBPid1.8
++ @3711 + O#XanIrenToBPid1.8
++ @3712 + O#XanIrenToBPid1.9
++ @3713 + O#XanIrenToBPid1.9
++ @3714 + O#XanIrenToBPid1.9a
++ @3715 + O#XanIrenToBPid1.9a
++ @3716 + O#XanIrenToBPid1.9b
++ @3717 + O#XanIrenToBPid1.10
++ @3718 + O#XanIrenToBPid1.10
END

IF ~~ O#XanIrenToBPid1.3
SAY @3719
IF ~~ + O#XanIrenToBPid1.11
END

IF ~~ O#XanIrenToBPid1.4
SAY @3720
IF ~~ + O#XanIrenToBPid1.11
END

IF ~~ O#XanIrenToBPid1.5
SAY @3721
IF ~~ + O#XanIrenToBPid1.11
END

IF ~~ O#XanIrenToBPid1.6
SAY @3722
IF ~~ + O#XanIrenToBPid1.11
END

IF ~~ O#XanIrenToBPid1.7
SAY @3723
IF ~~ + O#XanIrenToBPid1.11
END

IF ~~ O#XanIrenToBPid1.8
SAY @3724
IF ~~ + O#XanIrenToBPid1.11
END

IF ~~ O#XanIrenToBPid1.9
SAY @3725
= @3726
IF ~~ + O#XanIrenToBPid1.11
END

IF ~~ O#XanIrenToBPid1.9a
SAY @3727
IF ~~ + O#XanIrenToBPid1.11
END

IF ~~ O#XanIrenToBPid1.9b
SAY @3728
IF ~~ + O#XanIrenToBPid1.11
END

IF ~~ O#XanIrenToBPid1.10
SAY @3729
IF ~~ EXIT
END

IF ~~ O#XanIrenToBPid1.11
SAY @3730
= @3731
= @3732
IF ~~ EXIT
END

// 2.

IF ~~ O#XanIrenToBPid2
SAY @3733
++ @3734 + O#XanIrenToBPid2.0
++ @3735 + O#XanIrenToBPid2.1
++ @3736 + O#XanIrenToBPid2.1
END

IF ~~ O#XanIrenToBPid2.0
SAY @3737
IF ~~ + O#XanIrenToBPid2.1
END

IF ~~ O#XanIrenToBPid2.1
SAY @3738
++ @3739 + O#XanIrenToBPid2.2
++ @3740 + O#XanIrenToBPid2.2
++ @3741 + O#XanIrenToBPid2.2
END

IF ~~ O#XanIrenToBPid2.2
SAY @3742
= @3743
IF ~~ EXIT
END



// Reactions

IF ~~ O#XanToBFriendReaction
SAY @156 
IF ~RandomNum(3,1) Global("O#XanPIDF","GLOBAL",0)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",2)~ + O#XanPF1
IF ~RandomNum(3,2) Global("O#XanPIDF","GLOBAL",0)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",2)~ + O#XanPF2
IF ~RandomNum(3,3) Global("O#XanPIDF","GLOBAL",0)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",2)~ + O#XanPF3
IF ~RandomNum(3,1) Global("O#XanPIDF","GLOBAL",2)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",3)~ + O#XanPF4
IF ~RandomNum(3,2) Global("O#XanPIDF","GLOBAL",2)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",3)~ + O#XanPF5
IF ~RandomNum(3,3) Global("O#XanPIDF","GLOBAL",2)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",3)~ + O#XanPF6
IF ~Global("O#XanPIDF","GLOBAL",3)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",4)~ + O#XanPF7
IF ~RandomNum(3,1) Global("O#XanPIDF","GLOBAL",4)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",5)~ + O#XanPF8
IF ~RandomNum(3,2) Global("O#XanPIDF","GLOBAL",4)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",5)~ + O#XanPF9
IF ~RandomNum(3,3) Global("O#XanPIDF","GLOBAL",4)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",5)~ + O#XanPF10
IF ~RandomNum(3,1) Global("O#XanPIDF","GLOBAL",5)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",6)~ + O#XanPF11
IF ~RandomNum(3,2) Global("O#XanPIDF","GLOBAL",5)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",6)~ + O#XanPF12
IF ~RandomNum(3,3) Global("O#XanPIDF","GLOBAL",5)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",6)~ + O#XanPF13
IF ~Global("O#XanPIDF","GLOBAL",6)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",7)~ + O#XanPF14
IF ~RandomNum(3,1) Global("O#XanPIDF","GLOBAL",7)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",8)~ + O#XanPF15
IF ~RandomNum(3,2) Global("O#XanPIDF","GLOBAL",7)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",8)~ + O#XanPF16
IF ~RandomNum(3,3) Global("O#XanPIDF","GLOBAL",7)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",8)~ + O#XanPF17
IF ~RandomNum(3,1) Global("O#XanPIDF","GLOBAL",8)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",9)~ + O#XanPF18
IF ~RandomNum(3,2) Global("O#XanPIDF","GLOBAL",8)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",9)~ + O#XanPF19
IF ~RandomNum(3,3) Global("O#XanPIDF","GLOBAL",8)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",9)~ + O#XanPF20
IF ~Global("O#XanPIDF","GLOBAL",9)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",10)~ + O#XanPF21
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",10)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",11)~ + O#XanPF22
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",10)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",11)~ + O#XanPF23
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",11)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",12)~ + O#XanPF24
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",11)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",12)~ + O#XanPF25
IF ~Global("O#XanPIDF","GLOBAL",12)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",13)~ + O#XanPF26
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",13)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",14)~ + O#XanPF27
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",13)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",14)~ + O#XanPF28
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",14)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",15)~ + O#XanPF29
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",14)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",15)~ + O#XanPF30
IF ~Global("O#XanPIDF","GLOBAL",15)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",16)~ + O#XanPF31
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",16)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",17)~ + O#XanPF32
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",16)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",17)~ + O#XanPF33
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",17)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",18)~ + O#XanPF34
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",17)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",18)~ + O#XanPF35
IF ~Global("O#XanPIDF","GLOBAL",18)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",19)~ + O#XanPF36
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",19)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",20)~ + O#XanPF37
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",19)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",20)~ + O#XanPF38
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",20)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",21)~ + O#XanPF39
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",20)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",21)~ + O#XanPF40
IF ~Global("O#XanPIDF","GLOBAL",21)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",22)~ + O#XanPF41
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",22)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",23)~ + O#XanPF42
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",22)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",23)~ + O#XanPF43
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",23)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",24)~ + O#XanPF44
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",23)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",24)~ + O#XanPF45
IF ~Global("O#XanPIDF","GLOBAL",24)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",25)~ + O#XanPF46
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",25)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",26)~ + O#XanPF47
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",25)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",26)~ + O#XanPF48
IF ~Global("O#XanPIDF","GLOBAL",26)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",27)~ + O#XanPF49
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",27)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",28)~ + O#XanPF50
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",27)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",28)~ + O#XanPF51
IF ~Global("O#XanPIDF","GLOBAL",28)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",29)~ + O#XanPF52
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",29)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",30)~ + O#XanPF53
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",29)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",30)~ + O#XanPF54
IF ~Global("O#XanPIDF","GLOBAL",30)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",31)~ + O#XanPF55
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",31)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",32)~ + O#XanPF56
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",31)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",32)~ + O#XanPF57
IF ~Global("O#XanPIDF","GLOBAL",32)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",33)~ + O#XanPF58
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",33)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",34)~ + O#XanPF59
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",33)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",34)~ + O#XanPF60
IF ~Global("O#XanPIDF","GLOBAL",34)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",35)~ + O#XanPF61
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",35)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",36)~ + O#XanPF62
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",35)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",36)~ + O#XanPF63
IF ~Global("O#XanPIDF","GLOBAL",36)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",37)~ + O#XanPF64
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",37)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",38)~ + O#XanPF65
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",37)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",38)~ + O#XanPF66
IF ~Global("O#XanPIDF","GLOBAL",38)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",39)~ + O#XanPF67
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",39)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",40)~ + O#XanPF68
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",39)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",40)~ + O#XanPF69
IF ~Global("O#XanPIDF","GLOBAL",40)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",41)~ + O#XanPF70
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",41)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",42)~ + O#XanPF71
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",41)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",42)~ + O#XanPF72
IF ~Global("O#XanPIDF","GLOBAL",42)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",43)~ + O#XanPF73
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",43)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",44)~ + O#XanPF74
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",43)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",44)~ + O#XanPF75
IF ~Global("O#XanPIDF","GLOBAL",44)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",45)~ + O#XanPF76
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",45)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",46)~ + O#XanPF77
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",45)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",46)~ + O#XanPF78
IF ~Global("O#XanPIDF","GLOBAL",46)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",47)~ + O#XanPF79
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",47)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",48)~ + O#XanPF80
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",47)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",48)~ + O#XanPF81
IF ~Global("O#XanPIDF","GLOBAL",48)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",49)~ + O#XanPF82
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",49)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",50)~ + O#XanPF83
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",49)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",50)~ + O#XanPF84
IF ~Global("O#XanPIDF","GLOBAL",50)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",51)~ + O#XanPF85
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",51)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",52)~ + O#XanPF86
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",51)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",52)~ + O#XanPF87
IF ~Global("O#XanPIDF","GLOBAL",52)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",53)~ + O#XanPF88
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",53)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",54)~ + O#XanPF89
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",53)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",54)~ + O#XanPF90
IF ~Global("O#XanPIDF","GLOBAL",54)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",55)~ + O#XanPF91
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",55)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",56)~ + O#XanPF92
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",55)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",56)~ + O#XanPF93
IF ~Global("O#XanPIDF","GLOBAL",56)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",57)~ + O#XanPF94
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",57)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",58)~ + O#XanPF95
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",57)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",58)~ + O#XanPF96
IF ~Global("O#XanPIDF","GLOBAL",58)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",59)~ + O#XanPF97
IF ~RandomNum(2,1) Global("O#XanPIDF","GLOBAL",59)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",60)~ + O#XanPF98
IF ~RandomNum(2,2) Global("O#XanPIDF","GLOBAL",59)~ DO ~SetGlobal("O#XanPIDF","GLOBAL",60)~ + O#XanPF99
IF ~Global("O#XanPIDF","GLOBAL",60)~ + O#XanPF100
END

IF ~~ O#XanPF1
SAY @157
IF ~~ EXIT
END

IF ~~ O#XanPF2
SAY @158
IF ~~ EXIT
END

IF ~~ O#XanPF3
SAY @159
IF ~~ EXIT
END

IF ~~ O#XanPF4
SAY @160
IF ~~ EXIT
END

IF ~~ O#XanPF5
SAY @161
= @162
IF ~~ EXIT
END

IF ~~ O#XanPF6
SAY @163
IF ~~ EXIT
END

IF ~~ O#XanPF7
SAY @164
IF ~~ EXIT
END

IF ~~ O#XanPF8
SAY @165
IF ~~ EXIT
END

IF ~~ O#XanPF9
SAY @166
IF ~~ EXIT
END

IF ~~ O#XanPF10
SAY @167
IF ~~ EXIT
END

IF ~~ O#XanPF11
SAY @168
IF ~~ EXIT
END

IF ~~ O#XanPF12
SAY @169
IF ~~ EXIT
END

IF ~~ O#XanPF13
SAY @170
IF ~~ EXIT
END

IF ~~ O#XanPF14
SAY @171
IF ~~ EXIT
END

IF ~~ O#XanPF15
SAY @172
IF ~~ EXIT
END

IF ~~ O#XanPF16
SAY @173
IF ~~ EXIT
END

IF ~~ O#XanPF17
SAY @174
IF ~~ EXIT
END

IF ~~ O#XanPF18
SAY @175
IF ~~ EXIT
END

IF ~~ O#XanPF19
SAY @176
IF ~~ EXIT
END

IF ~~ O#XanPF20
SAY @177
= @178
IF ~~ EXIT
END

IF ~~ O#XanPF21
SAY @179
IF ~~ EXIT
END

IF ~~ O#XanPF22
SAY @180
IF ~~ EXIT
END

IF ~~ O#XanPF23
SAY @181
IF ~~ EXIT
END

IF ~~ O#XanPF24
SAY @182
= @183
IF ~~ EXIT
END

IF ~~ O#XanPF25
SAY @184
IF ~~ EXIT
END

IF ~~ O#XanPF26
SAY @185
IF ~~ EXIT
END

IF ~~ O#XanPF27
SAY @186
IF ~~ EXIT
END

IF ~~ O#XanPF28
SAY @187
IF ~~ EXIT
END

IF ~~ O#XanPF29
SAY @188
IF ~~ EXIT
END

IF ~~ O#XanPF30
SAY @189
IF ~~ EXIT
END

IF ~~ O#XanPF31
SAY @190
IF ~~ EXIT
END

IF ~~ O#XanPF32
SAY @191
IF ~~ EXIT
END

IF ~~ O#XanPF33
SAY @192
IF ~~ EXIT
END

IF ~~ O#XanPF34
SAY @193
IF ~~ EXIT
END

IF ~~ O#XanPF35
SAY @194
IF ~~ EXIT
END

IF ~~ O#XanPF36
SAY @195
= @196
IF ~~ EXIT
END

IF ~~ O#XanPF37
SAY @197
IF ~~ EXIT
END

IF ~~ O#XanPF38
SAY @198
= @199
IF ~~ EXIT
END

IF ~~ O#XanPF39
SAY @200
IF ~~ EXIT
END

IF ~~ O#XanPF40
SAY @201
IF ~~ EXIT
END

IF ~~ O#XanPF41
SAY @202
IF ~~ EXIT
END

IF ~~ O#XanPF42
SAY @203
IF ~~ EXIT
END

IF ~~ O#XanPF43
SAY @204
IF ~~ EXIT
END

IF ~~ O#XanPF44
SAY @205
IF ~~ EXIT
END

IF ~~ O#XanPF45
SAY @206
IF ~~ EXIT
END

IF ~~ O#XanPF46
SAY @207
IF ~~ EXIT
END

IF ~~ O#XanPF47
SAY @208
IF ~~ EXIT
END

IF ~~ O#XanPF48
SAY @209
= @210
IF ~~ EXIT
END

IF ~~ O#XanPF49
SAY @211
IF ~~ EXIT
END

IF ~~ O#XanPF50
SAY @212
IF ~~ EXIT
END

IF ~~ O#XanPF51
SAY @213
IF ~~ EXIT
END

IF ~~ O#XanPF52
SAY @214
IF ~~ EXIT
END

IF ~~ O#XanPF53
SAY @215
IF ~~ EXIT
END

IF ~~ O#XanPF54
SAY @216
IF ~~ EXIT
END

IF ~~ O#XanPF55
SAY @217
IF ~~ EXIT
END

IF ~~ O#XanPF56
SAY @218
IF ~~ EXIT
END

IF ~~ O#XanPF57
SAY @219
IF ~~ EXIT
END

IF ~~ O#XanPF58
SAY @220
IF ~~ EXIT
END

IF ~~ O#XanPF59
SAY @221
IF ~~ EXIT
END

IF ~~ O#XanPF60
SAY @222
IF ~~ EXIT
END

IF ~~ O#XanPF61
SAY @223
= @224
IF ~~ EXIT
END

IF ~~ O#XanPF62
SAY @225
IF ~~ EXIT
END

IF ~~ O#XanPF63
SAY @226
IF ~~ EXIT
END

IF ~~ O#XanPF64
SAY @227
= @228
IF ~~ EXIT
END

IF ~~ O#XanPF65
SAY @229
IF ~~ EXIT
END

IF ~~ O#XanPF66
SAY @230
IF ~~ EXIT
END

IF ~~ O#XanPF67
SAY @231
IF ~~ EXIT
END

IF ~~ O#XanPF68
SAY @232
IF ~~ EXIT
END

IF ~~ O#XanPF69
SAY @233
IF ~~ EXIT
END

IF ~~ O#XanPF70
SAY @234
IF ~~ EXIT
END

IF ~~ O#XanPF71
SAY @235
IF ~~ EXIT
END

IF ~~ O#XanPF72
SAY @236
IF ~~ EXIT
END

IF ~~ O#XanPF73
SAY @237
IF ~~ EXIT
END

IF ~~ O#XanPF74
SAY @238
IF ~~ EXIT
END

IF ~~ O#XanPF75
SAY @239
IF ~~ EXIT
END

IF ~~ O#XanPF76
SAY @240
IF ~~ EXIT
END

IF ~~ O#XanPF77
SAY @241
IF ~~ EXIT
END

IF ~~ O#XanPF78
SAY @242
IF ~~ EXIT
END

IF ~~ O#XanPF79
SAY @243
= @244
IF ~~ EXIT
END

IF ~~ O#XanPF80
SAY @245
IF ~~ EXIT
END

IF ~~ O#XanPF81
SAY @246
IF ~~ EXIT
END

IF ~~ O#XanPF82
SAY @247
IF ~~ EXIT
END

IF ~~ O#XanPF83
SAY @248
IF ~~ EXIT
END

IF ~~ O#XanPF84
SAY @249
= @250
IF ~~ EXIT
END

IF ~~ O#XanPF85
SAY @251
= @252
IF ~~ EXIT
END

IF ~~ O#XanPF86
SAY @253
IF ~~ EXIT
END

IF ~~ O#XanPF87
SAY @254
IF ~~ EXIT
END

IF ~~ O#XanPF88
SAY @255
IF ~~ EXIT
END

IF ~~ O#XanPF89
SAY @251
IF ~~ EXIT
END

IF ~~ O#XanPF90
SAY @256
IF ~~ EXIT
END

IF ~~ O#XanPF91
SAY @257
IF ~~ EXIT
END

IF ~~ O#XanPF92
SAY @258
IF ~~ EXIT
END

IF ~~ O#XanPF93
SAY @259
IF ~~ EXIT
END

IF ~~ O#XanPF94
SAY @260
IF ~~ EXIT
END

IF ~~ O#XanPF95
SAY @261
IF ~~ EXIT
END

IF ~~ O#XanPF96
SAY @262
IF ~~ EXIT
END

IF ~~ O#XanPF97
SAY @263
IF ~~ EXIT
END

IF ~~ O#XanPF98
SAY @264
IF ~~ EXIT
END

IF ~~ O#XanPF99
SAY @265
IF ~~ EXIT
END

IF ~~ O#XanPF100
SAY @266
IF ~~ EXIT
END



IF ~~ O#XanToBRomanceReaction
SAY @267 
IF ~Global("O#XanPIDR","GLOBAL",0)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",1)~ + O#XanPR0
IF ~RandomNum(3,1) Global("O#XanPIDR","GLOBAL",1)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",2)~ + O#XanPR1
IF ~RandomNum(3,2) Global("O#XanPIDR","GLOBAL",1)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",2)~ + O#XanPR2
IF ~RandomNum(3,3) Global("O#XanPIDR","GLOBAL",1)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",2)~ + O#XanPR3
IF ~RandomNum(3,1) Global("O#XanPIDR","GLOBAL",2)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",3)~ + O#XanPR4
IF ~RandomNum(3,2) Global("O#XanPIDR","GLOBAL",2)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",3)~ + O#XanPR5
IF ~RandomNum(3,3) Global("O#XanPIDR","GLOBAL",2)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",3)~ + O#XanPR6
IF ~Global("O#XanPIDR","GLOBAL",3)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",4)~ + O#XanPR7
IF ~RandomNum(3,1) Global("O#XanPIDR","GLOBAL",4)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",5)~ + O#XanPR8
IF ~RandomNum(3,2) Global("O#XanPIDR","GLOBAL",4)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",5)~ + O#XanPR9
IF ~RandomNum(3,3) Global("O#XanPIDR","GLOBAL",4)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",5)~ + O#XanPR10
IF ~RandomNum(3,1) Global("O#XanPIDR","GLOBAL",5)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",6)~ + O#XanPR11
IF ~RandomNum(3,2) Global("O#XanPIDR","GLOBAL",5)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",6)~ + O#XanPR12
IF ~RandomNum(3,3) Global("O#XanPIDR","GLOBAL",5)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",6)~ + O#XanPR13
IF ~Global("O#XanPIDR","GLOBAL",6)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",7)~ + O#XanPR14
IF ~RandomNum(3,1) Global("O#XanPIDR","GLOBAL",7)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",8)~ + O#XanPR15
IF ~RandomNum(3,2) Global("O#XanPIDR","GLOBAL",7)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",8)~ + O#XanPR16
IF ~RandomNum(3,3) Global("O#XanPIDR","GLOBAL",7)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",8)~ + O#XanPR17
IF ~RandomNum(3,1) Global("O#XanPIDR","GLOBAL",8)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",9)~ + O#XanPR18
IF ~RandomNum(3,2) Global("O#XanPIDR","GLOBAL",8)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",9)~ + O#XanPR19
IF ~RandomNum(3,3) Global("O#XanPIDR","GLOBAL",8)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",9)~ + O#XanPR20
IF ~Global("O#XanPIDR","GLOBAL",9)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",10)~ + O#XanPR21
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",10)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",11)~ + O#XanPR22
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",10)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",11)~ + O#XanPR23
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",11)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",12)~ + O#XanPR24
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",11)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",12)~ + O#XanPR25
IF ~Global("O#XanPIDR","GLOBAL",12)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",13)~ + O#XanPR26
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",13)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",14)~ + O#XanPR27
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",13)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",14)~ + O#XanPR28
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",14)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",15)~ + O#XanPR29
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",14)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",15)~ + O#XanPR30
IF ~Global("O#XanPIDR","GLOBAL",15)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",16)~ + O#XanPR31
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",16)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",17)~ + O#XanPR32
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",16)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",17)~ + O#XanPR33
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",17)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",18)~ + O#XanPR34
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",17)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",18)~ + O#XanPR35
IF ~Global("O#XanPIDR","GLOBAL",18)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",19)~ + O#XanPR36
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",19)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",20)~ + O#XanPR37
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",19)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",20)~ + O#XanPR38
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",20)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",21)~ + O#XanPR39
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",20)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",21)~ + O#XanPR40
IF ~Global("O#XanPIDR","GLOBAL",21)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",22)~ + O#XanPR41
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",22)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",23)~ + O#XanPR42
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",22)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",23)~ + O#XanPR43
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",23)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",24)~ + O#XanPR44
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",23)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",24)~ + O#XanPR45
IF ~Global("O#XanPIDR","GLOBAL",24)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",25)~ + O#XanPR46
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",25)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",26)~ + O#XanPR47
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",25)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",26)~ + O#XanPR48
IF ~Global("O#XanPIDR","GLOBAL",26)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",27)~ + O#XanPR49
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",27)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",28)~ + O#XanPR50
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",27)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",28)~ + O#XanPR51
IF ~Global("O#XanPIDR","GLOBAL",28)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",29)~ + O#XanPR52
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",29)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",30)~ + O#XanPR53
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",29)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",30)~ + O#XanPR54
IF ~Global("O#XanPIDR","GLOBAL",30)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",31)~ + O#XanPR55
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",31)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",32)~ + O#XanPR56
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",31)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",32)~ + O#XanPR57
IF ~Global("O#XanPIDR","GLOBAL",32)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",33)~ + O#XanPR58
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",33)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",34)~ + O#XanPR59
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",33)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",34)~ + O#XanPR60
IF ~Global("O#XanPIDR","GLOBAL",34)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",35)~ + O#XanPR61
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",35)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",36)~ + O#XanPR62
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",35)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",36)~ + O#XanPR63
IF ~Global("O#XanPIDR","GLOBAL",36)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",37)~ + O#XanPR64
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",37)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",38)~ + O#XanPR65
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",37)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",38)~ + O#XanPR66
IF ~Global("O#XanPIDR","GLOBAL",38)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",39)~ + O#XanPR67
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",39)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",40)~ + O#XanPR68
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",39)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",40)~ + O#XanPR69
IF ~Global("O#XanPIDR","GLOBAL",40)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",41)~ + O#XanPR70
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",41)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",42)~ + O#XanPR71
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",41)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",42)~ + O#XanPR72
IF ~Global("O#XanPIDR","GLOBAL",42)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",43)~ + O#XanPR73
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",43)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",44)~ + O#XanPR74
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",43)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",44)~ + O#XanPR75
IF ~Global("O#XanPIDR","GLOBAL",44)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",45)~ + O#XanPR76
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",45)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",46)~ + O#XanPR77
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",45)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",46)~ + O#XanPR78
IF ~Global("O#XanPIDR","GLOBAL",46)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",47)~ + O#XanPR79
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",47)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",48)~ + O#XanPR80
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",47)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",48)~ + O#XanPR81
IF ~Global("O#XanPIDR","GLOBAL",48)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",49)~ + O#XanPR82
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",49)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",50)~ + O#XanPR83
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",49)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",50)~ + O#XanPR84
IF ~Global("O#XanPIDR","GLOBAL",50)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",51)~ + O#XanPR85
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",51)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",52)~ + O#XanPR86
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",51)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",52)~ + O#XanPR87
IF ~Global("O#XanPIDR","GLOBAL",52)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",53)~ + O#XanPR88
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",53)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",54)~ + O#XanPR89
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",53)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",54)~ + O#XanPR90
IF ~Global("O#XanPIDR","GLOBAL",54)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",55)~ + O#XanPR91
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",55)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",56)~ + O#XanPR92
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",55)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",56)~ + O#XanPR93
IF ~Global("O#XanPIDR","GLOBAL",56)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",57)~ + O#XanPR94
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",57)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",58)~ + O#XanPR95
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",57)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",58)~ + O#XanPR96
IF ~Global("O#XanPIDR","GLOBAL",58)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",59)~ + O#XanPR97
IF ~RandomNum(2,1) Global("O#XanPIDR","GLOBAL",59)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",60)~ + O#XanPR98
IF ~RandomNum(2,2) Global("O#XanPIDR","GLOBAL",59)~ DO ~SetGlobal("O#XanPIDR","GLOBAL",60)~ + O#XanPR99
IF ~Global("O#XanPIDR","GLOBAL",60)~ + O#XanPR100
END

IF ~~ O#XanPR0
SAY @399
= @400
= @401
= @402
= @403
= @404
= @405
IF ~~ EXIT
END

IF ~~ O#XanPR1
SAY @268
IF ~~ EXIT
END

IF ~~ O#XanPR2
SAY @269
IF ~~ EXIT
END

IF ~~ O#XanPR3
SAY @270
IF ~~ EXIT
END

IF ~~ O#XanPR4
SAY @271
IF ~~ EXIT
END

IF ~~ O#XanPR5
SAY @272
IF ~~ EXIT
END

IF ~~ O#XanPR6
SAY @273
IF ~~ EXIT
END

IF ~~ O#XanPR7
SAY @274
= @275
IF ~~ EXIT
END

IF ~~ O#XanPR8
SAY @276
IF ~~ EXIT
END

IF ~~ O#XanPR9
SAY @277
IF ~~ EXIT
END

IF ~~ O#XanPR10
SAY @278
IF ~~ EXIT
END

IF ~~ O#XanPR11
SAY @279
IF ~~ EXIT
END

IF ~~ O#XanPR12
SAY @280
IF ~~ EXIT
END

IF ~~ O#XanPR13
SAY @281
IF ~~ EXIT
END

IF ~~ O#XanPR14
SAY @282
IF ~~ EXIT
END

IF ~~ O#XanPR15
SAY @283
IF ~~ EXIT
END

IF ~~ O#XanPR16
SAY @284
IF ~~ EXIT
END

IF ~~ O#XanPR17
SAY @285
IF ~~ EXIT
END

IF ~~ O#XanPR18
SAY @286
IF ~~ EXIT
END

IF ~~ O#XanPR19
SAY @287
IF ~~ EXIT
END

IF ~~ O#XanPR20
SAY @288
= @289
IF ~~ EXIT
END

IF ~~ O#XanPR21
SAY @290
IF ~~ EXIT
END

IF ~~ O#XanPR22
SAY @291
IF ~~ EXIT
END

IF ~~ O#XanPR23
SAY @292
IF ~~ EXIT
END

IF ~~ O#XanPR24
SAY @293
IF ~~ EXIT
END

IF ~~ O#XanPR25
SAY @294
IF ~~ EXIT
END

IF ~~ O#XanPR26
SAY @295
IF ~~ EXIT
END

IF ~~ O#XanPR27
SAY @296
IF ~~ EXIT
END

IF ~~ O#XanPR28
SAY @297
IF ~~ EXIT
END

IF ~~ O#XanPR29
SAY @298
= @299
IF ~~ EXIT
END

IF ~~ O#XanPR30
SAY @300
IF ~~ EXIT
END

IF ~~ O#XanPR31
SAY @301
IF ~~ EXIT
END

IF ~~ O#XanPR32
SAY @302
IF ~~ EXIT
END

IF ~~ O#XanPR33
SAY @303
IF ~~ EXIT
END

IF ~~ O#XanPR34
SAY @304
IF ~~ EXIT
END

IF ~~ O#XanPR35
SAY @305
IF ~~ EXIT
END

IF ~~ O#XanPR36
SAY @306
IF ~~ EXIT
END

IF ~~ O#XanPR37
SAY @307
IF ~~ EXIT
END

IF ~~ O#XanPR38
SAY @308
IF ~~ EXIT
END

IF ~~ O#XanPR39
SAY @309
= @310
IF ~~ EXIT
END

IF ~~ O#XanPR40
SAY @311
IF ~~ EXIT
END

IF ~~ O#XanPR41
SAY @312
= @313
IF ~~ EXIT
END

IF ~~ O#XanPR42
SAY @314
= @315
IF ~~ EXIT
END

IF ~~ O#XanPR43
SAY @316
IF ~~ EXIT
END

IF ~~ O#XanPR44
SAY @317
= @318
IF ~~ EXIT
END

IF ~~ O#XanPR45
SAY @319
= @320
IF ~~ EXIT
END

IF ~~ O#XanPR46
SAY @321
= @322
IF ~~ EXIT
END

IF ~~ O#XanPR47
SAY @323
IF ~~ EXIT
END

IF ~~ O#XanPR48
SAY @324
IF ~~ EXIT
END

IF ~~ O#XanPR49
SAY @325
IF ~~ EXIT
END

IF ~~ O#XanPR50
SAY @326
IF ~~ EXIT
END

IF ~~ O#XanPR51
SAY @327
IF ~~ EXIT
END

IF ~~ O#XanPR52
SAY @328
= @329
IF ~~ EXIT
END

IF ~~ O#XanPR53
SAY @330
IF ~~ EXIT
END

IF ~~ O#XanPR54
SAY @331
IF ~~ EXIT
END

IF ~~ O#XanPR55
SAY @332
IF ~~ EXIT
END

IF ~~ O#XanPR56
SAY @333
IF ~~ EXIT
END

IF ~~ O#XanPR57
SAY @334
IF ~~ EXIT
END

IF ~~ O#XanPR58
SAY @335
IF ~~ EXIT
END

IF ~~ O#XanPR59
SAY @336
IF ~~ EXIT
END

IF ~~ O#XanPR60
SAY @337
IF ~~ EXIT
END

IF ~~ O#XanPR61
SAY @338
= @339
IF ~~ EXIT
END

IF ~~ O#XanPR62
SAY @340
IF ~~ EXIT
END

IF ~~ O#XanPR63
SAY @341
IF ~~ EXIT
END

IF ~~ O#XanPR64
SAY @342
IF ~~ EXIT
END

IF ~~ O#XanPR65
SAY @343
IF ~~ EXIT
END

IF ~~ O#XanPR66
SAY @344
= @345
= @346
IF ~~ EXIT
END

IF ~~ O#XanPR67
SAY @347
IF ~~ EXIT
END

IF ~~ O#XanPR68
SAY @348
IF ~~ EXIT
END

IF ~~ O#XanPR69
SAY @349
IF ~~ EXIT
END

IF ~~ O#XanPR70
SAY @350
IF ~~ EXIT
END

IF ~~ O#XanPR71
SAY @351
= @352
IF ~~ EXIT
END

IF ~~ O#XanPR72
SAY @353
IF ~~ EXIT
END

IF ~~ O#XanPR73
SAY @354
IF ~~ EXIT
END

IF ~~ O#XanPR74
SAY @355
= @356
IF ~~ EXIT
END

IF ~~ O#XanPR75
SAY @357
IF ~~ EXIT
END

IF ~~ O#XanPR76
SAY @358
IF ~~ EXIT
END

IF ~~ O#XanPR77
SAY @359
IF ~~ EXIT
END

IF ~~ O#XanPR78
SAY @360
IF ~~ EXIT
END

IF ~~ O#XanPR79
SAY @361
IF ~~ EXIT
END

IF ~~ O#XanPR80
SAY @362
IF ~~ EXIT
END

IF ~~ O#XanPR81
SAY @363
IF ~~ EXIT
END

IF ~~ O#XanPR82
SAY @364
IF ~~ EXIT
END

IF ~~ O#XanPR83
SAY @365
IF ~~ EXIT
END

IF ~~ O#XanPR84
SAY @366
IF ~~ EXIT
END

IF ~~ O#XanPR85
SAY @367
IF ~~ EXIT
END

IF ~~ O#XanPR86
SAY @368
= @369
IF ~~ EXIT
END

IF ~~ O#XanPR87
SAY @370
IF ~~ EXIT
END

IF ~~ O#XanPR88
SAY @371
= @372
IF ~~ EXIT
END

IF ~~ O#XanPR89
SAY @373
IF ~~ EXIT
END

IF ~~ O#XanPR90
SAY @374
IF ~~ EXIT
END

IF ~~ O#XanPR91
SAY @375
IF ~~ EXIT
END

IF ~~ O#XanPR92
SAY @376
= @377
IF ~~ EXIT
END

IF ~~ O#XanPR93
SAY @378
IF ~~ EXIT
END

IF ~~ O#XanPR94
SAY @379
= @380
IF ~~ EXIT
END

IF ~~ O#XanPR95
SAY @381
= @382
IF ~~ EXIT
END

IF ~~ O#XanPR96
SAY @383
= @384
IF ~~ EXIT
END

IF ~~ O#XanPR97
SAY @385
IF ~~ EXIT
END

IF ~~ O#XanPR98
SAY @386
IF ~~ EXIT
END

IF ~~ O#XanPR99
SAY @387
IF ~~ EXIT
END

IF ~~ O#XanPR100
SAY @388
IF ~~ EXIT
END



// ToB PID: neutral

IF ~IsGabber(Player1) 
!Global("O#XanFriendship","GLOBAL",1)
!Global("O#XanRomanceActive","GLOBAL",2)~ O#XanToBPIDNeutral
SAY @389 
++ @390 + O#XanNeu1
+ ~!Global("O#XanToBThinkOverRomance","GLOBAL",1) GlobalLT("O#XanUnTalk","GLOBAL",3) Global("O#XanRT15","GLOBAL",2)~ + @391 + O#XanNeu4
+ ~!Global("O#XanToBThinkOverRomance","GLOBAL",1) GlobalGT("O#XanUnTalk","GLOBAL",2) Global("O#XanRT15","GLOBAL",2)~ + @391 + O#XanNeu2
+ ~!Global("O#XanRT15","GLOBAL",2)~ + @391 + O#XanNeu3
+ ~!Global("O#XanToBThinkOverRomance","GLOBAL",1) GlobalLT("O#XanUnTalk","GLOBAL",3) Global("O#XanRT15","GLOBAL",2)~ + @392 + O#XanNeu4
+ ~!Global("O#XanToBThinkOverRomance","GLOBAL",1) GlobalGT("O#XanUnTalk","GLOBAL",2) Global("O#XanRT15","GLOBAL",2)~ + @392 + O#XanNeu5
+ ~Global("O#XanToBThinkOverRomance","GLOBAL",1)~ + @1886 + O#XanNeu6
+ ~Global("O#XanToBThinkOverRomance","GLOBAL",1)~ + @2101 + O#XanNeu7
END

IF ~~ O#XanNeu1
SAY @393
IF ~~ EXIT
END

IF ~~ O#XanNeu2
SAY @394
IF ~~ EXIT
END

IF ~~ O#XanNeu3
SAY @395
IF ~~ DO ~SetGlobal("O#XanFriendship","GLOBAL",1)~ EXIT
END

IF ~~ O#XanNeu4
SAY @396
IF ~~ EXIT
END

IF ~~ O#XanNeu5
SAY @397
IF ~~ EXIT
END

IF ~~ O#XanNeu6
SAY @1887
= @536
IF ~~ DO ~SetGlobal("O#XanToBThinkOverRomance","GLOBAL",2) SetGlobal("O#XanRomanceActive","GLOBAL",2)~ EXIT
END

IF ~~ O#XanNeu7
SAY @2102
IF ~~ DO ~SetGlobal("O#XanToBThinkOverRomance","GLOBAL",2) SetGlobal("O#XanRomanceActive","GLOBAL",2)~ EXIT
END



// Romantic Encounters
// Laran

IF ~~ O#XanRELaranToB
SAY @2153
++ @2154 + O#XanRELaranToB1
+ ~!Global("O#XanBondedPathAlive","GLOBAL",2)~ + @2155 + O#XanRELaranToB2
++ @2156 + O#XanRELaranToB1
+ ~!Global("O#XanBondedPathAlive","GLOBAL",2)~ + @2157 + O#XanRELaranToB3
++ @2161 + O#XanRELaranToB4
END

IF ~~ O#XanRELaranToB1
SAY @2160
IF ~~ EXIT
END

IF ~~ O#XanRELaranToB2
SAY @2159
IF ~~ + O#XanRELaranToB1
END

IF ~~ O#XanRELaranToB3
SAY @2158
IF ~~ + O#XanRELaranToB1
END

IF ~~ O#XanRELaranToB4
SAY @2162
IF ~~ + O#XanRELaranToB1
END



// Someone else initiates talk

IF ~!IsGabber(Player1)~ O#XanToBPIDNotPC1
SAY @4247
IF ~~ EXIT
END

END