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("XzPCTimerStarted","GLOBAL",0)
THEN
RESPONSE #100
RealSetGlobalTimer("XzFriendTalkTime","GLOBAL",6000)
SetGlobal("XzPCTimerStarted","GLOBAL",1)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
RealGlobalTimerExpired("XzFriendTalkTime","GLOBAL")
GlobalGT("DREAM","Global",1)
OR(2)
Global("XzFriendTalk","GLOBAL",0)
Global("XzFriendTalk","GLOBAL",2)
THEN
RESPONSE #100
IncrementGlobal("XzFriendTalk","GLOBAL",1)
RealSetGlobalTimer("XzFriendlyTalkTime","GLOBAL",10)
Interact(Player1)
END

IF 
InParty(Myself)
RealGlobalTimerExpired("XzFriendlyTalkTime","GLOBAL")
OR(2)
Global("XzFriendTalk","GLOBAL",1)
Global("XzFriendTalk","GLOBAL",3)
THEN
RESPONSE #100
IncrementGlobal("XzFriendTalk","GLOBAL",1)
RealSetGlobalTimer("XzFriendTalkTime","GLOBAL",18000)
END

//Killed Mendas

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Dead("mendas3")
Global("X#XzarMendas","GLOBAL",0)
AreaCheck("ARU004")
THEN
RESPONSE #100
SetGlobal("X#XzarMendas","GLOBAL",1)
Dialogue(Player1)
END



////Xzar talks to Yeslick just after flooding mines////
IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Global("FLOODED","GLOBAL",1)
Global("XZYE1","LOCALS",0)
AreaCheck("AR8600")
InParty("YESLICK")
!StateCheck("YESLICK",STATE_SLEEPING)
THEN
RESPONSE #100
SetGlobal("XZYE1","LOCALS",1)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Global("XZYE1","LOCALS",1)
AreaCheck("AR8600")
InParty("YESLICK")
THEN
RESPONSE #100
StartDialogueNoSet(Player1)
END

///killed the lich called davaeron 3 version of the talk//

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
InParty("IMOEN2")
Global("XZIM3","GLOBAL",0)
Died("DAVAEORN")
!InParty("JAHEIRA")
!InParty("KHALID")
THEN
RESPONSE #100
SetGlobal("XZIM3","GLOBAL",1)
StartDialogueNoSet("IMOEN2")
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
InParty("JAHEIRA")
InParty("KHALID")
See("KHALID")
!Dead("KHALID")
Died("DAVAEORN")
Global("XZJA2","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("XZJA2","GLOBAL",1)
StartDialogueNoSet("JAHEIRA")
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
InParty("JAHEIRA")
InParty("KHALID")
See("KHALID")
Dead("KHALID")
Died("DAVAEORN")
Global("XZJA3","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("XZJA3","GLOBAL",1)
StartDialogueNoSet("JAHEIRA")
END




