/////////////////////////////////////////////////////////////////////
// MOON.S
/////////////////////////////////////////////////////////////////////

SETUP

	//Guards will talk to player once per visit to temple
	//until they have let you through already
	IF !gt_TWM_GUARD_PASS
		Remove gt_TALK_TO_TWM_GUARDS
	ENDIF

//	IF !gt_TWM_DENIZENS_READY
//        RunS    PlaceTWMDenizens
//	ENDIF

	IF mj_RESCUE_BANE

		IDoorLocked dWHITE_MOON
		IDoorOpen dWHITE_MOON

		IF !gt_PLACED_BANE_RETINUE

			Add gt_PLACED_BANE_RETINUE

			PlaceC LORDBANE pBANE_START

			PlaceC BANE_GUARD1 pBY_BANE1
			PlaceC BANE_GUARD2 pBY_BANE2
			PlaceC BANE_GUARD3 pBY_BANE3
			PlaceC BANE_GUARD4 pBY_BANE4
			IF ISDEAD-BANE_GUARD1
				RemoveC BANE_GUARD1
			ENDIF
			IF ISDEAD-BANE_GUARD2
				RemoveC BANE_GUARD2
			ENDIF
			IF ISDEAD-BANE_GUARD3
				RemoveC BANE_GUARD3
			ENDIF
			IF ISDEAD-BANE_GUARD4
				RemoveC BANE_GUARD4
			ENDIF

			IF gt_STRAIGHT_TO_TWM
				Widescreen FALSE
			ENDIF

		ELSE

			IF mj_DEFEAT_LIGHTSTEALER
                IF gt_PLACED_BANE_RETINUE

				    //Remove gt_PLACED_BANE_RETINUE
				    Remove gt_TWM_DENIZENS_READY

				    RemoveC BANE_GUARD1
				    RemoveC BANE_GUARD2
				    RemoveC BANE_GUARD3
				    RemoveC BANE_GUARD4
				    RemoveC TWM_GUARD1
				    RemoveC TWM_GUARD2
				    RemoveC TWM_INJBKM1
				    RemoveC TWM_INJBKM2
				    RemoveC TWM_INJBKM3
				    RemoveC TWM_INJBKM4
				    RemoveC TWM_INJBKF1
				    RemoveC TWM_INJBKF2
				    RemoveC TWM_INJBKF3
				    RemoveC TWM_INJBKF4
                ENDIF

                IF !gd_PLACED_WHITE_MOON_CEREMONY && !gd_DONE_WHITE_MOON_CEREMONY
                    Add gd_PLACED_WHITE_MOON_CEREMONY

                    PlaceC              WMC_BLOODKIN1       pMN_BK_1
                    PlaceC              WMC_BLOODKIN2       pMN_BK_2
                    PlaceC              WMC_BLOODKIN3       pMN_BK_3
                    PlaceC              WMC_BLOODKIN4       pMN_BK_4
                    PlaceC              WMC_BLOODKIN5       pMN_BK_5
                    PlaceC              WMC_BLOODKIN6       pMN_BK_6
                    PlaceC              WMC_BLOODKIN7       pMN_BK_7
                    PlaceC              WMC_BLOODKIN8       pMN_BK_8
                    PlaceC              WMC_BLOODKIN9       pMN_BK_9
                    PlaceC              WMC_BLOODKIN10       pMN_BK_10

                    AddControl          WMC_BLOODKIN1    Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN1    Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN1    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN1

                    AddControl          WMC_BLOODKIN2    Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN2    Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN2    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN2

                    AddControl          WMC_BLOODKIN3    Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN3    Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN3    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN3

                    AddControl          WMC_BLOODKIN4    Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN4    Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN4    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN4

                    AddControl          WMC_BLOODKIN5    Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN5    Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN5    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN5

                    AddControl          WMC_BLOODKIN6    Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN6    Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN6    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN6

                    AddControl          WMC_BLOODKIN7    Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN7    Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN7    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN7

                    AddControl          WMC_BLOODKIN8    Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN8    Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN8    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN8

                    AddControl          WMC_BLOODKIN9    Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN9    Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN9    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN9

                    AddControl          WMC_BLOODKIN10   Capture cM_GUARD_STAND1
                    AddControl          WMC_BLOODKIN10   Capture cM_GUARD_STAND2
                    AddControl          WMC_BLOODKIN10   Capture cM_GUARD_STAND3
                    SequenceRandomlySelects WMC_BLOODKIN10

            		PlaceC              TWM_INJBKM1         pMN_INJBKM1
            		PlaceC              TWM_INJBKM2         pMN_INJBKM2
            		PlaceC              TWM_INJBKM3         pMN_INJBKM3
            		PlaceC              TWM_INJBKM4         pMN_INJBKM4
            		PlaceC              TWM_INJBKF1         pMN_INJBKF1
            		PlaceC              TWM_INJBKF2         pMN_INJBKF2
            		PlaceC              TWM_INJBKF3         pMN_INJBKF3
            		PlaceC              TWM_INJBKF4         pMN_INJBKF4

                    AddControl          TWM_INJBKM1    Capture cM_GUARD_STAND1
                    AddControl          TWM_INJBKM1    Capture cM_GUARD_STAND2
                    AddControl          TWM_INJBKM1    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects TWM_INJBKM1

                    AddControl          TWM_INJBKM2    Capture cM_GUARD_STAND1
                    AddControl          TWM_INJBKM2    Capture cM_GUARD_STAND2
                    AddControl          TWM_INJBKM2    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects TWM_INJBKM2

                    AddControl          TWM_INJBKM3    Capture cM_GUARD_STAND1
                    AddControl          TWM_INJBKM3    Capture cM_GUARD_STAND2
                    AddControl          TWM_INJBKM3    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects TWM_INJBKM3

                    AddControl          TWM_INJBKM4    Capture cM_GUARD_STAND1
                    AddControl          TWM_INJBKM4    Capture cM_GUARD_STAND2
                    AddControl          TWM_INJBKM4    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects TWM_INJBKM4

                    AddControl          TWM_INJBKF1    Capture cM_GUARD_STAND1
                    AddControl          TWM_INJBKF1    Capture cM_GUARD_STAND2
                    AddControl          TWM_INJBKF1    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects TWM_INJBKF1

                    AddControl          TWM_INJBKF2    Capture cM_GUARD_STAND1
                    AddControl          TWM_INJBKF2    Capture cM_GUARD_STAND2
                    AddControl          TWM_INJBKF2    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects TWM_INJBKF2

                    AddControl          TWM_INJBKF3    Capture cM_GUARD_STAND1
                    AddControl          TWM_INJBKF3    Capture cM_GUARD_STAND2
                    AddControl          TWM_INJBKF3    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects TWM_INJBKF3

                    AddControl          TWM_INJBKF4    Capture cM_GUARD_STAND1
                    AddControl          TWM_INJBKF4    Capture cM_GUARD_STAND2
                    AddControl          TWM_INJBKF4    Capture cM_GUARD_STAND3
                    SequenceRandomlySelects TWM_INJBKF4

                    PlaceC              WMC_BKMONK          pMN_MONK_START

                    PlaceC              LAEN                pLAEN_START
                    Capture             LAEN                cM_V5_KNEEL1

                    RemoveC				P
					PlaceC              P                   pP_START
					camcut				P
                    Capture             P                   cM_V5_KNEEL1

					//SetPCModel				PCstage3
					//ChangeProfilePortrait P	PC3.BIN
					//doesn't look as nice as stage 2!

                ENDIF

			ENDIF

		ENDIF

	ELSE

		IDoorLocked dWHITE_MOON

	ENDIF

	
	//added for F1.1 (or so...?) these chars MUST be here
	RunS    PlaceTWMDenizens

