IF %BGT_VAR%
InParty(Myself)
Global("X#DreamTimerStarted","GLOBAL",0)
THEN
RESPONSE #100
RealSetGlobalTimer("X#DreamTalk","GLOBAL",180)
SetGlobal("X#DreamTimerStarted","GLOBAL",1)
END

IF %BGT_VAR%
InParty(Myself)
Global("P#BrPCTimerStarted","GLOBAL",0)
THEN
RESPONSE #100
RealSetGlobalTimer("P#BrFriendTalkTime","GLOBAL",900)
SetGlobal("P#BrPCTimerStarted","GLOBAL",1)
END

IF %BGT_VAR%
RealGlobalTimerExpired("P#BrFriendTalkTime","GLOBAL")
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
InMyArea(Player1)
OR(2)
Global("P#BrFriendTalk","GLOBAL",0)
Global("P#BrFriendTalk","GLOBAL",2)
THEN
RESPONSE #100
IncrementGlobal("P#BrFriendTalk","GLOBAL",1)
END

IF %BGT_VAR%
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
InMyArea(Player1)
OR(2)
Global("P#BrFriendTalk","GLOBAL",1)
Global("P#BrFriendTalk","GLOBAL",3)
THEN
RESPONSE #100
PlaySong(0)
PlaySound("branw99")
StartDialogueNoSet(Player1)
END

IF %BGT_VAR%
InParty(Myself)
Global("P#BranNewMatch","GLOBAL",1)
Global("X#ForCow","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("X#ForCow","GLOBAL",1)
ReallyForceSpellRES("SPWI299",Myself)
END

IF %BGT_VAR%
InParty(Myself)
Global("X#ForCow","GLOBAL",1)
THEN
RESPONSE #100
Dialogue(Player1)
END
