/////////////////////////////////////////////////////////////////////
// FAITH1.S - Faith Stone Interiors
/////////////////////////////////////////////////////////////////////

SETUP

	IF !ONMAP-ELRIC
		PlaceC ELRIC pELRIC_AT_HOME
		RunS ElricActions
	ENDIF

	IF !gt_FESTIVAL_PREP
		IF !gt_PLACED_BART
			Add gt_PLACED_BART
			PlaceC BARTH pBARTH_IN_APOTH
			SetObjInLeftHand BARTH ptn_mana_f
			MakeHeld BARTH ptn_heal_f
			RunS BartActions
		ENDIF
	ELSE
		IF gt_PLACED_BART
			Remove gt_PLACED_BART
			RemoveC BARTH
		ENDIF
	ENDIF

	IF !ONMAP-ALPH
		PlaceC ALPH pALPH_IN_STORE
		RunS AlphActions
	ENDIF

	IF mj_DEFEAT_GARGOS_2
		IF !gt_PLACED_ALKADATH
			Add gt_PLACED_ALKADATH
			PlaceC ALKADATH pBARTH_IN_APOTH
		ENDIF
	ENDIF

    IF  mj_RECOVER_CROWN
        RemoveC ALKADATH
    ENDIF

	IF mj_BARTS_ASSAULT
		IF mj_DEFEAT_BART
			RemoveC ALLIS
		ELSE
			IF !gt_PLACED_FAITH1_FINAL
				Add gt_PLACED_FAITH1_FINAL
				PlaceC ALLIS pELRIC_AT_HOME
			ENDIF
		ENDIF
	ENDIF
	
END

VIG TempSetup FALSE

	SetWeather 0 0 0 0 0 0 0 0

	IF mj_DEFEAT_GARGOS_2
		CachePortrait ALKADATH.BIN
	ELSE
		CachePortrait BARTH.BIN
	ENDIF
	CachePortrait ALLIS.BIN
	CachePortrait ALPHONSE.BIN
	CachePortrait ELRIC.BIN

END

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

VIG ElricActions FALSE

	Filter ELRIC Timeout 5 Wander
	AddControl ELRIC Capture cM_STAND1
	AddControl ELRIC Capture cM_STAND2
	AddControl ELRIC Capture cM_STAND3
	AddControl ELRIC Capture cM_STAND4
	AddControl ELRIC Capture cM_ELRIC_LIBRARY_GESTURE1
	SequenceRandomlySelects ELRIC	

END

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

VIG TalkToAllisFinal MSG-iALLIS

	Say ahba01

END

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

