IF %BGT_VAR%
AreaCheck("%CoastWay%")
Global("X#KagainCaravan","GLOBAL",1)
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
THEN
RESPONSE #100
SetGlobal("X#KagainCaravan","GLOBAL",2)
END

/* Initiate Kagain entry to 0123 */
IF %BGT_VAR%
Global("X#KagainCaravan","GLOBAL",2)
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
THEN
RESPONSE #100
PlaySong(0)
PlaySound("kagain99")
StartDialogueNoSet(Player1)
END

IF %BGT_VAR%
Global("X#KagainCaravan","GLOBAL",3)
Dead("X#KABAND")
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
THEN
RESPONSE #100
ClearAllActions()
SetGlobal("X#KagainCaravan","GLOBAL",4)
END

/* Initiate Kagain Silvershield talk */
IF %BGT_VAR%
Global("X#KagainCaravan","GLOBAL",4)
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
THEN
RESPONSE #100
PlaySong(0)
PlaySound("kagain99")
StartDialogueNoSet(Player1)
END