END

VIG TempSetup FALSE

	SetWeather 0 0 0 0 0 0 0 0

	FX_Torch  14728   1023   1324            
	FX_Torch  14728   3071   1324            
	FX_Torch  11384   3072   1324            
	FX_Torch  11384   1024   1324            
	FX_Torch  11474   4462   1324            
	FX_Torch  8959   4471   1324             
	FX_Torch  14591   4471   1324            
	FX_Torch  17151   4471   1324            
	FX_Torch  18056   4863   1324            
	FX_Torch  18056   6911   1324            
	FX_Torch  17408   12680   1324           
	FX_Torch  14848   12680   1324           
	FX_Torch  11264   12680   1324           
	FX_Torch  8704   12680   1324            
	FX_Torch  8312   10496   1324            
	FX_Torch  21504   7304   1324            
	FX_Torch  20480   7304   1324            
	FX_Torch  19456   7304   1324            
	FX_Torch  23807   5751   1324            
	FX_Torch  25343   5751   1324            
	FX_Torch  24832   9096   1324            
	FX_Torch  23808   9096   1324            
	FX_Torch  18944   12168   1324           
	FX_Torch  20223   11383   1324           
	FX_Torch  20616   15615   1452           
	FX_Torch  20616   18175   1452           
	FX_Torch  22784   19848   1452           
	FX_Torch  22783   18295   1452           
	FX_Torch  22784   22664   1452           
	FX_Torch  23944   21503   1452           
	FX_Torch  23295   20855   1452           
	FX_Torch  22271   20855   1452           
	FX_Torch  19832   20480   1452           
	FX_Torch  19832   17408   1452           
	FX_Torch  22528   15496   1452           
	FX_Torch  23808   15496   1452           
	FX_Torch  26367   11895   1452           
	FX_Torch  27784   12543   1452           
	FX_Torch  27784   13567   1452           
	FX_Torch  27784   14335   1452           
	FX_Torch  27392   15496   1452           
	FX_Torch  25856   15496   1452           
	FX_Torch  21880   12288   1452           
	FX_Torch  21880   13312   1452           
	FX_Torch  14335   13687   1324           
	FX_Torch  16895   13687   1324           
	FX_Torch  16264   22015   2092           
	FX_Torch  15872   23944   2092           
	FX_Torch  14336   23944   2092           
	FX_Torch  12800   23944   2092           
	FX_Torch  11008   23944   2092           
	FX_Torch  9472   23944   2092            
	FX_Torch  9080   22016   2092            
	FX_Torch  8312   17152   1324            
	FX_Torch  8312   15104   1324            
	FX_Torch  8703   13687   1324            
	FX_Torch  11775   13687   1324           
	FX_Torch  14335   13687   1324           
	FX_Torch  16895   13687   1324           
	FX_Torch  18568   23807   2092           
	FX_Torch  11776   17800   1324           
	FX_Torch  12800   17800   1324           
	FX_Torch  13824   17800   1324           
	FX_Torch  5120   7816   1324             
	FX_Torch  5888   7816   1324             
	FX_Torch  5119   4471   1324             
	FX_Torch  5887   4471   1324             
	FX_Torch  376   6144   1324              
	FX_Torch  376   7168   1324              
	FX_Torch  1023   5239   1324             
	FX_Torch  2047   5239   1324             
	FX_Torch  2696   5887   1324             
	FX_Torch  2696   6911   1324             
	FX_Torch  4608   9608   1324             
	FX_Torch  7424   9608   1324             
	FX_Torch  7423   8823   1324             
	FX_Torch  4232   13567   1452            
	FX_Torch  2048   13960   1452            
	FX_Torch  1656   12544   1452            
	FX_Torch  2047   11127   1452            
	FX_Torch  7423   11383   1324            
	FX_Torch  7424   12168   1324            

	AddBigFire 4025 12262
	AddBigFire 23054 12124
	AddBigFire 26284 7412
	AddBigFire 20461 4938

	CachePortrait CREDO.BIN
	CachePortrait LORDBANE.BIN
	CachePortrait ALVARIS.BIN
	CachePortrait LAENCHNT.BIN