VIG TalkToElric MSG-iELRIC

	Widescreen TRUE
	UnDrawSwordRemember
	EngageAndFace P ELRIC

	IF !mj_BEEN_TO_HEX

		// *** STAGE 1.0 CONVERSATION WITH ELRIC ***

		IF !ce_ELRIC
			//"Ah. You must be the young fellow staying with Andrus. I am Elric..."
			Say el0001
		ENDIF
		IF !gt_ELRIC_PAID_BOUNTY && f_COMORRO_DEAD
			Say el001b
			Add gt_ELRIC_PAID_BOUNTY

			IF gt_ELRIC_QL011
				Remove gt_ELRIC_QL011
				QLRemove ql011
			ENDIF
			UUComplete P
			Capture ELRIC cM_TOSS_GENTLE
			Capture P cM_OBJ_ACCEPT_1H1
			UUComplete P
			Gold+ P 100
		ENDIF
		IF ce_ELRIC
			IF gt_ELRIC_QL010 && mj_FREED_FARMERS
				Say el001a
				Remove gt_ELRIC_QL010
				QLRemove ql010
				UUComplete P
				Capture ELRIC cM_TOSS_GENTLE
				Capture P cM_OBJ_ACCEPT_1H1
				UUComplete P
				Gold+ P 100
			ENDIF
			Say el0006
		ELSE
			Add ce_ELRIC
			ChangeProfileToIdentified Mcitizen_Elric
		ENDIF
	
	    ResetChoice
	    WHILE !MenuExit
			ClearChoices
	
			IF !gt_ELRIC_WORK_EXPAND
				IF !mj_FREED_FARMERS && !f_COMORRO_DEAD
					AddChoice 1 tx0004
				ELSE
					AddChoice 10 tx0004
				ENDIF
			ELSE
				IF !mj_FREED_FARMERS && !f_COMORRO_DEAD
					AddChoice 9 txel11
				ENDIF
				AddChoice 10 txel12
			ENDIF
	
			IF POS-P-casket
				//Show casket
				AddChoice 2 tx0018
			ENDIF
	
			IF co_JAKE && !f_JAKE_DEAD
				//Jake
				AddChoice 3 tx0019
			ENDIF

			//The festival
			AddChoice 4 tx0017

			IF co_TEMPLE_OF_SHADOWS
				//Temple of shadows
				AddChoice 5 tx0015
			ENDIF

			IF co_RAAL
				//Raal
				AddChoice 6 tx0032
			ENDIF

			IF co_THEHEX
				//The Hex
				AddChoice 7 tx0025
			ENDIF

			//Trade (Elric wants any volumes he does not possess)
			AddChoice 8 tx0008

			//Identify
			AddChoice 11 txid01

			// Leave
			AddChoice 0 tx0003
	
			GetChoice ELRIC
	
			SWITCH CHOICE
				CASE 1
					//Work

					Say el0007
					Add gt_ELRIC_WORK_EXPAND

				CASE 9

					Say el007b
					Say el007c
					IF !gt_ELRIC_GIVEN_QUESTS
						Add gt_ELRIC_GIVEN_QUESTS
						QLAdd ql010 qlt010 qlb010
						Add gt_ELRIC_QL010
						QLAdd ql011 qlt011 qlb011
						Add gt_ELRIC_QL011
					ENDIF

				CASE 10

					Say el007a
					Add co_DEMONPAPERS

				CASE 2
					//Show casket

					//"...I cannot make out the seal...Perhaps you could show this to Melissa - or that new alchemist?"
					Say el0008

				CASE 3
					//Jake

					//"Jake? Ah yes...in the antiques business...books, charts and curios..."
					Say el0009

				CASE 4
					//The festival

					//"...a long tradition...touch the Faith Stone...to bring luck and prosperity...doesn't seem to..."
					Say el016b

				CASE 5
					//Temple of shadows

					//"...beyond the western mountains...old school...Bishop Mortan...stumbled across a secret..."
					Say el0012
					IF mj_HEX_COMPASS && gt_QL012
						Remove gt_QL012
						MessagesOff
						QLDelete ql012
						MessagesOn
					ENDIF
					Add gt_QL013
					QLAdd ql013 qlt013 qlb013
					//"...phantoms...undead...blood...desecration...terrible...apparitions...portent...doom...shadows...demons..."
					Say el012p

				CASE 6
					//Raal

					//"...evil men - granted immortality by the League of Six...Skorn sought to break the world...thwarted by a powerful Warlock..."
					Say el0015
					//"...his minions still surface...where evil is found..."
					Say el016a

				CASE 7
					//The Hex

					//"...part of a greater design...employed by Harbinger...secrets of powerful magic..."
					Say el019i

				CASE 8
					//Trade

					MessagesOff
					ShopPanel	ELRI_SHOP	100		65		ELRIC			BUYSELL
					MessagesOn

				CASE 11
					//Identify

					MessagesOff
					ShopPanel	ELRI_SHOP	100		65		ELRIC			IDENTIFY
					MessagesOn

				CASE 0
					//Leave

					//"It has been a pleasure...Come back any time."
					Say el0017
			ENDSWITCH
		ENDWHILE
	ELSE

        IF !f_USED_FERRY
		    // *** STAGE 1.2 CONVERSATION WITH ELRIC ***

		    //"Ah, greetings to our new Lord..."
		    Say el0018
	    
			IF !gt_ELRIC_PAID_BOUNTY && f_COMORRO_DEAD
				Say el001b
				Add gt_ELRIC_PAID_BOUNTY

				IF gt_ELRIC_QL011
					Remove gt_ELRIC_QL011
					QLRemove ql011
				ENDIF
				UUComplete P
				Capture ELRIC cM_TOSS_GENTLE
				Capture P cM_OBJ_ACCEPT_1H1
				UUComplete P
				Gold+ P 100
			ENDIF
			IF gt_ELRIC_QL010 && mj_FREED_FARMERS
				Say el001a
				Remove gt_ELRIC_QL010
				QLRemove ql010
				UUComplete P
				Capture ELRIC cM_TOSS_GENTLE
				Capture P cM_OBJ_ACCEPT_1H1
				UUComplete P
				Gold+ P 100
			ENDIF

	        ResetChoice
	        WHILE !MenuExit
			    ClearChoices
	    
			    //Work (Elric wants any volumes he does not possess)
			    AddChoice 1 tx0004
	    
			    IF co_SHADOWGUARD
				    //Shadowguard
				    AddChoice 2 txh001
			    ENDIF

			    IF co_ANVIL_OF_HORATH
				    //Anvil
				    AddChoice 3 tx0056
			    ENDIF

			    IF co_SKULL_OF_ALCHEMY
				    //Skull
				    AddChoice 4 txe601
			    ENDIF

			    IF co_TOME_OF_HADES
				    //Tome
				    AddChoice 5 txe602
			    ENDIF

			    IF co_RAAL
				    //Raal
				    AddChoice 6 tx0032
			    ENDIF

			    IF co_JAKE && !f_JAKE_DEAD
				    //Jake
				    AddChoice 7 tx0019
			    ENDIF

			    //Trade (Elric wants any volumes he does not possess)
			    AddChoice 8 tx0008
		    
				//Identify
				AddChoice 9 txid01

			    // Leave
			    AddChoice 0 tx0003
	    
			    GetChoice ELRIC
	    
			    SWITCH CHOICE
				    CASE 1
					    //Work

					    //"...I have been looking for...The Demon Papers...I will gladly buy them...if you can find them."
					    Say el007a

					    Add co_DEMONPAPERS
					    //"There is little else I require...I have heard rumour of dark plots in Shadowguard..."
					    Say el0019

					    Add co_SHADOWGUARD

				    CASE 2
					    //Shadowguard

					    //"...blah..."
					    Say el0020

				    CASE 3
					    //Anvil

					    //"...beyond the Path of Shadows?"
					    Say el0021

				    CASE 4
					    //Skull

					    //"...to the west..."
					    Say el0022

				    CASE 5
					    //Tome

					    //"...could drive a man to madness."
					    Say el0023

				    CASE 6
					    //Raal

					    //"...evil men - granted immortality by the League of Six...Skorn sought to break the world...thwarted by a powerful Warlock..."
					    Say el0015
					    //"...his minions still surface...where evil is found..."
					    Say el016a

				    CASE 7
					    //Jake

					    //"Jake? Ah yes...in the antiques business...books, charts and curios..."
					    Say el0009

				    CASE 8
					    //Trade

					    MessagesOff
						ShopPanel	ELRI_SHOP	100		65		ELRIC			BUYSELL
						MessagesOn

					CASE 9 
						//Identify

						MessagesOff
						ShopPanel	ELRI_SHOP	100		65		ELRIC			IDENTIFY
						MessagesOn

				    CASE 0
					    //Leave

					    //"Then return soon, sire."
					    Say el0024
			    ENDSWITCH
		    ENDWHILE
        ELSE
			IF !mj_DEFEAT_GARGOS_2
				// *** STAGE 2 CONVERSATION WITH ELRIC ***

				//"Ah, greetings to our new Lord..."
				Say el0018
			
				IF !gt_ELRIC_PAID_BOUNTY && f_COMORRO_DEAD
					Say el001b
					Add gt_ELRIC_PAID_BOUNTY

					IF gt_ELRIC_QL011
						Remove gt_ELRIC_QL011
						QLRemove ql011
					ENDIF
					UUComplete P
					Capture ELRIC cM_TOSS_GENTLE
					Capture P cM_OBJ_ACCEPT_1H1
					UUComplete P
					Gold+ P 100
				ENDIF
				IF gt_ELRIC_QL010 && mj_FREED_FARMERS
					Say el001a
					Remove gt_ELRIC_QL010
					QLRemove ql010
					UUComplete P
					Capture ELRIC cM_TOSS_GENTLE
					Capture P cM_OBJ_ACCEPT_1H1
					UUComplete P
					Gold+ P 100
				ENDIF

				ResetChoice
				WHILE !MenuExit
					ClearChoices

					 // Chant	    
					AddChoice 1 txpw02

					 // Barthelago	    
					AddChoice 2 tx0007

					 // Shadowguard
					AddChoice 3 txh001

					 // Guild of Assassins
					//IF co_THEGUILD
						//AddChoice 6 tx0097
					//ENDIF

					 // Lightstealer
					IF co_LIGHTSTEALER
    					AddChoice 4 txpw07
					ENDIF

					 // Heart of Kinkathra
					//AddChoice 5 txlb08

					//Trade (Elric wants any volumes he does not possess)
					AddChoice 8 tx0008

					//Identify
					AddChoice 9 txid01

					AddChoice 0 tx0003

					GetChoice ELRIC
			
					SWITCH CHOICE
						CASE 1
							// Chant
							Say el2001

						CASE 2
							// Barthelago
							Say el2002
							ChangeProfileToIdentified Mcitizen_Bart

						CASE 3
							// Shadowguard
							Say el2006

						//CASE 6
							// Guild of Assassins
							//Say el2003

						CASE 4
							// Lightstealer
							Say el2005

						//CASE 5
							// Heart of Kinkathra
							//Say el2004

						CASE 8
							//Trade

							MessagesOff
							ShopPanel	ELRI_SHOP	100		65		ELRIC			BUYSELL
							MessagesOn

						CASE 9 
							//Identify

							MessagesOff
							ShopPanel	ELRI_SHOP	100		65		ELRIC			IDENTIFY
							MessagesOn

						CASE 0
							// Leave

							//"Then return soon, sire."
							Say el0024
					ENDSWITCH
				ENDWHILE
			ELSE
				IF !mj_BARTS_ASSAULT
					// *** STAGE 3 CONVERSATION WITH ELRIC ***

					//"Well met, my lord Warlock."
					Say el0030
				
					IF !gt_ELRIC_PAID_BOUNTY && f_COMORRO_DEAD
						Say el001b
						Add gt_ELRIC_PAID_BOUNTY

						IF gt_ELRIC_QL011
							Remove gt_ELRIC_QL011
							QLRemove ql011
						ENDIF
						UUComplete P
						Capture ELRIC cM_TOSS_GENTLE
						Capture P cM_OBJ_ACCEPT_1H1
						UUComplete P
						Gold+ P 100
					ENDIF
					IF gt_ELRIC_QL010 && mj_FREED_FARMERS
						Say el001a
						Remove gt_ELRIC_QL010
						QLRemove ql010
						UUComplete P
						Capture ELRIC cM_TOSS_GENTLE
						Capture P cM_OBJ_ACCEPT_1H1
						UUComplete P
						Gold+ P 100
					ENDIF

					ResetChoice
					WHILE !MenuExit
						ClearChoices

						// Invasion
						AddChoice 1 txel01

						// Crown of Rule
						AddChoice 2 txpi03

						// Dragon Soldiers
						AddChoice 3 txpi02
						//AddChoice 3 tx0117

						// Trade
						AddChoice 4 tx0008

						//Identify
						AddChoice 9 txid01

						//Leave
						AddChoice 0 tx0003

						GetChoice ELRIC
				
						SWITCH CHOICE
							CASE 1
								// Invasion
								Say el0036

							CASE 2
								// Crown of Rule
								Say el0037
								QLAdd ql030 qlt030 qlb030

							CASE 3
								// Dragon Soldiers
								Say el0042

							CASE 4
								// Trade

								MessagesOff
								ShopPanel	ELRI_SHOP	100		65		ELRIC			BUYSELL
								MessagesOn

							CASE 9 
								//Identify

								MessagesOff
								ShopPanel	ELRI_SHOP	100		65		ELRIC			IDENTIFY
								MessagesOn

							CASE 0
								// Leave
								Say el0024
						ENDSWITCH
					ENDWHILE
				ELSE
					// *** STAGE 4 CONVERSATION WITH ELRIC ***
					IF !mj_DEFEAT_BART
						Say elba01
					ELSE
						IF !mj_ACTIVATE_GATEWAY
							IF !gt_ELRIC_4_INTRO
								Say elba02
								Add gt_ELRIC_4_INTRO
							ELSE
								Say elba03
							ENDIF

							ResetChoice
							WHILE !MenuExit
								ClearChoices

								//Trade
								AddChoice 1 tx0008

								//Galdon Thor
								AddChoice 2 txel41

								//Bart
								AddChoice 3 tx0007

								//Skorn
								AddChoice 4 txel42

								//Identify
								AddChoice 9 txid01

								//Leave
								AddChoice 0 tx0003

								GetChoice ELRIC

								SWITCH Choice
									CASE 1
										//Trade

										MessagesOff
										ShopPanel	ELRI_SHOP	100		65		ELRIC			BUYSELL
										MessagesOn

									CASE 2
										//Galdon Thor

										Say elba04

									CASE 3
										//Bart

										Say elba06

									CASE 4
										//Skorn

										Say elba07

									CASE 9 
										//Identify

										MessagesOff
										ShopPanel	ELRI_SHOP	100		65		ELRIC			IDENTIFY
										MessagesOn

								ENDSWITCH
							ENDWHILE
							Say elba09
						ELSE
							Say elba10
						ENDIF
					ENDIF
				ENDIF
			ENDIF
        ENDIF
	ENDIF

	// *** END CONVERSATION WITH ELRIC ***

	RunS ElricActions
	Widescreen FALSE
