/////////////////////////////////////////////////////////////////////
// TALEN.S - Talendrah.
/////////////////////////////////////////////////////////////////////

SETUP

    IF  !gd_PLACED_TA_SOLDIERS
        Add gd_PLACED_TA_SOLDIERS

		RemoveC P
		PlaceC P pP
		MakeInvisible P
		camcut P

        PlaceC      BARTH       pBARTH_START
        AddControl  BARTH       MoveCDir    pBARTH_1
        AddControl  BARTH       MoveCDir    pBARTH_2
        AddControl  BARTH       MoveCDir    pBARTH_START
        AddControl  BARTH       Capture     cM_BLINDED1
        AddControl  BARTH       Capture     cM_CLUTCH_HEAD
        AddControl  BARTH       Capture     cM_BLINDED2
        SequenceRandomlySelects BARTH
		SetHP BARTH 500

        PlaceC  TA_SOLDIER_1    pTA_SOLDIER_1_START
        PlaceC  TA_SOLDIER_2    pTA_SOLDIER_2_START
        PlaceC  TA_SOLDIER_3    pTA_SOLDIER_3_START
        PlaceC  TA_SOLDIER_4    pTA_SOLDIER_4_START
        PlaceC  TA_SOLDIER_5    pTA_SOLDIER_5_START
        PlaceC  TA_SOLDIER_6    pTA_SOLDIER_6_START
        PlaceC  TA_SOLDIER_7    pTA_SOLDIER_7_START
        PlaceC  TA_SOLDIER_8    pTA_SOLDIER_8_START
        PlaceC  TA_SOLDIER_9    pTA_SOLDIER_9_START
        PlaceC  TA_SOLDIER_10   pTA_SOLDIER_10_START
        PlaceC  TA_SOLDIER_11   pTA_SOLDIER_11_START
        PlaceC  TA_SOLDIER_12   pTA_SOLDIER_12_START
        PlaceC  TA_SOLDIER_13   pTA_SOLDIER_13_START
        PlaceC  CAPT_DURGAR     pTA_DURGAR_1

        AddControl  TA_SOLDIER_1    Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_1    Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_1    Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_1

        AddControl  TA_SOLDIER_2    Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_2    Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_2    Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_2

        AddControl  TA_SOLDIER_3    Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_3    Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_3    Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_3

        AddControl  TA_SOLDIER_4    Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_4    Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_4    Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_4

        AddControl  TA_SOLDIER_5    Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_5    Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_5    Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_5

        AddControl  TA_SOLDIER_6    Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_6    Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_6    Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_6

        AddControl  TA_SOLDIER_7    Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_7    Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_7    Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_7

        AddControl  TA_SOLDIER_8    Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_8    Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_8    Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_8

        AddControl  TA_SOLDIER_9    Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_9    Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_9    Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_9

        AddControl  TA_SOLDIER_10   Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_10   Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_10   Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_10

        AddControl  TA_SOLDIER_11   Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_11   Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_11   Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_11

        AddControl  TA_SOLDIER_12   Capture cM_GUARD_STAND1
        AddControl  TA_SOLDIER_12   Capture cM_GUARD_STAND2
        AddControl  TA_SOLDIER_12   Capture cM_GUARD_STAND3
        SequenceRandomlySelects TA_SOLDIER_12

	ELSE
		//returning - restore Bart?

		IF gd_FOUND_BARTH && !gd_FREED_HEART

			IF !ONMAP-BARTH
				PlaceC BARTH pP_TALEN_HEX
			ENDIF

		    Follow          BARTH   P

		ENDIF
    ENDIF

END

VIG TempSetup FALSE

    DisableTeleport TA_HEXSTONE
    DisableTeleport TA_ARRIVE_1

	Set gd_WEATHER_TYPE	1
	Set gd_WIND_TYPE	2
    RunS CueWeather

	FX_WellOfSouls pVAULT

	CachePortrait KINKATH.BIN
	CachePortrait TALOS.BIN
	CachePortrait PC2.BIN
	
	IF !gd_ARRIVED_AT_TALENDRAH
		CachePortrait CAPTDRGR.BIN
	ELSE
		CachePortrait GARGSDMN.BIN
	ENDIF

