/////////////////////////////////////////////////////////////////////
// MARTKET1.S - PUB
/////////////////////////////////////////////////////////////////////

SETUP

	IF !ce_ANDRUS

		// *** FIRST NIGHT ***

		IF !gt_PLACED_PUB_INTRO_CHARS
			Add gt_PLACED_PUB_INTRO_CHARS
			
			PlaceC WILL pWILL_BAR
			PlaceC EMMA pEMMA_BAR
			PlaceC ALPH pALPH_BAR
			PlaceC BARTH pBARTH_BAR

            IF  gd_DEMOING_INN
                Remove  gd_DEMOING_INN
			    RemoveC LAEN
            ENDIF
		ENDIF

	ELSE

		// *** TIDY UP AFTER FIRST NIGHT ***

		IF gt_PLACED_PUB_INTRO_CHARS

			Remove gt_PLACED_PUB_INTRO_CHARS

			RemoveC WILL
			RemoveC EMMA
			RemoveC ALPH
			RemoveC BARTH
			RemoveC LAEN

		ENDIF

		// *** NORMAL PUB BEHAVIOUR ***

		IF !gt_PLACED_WILL_EMMA_STAGE1
			Add gt_PLACED_WILL_EMMA_STAGE1

			PlaceC WILL pWILL_BAR
			PlaceC EMMA pEMMA_BAR
			RunS WillActions
			RunS EmmaActions

			IF gt_EMMA_FLIRT_COUNT>4
				Add gt_WARNED_OFF_EMMA
			ENDIF
		ENDIF

		IF mj_BARTS_ASSAULT
			IF !mj_DEFEAT_BART

				// *** DURING RAT INVASION ***

				IF !gd_INN_PLACED_RATS
					Add gd_INN_PLACED_RATS

					RemoveC WILL
					RemoveC EMMA
					PlaceC WILL pINN_WILL_FIGHT
					PlaceC EMMA pEMMA_INVASION_START

					PlaceC              PB_RAT_1    pPB_RATBEAST_1
					PlaceC              PB_RAT_2    pPB_RATBEAST_2
					PlaceC              PB_RAT_3    pPB_RATBEAST_3

					IDoorOpen   dinn_cellar
				ENDIF
			ELSE

				// *** AFTER RAT INVASION ***

				IF gd_INN_PLACED_RATS
					RemoveC WILL
					RemoveC EMMA
					KillC  PB_RAT_1
					KillC  PB_RAT_2
					KillC  PB_RAT_3

					PlaceC EMMA pEMMA_BAR
					RunS EmmaActions

					//IF !f_WILL_DEAD
					//	PlaceC WILL pWILL_BAR
					//	RunS WillActions
					//	ChangeProfileToDestiny    mcitizen_will
					//ENDIF
				ENDIF
			ENDIF
		ENDIF
	ENDIF


END

VIG TempSetup FALSE

    SetWeather  0 0 0 0 0 0 0 0
	
	//pub fireplace
	AddBigFire 17778 3589

	IF !f_PLAYED_INTRO_PUB_VIG
		CachePortrait BARTH.BIN
		CachePortrait PC1.BIN
		CachePortrait WILLFARS.BIN
		CachePortrait EMMA.BIN
	ELSE
		CachePortrait WILLFARS.BIN
		CachePortrait EMMA.BIN
	ENDIF

END

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

VIG PubInvasion !gd_PLAYED_PUB_INVASION_VIG && mj_BARTS_ASSAULT && !mj_DEFEAT_BART && INAREA-P-INN_DOORWAY
    Add gd_PLAYED_PUB_INVASION_VIG

	Widescreen TRUE

    MoveCDir    P   pP_INVASION_1
    MoveCDir    EMMA    pEMMA_INVASION_1

    UUComplete  EMMA
    UUComplete  P

    QuickSay ema406
    Wait    1500
    Capture EMMA    cM_TALK_REFER_RIGHT2

	AwardOb WILL    	shortsword "sword"

    UUSay
    UUComplete      EMMA

    //MoveC_1tel      P   PB_BAR   pP_INVASION_2  run

	Widescreen FALSE
    RunS EmmaActions

END

VIG PubInvasionPart2 !gt_PUB_INV_2 && mj_BARTS_ASSAULT && !mj_DEFEAT_BART && INAREA-P-INN_CELLAR

	Add gt_PUB_INV_2
	//Widescreen TRUE

   	MeleeAttack     PB_RAT_1
   	MeleeAttack     PB_RAT_2
   	//MeleeAttack     PB_RAT_3
   	MeleeAttack     WILL

//    UUComplete      P
	QuickSay wfa407

	//Widescreen FALSE
    ChangeProfileToNotDestiny    mcitizen_will
	SetHP WILL 500

    GiveSightOfPlayerTo     PB_RAT_3
    AttackDemo2     PB_RAT_3