END

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

VIG PlaceTWMDenizens    FALSE

	Remove gt_TWM_DENIZENS_READY

	PlaceC TWM_GUARD1 pTWM_GUARD1
	PlaceC TWM_GUARD2 pTWM_GUARD2

	PlaceC TWM_INJBKM1 pTWM_INJBKM1
	PlaceC TWM_INJBKM2 pTWM_INJBKM2
	PlaceC TWM_INJBKM3 pTWM_INJBKM3
	PlaceC TWM_INJBKM4 pTWM_INJBKM4
	PlaceC TWM_INJBKF1 pTWM_INJBKF1
	PlaceC TWM_INJBKF2 pTWM_INJBKF2
	PlaceC TWM_INJBKF3 pTWM_INJBKF3
	PlaceC TWM_INJBKF4 pTWM_INJBKF4
END

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

VIG OrdersForDenizens FIVESEC && !gt_TWM_DENIZENS_READY

	Add gt_TWM_DENIZENS_READY

	LookAtTurnFollow TWM_GUARD1 P
	LookAtTurnFollow TWM_GUARD2 P

	WanderNotFar TWM_INJBKM1 2 10
	SwitchOnSightOfPlayer TWM_INJBKM1 LookAtTurnFollow P
	WanderNotFar TWM_INJBKM2 2 10
	SwitchOnSightOfPlayer TWM_INJBKM2 LookAtTurnFollow P
	WanderNotFar TWM_INJBKM3 2 10
	SwitchOnSightOfPlayer TWM_INJBKM3 LookAtTurnFollow P
	WanderNotFar TWM_INJBKM4 2 10
	SwitchOnSightOfPlayer TWM_INJBKM4 LookAtTurnFollow P
	WanderNotFar TWM_INJBKF1 2 10
	SwitchOnSightOfPlayer TWM_INJBKF1 LookAtTurnFollow P
	WanderNotFar TWM_INJBKF2 2 10
	SwitchOnSightOfPlayer TWM_INJBKF2 LookAtTurnFollow P
	WanderNotFar TWM_INJBKF3 2 10
	SwitchOnSightOfPlayer TWM_INJBKF3 LookAtTurnFollow P
	WanderNotFar TWM_INJBKF4 2 10
	SwitchOnSightOfPlayer TWM_INJBKF4 LookAtTurnFollow P

END

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

VIG MustFadeUp gt_STRAIGHT_TO_TWM 

	Remove gt_STRAIGHT_TO_TWM
	RunS PalFadeRPG

END

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

VIG TalkToInjBKM1 MSG-iTWM_INJBKM1

	SWITCH RAND-2
		CASE 0
			//"Listen close...a Thardolin ship was sighted..."
			Say bkm003 BKINMAN1.BIN
		CASE 1
			//"Hail, brother. Our war against Lightstealer goes well."
			Say bkm002 BKINMAN1.BIN
			Add co_LIGHTSTEALER
	ENDSWITCH

END

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

