IF %BGT_VAR%
InParty(Myself)
Global("X#QuPCTimerStarted","GLOBAL",0)
THEN
RESPONSE #100
RealSetGlobalTimer("X#QuFriendTalkTime","GLOBAL",1800)
SetGlobal("X#QuPCTimerStarted","GLOBAL",1)
END

IF %BGT_VAR%
Global("X#QuFriendTalk","GLOBAL",0)
RealGlobalTimerExpired("X#QuFriendTalkTime","GLOBAL")
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
See(Player1)
!StateCheck("quayle",CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
THEN
RESPONSE #100
IncrementGlobal("X#QuFriendTalk","GLOBAL",1)
END

IF %BGT_VAR%
Global("X#QuFriendTalk","GLOBAL",1)
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
See(Player1)
!StateCheck("quayle",CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
THEN
RESPONSE #100
PlaySong(0)
PlaySound("quayl99")
StartDialogueNoSet(Player1)
END