END

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

VIG PubInvasionWillDeath    mj_BARTS_ASSAULT && !f_WILL_DEAD && ISDEAD-WILL
    Add f_WILL_DEAD
END

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

VIG PubIntro !f_PLAYED_INTRO_PUB_VIG
// && INAREA-P-INN_DOORWAY

	Add f_PLAYED_INTRO_PUB_VIG

	Widescreen TRUE
StartRecord
	UnDrawSwordRemember
	playmusic rpg17.wav
	freecam
	camcut start
	setcammoveconstant 5

	// *** PUB VIGNETTE START ***

    campan         bebar02

	// *** ARRIVE IN THE INN ***
	MoveCDir		P		pP_IN_BAR 

	LookAtTurnFollow	WILL	P 
	LookAtTurnFollow	EMMA	P 
	LookAtTurnFollow	BARTH	P 
	LookAtTurnFollow	ALPH	P 
	UUComplete			P 

	Capture			P		cM_V6_LOOK_AROUND2_BETTER 
	UUComplete		P 


	// *** INTRODUCTIONS ***
	

	LookAt			BARTH	WILL 
	UUComplete		BARTH
	//"Looks like you got trouble Will..."
	QuickSay		ba0001  BARTH.BIN
	Capture			BARTH	cM_TALK_AGREE2
	LookAtTurn		WILL	P
	wait 100
	LookAtTurn		ALPH	P
	wait 100
	LookAtTurn		EMMA	P
	UUSay
	LookAt			BARTH	P 
	camcut pos02
	LookAtTurn		P		BARTH 
	UUComplete		P
	//"I'm no trouble good sirs, my lady."
	QuickSay		Hx0020 
	Capture			P		cM_TALK_DISAGREE2
	UUSay
	

	LookAt			P		EMMA 
	Capture			BARTH	cM_TALK_AGREE2
	//"My lady is it? Such decorum..."
	camcut pview10
QuickSay				ba0002 BARTH.BIN
	LookAt			WILL	BARTH 
	UUComplete		WILL 
	LookAt			WILL	EMMA 
	
	UUSay
	//Emma. In the back. There may be trouble."
	QuickSay		wf0001 
	UUComplete		WILL
	Capture			WILL	cM_TALK_REFER_RIGHT1
	camcut          andyca2
	ChangeProfileToIdentified Mcitizen_Emma

	// *** EMMA WALKS AWAY ***
	
	Wait 500
	MoveCDir		EMMA	pEMMA_PAUSE 
	UUComplete		EMMA 
	LookAtTurn		EMMA	P 
	Wait 500
	LookAt			P		EMMA
	camcut closef
	UUSay
	//"He doesn't look like trouble to me."
	Say				em0001 
	LookAtTurn		P		WILL
    camcut          wilbur
	LookAtTurn		WILL	P
	//"No one ever does."
	Say				wf001a
    camcut          andyca2

	UUComplete		EMMA     
	MoveCDir		EMMA	pEMMA_LEAVE 

	// *** CONVERSE ***
	
	LookAtTurn		WILL	P 
	Capture			P		cM_TALK_DISAGREE3

	//"I believe you have the wrong impression...looking for Andrus...my name's-"
	Say				Hx0021 
	LookAtTurn		P		WILL 
    camcut         wilbur
	Capture			WILL		cM_TALK_QUESTION2

	//We don't need to know your name...what did you want with the old man?"
	Say				wf0002 
    camcut       pos02
	Capture			P		cM_TALK_AGREE3

	//"He's my uncle."
	Say				Hx0022 
    camcut        wilbur
	Capture			WILL		cM_TALK_SURPRISE2
	LookAtTurn		ALPH	P

	//Uncle eh? Andrus is as mad as a March hare."
	Say				wf0003 
	camcut pos04
 
	Capture			ALPH		cM_TALK_REFER_OTHER_PERSON1

	//"...I say give the youngster a chance...looks to me like he's been on the road for days."
	QuickSay		ag001a 
	LookAt			P		ALPH 
	LookAtTurn		BARTH	ALPH 
	LookAt			WILL	ALPH 
	UUComplete		ALPH
	Capture			ALPH		cM_TALK_REFER_OTHER_PERSON2
	UUSay
	LookAtTurn		BARTH	P 

	//"Now then, why'd you be after the old man in this weather?"
	Say				ag001c 
	LookAt			ALPH	P 
	LookAtTurn		WILL	P 
    camcut         pos02
	Capture			P			cM_TALK_QUESTION1

	//"My father recently passed away...he spoke...of Madrigal, and of...my uncle..."
	Say				Hx0023 
    camcut         pos04

	LookAt			WILL	ALPH
    
	//"Ah lad, I'm sorry for your loss...Andrus...talks about...fairies and Fay...or the wars."
	QuickSay				ag0002 
	Wait 2000

	// *** LAEN CHANT ARRIVES ***
	PlaceC			LAEN	pCHANT_JUST_INSIDE
    MoveC			LAEN	pLAEN_AT_BAR  
	LookAtFollow	WILL	LAEN
	UUSay