VIG TalkToInjBKM2 MSG-iTWM_INJBKM2

	SWITCH RAND-2
		CASE 0
			//"Listen close...a Thardolin ship was sighted..."
			Say bkm003 BKINMAN2.BIN
		CASE 1
			//"Hail, brother. Our war against Lightstealer goes well."
			Say bkm002 BKINMAN2.BIN
			Add co_LIGHTSTEALER
	ENDSWITCH

END

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

VIG TalkToInjBKM3 MSG-iTWM_INJBKM3

	SWITCH RAND-2
		CASE 0
			//"Listen close...a Thardolin ship was sighted..."
			Say bkm003 BKINMAN3.BIN
		CASE 1
			//"Hail, brother. Our war against Lightstealer goes well."
			Say bkm002 BKINMAN3.BIN
			Add co_LIGHTSTEALER
	ENDSWITCH

END
/////////////////////////////////////////////////////////////////////

VIG TalkToInjBKM4 MSG-iTWM_INJBKM4

	SWITCH RAND-2
		CASE 0
			//"Listen close...a Thardolin ship was sighted..."
			Say bkm003 BKINMAN4.BIN
		CASE 1
			//"Hail, brother. Our war against Lightstealer goes well."
			Say bkm002 BKINMAN4.BIN
			Add co_LIGHTSTEALER
	ENDSWITCH

END

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

VIG TalkToInjBKF1 MSG-iTWM_INJBKF1

	SWITCH RAND-2
		CASE 0
			//"Be wary...things have been sighted at Khulindah's mound."
			Say bkf003 BKINFEM4.BIN
		CASE 1
			//"Greetings, brother...we will soon return to our homeland."
			Say bkf002 BKINFEM4.BIN
	ENDSWITCH

END

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

VIG TalkToInjBKF2 MSG-iTWM_INJBKF2

	SWITCH RAND-2
		CASE 0
			//"Be wary...things have been sighted at Khulindah's mound."
			Say bkf003 BKINFEM2.BIN
		CASE 1
			//"Greetings, brother...we will soon return to our homeland."
			Say bkf002 BKINFEM2.BIN
	ENDSWITCH

END

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

VIG TalkToInjBKF3 MSG-iTWM_INJBKF3

	SWITCH RAND-2
		CASE 0
			//"Be wary...things have been sighted at Khulindah's mound."
			Say bkf003 BKINFEM3.BIN
		CASE 1
			//"Greetings, brother...we will soon return to our homeland."
			Say bkf002 BKINFEM3.BIN
	ENDSWITCH

END

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

VIG TalkToInjBKF4 MSG-iTWM_INJBKF4

	SWITCH RAND-2
		CASE 0
			//"Be wary...things have been sighted at Khulindah's mound."
			Say bkf003 BKINFEM4.BIN
		CASE 1
			//"Greetings, brother...we will soon return to our homeland."
			Say bkf002 BKINFEM4.BIN
	ENDSWITCH

END

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

VIG TalkToGuards MSG-iTWM_GUARD1 || MSG-iTWM_GUARD2 || (!gt_TALK_TO_TWM_GUARDS && INAREA-P-TWM_ENTRY)

	Widescreen TRUE

	//Do not greet player repeatedly
	IF !gt_TALK_TO_TWM_GUARDS || (mj_DEFEAT_LIGHTSTEALER && (MSG-iTWM_GUARD1 || MSG-iTWM_GUARD2))
		Add gt_TALK_TO_TWM_GUARDS

		LookAtTurnFollow P TWM_GUARD1

		IF mj_RESCUE_BANE
			//"Welcome, friend...you are to be allowed entry."
			Say cd0002 CREDO.BIN
			Add gt_TWM_GUARD_PASS
		ELSE
			//"I am sorry...The Church is closed...Lord Bane is missing..."
			Say cd0001 CREDO.BIN
	
			Add co_LORDBANE
		ENDIF
	ENDIF

	IF !mj_DEFEAT_LIGHTSTEALER
		ResetChoice
		WHILE !MenuExit
			ClearChoices

			//Chant
			AddChoice 1 txpw02

			//Lord Bane
			AddChoice 2 txpw04

			//Tamaran's Pit
			AddChoice 3 txcd03

			IF co_LIGHTSTEALER
				//Lightstealer
				AddChoice 4 txpw07
			ENDIF

			IF co_THEGUILD
				//The Guild
				AddChoice 5 tx0097
			ENDIF

			AddChoice 0 tx0003

			GetChoice TWM_GUARD1 CREDO.BIN

			SWITCH Choice
				CASE 1
					//Chant

					//"...Chant...has returned...he is...out on...business..."
					Say cd0006 CREDO.BIN

				CASE 2
					//Lord Bane

					IF mj_RESCUE_BANE
						//"Lord bane awaits within..."
						Say cd0008 CREDO.BIN
					ELSE
						//"Lord Bane has escorted the young warriors into the Fens..."
						Say cd0007 CREDO.BIN
						QLAdd ql020 qlt020 qlb020
					ENDIF

				CASE 3
					//Tamaran's Pit

					//"...south and east...deep in the Fens."
					Say cd0003 CREDO.BIN

				CASE 4
					//Lightstealer

					//"The Vampire Lord...has taken our lands...His allies are everywhere."
					Say cd0004 CREDO.BIN

				CASE 5
					//The Guild

					//"I know of no such place...they would surely be allies of Lightstealer."
					Say cd0005 CREDO.BIN

					Add co_LIGHTSTEALER

				CASE 0
					//Leave

					IF !mj_RESCUE_BANE
						//"Until Bane returns, I cannot help you further."
						Say cd0009 CREDO.BIN
					ELSE
						//"You are welcome to return at any time."
						Say cd0010 CREDO.BIN
					ENDIF
			ENDSWITCH
		ENDWHILE
	ENDIF

	Widescreen FALSE