END

/////////////////////////////////////////////////////////////////////

VIG ReappearAtTelendrah gg_TALEN_TELE_INVIS
	Remove gg_TALEN_TELE_INVIS
	FX_Visible P
END

/////////////////////////////////////////////////////////////////////

VIG BarthBurn   FIVESEC && !gd_FREED_HEART
    FX_GreenFire   BARTH
	GiveSightOfPlayerTo BARTH
END

/////////////////////////////////////////////////////////////////////

VIG ArrivalAtTalendrah  gd_PLACED_TA_SOLDIERS && !gd_ARRIVED_AT_TALENDRAH

    Widescreen  TRUE
	camcut P
//camcut pos01
setcammoveconstant 4
//campan pos02

    FX_Teleport P
    Wait        5000
	MakeVisible P
	Wait        5000

    Camcut      durgar

    // Revenant Captain Durgar talks to his troops.
    MoveCDir    CAPT_DURGAR pTA_DURGAR_2
    Wait        1000

    QuickSay    rc001a
    UUComplete  CAPT_DURGAR
    Capture     CAPT_DURGAR cM_TALK_CROWD1
    UUComplete  CAPT_DURGAR
    MoveCDir    CAPT_DURGAR pTA_DURGAR_3
 camcut pos05 
  Wait        3000

	UUSay
    QuickSay    rc001d      

    Wait        500


    Capture     TA_SOLDIER_1    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_2    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_3    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_4    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_5    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_6    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_7    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_8    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_9    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_10   cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_11   cM_STAND_TO_ATTENTION1_ATTEN
	Wait 125
    Capture     TA_SOLDIER_12   cM_STAND_TO_ATTENTION1_ATTEN

    UUComplete  CAPT_DURGAR
    Capture     CAPT_DURGAR cM_TALK_THREATEN1
    UUComplete  CAPT_DURGAR
    Capture     CAPT_DURGAR cM_TALK_BECKON_FORWARD1

    UUComplete  TA_SOLDIER_6
    UUComplete  TA_SOLDIER_12
    UUComplete  TA_SOLDIER_5
    UUComplete  TA_SOLDIER_11
    UUComplete  TA_SOLDIER_4
    UUComplete  TA_SOLDIER_10
    UUComplete  TA_SOLDIER_3
    UUComplete  TA_SOLDIER_9
    UUComplete  TA_SOLDIER_2
    UUComplete  TA_SOLDIER_8
    UUComplete  TA_SOLDIER_1
    UUComplete  TA_SOLDIER_7

	UUSay

    MoveC    TA_SOLDIER_6    pTA_SOLDIER_6_END	march
    MoveC    TA_SOLDIER_12   pTA_SOLDIER_12_END	march
    Wait        1500

    MoveC    TA_SOLDIER_5    pTA_SOLDIER_5_END	march
    MoveC    TA_SOLDIER_11   pTA_SOLDIER_11_END	march
    Wait        1500

	RunS QPalFadeBLACK
    MoveC    TA_SOLDIER_4    pTA_SOLDIER_4_END	march
    MoveC    TA_SOLDIER_10   pTA_SOLDIER_10_END	march
    Wait        1500

    MoveC    TA_SOLDIER_3    pTA_SOLDIER_3_END	march
    MoveC    TA_SOLDIER_9    pTA_SOLDIER_9_END	march
    Wait        1500

    MoveC    TA_SOLDIER_2    pTA_SOLDIER_2_END	march
    MoveC    TA_SOLDIER_8    pTA_SOLDIER_8_END	march
    Wait        1500

    MoveC    TA_SOLDIER_1    pTA_SOLDIER_1_END	march
    MoveC    TA_SOLDIER_7    pTA_SOLDIER_7_END	march

//    UUComplete  CAPT_DURGAR

	UUFade

