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

////MIPC1////
IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Global("MinscPCCandlekeep","LOCALS",0)
AreaCheck("AR6508")
See(Player1)
THEN
RESPONSE #100
SetGlobal("MinscPCCandlekeep","LOCALS",1)
StartDialogNoSet(Player1)
END

////MIAJ2/////
IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Global("MIAJ_BG","LOCALS",0)
AreaCheck("AR7800")
InParty("Ajantis")
THEN
RESPONSE #100
SetGlobal("MIAJ_BG","LOCALS",1)
StartDialogNoSet("Ajantis")
END

/////MIKH1/////
IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Global("HelpMinsc","GLOBAL",0)
Global("MIKH_Gnolls","LOCALS",0)
AreaCheck("AR4100")
InParty("Khalid")
THEN
RESPONSE #100
SetGlobal("MIKH_Gnolls","LOCALS",1)
StartDialogNoSet("Khalid")
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
RealGlobalTimerExpired("DreamTalk","GLOBAL")
Global("MIJA1","LOCALS",0)
See("Jaheira")
AreaType(FOREST)
PartyRested()
THEN
RESPONSE #100
SetGlobal("MIJA1","LOCALS",1)
RealSetGlobalTimer("DreamTalk","GLOBAL",1080)
StartDialogueNoSet("Jaheira")
END

//IRON lord
IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
Global("IronTimerStarted","GLOBAL",0)
Global("IronLord","GLOBAL",1)
THEN
RESPONSE #100
RealSetGlobalTimer("IRONLORD","GLOBAL",1800)
SetGlobal("IronTimerStarted","GLOBAL",1)
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
InParty("EDWIN")
See("EDWIN")
!StateCheck("EDWIN",STATE_SLEEPING)
Global("MIED1","LOCALS",1)
RealGlobalTimerExpired("IRONLORD","GLOBAL")
Global("Yegoriy","GLOBAL",0)
THEN
RESPONSE #100
IncrementGlobal("Yegoriy","GLOBAL",1)
RealSetGlobalTimer("MiIronTime","GLOBAL",10)
Interact("EDWIN")
END

IF
InParty(Myself) CombatCounter(0) !See([ENEMY])
RealGlobalTimerExpired("MiIronTime","GLOBAL")
Global("Yegoriy","GLOBAL",1)
THEN
RESPONSE #100
IncrementGlobal("Yegoriy","GLOBAL",1)
END

//roll backs on dream scripts

IF
InParty(Myself)
RealGlobalTimerExpired("BackUpTimer","GLOBAL")
Global("MIDY1","LOCALS",1)
THEN
RESPONSE #100
IncrementGlobal("MIDY1","LOCALS",-1)
END

IF
InParty(Myself)
RealGlobalTimerExpired("BackUpTimer","GLOBAL")
Global("MIDY2","LOCALS",1)
THEN
RESPONSE #100
IncrementGlobal("MIDY2","LOCALS",-1)
END

IF
InParty(Myself)
RealGlobalTimerExpired("BackUpTimer","GLOBAL")
Global("MIEL1","LOCALS",1)
THEN
RESPONSE #100
IncrementGlobal("MIEL1","LOCALS",-1)
END