END

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

VIG TalkToLordBane MSG-iLORDBANE
freecam

	WideScreen TRUE
camcut pos1000

//	MoveCDir P pP_BANE				REMOVED BY GREG 29/11/99
//	LookAtTurnFollow LORDBANE P		REMOVED BY GREG 29/11/99

	IF !gt_TALK_LORD_BANE
		//"At last we are all here...the westerner no doubt seeks audience..."
		Say lb0006

		MoveC BANE_GUARD1 pDOORWAY1
		MoveC BANE_GUARD2 pDOORWAY2
		MoveC BANE_GUARD3 pDOORWAY3
		MoveC BANE_GUARD4 pDOORWAY4
	ENDIF

	//player must be in position now
//	UUComplete P				REMOVED BY GREG 29/11/99
	// ADDED BY GREG 29/11/99
	EngageAndFace P LORDBANE



setcammoveconstant 4
campan pos2000

	//"Welcome to my court, young traveller."
	Say lb0007

	IF !gt_TALK_LORD_BANE
		Add gt_TALK_LORD_BANE

		RemoveC BANE_GUARD1
		RemoveC BANE_GUARD2
		RemoveC BANE_GUARD3
		RemoveC BANE_GUARD4
	ENDIF

	ResetChoice
	WHILE !MenuExit
		ClearChoices

		//Chant
		AddChoice 1 txpw02

		//Barthelago
		AddChoice 2 tx0007

		//The Bloodkin
		AddChoice 3 txlb03

		IF co_THEGUILD
			//Guild of Assassins
			AddChoice 4 txlb04
		ENDIF

		IF co_LORDCRUX && !f_CRUX_DEAD
			//Lord Crux
			AddChoice 5 txpw06
		ENDIF

		IF co_LIGHTSTEALER
			//Lightstealer
			AddChoice 6 txpw07
		ENDIF

		IF co_BLOODMASTER
			//Blood Master
			AddChoice 7 txpw08
		ENDIF

		//Heart of Kinkathra
		AddChoice 8 txlb08

		//IF mj_FOUND_BLOODMASTER
		IF co_GIVE_BLOODMASTER && POS-P-bloodmaster
			//Give Blood Master to Bane
			AddChoice 9 txlb09
		ENDIF

		//Leave
		AddChoice 0 tx0003

		GetChoice LORDBANE

		SWITCH Choice
			CASE 1
				//Chant

				//"Laen...was chosen...His return is a good omen..."
				Say lb0008

				Add co_LIGHTSTEALER

			CASE 2
				//Barthelago

				//"I know of no such man, but perhaps...Candice...knows something..."
				Say lb0009

			CASE 3
				//The Bloodkin

				//"We are...from Totalaran, to the north...driven from our homeland by Lightstealer...prophecy...Blood-Master"
				Say lb0010

				Add co_LIGHTSTEALER
				Add co_BLOODMASTER

			CASE 4
				//Guild of Assassins

				//"I know nothing of such a guild, though...it would not surprise me..."
				Say lb0011

			CASE 5
				//Lord Crux

				//"Yes, he is a wealthy man...a dangerous man...cunning..."
				Say lb0012
				QLAdd ql022 qlt022 qlb022

			CASE 6
				//Lightstealer

				//"...the king of the vampires...prophecy...Blood-Master."
				Say lb0013

				Add co_BLOODMASTER

			CASE 7
				//Blood Master

				//"...the hammer forged by Alvaris...the only weapon that can defeat Lightstealer..."
				Say lb0014

				Add co_LIGHTSTEALER
				Add co_GIVE_BLOODMASTER
				QLAdd ql021 qlt021 qlb021

			CASE 8
				//Heart of Kinkathra

				//"...library in Totalaran spoke of such...I would be honoured..."
				Say lb0015

				Add co_LIGHTSTEALER

			CASE 9
				// *** GIVE BLOOD MASTER TO BANE ***
				QLRemove ql021

				UnDrawSwordRemember

				//"My lord - I have returned from the resting place of Alvaris with this - Blood Master."
				QuickSay hxwm01

				//bloodkin begin to gather to witness the fulfilment of their prophecy

				RemoveC TWM_INJBKM1
				RemoveC TWM_INJBKF2
				RemoveC TWM_INJBKM3
				RemoveC TWM_INJBKF4
				PlaceC TWM_INJBKM1 pDOORWAY1
				PlaceC TWM_INJBKF2 pDOORWAY2
				PlaceC TWM_INJBKM3 pDOORWAY3
				PlaceC TWM_INJBKF4 pDOORWAY4
				Engage TWM_INJBKM1 LORDBANE 800
				Engage TWM_INJBKF2 LORDBANE 800
				Engage TWM_INJBKM3 LORDBANE 800
				Engage TWM_INJBKF4 LORDBANE 800

				UUSay

				Capture P cM_TOSS_GENTLE
				Capture LORDBANE cM_OBJ_ACCEPT_1H2

				UUComplete P

				IF POS-P-bloodmaster
					DeleteObjectsInBackPackWithID P bloodmaster
				ENDIF

				Add mj_BLOODMASTER_BANE
				AwardEP xp_BLOODMASTER_BANE

				//"...you are a Blood-kin at heart...You are known now...as Young Moon - and I welcome you..."
				QuickSay lb0016

				//Chant begins to walk towards the group

				PlaceC LAEN pCHANT_START
				MoveC LAEN pCHANT_TALK
				AddControl LAEN LookAtTurn LORDBANE

				UUSay
				UUComplete LAEN

				//"Laen - your return is most timely. What news do you bring?"
				QuickSay lb0017
				LookAtTurnFollow LORDBANE LAEN
				Wait 750
				LookAtTurnFollow P LAEN

				//more bloodkin arrive to watch the scene

				RemoveC TWM_INJBKF1
				RemoveC TWM_INJBKM2
				PlaceC TWM_INJBKF1 pDOORWAY1
				PlaceC TWM_INJBKM2 pDOORWAY3
				Engage TWM_INJBKF1 P 600
				Engage TWM_INJBKM2 P 600

				//Chant arrives and speaks

				UUComplete LAEN
				LookAtTurn LAEN LORDBANE
				UUSay

				//"...Lord Crux...was in league with Lightstealer...both...but pawns of the demon Revenants."
				Say dawmb1 LAEN

				//"This is grave news indeed...we should strike now..."
				Say lb0018
				LookAtTurnFollow P LORDBANE

				//"Bloodkin! Let it be known that we march on Totalaran!"
				QuickSay lb0020

				QLAdd ql025 qlt025 qlb025

				//more bloodkin arrive at a run

				RemoveC TWM_INJBKF3
				RemoveC TWM_INJBKM4
				PlaceC TWM_INJBKF3 pDOORWAY1
				PlaceC TWM_INJBKM4 pDOORWAY2
				SetWalkType TWM_INJBKF3 RUN
				SetWalkType TWM_INJBKM4 RUN
				Engage TWM_INJBKF3 LORDBANE 1200
				Engage TWM_INJBKM4 LAEN 1200

				Wait 1500

				//surviving guardsmen arrive at a run

				PlaceC BANE_GUARD1 pDOORWAY1
				PlaceC BANE_GUARD2 pDOORWAY2
				PlaceC BANE_GUARD3 pDOORWAY3
				PlaceC BANE_GUARD4 pDOORWAY4
				IF ISDEAD-BANE_GUARD1
					RemoveC BANE_GUARD1
				ENDIF
				IF ISDEAD-BANE_GUARD2
					RemoveC BANE_GUARD2
				ENDIF
				IF ISDEAD-BANE_GUARD3
					RemoveC BANE_GUARD3
				ENDIF
				IF ISDEAD-BANE_GUARD4
					RemoveC BANE_GUARD4
				ENDIF
				SetWalkType BANE_GUARD1 RUN
				SetWalkType BANE_GUARD2 RUN
				SetWalkType BANE_GUARD3 RUN
				SetWalkType BANE_GUARD4 RUN
				Engage BANE_GUARD1 P 1200
				Engage BANE_GUARD2 LORDBANE 1200
				Engage BANE_GUARD3 LORDBANE 1200
				Engage BANE_GUARD4 LORDBANE 1200

				UUSay
				
				RunS PalFadeBLACK

				//restore sensible behaviour
				SetWalkType TWM_INJBKF3 WALK
				SetWalkType TWM_INJBKM4 WALK
				SetWalkType BANE_GUARD1 WALK
				SetWalkType BANE_GUARD2 WALK
				SetWalkType BANE_GUARD3 WALK
				SetWalkType BANE_GUARD4 WALK

				SetChoiceToExit
				DrawSwordRemember

				//tidy up slackers...
				RemoveC LORDBANE
				RemoveC LAEN

				Remove gt_TWM_DENIZENS_READY

				RemoveC BANE_GUARD1
				RemoveC BANE_GUARD2
				RemoveC BANE_GUARD3
				RemoveC BANE_GUARD4
				RemoveC TWM_GUARD1
				RemoveC TWM_GUARD2
				RemoveC TWM_INJBKM1
				RemoveC TWM_INJBKM2
				RemoveC TWM_INJBKM3
				RemoveC TWM_INJBKM4
				RemoveC TWM_INJBKF1
				RemoveC TWM_INJBKF2
				RemoveC TWM_INJBKF3
				RemoveC TWM_INJBKF4

				PostMsg t_SP_SOUTH

			CASE 0
				//Leave

				//"Farewell, young traveller. you will always be welcome in my home."
				Say lb0022
		ENDSWITCH
	ENDWHILE