//	DrawSwordRemember

END

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

VIG BartActions FALSE

	MoveCDir BARTH pBARTH_IN_APOTH
	AddControl BARTH Capture cM_STAND1
	AddControl BARTH Capture cM_STAND2
	AddControl BARTH Capture cM_STAND3
	AddControl BARTH Capture cM_STAND4
	AddControl BARTH Capture cM_BART_RANDOM1_SHAKE
	AddControl BARTH Capture cM_BART_RANDOM2_SHOCK
	AddControl BARTH Capture cM_BART_RANDOM3_STIR
	SequenceRandomlySelects BARTH	

END

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

VIG TalkToBart MSG-iBARTH

	Widescreen TRUE
	UnDrawSwordRemember
	MoveCDir P pP_BY_COUNTER

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

	IF gk_BARTSEENCASKET
		//"Good day, my lord..."
		Say ba010a BARTH.BIN
	else
		//"Mm. The vagrant..."
		Say ba0007 BARTH.BIN
	ENDIF

    ResetChoice
    WHILE !MenuExit
        ClearChoices

		// *** SETUP MENU ***

		//Work
		AddChoice 1 tx0004

		IF gk_BARTSEENCASKET

			//Temple of shadows
			IF co_TEMPLE_OF_SHADOWS
				AddChoice 2 tx0015
			ENDIF

			//The Hex
			IF co_THEHEX
				AddChoice 3 tx0025
			ENDIF
		
			//Guild of assassins
			IF co_THEGUILD
				AddChoice 4 tx0097
			ENDIF

		ENDIF

		//The festival
		AddChoice 5 tx0017

		//Trade
		AddChoice 6 tx0008

		//Show casket
		IF POS-P-casket && !gk_BARTSEENCASKET
			AddChoice 7 tx0018
		ENDIF
	
		//Identify
		AddChoice 9 txid01

		//Leave
		Addchoice 0	tx0003	

        GetChoice BARTH		

		// *** DEAL WITH THE CHOICE ***

	    SWITCH CHOICE
			CASE 1
				//Work
				IF gk_BARTSEENCASKET
					//"Surely not, my lord..."
					Say ba013b BARTH.BIN
				ELSE
					//"Seeking gainful employment...?"
					Say ba013a BARTH.BIN
					QLAdd ql007 qlt007 qlb007
					Add gt_TALKED_BART_ERBS
				ENDIF
			CASE 2
				//Temple of shadows
				//"The old temple? Ah yes..."
				Say ba0022 BARTH.BIN
			CASE 3
				//The tower
				//"Well, I know a little of warlock's hexes..."
				Say ba0025 BARTH.BIN
			CASE 4
				//Guild of assassins
				//"The Guild?...I know nothing...I am still loyal"
				Say ba033c BARTH.BIN
			CASE 5
				//The festival
				IF gk_BARTSEENCASKET
					//"The festival? Ah, yes, I have something special in mind this year..."
					Say ba0033 BARTH.BIN
				ELSE
					//"I'm sure you're looking forward to it...What drivel."
					Say ba033a BARTH.BIN
				ENDIF
			CASE 6
				//Trade

				IF gk_BARTSEENCASKET
					//"Ah...my lord, what can I offer you...?"
					Say bat003 BARTH.BIN

					MessagesOff
					ShopPanel	BART_SHOP	80		65		BARTH			BUYSELL
					MessagesOn

					//"A pleasure to have done business..."
					Say bat004 BARTH.BIN
				ELSE
					//"Ah, the peasant..."
					Say bat001 BARTH.BIN

					MessagesOff
					ShopPanel	BART_SHOP	100		65		BARTH			BUYSELL
					MessagesOn

					//"Very well, if you are finished."
					Say bat002 BARTH.BIN
				ENDIF

			CASE 7
				//Show casket
				Add gk_BARTSEENCASKET
				//"This is yours?"
				Say ba0034 BARTH.BIN

				// Bart thinking fast, dramatic pause
				Wait 3500

				//"Ah. Now I understand...my lord...appropriate rebate...at your immediate disposal."
				Say ba0035 BARTH.BIN

				//"Never fear, my lord...our little secret, yes?"
				Say ba0036 BARTH.BIN
				IF !gt_XP_SCARED_BART
					Add gt_XP_SCARED_BART
					AwardEP xp_SCARED_BART
				ENDIF

			CASE 9 
				//Identify

				MessagesOff
				ShopPanel	BART_SHOP	100		65		BARTH			IDENTIFY
				MessagesOn

	    ENDSWITCH

		//Check Bart's Herb Quest

		IF !gt_HERB_QUEST && gt_TALKED_BART_ERBS
			IF ISINSHOP-BART_SHOP-herb_poison
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-herb_cure
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-herb_heal
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-herb_magic
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-herb_hex
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-herb_str
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-herb_bheal
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-mshrm_dpoison
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-mshrm_sick
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-mshrm_mana
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-mshrm_mad
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-mshrm_poison
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-mshrm_trippy
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-mshrm_acid
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-mshrm_boom
				Add gt_HERB_QUEST
			ENDIF
			IF ISINSHOP-BART_SHOP-mshrm_bigmana
				Add gt_HERB_QUEST
			ENDIF

			IF gt_HERB_QUEST
				AwardEP xp_HERB_QUEST
				QLRemove ql007
			ENDIF
		ENDIF

    ENDWHILE

	// *** END CONVERSATION WITH BART ***

	RunS BartActions
	Widescreen FALSE
