/* Xzar's bedtime story */
IF %BGT_VAR%
RealGlobalTimerExpired("X#DreamTalk","GLOBAL")
Global("X#GarXzarRest1","GLOBAL",0)
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InParty("xzar")
!StateCheck("xzar",CD_STATE_NOTVALID)
!TimeOfDay(DAY)
!TimeOfDay(MORNING)
AreaType(FOREST)
CombatCounter(0)
!See([ENEMY])
InMyArea("xzar")
THEN
RESPONSE #100
SetGlobal("X#GarXzarRest1","GLOBAL",1)
RealSetGlobalTimer("X#DreamTalk","GLOBAL",180)
StartDialogueNoSet(Player1)
END

IF %BGT_VAR%
Global("X#GarXzarRest1","GLOBAL",1)
RealGlobalTimerExpired("X#DreamTalk","GLOBAL")
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InParty("xzar")
!StateCheck("xzar",CD_STATE_NOTVALID)
!TimeOfDay(DAY)
!TimeOfDay(MORNING)
AreaType(FOREST)
CombatCounter(0)
!See([ENEMY])
InMyArea("xzar")
THEN
RESPONSE #100
RealSetGlobalTimer("X#DreamTalk","GLOBAL",180)
StartDialogueNoSet(Player1)
END