SetCamMoveNormal

    Add         gd_ARRIVED_AT_TALENDRAH
    camcut      P

    // Now get the soldiers to look around

    Wander					TA_SOLDIER_1
    AddFilter				TA_SOLDIER_1  DontGoFarFrom   1000 2500 pTA_SOLDIER_1A
    SwitchOnSightOfPlayer   TA_SOLDIER_1  MeleeAttackBLands
    Wander					TA_SOLDIER_2
    AddFilter				TA_SOLDIER_2  DontGoFarFrom   1000 2500 pTA_SOLDIER_2A
    SwitchOnSightOfPlayer   TA_SOLDIER_2  MeleeAttackBLands
    Wander					TA_SOLDIER_3
    AddFilter				TA_SOLDIER_3  DontGoFarFrom   1000 2500 pTA_SOLDIER_3A
    SwitchOnSightOfPlayer   TA_SOLDIER_3  MeleeAttackBLands
    Wander					TA_SOLDIER_4
    AddFilter				TA_SOLDIER_4  DontGoFarFrom   1000 2500 pTA_SOLDIER_4A
    SwitchOnSightOfPlayer   TA_SOLDIER_4  MeleeAttackBLands
    Wander					TA_SOLDIER_5
    AddFilter				TA_SOLDIER_5  DontGoFarFrom   1000 2500 pTA_SOLDIER_5A
    SwitchOnSightOfPlayer   TA_SOLDIER_5  MeleeAttackBLands
    Wander					TA_SOLDIER_6
    AddFilter				TA_SOLDIER_6  DontGoFarFrom   1000 2500 pTA_SOLDIER_6A
    SwitchOnSightOfPlayer   TA_SOLDIER_6  MeleeAttackBLands
    Wander					TA_SOLDIER_7
    AddFilter				TA_SOLDIER_7  DontGoFarFrom   1000 2500 pTA_SOLDIER_7A
    SwitchOnSightOfPlayer   TA_SOLDIER_7  MeleeAttackBLands
    Wander					TA_SOLDIER_8
    AddFilter				TA_SOLDIER_8  DontGoFarFrom   1000 2500 pTA_SOLDIER_8A
    SwitchOnSightOfPlayer   TA_SOLDIER_8  MeleeAttackBLands
    Wander					TA_SOLDIER_9
    AddFilter				TA_SOLDIER_9  DontGoFarFrom   1000 2500 pTA_SOLDIER_9A
    SwitchOnSightOfPlayer   TA_SOLDIER_9  MeleeAttackBLands
    Wander					TA_SOLDIER_10
    AddFilter				TA_SOLDIER_10 DontGoFarFrom   1000 2500 pTA_SOLDIER_10A
    SwitchOnSightOfPlayer   TA_SOLDIER_10 MeleeAttackBLands
    Wander					TA_SOLDIER_11
    AddFilter				TA_SOLDIER_11 DontGoFarFrom   1000 2500 pTA_SOLDIER_11A
    SwitchOnSightOfPlayer   TA_SOLDIER_11 MeleeAttackBLands
    Wander					TA_SOLDIER_12
    AddFilter				TA_SOLDIER_12 DontGoFarFrom   1000 2500 pTA_SOLDIER_12A
    SwitchOnSightOfPlayer   TA_SOLDIER_12 MeleeAttackBLands
    Wander					TA_SOLDIER_13
    AddFilter				TA_SOLDIER_13 DontGoFarFrom   1000 2500 pTA_SOLDIER_13A
    SwitchOnSightOfPlayer   TA_SOLDIER_13 MeleeAttackBLands

    AddControl  CAPT_DURGAR MoveCDir    pDURGAR_STAND1
    AddControl  CAPT_DURGAR MoveCDir    pDURGAR_STAND2
    AddControl  CAPT_DURGAR Capture     cM_GUARD_STAND1
    AddControl  CAPT_DURGAR Capture     cM_GUARD_STAND2
    AddControl  CAPT_DURGAR Capture     cM_GUARD_STAND3
    SequenceRandomlySelects CAPT_DURGAR
    SwitchOnSightOfPlayer   CAPT_DURGAR MeleeAttackBLands

    Widescreen  FALSE
	RunS PalFadeRPG
