//Lovetalk and friendtalk scripts//
IF
Global("NathRomanceActive","GLOBAL",2)
Global("FHExpLoveTalk","LOCALS",0)
Global("FHExpNathMatch","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("FHExpNathMatch","GLOBAL",1)
SetGlobal("FHExpLoveTalk","LOCALS",1)
END

IF
!Global("NathRomanceActive","GLOBAL",2)
Global("FHExpFriendTalk","LOCALS",0)
Global("FHExpFriendTimeSet","GLOBAL",0)
!Global("FHExpNathMatch","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("FHExpFriendTimeSet","GLOBAL",1)
RealSetGlobalTimer("FHExpFriendTime","GLOBAL",EIGHT_HOURS)
SetGlobal("FHExpFriendTalk","LOCALS",1)
END

IF
RealGlobalTimerExpired("FHExpFriendTime","GLOBAL")
InParty(Myself)
See(Player1)
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
!InWatchersKeep()
CombatCounter(0)
OR(2)
Global("FHExpFriendTalk","LOCALS",1)
Global("FHExpFriendTalk","LOCALS",3)
THEN
RESPONSE #100
IncrementGlobal("FHExpFriendTalk","LOCALS",1)
END

IF
RealGlobalTimerExpired("FHExpFriendTime","GLOBAL")
InParty(Myself)
See(Player1)
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
!InWatchersKeep()
CombatCounter(0)
OR(2)
Global("FHExpFriendTalk","LOCALS",2)
Global("FHExpFriendTalk","LOCALS",4)
THEN
RESPONSE #100
Interact(Player1)
END

IF
Global("NathRomanceActive","GLOBAL",2)
Global("FH25FirstTimer","GLOBAL",0)
See(Player1)
!InWatchersKeep()
CombatCounter(0)
Global("FHExpLoveTalk","LOCALS",1)
Global("MelissanJob","GLOBAL",1)
THEN
RESPONSE #100
RealSetGlobalTimer("NathRomance","GLOBAL",500)
SetGlobal("FH25FirstTimer","GLOBAL",1)
END

IF
InParty(Myself)
Global("NathRomanceActive","GLOBAL",2)
See(Player1)
RealGlobalTimerExpired("NathRomance","GLOBAL")
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
CombatCounter(0)
!InWatchersKeep()
!AreaType([DUNGEON])
Global("FHExpLoveTalk","LOCALS",9)
Global("MetBal","GLOBAL",1)
THEN
RESPONSE #100
IncrementGlobal("FHExpLoveTalk","LOCALS",1)
END

IF
Global("NathRomanceActive","GLOBAL",2)
See(Player1)
RealGlobalTimerExpired("NathRomance","GLOBAL")
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
CombatCounter(0)
!InWatchersKeep()
!AreaType(DUNGEON)
OR(4)
Global("FHExpLoveTalk","LOCALS",1)
Global("FHExpLoveTalk","LOCALS",3)
Global("FHExpLoveTalk","LOCALS",7)
Global("FHExpLoveTalk","LOCALS",11)
THEN
RESPONSE #100
IncrementGlobal("FHExpLoveTalk","LOCALS",1)
END

IF
Global("NathRomanceActive","GLOBAL",2)
See(Player1)
RealGlobalTimerExpired("NathRomance","GLOBAL")
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
CombatCounter(0)
!InWatchersKeep()
!AreaType(DUNGEON)
PartyRested()
Global("FHExpLoveTalk","LOCALS",13)
THEN
RESPONSE #100
IncrementGlobal("FHExpLoveTalk","LOCALS",1)
END

IF
InParty(Myself)
See(Player1)
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
CombatCounter(0)
!InWatchersKeep()
!AreaType(DUNGEON)
RealGlobalTimerExpired("NathRomance","GLOBAL")
OR(8)
Global("FHExpLoveTalk","LOCALS",2)
Global("FHExpLoveTalk","LOCALS",4)
Global("FHExpLoveTalk","LOCALS",6)
Global("FHExpLoveTalk","LOCALS",8)
Global("FHExpLoveTalk","LOCALS",10)
Global("FHExpLoveTalk","LOCALS",12)
Global("FHExpLoveTalk","LOCALS",14)
Global("FHExpLoveTalk","LOCALS",16)
THEN
RESPONSE #100
Interact(Player1)
END

IF
Global("FHLovedOne","GLOBAL",6)
Global("FHWraithTalk","LOCALS",0)
InParty(Myself)
Global("NathRomanceActive","GLOBAL",2)
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
See(Player1)
CombatCounter(0)
THEN
RESPONSE #100
SetGlobal("FHWraithTalk","LOCALS",1)
Interact(Player1)
Wait(1)
END

IF
Global("FHSaradushTimer","LOCALS",0)
Global("SaradushSacked","GLOBAL",1)
InParty(Myself)
Global("NathRomanceActive","GLOBAL",2)
THEN
RESPONSE #100
SetGlobal("FHSaradushTimer","LOCALS",1)
RealSetGlobalTimer("FHSaradush","GLOBAL",500)
END

IF
Global("SaradushSacked","GLOBAL",1)
RealGlobalTimerExpired("FHSaradush","GLOBAL")
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
Global("NathRomanceActive","GLOBAL",2)
Global("FHSaradushTalk","GLOBAL",0)
InParty(Myself)
See(Player1)
CombatCounter(0)
THEN
RESPONSE #100
SetGlobal("FHSaradushTalk","GLOBAL",1)
END

IF
RealGlobalTimerExpired("FHSaradush","GLOBAL")
Global("FHSaradushTalk","GLOBAL",1)
THEN
RESPONSE #100
Interact(Player1)
END

IF
Global("ChallengesDone","GLOBAL",1)
GlobalLT("FHExpLoveTalk","LOCALS",16)
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
InParty(Myself)
Global("NathRomanceActive","GLOBAL",2)
See(Player1)
CombatCounter(0)
THEN
RESPONSE #100
SetGlobal("FHExpLoveTalk","LOCALS",16)
END

//String fixer//
IF
HotKey(K)
THEN
RESPONSE #100
StartCutSceneMode()
StartCutScene("FHNFIX")
END

//Reputation quibbling//
IF
InParty(Myself)
Global("NathRomanceActive","GLOBAL",2)
ReputationLT(Player1,9)
Global("NathGoes2","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("NathGoes2","GLOBAL",1)
StartDialogueNoSet(Player1)
END

//Romancing PC dual-classes to a thief//
IF
InParty(Myself)
Class(Player1,THIEF)
Global("NathRomanceActive","GLOBAL",2)
Global("NathThief2","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("NathThief2","GLOBAL",1)
StartDialogueNoSet(Player1)
END