camcut p
setcammovenormal
NormalCam
	WideScreen FALSE
END
/////////////////////////////////////////////////////////////////////

VIG TalkToChant  MSG-iLAEN

	Widescreen TRUE
	EngageAndFace P LAEN

    IF !mj_DEFEAT_GARGOS_2
        Say dawm01
    ELSE
        IF  !gd_CHANT_AFTER_TALENDRAH
            Add gd_CHANT_AFTER_TALENDRAH
            Say dawm07
        ELSE
            Say dawm08
        ENDIF
    ENDIF

	ResetChoice
	WHILE !MenuExit
		ClearChoices

		// Madrigal
		AddChoice 1 txch01

		// Lord Bane
		AddChoice 2 txpw04

		// Blood Master
		AddChoice 3 txpw08

		// Talendrah
		AddChoice 4 txwm04

        // Leave
		AddChoice 0 tx0003

		GetChoice LAEN

		SWITCH Choice
			CASE 1
        		// Madrigal
                IF !mj_DEFEAT_GARGOS_2
                    Say dawm02
                ELSE
                    Say dawm09
                ENDIF

			CASE 2
				// Lord Bane
                Say dawm03

			CASE 3
				// Blood Master
                Say dawm04

			CASE 4
				// Talendrah
                Say dawm05

			CASE 0
                // Leave
                Say dawm06

		ENDSWITCH
	ENDWHILE
	Widescreen FALSE