END

/////////////////////////////////////////////////////////////////////

VIG PlayerInCombat ONEMIN && INCOMBAT-P

	GiveSightOfPlayerTo TA_SOLDIER_1
	GiveSightOfPlayerTo TA_SOLDIER_2
	GiveSightOfPlayerTo TA_SOLDIER_3
	GiveSightOfPlayerTo TA_SOLDIER_4
	GiveSightOfPlayerTo TA_SOLDIER_5
	GiveSightOfPlayerTo TA_SOLDIER_6
	GiveSightOfPlayerTo TA_SOLDIER_7
	GiveSightOfPlayerTo TA_SOLDIER_8
	GiveSightOfPlayerTo TA_SOLDIER_9
	GiveSightOfPlayerTo TA_SOLDIER_10
	GiveSightOfPlayerTo TA_SOLDIER_11
	GiveSightOfPlayerTo TA_SOLDIER_12
	GiveSightOfPlayerTo TA_SOLDIER_13

END

/////////////////////////////////////////////////////////////////////

VIG KinkathraWords  HALFSEC && !gd_KINKA_WORDS && !gd_FOUND_BARTH && INAREA-P-kinka
	widescreen true

	FreezeC TA_SOLDIER_1
	FreezeC TA_SOLDIER_2
	FreezeC TA_SOLDIER_3
	FreezeC TA_SOLDIER_4
	FreezeC TA_SOLDIER_5
	FreezeC TA_SOLDIER_6
	FreezeC TA_SOLDIER_7
	FreezeC TA_SOLDIER_8
	FreezeC TA_SOLDIER_9
	FreezeC TA_SOLDIER_10
	FreezeC TA_SOLDIER_11
	FreezeC TA_SOLDIER_12
	FreezeC TA_SOLDIER_13
	FreezeC CAPT_DURGAR

    StopC       P

    FX_BurnPerson   P
    Capture     P       cM_HIT_BY_LIGHT1

    Wait        3000

    Say         ki0001  KINKATH.BIN
	Wait        2000

    Say         ki0002  KINKATH.BIN

	Wait        2000

    Capture     P       cM_V6_LOOK_AROUND2_BETTER

    UUComplete  P

    Add         gd_KINKA_WORDS

	widescreen false
	AwardEP xp_FIND_KINKATHRA

	UnFreezeC TA_SOLDIER_1
	UnFreezeC TA_SOLDIER_2
	UnFreezeC TA_SOLDIER_3
	UnFreezeC TA_SOLDIER_4
	UnFreezeC TA_SOLDIER_5
	UnFreezeC TA_SOLDIER_6
	UnFreezeC TA_SOLDIER_7
	UnFreezeC TA_SOLDIER_8
	UnFreezeC TA_SOLDIER_9
	UnFreezeC TA_SOLDIER_10
	UnFreezeC TA_SOLDIER_11
	UnFreezeC TA_SOLDIER_12
	UnFreezeC TA_SOLDIER_13
	UnFreezeC CAPT_DURGAR

END

/////////////////////////////////////////////////////////////////////

VIG TheHeart  !gd_FOUND_BARTH && DISTFROM-P-BARTH-4

	FreezeC TA_SOLDIER_1
	FreezeC TA_SOLDIER_2
	FreezeC TA_SOLDIER_3
	FreezeC TA_SOLDIER_4
	FreezeC TA_SOLDIER_5
	FreezeC TA_SOLDIER_6
	FreezeC TA_SOLDIER_7
	FreezeC TA_SOLDIER_8
	FreezeC TA_SOLDIER_9
	FreezeC TA_SOLDIER_10
	FreezeC TA_SOLDIER_11
	FreezeC TA_SOLDIER_12
	FreezeC TA_SOLDIER_13
	FreezeC CAPT_DURGAR

	widescreen true
