IF
Global("O#CoranSummoned","GLOBAL",1)
THEN
RESPONSE #100
StartDialogueNoSet([PC])
Wait(1)
END 

IF 
InParty(Myself)
Global("O#CoranShutUp","GLOBAL",0)
Global("O#CoranPCToBTalk","GLOBAL",0)
THEN
RESPONSE #100
RealSetGlobalTimer("O#CoranPCToBTimer","GLOBAL",3600)
SetGlobal("O#CoranPCToBTalk","GLOBAL",1)
END

IF
InParty(Myself)
RealGlobalTimerExpired("O#CoranPCToBTimer","GLOBAL")
Global("O#CoranShutUp","GLOBAL",0)
See(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID) 
!StateCheck(Myself,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
OR(3)
Global("O#CoranPCToBTalk","GLOBAL",1)
Global("O#CoranPCToBTalk","GLOBAL",3)
Global("O#CoranPCToBTalk","GLOBAL",5)
THEN
RESPONSE #100
IncrementGlobal("O#CoranPCToBTalk","GLOBAL",1)
END

IF
InParty(Myself)
RealGlobalTimerExpired("O#CoranPCToBTimer","GLOBAL")
Global("O#CoranShutUp","GLOBAL",0)
Dead("CHALRV01")
See(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID) 
!StateCheck(Myself,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
Global("O#CoranPCToBTalk","GLOBAL",7)
THEN
RESPONSE #100
IncrementGlobal("O#CoranPCToBTalk","GLOBAL",1)
END

IF
InParty(Myself)
Global("O#CoranShutUp","GLOBAL",0)
!AreaType(DUNGEON)
See(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID) 
!StateCheck(Myself,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
OR(4)
Global("O#CoranPCToBTalk","GLOBAL",2)
Global("O#CoranPCToBTalk","GLOBAL",4)
Global("O#CoranPCToBTalk","GLOBAL",6)
Global("O#CoranPCToBTalk","GLOBAL",8)
THEN
RESPONSE #100
StartDialogueNoSet(Player1)
END

IF
HotKey(K)
THEN
RESPONSE #100
StartCutSceneMode()
StartCutScene("O#CoranF")
END