camcut          andyca2

    Wait 500
	//"My uncle was a soldier?"
	Say				Hx0024 
	//RemoveC			EMMA

	camcut        pos04
	//"Aye...officer...and his brother, your father..."
	QuickSay		ag0003 
    

	UUComplete		LAEN 

	LookAtTurn		LAEN	BARTH
	UUSay

	//"My father? But I know nothing of these battles."
	Say				Hx0025 
    camcut         wilbur

	//"Better it stays that way."
	Say				wf0004 
    camcut          barth01

	//"Better you know nothing."
	UUComplete		LAEN
	Capture			LAEN	cM_DUST_OFF_SNOW 
	Wait			450
	FX_DustSnow		LAEN
	Say				ba0004 BARTH.BIN
	
    UUComplete		LAEN 

	LookAtTurnFollow	P		LAEN 
	LookAtFollow	ALPH	LAEN 
	LookAtFollow	BARTH	LAEN 
	LookAtFollow	LAEN	P 
	camcut leo2

	//"...We would do well to remember those times..."
	Say				da0001
	//"...people don't remember..."
	Say				da001x

//	Capture			LAEN	cM_DUST_OFF_SNOW 
//	Wait			450
//	FX_DustSnow		LAEN
//	UUComplete		LAEN 
	LookAtTurn		LAEN	P 
	UUComplete		LAEN

    Capture			LAEN	cM_GREETING_NOD 
	UUComplete		LAEN
	//"The roads are dark and troublesome this night friend."
	Say				da001a 
	camcut start

	REM				*** Vignette Variables ***

	IF ce_RAAL
		//"I came across an old shack...by a tower, in the forest."
		Say			Hx0026
		//"That tower lies close to the house of Andrus."
		
say 			da0002
		MessagesOff 
		QLDelete ql002
		QLAdd ql003 qlt003 qlb003
		MessagesOn
		LookAt		WILL	P 
		LookAt		P		WILL
		//"So I take the north road?"
		Say			Hx0027 
        camcut pview
		//"If your heart's still set on it, yes..."
		Say			wf0005 
		
	ENDIF

	LookAt			P		WILL 
	LookAt			LAEN	WILL 
	LookAt			BARTH	WILL 
	LookAt			ALPH	WILL 
	LookAt			WILL	P 
	camcut wilbur

	IF !ce_RAAL
		//"...You know where to come for ale...you want one or not?"
		Say				wf0006 
	ENDIF

	// *** PUB VIGNETTE END ***

	MoveCDir		WILL	pWILL_BAR  
	MoveCDir		LAEN	pLAEN_AT_BAR
	Wait 100 
	MoveCDir		BARTH	pBARTH_BAR  
	Wait 250
	MoveCDir		ALPH	pALPH_BAR  

StopRecord

	Widescreen FALSE
	setcammovenormal
NormalCam
	camcut p

	UUComplete WILL
	UUComplete LAEN
	UUComplete BARTH
	UUComplete ALPH

	RunS WillActions
	RunS EmmaActions
	RunS AlphActions
	RunS BarthActions
	RunS LaenActions

END

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

VIG WillActions FALSE

	MoveCDir	WILL	pWILL_BAR
	AddControl	WILL	DelayControl 1 4
	AddControl	WILL	DelayControl 8 2
	AddControl	WILL	Capture cM_V3_WIPE_BAR2
	AddControl	WILL	Capture cM_V3_WIPE_BAR3
	AddControl	WILL	Capture cM_V3_WIPE_BAR4
	AddControl	WILL	Capture cM_V3_POUR_DRINK1
	AddControl	WILL	Capture cM_V3_POUR_DRINK2
	SequenceRandomlySelects WILL	

END

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

VIG EmmaActions FALSE

	MoveC		EMMA	pEMMA_BAR
	AddControl	EMMA	DelayControl 3 5
	AddControl	EMMA	Filter Timeout 4 Filter FailCompletes LookAtTurnFollow P
	AddControl	EMMA	TDCapture cF_PULL_LEVER		pEM_WORK1	10 3
	AddControl	EMMA	TDCapture cF_PULL_LEVER		pEM_WORK2	10 3
	AddControl	EMMA	TDCapture cF_CLEAN_GLASS1	pEM_WORK3	10 3
	AddControl	EMMA	TDCapture cF_CLEAN_GLASS1	pEM_WORK4	10 3
	SequenceRandomlySelects EMMA