camcut p


    StopC           P
    StopC           BARTH
    EngageAndFace   P   BARTH
    Say             Hx333a
	ChangeProfileToIdentified mcitizen_bart
	ChangeProfileToIdentified mdemon_bart


  Say             ki0004  KINKATH.BIN
    Say             ki0005  KINKATH.BIN
    Say             Hx0333
    Follow          BARTH   P
    Add             gd_FOUND_BARTH

	QLRemove ql016
	QLAdd ql027 qlt027 qlb027

	widescreen false

	UnFreezeC TA_SOLDIER_1
	UnFreezeC TA_SOLDIER_2
	UnFreezeC TA_SOLDIER_3
	UnFreezeC TA_SOLDIER_4
	UnFreezeC TA_SOLDIER_5
	UnFreezeC TA_SOLDIER_6
	UnFreezeC TA_SOLDIER_7
	UnFreezeC TA_SOLDIER_8
	UnFreezeC TA_SOLDIER_9
	UnFreezeC TA_SOLDIER_10
	UnFreezeC TA_SOLDIER_11
	UnFreezeC TA_SOLDIER_12
	UnFreezeC TA_SOLDIER_13
	UnFreezeC CAPT_DURGAR

END

/////////////////////////////////////////////////////////////////////

VIG TheHeartBarth  ONESEC && gd_FOUND_BARTH && !gd_FREED_HEART && INAREA-P-kinka && DISTFROM-P-BARTH-8

	FreezeC TA_SOLDIER_1
	FreezeC TA_SOLDIER_2
	FreezeC TA_SOLDIER_3
	FreezeC TA_SOLDIER_4
	FreezeC TA_SOLDIER_5
	FreezeC TA_SOLDIER_6
	FreezeC TA_SOLDIER_7
	FreezeC TA_SOLDIER_8
	FreezeC TA_SOLDIER_9
	FreezeC TA_SOLDIER_10
	FreezeC TA_SOLDIER_11
	FreezeC TA_SOLDIER_12
	FreezeC TA_SOLDIER_13
	FreezeC CAPT_DURGAR

	widescreen true

	camcut pos08

    StopC       P

    MoveCDir    BARTH   pBARTH_FREED
    MoveC       P       pP_STAND
	AddControl	P	    LookAtTurnFollow    BARTH
    Say         ki0012  KINKATH.BIN

	setcammovenormal 8
	campan pos012

    PlaceC      TALOS   pTALOS_START
    UUComplete  BARTH
    FX_Teleport BARTH
    Wait        2000
    Capture     BARTH   cM_FARMERS_FREEDOM1
    UUComplete  BARTH
	Capture     BARTH   cM_FALL_N_DIE_DIE_DIE1
    Add         gd_FREED_HEART
	QLRemove ql027
	AwardEP xp_HEART_OF_KINKATHRA
	MessagePumpLongGreen 999

    MoveCDir    TALOS   pTALOS_1
	Wait 4000
    UUComplete  TALOS

	LookAtTurnFollow TALOS BARTH
    QuickSay    gt0001  TALOS.BIN
	Wait 750
    LookAtTurnFollow    P       TALOS

    Capture     TALOS   cM_TALK_THREATEN1
	camcut pos015  
    UUComplete  TALOS

	Wait        100

    MoveCDir    TALOS   pTALOS_GARGOS
	camcut pos012  
	Wait        1500

	UUSay

    QuickSay    gt0002  TALOS.BIN
    UUComplete  TALOS

    Capture     TALOS   cM_TALK_REFER_OTHER_PERSON1
	UUSay

    QuickSay    Hx0339
    Capture     P       cM_TALK_THREATEN2
    UUComplete  TALOS

	UUSay

    QuickSay    gt0003  TALOS.BIN
    Capture     TALOS   cM_TALK_QUESTION2
    UUComplete  TALOS

    Capture     TALOS   cM_TALK_BECKON_FORWARD1
	setcammoveconstant 10
	campan pos014
    MoveCDir    P       pP_GARGOS
    UUComplete  P

	UUSay

	PlayMusic RPG32.WAV

	UUComplete TALOS

    // Change TALOS to GARGOS - demon.
    FX_YellowFire   16431 12075
    FX_BurnPerson   TALOS
    Wait        1000

    FX_YellowFire   16431 12075
    KillC     TALOS
    PlaceC      GARGOS_DEMON  pTALOS_GARGOS
    Capture     GARGOS_DEMON  cM_V16_LAUGHING_FULL2
    QuickSay    Hx0340
    Capture     P	cM_TALK_SURPRISE1
    UUComplete  P

    UUComplete  GARGOS_DEMON

	UUSay

    QuickSay    gt0004  GARGSDMN.BIN
    Capture     GARGOS_DEMON    cM_S2_GREETING1
    UUComplete  GARGOS_DEMON

    Capture     GARGOS_DEMON    cM_TALK_REFER_OTHER_PERSON2
    UUComplete  GARGOS_DEMON

    UUSay
    QuickSay    Hx340a
    Capture     P               cM_TALK_REFER_SELF1

    UUSay
    QuickSay    gt004a  GARGSDMN.BIN
    Capture     GARGOS_DEMON    cM_TALK_THREATEN1
    UUComplete  GARGOS_DEMON
    Capture     GARGOS_DEMON    cM_TALK_BECKON_FORWARD1

    UUComplete  GARGOS_DEMON
	UUSay
    AttackDemo2 GARGOS_DEMON

	QLAdd ql028 qlt028 qlb028
	ChangeProfileToIdentified erev_gargos2

	SetCamMoveNormal
	NormalCam
	Camcut P

	CannotBeHit BARTH

	widescreen false

	UnFreezeC TA_SOLDIER_1
	UnFreezeC TA_SOLDIER_2
	UnFreezeC TA_SOLDIER_3
	UnFreezeC TA_SOLDIER_4
	UnFreezeC TA_SOLDIER_5
	UnFreezeC TA_SOLDIER_6
	UnFreezeC TA_SOLDIER_7
	UnFreezeC TA_SOLDIER_8
	UnFreezeC TA_SOLDIER_9
	UnFreezeC TA_SOLDIER_10
	UnFreezeC TA_SOLDIER_11
	UnFreezeC TA_SOLDIER_12
	UnFreezeC TA_SOLDIER_13
	UnFreezeC CAPT_DURGAR

