IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Global("DreamTimerStarted","GLOBAL",0)
THEN
RESPONSE #100
RealSetGlobalTimer("DreamTalk","GLOBAL",180)
SetGlobal("DreamTimerStarted","GLOBAL",1)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Global("XaPCTimerStarted","GLOBAL",0)
THEN
RESPONSE #100
RealSetGlobalTimer("XaFriendTalkTime","GLOBAL",1800)
SetGlobal("XaPCTimerStarted","GLOBAL",1)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
RealGlobalTimerExpired("XaFriendTalkTime","GLOBAL")
!StateCheck(Player1,STATE_SLEEPING)
See(Player1)
OR(3)
Global("XaFriendTalk","GLOBAL",0)
Global("XaFriendTalk","GLOBAL",2)
Global("XaFriendTalk","GLOBAL",8)
THEN
RESPONSE #100
IncrementGlobal("XaFriendTalk","GLOBAL",1)
RealSetGlobalTimer("XaFriendlyTalkTime","GLOBAL",10)
Interact(Player1)
END

IF
InParty(Myself)
RealGlobalTimerExpired("XaFriendlyTalkTime","GLOBAL")
OR(3)
Global("XaFriendTalk","GLOBAL",1)
Global("XaFriendTalk","GLOBAL",3)
Global("XaFriendTalk","GLOBAL",9)
THEN
RESPONSE #100
IncrementGlobal("XaFriendTalk","GLOBAL",1)
RealSetGlobalTimer("XaFriendTalkTime","GLOBAL",7200)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
RealGlobalTimerExpired("XaFriendTalkTime","GLOBAL")
!StateCheck(Player1,STATE_SLEEPING)
See(Player1)
AreaType(DUNGEON)
Global("XaFriendTalk","GLOBAL",4)
THEN
RESPONSE #100
IncrementGlobal("XaFriendTalk","GLOBAL",1)
RealSetGlobalTimer("XaFriendlyTalkTime","GLOBAL",10)
Interact(Player1)
END

IF
InParty(Myself)
RealGlobalTimerExpired("XaFriendlyTalkTime","GLOBAL")
Global("XaFriendTalk","GLOBAL",5)
THEN
RESPONSE #100
IncrementGlobal("XaFriendTalk","GLOBAL",1)
RealSetGlobalTimer("XaFriendTalkTime","GLOBAL",7200)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
RealGlobalTimerExpired("XaFriendTalkTime","GLOBAL")
!StateCheck(Player1,STATE_SLEEPING)
See(Player1)
AreaType(FOREST)
TimeofDay(NIGHT)
Global("XaFriendTalk","GLOBAL",6)
THEN
RESPONSE #100
IncrementGlobal("XaFriendTalk","GLOBAL",1)
RealSetGlobalTimer("XaFriendlyTalkTime","GLOBAL",10)
Interact(Player1)
END

IF
InParty(Myself) 
RealGlobalTimerExpired("XaFriendlyTalkTime","GLOBAL")
Global("XaFriendTalk","GLOBAL",7)
THEN
RESPONSE #100
IncrementGlobal("XaFriendTalk","GLOBAL",1)
RealSetGlobalTimer("XaFriendTalkTime","GLOBAL",7200)
END

IF
CombatCounter(0) !See([ENEMY])InParty("XZAR")
See("XZAR")
!StateCheck("XZAR",STATE_SLEEPING)
InParty("MONTARON")
See("MONTARON")
AreaCheck("AR7704")
Dead("NIEMAIN")
Dead("OULAM")
Dead("WHEBER")
Dead("WILLIAM")
Global("XAXZ2","LOCALS",0)
THEN
RESPONSE #100
SetGlobal("XAXZ2","LOCALS",1)
Interact("XZAR")
END