END

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

VIG AlphActions FALSE

	Capture		ALPH	cM_DRINK_ALE
	AddControl	ALPH	LookAtTurn	pALPH_LOOK
	AddControl	ALPH	DelayControl 1 4
	AddControl	ALPH	DelayControl 8 2
	SequenceRandomlySelects	ALPH

END

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

VIG BarthActions FALSE

	Capture		BARTH	cM_DRINK_ALE
	AddControl	BARTH	LookAtTurn	pBART_LOOK
	AddControl	BARTH	DelayControl 1 4
	AddControl	BARTH	DelayControl 8 2
	AddControl	BARTH	Capture cM_V16_HANDS_HIPS_LOOK_AROUND1
	AddControl	BARTH	Capture cM_V16_HANDS_HIPS_LOOK_AROUND2
	AddControl	BARTH	Filter Timeout 10 Filter FailCompletes LookAtTurnFollow EMMA
	SequenceRandomlySelects	BARTH

END

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

VIG LaenActions FALSE

	Capture		LAEN	cM_DRINK_ALE
	AddControl	LAEN	LookAtTurn	pLAEN_LOOK
	AddControl	LAEN	DelayControl 1 4
	AddControl	LAEN	DelayControl 8 2
	AddControl	LAEN	Filter Timeout 5 Filter FailCompletes LookAtTurnFollow P
	SequenceRandomlySelects	LAEN

END

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