END

/////////////////////////////////////////////////////////////////////

VIG GargosDeath2 FIVESEC && gd_FREED_HEART && !mj_DEFEAT_GARGOS_2 && ISDEAD-GARGOS_DEMON

    Add mj_DEFEAT_GARGOS_2
	SetCharSet	Diamond		DI2
	SetCharSet	Faith		FS3
	SetCharSet	SouthSq		SS2
	SetCharSet	EFens		EF2
	ActivateHexStone	WELL
	ActivateHexStone	RIM
	ActivateHexStone	MINE
	ActivateHexStone	CHAOS
	CanBeHit BARTH
	SetHP BARTH 3750

	Set gg_FX_GARGOS2_DEATH 0

END

/////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////

VIG FlyBy3 FALSE

	Widescreen TRUE

	//prepare characters for flyby
	
    RemoveC  TA_SOLDIER_1
    RemoveC  TA_SOLDIER_2
    RemoveC  TA_SOLDIER_3
    RemoveC  TA_SOLDIER_4
    RemoveC  TA_SOLDIER_5
    RemoveC  TA_SOLDIER_6
    RemoveC  TA_SOLDIER_7
    RemoveC  TA_SOLDIER_8
    RemoveC  TA_SOLDIER_9
    RemoveC  TA_SOLDIER_10
    RemoveC  TA_SOLDIER_11
    RemoveC  TA_SOLDIER_12
    RemoveC  TA_SOLDIER_13
    RemoveC  CAPT_DURGAR

    PlaceC  TA_SOLDIER_1    pTA_SOLDIER_1_START
    PlaceC  TA_SOLDIER_2    pTA_SOLDIER_2_START
    PlaceC  TA_SOLDIER_3    pTA_SOLDIER_3_START
    PlaceC  TA_SOLDIER_4    pTA_SOLDIER_4_START
    PlaceC  TA_SOLDIER_5    pTA_SOLDIER_5_START
    PlaceC  TA_SOLDIER_6    pTA_SOLDIER_6_START
    PlaceC  TA_SOLDIER_7    pTA_SOLDIER_7_START
    PlaceC  TA_SOLDIER_8    pTA_SOLDIER_8_START
    PlaceC  TA_SOLDIER_9    pTA_SOLDIER_9_START
    PlaceC  TA_SOLDIER_10   pTA_SOLDIER_10_START
    PlaceC  TA_SOLDIER_11   pTA_SOLDIER_11_START
    PlaceC  TA_SOLDIER_12   pTA_SOLDIER_12_START
    PlaceC  TA_SOLDIER_13   pTA_SOLDIER_13_START
    PlaceC  CAPT_DURGAR     pTA_DURGAR_1

    AddControl  TA_SOLDIER_1    Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_1    Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_1    Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_1

    AddControl  TA_SOLDIER_2    Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_2    Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_2    Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_2

    AddControl  TA_SOLDIER_3    Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_3    Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_3    Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_3

    AddControl  TA_SOLDIER_4    Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_4    Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_4    Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_4

    AddControl  TA_SOLDIER_5    Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_5    Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_5    Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_5

    AddControl  TA_SOLDIER_6    Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_6    Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_6    Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_6

    AddControl  TA_SOLDIER_7    Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_7    Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_7    Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_7

    AddControl  TA_SOLDIER_8    Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_8    Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_8    Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_8

    AddControl  TA_SOLDIER_9    Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_9    Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_9    Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_9

    AddControl  TA_SOLDIER_10   Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_10   Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_10   Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_10

    AddControl  TA_SOLDIER_11   Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_11   Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_11   Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_11

    AddControl  TA_SOLDIER_12   Capture cM_GUARD_STAND1
    AddControl  TA_SOLDIER_12   Capture cM_GUARD_STAND2
    AddControl  TA_SOLDIER_12   Capture cM_GUARD_STAND3
    SequenceRandomlySelects TA_SOLDIER_12

	// *** CAMERA FLY-BY CODE ***

	// This script is a copy of the popular vignette where
	// Captain Durgar shouts at his troops, except I've removed
	// all the speech calls.
	// Ideally the camera should track along one of the roads
	// showing off the ruins before panning over to the soldiers.
	// Take care to keep the camera moving - the UUComplete and Wait
	// commands may stall it. If in doubt, don't show too much of
	// the action and just pass it by.

	SetCamMoveConstant 50

	StartRecord