END

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

VIG WhiteMoonCeremony   gd_PLACED_WHITE_MOON_CEREMONY && !gd_DONE_WHITE_MOON_CEREMONY

camcut pos01
freecam
	widescreen true
	RunS PalFadeRPG

	UnDrawSwordRemember
setcammoveconstant 10
campan pos02
	ChangeProfileToIdentified mbloodkin_chant
    QuickSay    on0001
    Wait        1000
    Capture     WMC_BKMONK  cM_TALK_CROWD1
    UUComplete  WMC_BKMONK
    Capture     WMC_BKMONK  cM_TALK_CROWD2
    UUComplete  WMC_BKMONK

    LookAtTurn      WMC_BKMONK  P
    UUComplete      WMC_BKMONK

    UUSay
    QuickSay on0002
    Wait        500
    Capture     WMC_BKMONK  cM_TALK_REFER_OTHER_PERSON1
    UUComplete  WMC_BKMONK
    //Capture P       cM_V5_STAND1

    Wait        500
    UUSay

    Capture LAEN    cM_V5_STAND1

    LookAtTurn      P       LAEN
    UUComplete      LAEN
    LookatTurn      LAEN    P

    UUComplete      P
    UUComplete      LAEN

    Capture         P       cM_OBJ_ACCEPT_1H1
    Capture         LAEN    cM_OBJ_ACCEPT_1H1

    UUComplete      P
    UUComplete      LAEN

    AwardOb         LAEN    bloodmaster blood_master
	IF POS-P-BLOODMASTER
		DeleteObjectsInBackpackWithID P bloodmaster
	ENDIF


    LookAtTurn      LAEN    WMC_BKMONK
    UUComplete      LAEN

    QuickSay        on0003
    Wait            1000
    Capture         WMC_BKMONK   cM_TALK_REFER_OTHER_PERSON2

    UUSay
camcut pos03

    LookAtTurn      LAEN    WMC_BLOODKIN1
    UUComplete      LAEN

    QuickSay        dawmc1
    Wait            500
    Capture         LAEN    cM_HOLD_OBJ_ALOFT1
    UUComplete      LAEN
    Capture         LAEN  cM_TALK_CROWD2

    // Bloodkin cheer
    Capture         WMC_BLOODKIN1   cM_CHEER1
    Capture         WMC_BLOODKIN2   cM_CHEER2
    Capture         WMC_BLOODKIN3   cM_CHEER4
    Capture         WMC_BLOODKIN4   cM_CHEER4
    Capture         WMC_BLOODKIN5   cM_CHEER2
    Capture         WMC_BLOODKIN6   cM_CHEER1
    Capture         WMC_BLOODKIN7   cM_CHEER1
    Capture         WMC_BLOODKIN8   cM_CHEER2
    Capture         WMC_BLOODKIN9   cM_CHEER4
    Capture         WMC_BLOODKIN10  cM_CHEER1
    Capture         TWM_INJBKM1     cM_CHEER4
    Capture         TWM_INJBKM2     cM_CHEER2
    Capture         TWM_INJBKM3     cM_CHEER1
    Capture         TWM_INJBKM4     cM_CHEER4
    Capture         TWM_INJBKF1     cM_CHEER2
    Capture         TWM_INJBKF2     cM_CHEER2
    Capture         TWM_INJBKF3     cM_CHEER1
    Capture         TWM_INJBKF4     cM_CHEER4


    //Capture         P               cM_CLAPPING1

    LookAtTurn      LAEN    WMC_BKMONK

	PlaySFXPerson cheer6.wav WMC_BLOODKIN1
	wait 500
	PlaySFXPerson cheer3.wav WMC_BLOODKIN10

    UUComplete      LAEN

    LookAtTurn      WMC_BKMONK  P
    UUComplete      WMC_BKMONK

    LookAtTurn      P   WMC_BKMONK

   Wait            250
    UUSay
    QuickSay on0004
    Wait            250