//	DrawSwordRemember

END

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

VIG AlphActions FALSE

	MoveCDir ALPH pALPH_IN_STORE
	AddControl ALPH Capture cM_STAND1
	AddControl ALPH Capture cM_STAND2
	AddControl ALPH Capture cM_STAND3
	AddControl ALPH Capture cM_STAND4
	AddControl ALPH Capture cM_V3_WIPE_BAR2
	SequenceRandomlySelects ALPH	

END

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

VIG TalkToAlph MSG-iALPH

	Widescreen TRUE
	UnDrawSwordRemember

//	MoveCDir P pTALK_ALPH

//	Engage P ALPH 500
//	AddControl P LookAtTurn ALPH
//	LookAtTurnFollow ALPH P

	MoveCDir P pTALK_ALPH
	MoveCDir ALPH pALPH_IN_STORE
	UUComplete P
	UUComplete ALPH

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

	IF mj_DEFEAT_BART

		Say ag0061
		Say ag0054

	ELSE

		IF mj_BEEN_TO_HEX
			//"Looking for something in particular, my Lord?"
			Say ag0024
		ELSE
			//"Looking for something in particular?"
			say ag0006
		ENDIF

		ResetChoice
		WHILE !MenuExit
			ClearChoices

			// *** SETUP MENU ***

			//Bart
			AddChoice 1 tx0007

			//Trade
			AddChoice 2 tx0008

			//Bart's departure
			IF mj_BEEN_TO_HEX && !mj_DEFEAT_GARGOS_2
				AddChoice 3 tx8900
			ENDIF

			IF co_ALKADATH && !mj_RECOVER_CROWN
				AddChoice 4 tx0118
			ENDIF

			IF mj_DEFEAT_GARGOS_2 && !mj_RECOVER_CROWN
				//Soldiers
				AddChoice 5 tx0117
			ENDIF

			//Goodbye
			AddChoice 0 tx0003

			// *** DISPLAY THE MENU ***
			GetChoice ALPH

			// *** DEAL WITH THE CHOICE ***
			SWITCH CHOICE
				case 1
					//Bart

					IF mj_DEFEAT_GARGOS_2
						//"...up to no good..."
						Say ag041a
					ELSE
						//"Now there's a man... unscrupulous and arrogant..."
						Say ag0010
						ChangeProfileToIdentified Mcitizen_Bart
					ENDIF
				case 2
					//Trade

					IF mj_BEEN_TO_HEX
						IF mj_DEFEAT_GARGOS_2
							//"...discount."
							Say ag3003
						ELSE
							//"All items at discount, sir..."
							Say ag036a
						ENDIF

						MessagesOff
						ShopPanel	ALPH_SHOP	80		60		ALPH			BUYSELL
						MessagesOn
					ELSE
						MessagesOff
						ShopPanel	ALPH_SHOP	100		65		ALPH			BUYSELL
						MessagesOn
					ENDIF

					IF mj_DEFEAT_GARGOS_2
						//"It's been a pleasure..."
						Say ag3004
					ENDIF

				case 3
					//Bart's departure

					//"That old coot's gone...up to no good, wherever he's gone."
					Say ag036b
				case 4
					//Al'Kadath

					//"...nasty piece of work...in Barthelago's shop..."
					Say ag3001
				case 5
					//Soldiers

					//"Arrived...a few days back. Said they owned the town...Their leader is...called Al'Kadath."
					Say ag3002

					Add co_ALKADATH
				case 0
					//Goodbye

					Capture ALPH cM_S2_FAREWELL4

					IF mj_BEEN_TO_HEX
						//"Do come again. Always a pleasure"
						Say ag0036
					ELSE
						//"Then I bid you good day."
						Say ag0020
					ENDIF
			ENDSWITCH
		ENDWHILE
	ENDIF

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

	RunS AlphActions
	Widescreen FALSE