// look around and pan over to the soldiers...




// now pan past the soldiers? 

    MoveCDir    CAPT_DURGAR pTA_DURGAR_2
    UUComplete  CAPT_DURGAR
    Capture     CAPT_DURGAR cM_TALK_CROWD1
    UUComplete  CAPT_DURGAR
    MoveCDir    CAPT_DURGAR pTA_DURGAR_3
	Wait        3000

    Capture     TA_SOLDIER_1    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_2    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_3    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_4    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_5    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_6    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_7    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_8    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_9    cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_10   cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_11   cM_STAND_TO_ATTENTION1_ATTEN
    Capture     TA_SOLDIER_12   cM_STAND_TO_ATTENTION1_ATTEN

// now pan away again...

    UUComplete  CAPT_DURGAR
    Capture     CAPT_DURGAR cM_TALK_THREATEN1
    AddControl	CAPT_DURGAR Capture cM_TALK_BECKON_FORWARD1

    Wander      TA_SOLDIER_1
    AddFilter   TA_SOLDIER_1  DontGoFarFrom   1000 2500 pTA_SOLDIER_1A
    Wander      TA_SOLDIER_2
    AddFilter   TA_SOLDIER_2  DontGoFarFrom   1000 2500 pTA_SOLDIER_2A
    Wander      TA_SOLDIER_3
    AddFilter   TA_SOLDIER_3  DontGoFarFrom   1000 2500 pTA_SOLDIER_3A
    Wander      TA_SOLDIER_4
    AddFilter   TA_SOLDIER_4  DontGoFarFrom   1000 2500 pTA_SOLDIER_4A
    Wander      TA_SOLDIER_5
    AddFilter   TA_SOLDIER_5  DontGoFarFrom   1000 2500 pTA_SOLDIER_5A
    Wander      TA_SOLDIER_6
    AddFilter   TA_SOLDIER_6  DontGoFarFrom   1000 2500 pTA_SOLDIER_6A
    Wander      TA_SOLDIER_7
    AddFilter   TA_SOLDIER_7  DontGoFarFrom   1000 2500 pTA_SOLDIER_7A
    Wander      TA_SOLDIER_8
    AddFilter   TA_SOLDIER_8  DontGoFarFrom   1000 2500 pTA_SOLDIER_8A
    Wander      TA_SOLDIER_9
    AddFilter   TA_SOLDIER_9  DontGoFarFrom   1000 2500 pTA_SOLDIER_9A
    Wander      TA_SOLDIER_10
    AddFilter   TA_SOLDIER_10  DontGoFarFrom   1000 2500 pTA_SOLDIER_10A
    Wander      TA_SOLDIER_11
    AddFilter   TA_SOLDIER_11  DontGoFarFrom   1000 2500 pTA_SOLDIER_11A
    Wander      TA_SOLDIER_12
    AddFilter   TA_SOLDIER_12  DontGoFarFrom   1000 2500 pTA_SOLDIER_12A
    Wander      TA_SOLDIER_13
    AddFilter   TA_SOLDIER_13  DontGoFarFrom   1000 2500 pTA_SOLDIER_13A

	UUComplete	CAPT_DURGAR
    AddControl  CAPT_DURGAR MoveCDir    pDURGAR_STAND1
    AddControl  CAPT_DURGAR MoveCDir    pDURGAR_STAND2
    AddControl  CAPT_DURGAR Capture     cM_GUARD_STAND1
    AddControl  CAPT_DURGAR Capture     cM_GUARD_STAND2
    AddControl  CAPT_DURGAR Capture     cM_GUARD_STAND3
    SequenceRandomlySelects CAPT_DURGAR


	StopRecord

	// *** END OF FLY-BY ***

	Widescreen FALSE

