IF
	CombatCounter(0)
	!Difficulty(EASIEST)
	OR(2)
		Dead("Gromnir")
		GlobalLT("Chapter","GLOBAL",8)
	XPGT(Player1,3000000)
	InMyArea(Player1)
	Global("RedBadgeStage","GLOBAL",0)
THEN
	RESPONSE #100
		IncrementGlobal("RedBadgeStage","GLOBAL",1)
		SetGlobal("RedBadgeTeleport","GLOBAL",1)
		SetGlobalTimer("RedBadgeTimeout","GLOBAL",360)
		SetGlobalTimer("RedBadgeTeleportTimer","GLOBAL",100)
END

IF
	CombatCounter(0)
	!Difficulty(EASIEST)
	XPGT(Player1,3500000)
	OR(2)
		Dead("Gromnir")
		GlobalLT("Chapter","GLOBAL",8)
	InMyArea(Player1)
	!InMyArea([ENEMY])
	Global("RedBadgeStage","GLOBAL",1)
	Global("RedBadgeTeleport","GLOBAL",0)
	GlobalTimerExpired("RedBadgeTimeout","GLOBAL")
THEN
	RESPONSE #100
		IncrementGlobal("RedBadgeStage","GLOBAL",1)
		SetGlobal("RedBadgeTeleport","GLOBAL",1)
		SetGlobalTimer("RedBadgeTeleportTimer","GLOBAL",100)
END

IF
	Global("RedBadgeTeleport","GLOBAL",1)
	!Difficulty(EASIEST)
	GlobalTimerExpired("RedBadgeTeleportTimer","GLOBAL")
	InMyArea(Player1)
THEN
	RESPONSE #100
		StartCutSceneMode()
		SetGlobal("RedBadgeTeleport","GLOBAL",0)
		CreateVisualEffectObject("SPPORTAL",Player1)
		CreateVisualEffectObject("SPPORTAL",Player2)
		CreateVisualEffectObject("SPPORTAL",Player3)
		CreateVisualEffectObject("SPPORTAL",Player4)
		CreateVisualEffectObject("SPPORTAL",Player5)
		CreateVisualEffectObject("SPPORTAL",Player6)
		Wait(2)
		EndCutSceneMode()
		ActionOverride(Player1,LeaveAreaLUAPanic("sola0002","",[677.502],0))
		ActionOverride(Player1,LeaveAreaLUA("sola0002","",[677.502],0))
		ActionOverride(Player2,LeaveAreaLUA("sola0002","",[677.502],0))
		ActionOverride(Player3,LeaveAreaLUA("sola0002","",[677.502],0))
		ActionOverride(Player4,LeaveAreaLUA("sola0002","",[677.502],0))
		ActionOverride(Player5,LeaveAreaLUA("sola0002","",[677.502],0))
		ActionOverride(Player6,LeaveAreaLUA("sola0002","",[677.502],0))
		CreateVisualEffectObject("SPPORTAL",Player1)
		CreateVisualEffectObject("SPPORTAL",Player2)
		CreateVisualEffectObject("SPPORTAL",Player3)
		CreateVisualEffectObject("SPPORTAL",Player4)
		CreateVisualEffectObject("SPPORTAL",Player5)
		CreateVisualEffectObject("SPPORTAL",Player6)
		ActionOverride("solasna1",StartDialogueNoSet(Player1))
END