VIG TalkToWill MSG-iWILL && (mj_DEFEAT_BART || !mj_BARTS_ASSAULT)

	Widescreen TRUE
	UnDrawSwordRemember
	IF INAREA-P-behind-bar
		EngageAndFace P WILL
	ELSE
		MoveCDir P pP_TALK_WILL
		UUComplete P
		Face P WILL
	ENDIF

	IF !mj_SLEPT_AT_ANDRUS

		// *** First night at Inn ***

		//"Ah. A traveller in need of refreshment, eh? What will it be?"
		Say wf0012
		IF !ce_WILL
			Add ce_WILL
			//"Name's Will - Will Farshore..."
			Say wf0007
			ChangeProfileToIdentified Mcitizen_Will
		ENDIF
		
		ResetChoice
		WHILE !MenuExit
			ClearChoices

			//Local Talk
			AddChoice 2 tx0005

			//Trade
			AddChoice 1 tx0006

			//Leave
			AddChoice 0 tx0003

			GetChoice WILL 

			SWITCH Choice
				CASE 2
					//Local Talk

					//"We're not keen on strangers...This is a quiet town..."
					Say wf0008 
				CASE 1
					MessagesOff
					ShopPanel WILL_SHOP 100 65 WILL BUYSELL
					MessagesOn
			ENDSWITCH
		ENDWHILE

	ELSE

		IF !mj_BEEN_TO_HEX
			// *** Stage 1.0 & 1.1 interactions ***

			//"Ah. A traveller in need of refreshment, eh? What will it be?"
			Say wf0012
			IF !ce_WILL
				Add ce_WILL
				//"Name's Will - Will Farshore..."
				Say wf0007
				ChangeProfileToIdentified Mcitizen_Will
			ENDIF

			ResetChoice
			WHILE !MenuExit
				ClearChoices
	
				//Work
				AddChoice 1 tx0004

				IF !f_JAKE_DEAD && gt_TAKEN_CASKET
					//Jake
					AddChoice 2 tx0019
				ENDIF
				
				//Emma
				AddChoice 3 txi001

				//Trade
				AddChoice 4 tx0006

				//Leave
				AddChoice 0  tx0003 
	
				GetChoice WILL 
	
				SWITCH Choice
					CASE 1
						//Work

						IF !gt_TAKEN_CASKET
							Capture WILL cM_PICK_GROUND
							//"In need of gold, eh?...deliver this to Jake...west...then north...can't miss it."
							Say wf0015

							UUComplete WILL
	
							AwardOb P casket "casket"
	
							Add gt_TAKEN_CASKET
							Add co_JAKE
							QLAdd ql008 qlt008 qlb008
						ELSE
							//"Sorry...nothing...aside from delivering that package to Jake."
							    Say wf015a
						ENDIF

					CASE 2
						//Jake

						//"You'll find Jake at the old estate...west...north...can't miss it."
						Say wf0016

					CASE 3
						//Emma

						IF gg_FLIRTED_A_LOT
							//"I don't want you to talk to her..."
							Say wf0019

							Add gt_WARNED_OFF_EMMA
						ELSE
							IF gg_FLIRTED_A_BIT
								//"You be careful...Don't think I haven't noticed."
								Say wf0018
							ELSE
								//"Emma is a good girl..."
								Say wf0017
							ENDIF
						ENDIF

					CASE 4
						//Trade

						MessagesOff
						ShopPanel WILL_SHOP 100 65 WILL BUYSELL
						MessagesOn

					CASE 0
						//Leave

						//"There'll be a beer waiting"
						Say wf0024
				ENDSWITCH
			ENDWHILE

		ELSE
			IF !mj_DEFEAT_GARGOS_2
				// *** Stage 1.2 & Stage 2 interactions ***

				IF !ce_WILL
					Add ce_WILL
					//"Name's Will - Will Farshore..."
					Say wf0007
					ChangeProfileToIdentified Mcitizen_Will
				ELSE
					//"Hello..."
					Say wf024a
				ENDIF

				ResetChoice
				WHILE !MenuExit
					ClearChoices

					//Work
					AddChoice 1 tx0004

					//Emma
					AddChoice 2 txi001

					//Trade
					AddChoice 3 tx0006

					//Leave
					AddChoice 0 tx0003

					GetChoice WILL

					SWITCH Choice
						CASE 1
							//Work

							//"I'm sorry, I don't have anything..."
							Say wf5001

						CASE 2
							//Emma

							//"For her own good...leave her be..."
							Say wf5002

						CASE 3
							//Trade

							MessagesOff
							ShopPanel WILL_SHOP 105 65 WILL BUYSELL
							MessagesOn

						CASE 0
							//Leave

							//"Try not to do any...vanishing again..."
							Say wf5004

					ENDSWITCH
				ENDWHILE
			ELSE
				IF !mj_RECOVER_CROWN
					// *** Stage 3 interactions ***

					IF !gt_WILL_STAGE_3_INTRO && f_ANDRUS_DEAD
						Add gt_WILL_STAGE_3_INTRO
						//"So you've returned..."
						Say wf0025
					ELSE
						//"Here's trouble..."
						Say wf0026
					ENDIF

					ResetChoice
					WHILE !MenuExit
						ClearChoices

						//Soldiers
						AddChoice 1 txwf01

						//Merchants
						AddChoice 2 txwf02

						//Blood-kin
						AddChoice 3 txh202

						IF co_ALKADATH
							AddChoice 4 tx0118
						ENDIF

						//Trade
						AddChoice 5 tx0006

						//Leave
						AddChoice 0 tx0003

						GetChoice WILL

						SWITCH Choice
							CASE 1
								//Soldiers

								//"...Their leader is...Al'Kadath..."
								Say wf0027
								Add co_ALKADATH

							CASE 2
								//Merchants

								//"...bad for business...Especially that Delgar Dim..."
								Say wf0028

							CASE 3
								//Blood-kin

								//"...whole group of them...heading...west..."
								Say wf0029

							CASE 4
								//Al'Kadath

								//"...in Barthelago's old shop..."
								Say wf0030

							CASE 5
								//Trade

								//"I suppose your coin is as good as anyone else's."
								Say wf0031

								MessagesOff
								ShopPanel WILL_SHOP 100 65 WILL BUYSELL
								MessagesOn

								//"Well at least you've got good taste in food."
								Say wf0032

							CASE 0
								//Leave

								//"...good luck to you."
								Say wf0033

						ENDSWITCH
					ENDWHILE
				ELSE
					// *** Stage 4 interactions ***
					IF !mj_BARTS_ASSAULT
						IF !gt_WILL_4_INTRO
							Add gt_WILL_4_INTRO
							Say wfa401
						ELSE
							Say wfa402
						ENDIF

						ResetChoice
						WHILE !MenuExit
							ClearChoices
							
							IF !mj_DEFEAT_AL
								//Al'Kadath
								AddChoice 1 tx0118
							ENDIF

							//Trade
							AddChoice 2 tx0006

							//Leave
							AddChoice 0 tx0003

							GetChoice WILL

							SWITCH Choice
								CASE 1
									//Al'Kadath

									Say wfa403

								CASE 2
									//Trade

									Say wfa404

									MessagesOff
									ShopPanel WILL_SHOP 100 65 WILL BUYSELL
									MessagesOn

									Say wfa405
							ENDSWITCH
						ENDWHILE
						Say wfa406
					ELSE
						IF !mj_DEFEAT_BART
							Say wfa407
						ELSE
							IF !mj_ACTIVATE_GATEWAY
								Say wfa408
							ELSE
								Say wfa409
							ENDIF
						ENDIF
					ENDIF
				ENDIF
			ENDIF
		ENDIF
	ENDIF
	//MoveCDir		WILL	pWILL_BAR  
	//UUComplete WILL
	RunS WillActions