END

/////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////



/////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////

VIG FlyBy FALSE

	Widescreen TRUE

	// *** EXAMPLE CAMERA FLY-BY CODE ***

	// use UUCameraComplete to wait for a pan to finish
	// use SetCamMoveConstant to set camera movement per frame
	//     - remember the movie is played at 25fps no matter how slow it records

	SetCamMoveConstant 15
	FreeCam
	PhotoOn

	camcut Flyby02

	campan Flyby01
	UUCameraComplete

	PhotoOff

	// *** END OF FLY-BY ***

	Widescreen FALSE

END

/////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////

VIG FlyBy2 FALSE

	Widescreen TRUE

	// *** EXAMPLE CAMERA FLY-BY CODE ***

	// use UUCameraComplete to wait for a pan to finish
	// use SetCamMoveConstant to set camera movement per frame
	//     - remember the movie is played at 25fps no matter how slow it records

	SetCamMoveConstant 15
	FreeCam
	PhotoOn

	camcut Flyby03

	campan Flyby04
	UUCameraComplete

	SetCamMoveConstant 22

	//campan Flyby05
	//UUCameraComplete

	campan Flyby07
	UUCameraComplete

	PhotoOff

	// *** END OF FLY-BY ***

	Widescreen FALSE

END

/////////////////////////////////////////////////////////////////////

VIG DoDeathEffectGargos2 ONESEC && gg_FX_GARGOS2_DEATH && gg_FX_GARGOS2_DEATH<4
	AddTo gg_FX_GARGOS2_DEATH 1

	IF gg_FX_GARGOS2_DEATH=4
		FX_RevSpiritToPerson GARGOS_DEMON P 0
		AwardEP xp_DEFEAT_GARGOS_2
	ENDIF
END

/////////////////////////////////////////////////////////////////////
