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("KhFriendTalk","GLOBAL",0)
Dead("Mulahey")
THEN
RESPONSE #100
SetGlobal("KhFriendTalk","GLOBAL",1)
RealSetGlobalTimer("KhFriendlyTalkTime","GLOBAL",10)
Interact(Player1)
END

IF
InParty(Myself)
RealGlobalTimerExpired("KhFriendlyTalkTime","GLOBAL")
Global("KhFriendTalk","GLOBAL",1)
THEN
RESPONSE #100
IncrementGlobal("KhFriendTalk","GLOBAL",1)
RealSetGlobalTimer("KhFriendTalkTime","GLOBAL",1800)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Global("KhElminster","GLOBAL",0)
OR(7)
AreaCheck("AR7300")
AreaCheck("AR7400")
AreaCheck("AR7600")
AreaCheck("AR7700")
AreaCheck("AR8000")
AreaCheck("AR8100")
AreaCheck("AR8200")
THEN
RESPONSE #100
SetGlobal("KhElminster","GLOBAL",1)
RealSetGlobalTimer("KhFriendlyTalkTime","GLOBAL",10)
Interact(Player1)
END


//Quayle
IF
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
Global("KHQU1","GLOBAL",0)
AreaCheck("AR7700")
InParty("Quayle")
See("QUAYLE")
!StateCheck("QUAYLE",STATE_SLEEPING)
THEN
RESPONSE #100
SetGlobal("KHQU1","GLOBAL",1)
Interact("Quayle")
END