//	DrawSwordRemember
	Widescreen FALSE

END

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

VIG TalkToBartIntro MSG-iBARTH

	// *** START CONVERSATION WITH BART ***

 	Widescreen TRUE
	EngageAndFace	P		BARTH 

	IF !ce_BARTH
		//"I'm Barthelago. I run the Apothecary..."
		Say ba0005 BARTH.BIN
		ChangeProfileToIdentified Mcitizen_Bart
		Add ce_BARTH
	ENDIF

	ResetChoice
	WHILE !MenuExit
		ClearChoices

		//Local Talk
		AddChoice 1 tx0005

		//Exit
		AddChoice 0 tx0003

		GetChoice BARTH BARTH.BIN
		
		SWITCH Choice
			CASE 1
				//Local Talk

				//"If you need potions...come to me..."
				Say ba005a BARTH.BIN
				//"...however, your purse may be lacking...work...Tomorrow...see me then."
				Say ba005b BARTH.BIN
		ENDSWITCH
	ENDWHILE

	RunS BarthActions
	Widescreen FALSE
	//MoveCDir		BARTH	pBARTH_BAR  
END

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

VIG TalkToAlphIntro MSG-iALPH

	Widescreen TRUE
	EngagePoint P pP_APPROACH_AL 150

//	AddControl P EngageAndFace ALPH
//F1.0P swap for...
	UUComplete P
	LookAtTurnFollow ALPH P
	AddControl P EngagePoint pALPH_BAR 400
	AddControl P LookAtTurnFollow ALPH
	Wait 750
//...end swap

	// *** START CONVERSATION WITH ALPH ***

	IF !ce_ALPH
		//"The name's Alphonse, lad."
		Say ag0004
		ChangeProfileToIdentified Mcitizen_Alphonse
		Add ce_ALPH
	ENDIF

	//"It looks like you're here for the duration - damn snow..."
	Say ag004a
		
   	ResetChoice
	WHILE !MenuExit
		ClearChoices

		// *** SETUP MENU ***

		//Local Talk
		AddChoice 1  tx0005 

		//Exit
		AddChoice 0  tx0003 
		
		// *** DISPLAY THE MENU ***

        GetChoice ALPH

		SWITCH Choice
			CASE 1
				//Local Talk

				//"...anything you need, see me...But you be careful..."
				Say ag0005 
        ENDSWITCH
    ENDWHILE

	// *** END CONVERSATION WITH ALPH ***

	RunS AlphActions
	Widescreen FALSE
	//MoveCDir		ALPH	pALPH_BAR  
END

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

VIG TalkToChantIntro MSG-iLAEN

	Widescreen TRUE
	EngageAndFace P LAEN

	// *** START CONVERSATION WITH LAEN ***

	//"Welcome...My name is Chant..."
	Say da0003
	ChangeProfileToIdentified Mbloodkin_Chant
	Add ce_LAEN

	ResetChoice
	WHILE !MenuExit
		ClearChoices

		//Local Talk
		AddChoice 1  tx0005 

		//The man with glowing eyes
		IF ce_RAAL
			AddChoice 2  tx0043 
		ENDIF

		//Raal
		IF co_RAAL
			AddChoice 3 tx0032
		ENDIF

		AddChoice 0  tx0003 

		GetChoice LAEN 

		SWITCH Choice
			CASE 1
				//Local talk

				//The little to speak of..."
				Say da0004 

			CASE 2
				//The man with glowing eyes

				//"By your uncle's shack, you say..."
				Say da004a
				//"A Raal...Their kind are rare..."
				Say da004b
				ChangeProfileToIdentified Mdemon_Raal
	
				Add co_RAAL

			CASE 3
				//Raal

				//"A Raal is a thing of memory, and best left that way."
				Say da0019
		ENDSWITCH
	ENDWHILE
	
	// *** INTERACT - LAEN CHANT COMPLETED ***

	RunS LaenActions
	Widescreen FALSE
	//MoveCDir		LAEN	pLAEN_AT_BAR  
END

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