//	DrawSwordRemember

END

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

VIG TalkToAlKadath MSG-iALKADATH

	Widescreen TRUE
	UnDrawSwordRemember
	EngageAndFace P ALKADATH

	IF ce_ALKADATH
		//"Be at peace, sir."
		Say lk0004
	ELSE
		Add ce_ALKADATH
		//"Ah, the Warlock...I am Captain Al'Kadath..."
		Say lk0001
		ChangeProfileToIdentified Msoldier_Alkadath
	ENDIF

	ResetChoice
	WHILE !MenuExit
		ClearChoices

		//Invasion
		AddChoice 1 txel01

		IF co_CONTINGENCIES
			//Contingencies
			AddChoice 2 txak02
		ENDIF

		//Leave
		AddChoice 0 tx0003

		GetChoice ALKADATH

		SWITCH Choice
			CASE 1
				//Invasion

				//"...the strong should protect the weak...we have...contingencies to ensure...cooperation..."
				Say lk0002

				Add co_CONTINGENCIES

			CASE 2
				//Contingencies

				//"...For each of my mean that suffer...injury, six...shall be executed..."
				Say lk0003

		ENDSWITCH
	ENDWHILE

	//"I'm sure we will...get on...fine."
	Say lk0005
	QLAdd ql029 qlt029 qlb029

	Widescreen FALSE
//	DrawSwordRemember

END

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