camcut pos02    
 Capture         WMC_BKMONK  cM_TALK_REFER_LEFT1
    UUComplete      WMC_BKMONK

    MoveCDir        WMC_BKMONK  pMN_MONK_GIVE
	AddFilter		WMC_BKMONK	Timeout 5
    UUComplete      WMC_BKMONK


    IF mj_FOUND_MESSENGER
        UUSay
        QuickSay    on0005
        Wait        1000
        Capture      WMC_BKMONK  cM_TALK_REFER_OTHER_PERSON2
        UUComplete      WMC_BKMONK
 
   ELSE
setcammoveconstant 2
campan pos04
        // player is given messenger
        UUSay
        QuickSay on0006
        //Capture         WMC_BKMONK  cM_HOLD_OBJ_ALOFT2
        //UUComplete      WMC_BKMONK
		Wait 1500
        Capture         P           cM_OBJ_ACCEPT_1H1
        Capture         WMC_BKMONK  cM_TOSS_GENTLE

        UUComplete      P

        AwardOb         P   mess2   "messenger"
        UUComplete      WMC_BKMONK
    ENDIF

    UUSay
    QuickSay on0007
    Capture         P           cM_OBJ_ACCEPT_1H1
    Capture         WMC_BKMONK  cM_TOSS_GENTLE

    AwardOb         P   talendrah   "book"

    UUComplete      P
    UUComplete      WMC_BKMONK

    Capture         WMC_BKMONK  cM_TALK_GENERAL1
    UUComplete      WMC_BKMONK


    LookAtTurn      LAEN    WMC_BLOODKIN1
    UUComplete      LAEN

    UUSay
    QuickSay dawmc2
    Wait            500
    Capture         LAEN  cM_TALK_CROWD2
    UUComplete      LAEN

    LookAtTurn      LAEN    P
    UUComplete      LAEN

	UUSay
    QuickSay        dawmc3
    Wait            1000
    Capture         LAEN  cM_TALK_REFER_RIGHT1
    UUComplete      LAEN
    Capture         LAEN  cM_TALK_REFER_SELF2
    UUComplete      LAEN
	UUSay

    Add     gd_DONE_WHITE_MOON_CEREMONY

    RunS PalFadeBLACK

    RemoveC         WMC_BKMONK

    RemoveC         WMC_BLOODKIN1
    RemoveC         WMC_BLOODKIN2
    RemoveC         WMC_BLOODKIN3
    RemoveC         WMC_BLOODKIN4
    RemoveC         WMC_BLOODKIN5
    RemoveC         WMC_BLOODKIN5
    RemoveC         WMC_BLOODKIN6
    RemoveC         WMC_BLOODKIN7
    RemoveC         WMC_BLOODKIN8
    RemoveC         WMC_BLOODKIN9
    RemoveC         WMC_BLOODKIN10

	RemoveC TWM_INJBKM1
	RemoveC TWM_INJBKM2
	RemoveC TWM_INJBKM3
	RemoveC TWM_INJBKM4
	RemoveC TWM_INJBKF1
	RemoveC TWM_INJBKF2
	RemoveC TWM_INJBKF3
	RemoveC TWM_INJBKF4

    RunS            PlaceTWMDenizens
	Add gt_TALK_TO_TWM_GUARDS
	Remove gt_TWM_DENIZENS_READY

    //ResetStats      P		 OW! OW! OW!

	PostMsg m_pP_CERE_OVER
	camcut P

	// PLACE LAEN SOMEWHERE INTERESTING.
    WanderNotFar LAEN 2 20
    SwitchOnSightOfPlayer LAEN LookAtTurnFollow P
	SetCamMoveNormal
NormalCam
widescreen false
//	DrawSwordRemember
	// Next day message
	Add gt_FADE_NOW_WMC_COMPLETE
	Capture P       cM_V5_STAND1
END

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

VIG BodgyFade ONESEC && gt_FADE_NOW_WMC_COMPLETE && CC-P

	Remove gt_FADE_NOW_WMC_COMPLETE
	MessagePumpLongGreen 223
	HealCharacter P
    RunS PalFadeRPG

END

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