IF
InParty(Myself) CombatCounter(0) !See([ENEMY]) CombatCounter(0) !See([ENEMY])
Global("X#EDPCTimerStarted","GLOBAL",0)
Global("X#EdwinFriendTalk","GLOBAL",0)
Global("X#EdwinDynaheir","GLOBAL",0)
THEN
RESPONSE #100
RealSetGlobalTimer("X#EDFriendTalkTime","GLOBAL",1800)
RealSetGlobalTimer("X#EDDynaTalkTime","GLOBAL",3600)
SetGlobal("X#EDPCTimerStarted","GLOBAL",1)
SetGlobal("X#EdwinFriendTalk","GLOBAL",1)
SetGlobal("X#EdwinDynaheir","GLOBAL",1)
END


IF
InParty(Myself) CombatCounter(0) !See([ENEMY]) CombatCounter(0) !See([ENEMY])
!StateCheck(Player1,STATE_SLEEPING)
RealGlobalTimerExpired("X#EDFriendTalkTime","GLOBAL")
See(Player1)
CombatCounter(0)
OR(2)
Global("X#EdwinFriendTalk","GLOBAL",1)
Global("X#EdwinFriendTalk","GLOBAL",3)
THEN
RESPONSE #100
IncrementGlobal("X#EdwinFriendTalk","GLOBAL",1)
RealSetGlobalTimer("X#EDFriendlyTalkTime","GLOBAL",10)
Dialogue(Player1)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY]) CombatCounter(0) !See([ENEMY])
RealGlobalTimerExpired("X#EDFriendlyTalkTime","GLOBAL")
OR(2)
Global("X#EdwinFriendTalk","GLOBAL",2)
Global("X#EdwinFriendTalk","GLOBAL",4)
THEN
RESPONSE #100
RealSetGlobalTimer("X#EDFriendTalkTime","GLOBAL",3600)
IncrementGlobal("X#EdwinFriendTalk","GLOBAL",1)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY]) CombatCounter(0) !See([ENEMY])
!StateCheck(Player1,STATE_SLEEPING)
RealGlobalTimerExpired("X#EDDynaTalkTime","GLOBAL")
See(Player1)
CombatCounter(0)
!Dead("Dynaheir")
Global("X#EdwinDynaheir","GLOBAL",1)
THEN
RESPONSE #100
IncrementGlobal("X#EdwinDynaheir","GLOBAL",1)
RealSetGlobalTimer("X#EDDynaTalkTime","GLOBAL",7200)
Dialogue(Player1)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY]) CombatCounter(0) !See([ENEMY])
!StateCheck(Player1,STATE_SLEEPING)
RealGlobalTimerExpired("X#EDDynaTalkTime","GLOBAL")
See(Player1)
CombatCounter(0)
!Dead("Dynaheir")
InParty("Dynaheir")
Global("X#EdwinDynaheir","GLOBAL",3)
THEN
RESPONSE #100
IncrementGlobal("X#EdwinDynaheir","GLOBAL",1)
RealSetGlobalTimer("X#EDDynaTalkTime","GLOBAL",7200)
Dialogue(Player1)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY]) CombatCounter(0) !See([ENEMY])
!StateCheck(Player1,STATE_SLEEPING)
RealGlobalTimerExpired("EdwinKillsDynaheir","GLOBAL")
See(Player1)
CombatCounter(0)
!Dead("Dynaheir")
PartyRested()
InParty("Dynaheir")
Global("X#EdwinDynaheir","GLOBAL",5)
THEN
RESPONSE #100
IncrementGlobal("X#EdwinDynaheir","GLOBAL",1)
ActionOverride("Edwin",Kill("Dynaheir"))
END

IF
InParty("Edwin")
Global("EdwinBetrayRW","GLOBAL",5)
Dead("dynaheir")
Dead("minsc")
AreaCheck("AR9100")
THEN
RESPONSE #100
SetGlobal("EdwinBetrayRW","GLOBAL",6)
ActionOverride("denak", Dialogue("Edwin"))
END

IF
InParty(Myself)
Gender("edwin",FEMALE)
Global("X#EdwinFemale","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("X#EdwinFemale","GLOBAL",1)
StartDialogueNoSet(Player1)
END