VIG TalkToEmma MSG-iEMMA

	Widescreen TRUE
	EngageAndFace P EMMA

	IF !mj_BEEN_TO_HEX

		// *** Stage 1.0 & 1.1 interactions ***

		IF gt_WARNED_OFF_EMMA
			//"Sorry lover, Will doesn't want me talking to you anymore"
			Say em0008
		ELSE

			//"Hello sir..."
			Say em0002

			ResetChoice
			WHILE !MenuExit
				ClearChoices

				//Buy drink
				AddChoice 1 txe001

				//Flirt
				IF gg_CAN_FLIRT_WITH_EMMA
					AddChoice 2 txe002
				ENDIF

				//Rumours
				AddChoice 3 txe004

				//Leave
				AddChoice 0 tx0003

				GetChoice EMMA

				SWITCH Choice
					CASE 1
						//Buy drink

						IF gg_EMMA_DISCOUNT
							MessagesOff
							ShopPanel	EMMA_SHOP	90		65		EMMA			BUYSELL
							MessagesOn
						ELSE
							MessagesOff
							ShopPanel	EMMA_SHOP	100		65		EMMA			BUYSELL
							MessagesOn
						ENDIF

					CASE 2
						//Flirt

						AddTo gt_EMMA_FLIRT_COUNT 1

						IF gt_EMMA_FLIRT_COUNT=3
							Add gg_FLIRTED_A_BIT
						ENDIF

						IF gt_EMMA_FLIRT_COUNT=4
							//"You do know how to treat a lady right..."
							Say em0005
							Add gg_FLIRTED_A_LOT
							Add gg_EMMA_DISCOUNT
							Set gt_EMMA_FLIRT_COUNT 0
						ELSE
							//"Ooh. Keep that up..."
							Say em0004
							Remove gg_EMMA_DISCOUNT
						ENDIF

					CASE 3
						//Rumours
						
						IF !gt_EMMA_FLIRT_COUNT
							//"Sorry lover..."
							Say em006a
							Add gg_CAN_FLIRT_WITH_EMMA
						ELSE
							Remove gt_EMMA_FOUND_RUMOUR
							WHILE !gt_EMMA_FOUND_RUMOUR
								SWITCH RAND-7
									CASE 0
										//"...Hammer is actually a soldier..."
										Say emr001
										Add gt_EMMA_FOUND_RUMOUR
									CASE 1
										//"Melissa is a strange one..."
										Say emr002
										Add gt_EMMA_FOUND_RUMOUR
									CASE 2
										//"Elric is a weak old man..."
										Say emr003
										Add gt_EMMA_FOUND_RUMOUR
									CASE 3
										IF mj_HEX_COMPASS
											//"...Hammer's...found...ruined temple..."
											Say emr004
											Add co_TEMPLE_OF_SHADOWS
											Add gt_EMMA_FOUND_RUMOUR
										ENDIF
									CASE 4
										IF !co_JAKE
											//"There's this strange man...Jake...strange packages..."
											Say emr005
											Add co_JAKE
											Add gt_EMMA_FOUND_RUMOUR
										ENDIF
									CASE 5
										IF !mj_FREED_FARMERS
											//"One of those rough men...complaining about having to guard the mines..."
											Say emr006
											Add gt_EMMA_FOUND_RUMOUR
										ENDIF
									CASE 6
										//"Barthelago only arrived in town two months back..."
										Say emr007
										ChangeProfileToIdentified Mcitizen_Bart
										Add gt_EMMA_FOUND_RUMOUR
								ENDSWITCH
							ENDWHILE
						ENDIF

					CASE 0
						//Leave

						//"Leaving so soon...?"
						Say em0006
				ENDSWITCH
			ENDWHILE
		ENDIF
	ELSE

		IF !mj_DEFEAT_GARGOS_2

			// *** Stage 1.2 & 2 interactions ***

			IF !gd_EMMA_INITIAL_GREETING
    			//"Hey, lover. You had us all worried..."
    			Say em0009
				Add gd_EMMA_INITIAL_GREETING
			ELSE
    			Say em009a
			ENDIF

			ResetChoice
			WHILE !MenuExit
				ClearChoices

				//Buy drink
				AddChoice 1 txe001

				//Flirt
				AddChoice 2 txe002

				//Rumours
				AddChoice 3 txe004

				//Leave
				AddChoice 0 tx0003

				GetChoice EMMA

				SWITCH Choice
					CASE 1
						//Buy drink
						
						MessagesOff
						ShopPanel	EMMA_SHOP	90		65		EMMA			BUYSELL
						MessagesOn

					CASE 2
						//Flirt

						//"I've never met a warlock before..."
						Say em0010

					CASE 3
						//Rumours

						IF !gt_EMMA_RUMOUR11
							//"Everyone is talking about your disappearance..."
							Say em0011
							Add gt_EMMA_RUMOUR11
						ELSE
							IF !gt_EMMA_RUMOUR13
								//"Chant has gone back...east..."
								Say em0013
								Add gt_EMMA_RUMOUR13
							ELSE
								IF !gt_EMMA_RUMOUR14
									//"Barthelago fled...no one knows where..."
									Say em0014
									Add gt_EMMA_RUMOUR14
								ELSE
									IF !gt_EMMA_RUMOUR15
										//"Elric and Hammer...worried...ancient treaty..."
										Say em0015
										Add gt_EMMA_RUMOUR15
									ELSE
										IF !gd_EMMA_RUMOUR16 && f_USED_FERRY
											Say em0016
											Add gd_EMMA_RUMOUR16
										ELSE
											IF !gd_EMMA_RUMOUR17 && mj_FOUND_BLOODMASTER
												Say em0017
												Add gd_EMMA_RUMOUR17
											ELSE
												//"Sorry lover..."
												Say em006a
											ENDIF
										ENDIF
									ENDIF
								ENDIF
							ENDIF
						ENDIF

					CASE 0
						//Leave

						//"Hey. Don't disappear forever."
						Say em0012
				ENDSWITCH
			ENDWHILE

		ELSE
			IF !mj_RECOVER_CROWN
				// *** Stage 3 interactions ***

				IF !gt_EMMA_STAGE_3_INTRO
    				//"You're back..."
    				Say em0018
					Add gt_EMMA_STAGE_3_INTRO
				ELSE
					//"You look thirsty..."
    				Say em0019
				ENDIF

				ResetChoice
				WHILE !MenuExit
					ClearChoices

					//Buy drink
					AddChoice 1 txe001

					//Flirt
					AddChoice 2 txe002

					//Rumours
					AddChoice 3 txe004

					//Leave
					AddChoice 0 tx0003

					GetChoice EMMA

					SWITCH Choice
						CASE 1
							//Buy drink

							//"What can I get you?"
							Say em0023
							
							MessagesOff
							ShopPanel	EMMA_SHOP	90		65		EMMA			BUYSELL
							MessagesOn

							//"I can't get you anything else?"
							Say em0024

						CASE 2
							//Flirt

							//"I've never met a warlock before..."
							Say em0010

						CASE 3
							//Rumours

							IF !gt_EMMA_RUMOUR20
								//"..."
								Say em0020
								Add gt_EMMA_RUMOUR20
							ELSE
								IF !gt_EMMA_RUMOUR21
									//"..."
									Say em0021
									Add gt_EMMA_RUMOUR21
								ELSE
									IF !gt_EMMA_RUMOUR22
										//"..."
										Say em0022
										Add gt_EMMA_RUMOUR22
									ELSE
										//"Sorry lover..."
										Say em006a
									ENDIF
								ENDIF
							ENDIF

						CASE 0
							//Leave

							//"Be careful..."
							Say em0025
					ENDSWITCH
				ENDWHILE
			ELSE
				IF !gt_EMMA_4_STOCK
					Add gt_EMMA_4_STOCK

					Stock	EMMA_SHOP	ham		3
					Stock	EMMA_SHOP	chicken	5
					Stock	EMMA_SHOP	fish	8
					Stock	EMMA_SHOP	bread	5
					Stock	EMMA_SHOP	apple	10
				ENDIF

				IF !mj_BARTS_ASSAULT
					IF !gt_EMMA_4_INTRO
						Add gt_EMMA_4_INTRO
						Say ema401
					ELSE
						Say ema402
					ENDIF

					ResetChoice
					WHILE !MenuExit
						ClearChoices

						//Trade
						AddChoice 1 tx0006

						//Leave
						AddChoice 0 tx0003

						GetChoice EMMA

						SWITCH Choice
							CASE 1
								//Trade

								IF mj_DEFEAT_AL
									Say ema403
								ENDIF

								MessagesOff
								ShopPanel	EMMA_SHOP	80		65		EMMA			BUYSELL
								MessagesOn

								Say ema404
							CASE 0
								//Leave

								Say ema405
						ENDSWITCH
					ENDWHILE
				ELSE
					IF !mj_DEFEAT_BART
						Say ema406
					ELSE
						IF !mj_ACTIVATE_GATEWAY
							IF f_WILL_DEAD
								Say ema407
							ELSE
								Say ema408
							ENDIF
						ELSE
							IF !gt_EMMA_FINAL_INTRO && !f_WILL_DEAD
								Add gt_EMMA_FINAL_INTRO
								Say ema409
							ELSE
								Say ema410
							ENDIF

							ResetChoice
							WHILE !MenuExit
								ClearChoices

								//Trade
								AddChoice 1 tx0006

								//Leave
								AddChoice 0 tx0003

								GetChoice EMMA

								SWITCH Choice
									CASE 1
										//Trade

										Say ema411

										MessagesOff
										ShopPanel	EMMA_SHOP	80		65		EMMA			BUYSELL
										MessagesOn

										Say ema412
									CASE 0
										//Leave

										Say ema413
								ENDSWITCH
							ENDWHILE
						ENDIF
					ENDIF
				ENDIF
			ENDIF
		ENDIF
	ENDIF
	RunS EmmaActions
	Widescreen FALSE
END

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