
/////////////////////////////////////////////////////////////////////
// COMMON.S
/////////////////////////////////////////////////////////////////////

//VIG MemoryCheck TRUE
//	Memory
//END



VIG PalFadeBLACK FALSE

	Fade 100 3
	UUFade

END

VIG QPalFadeBLACK FALSE

	Fade 100 3

END

VIG PalFadeRPG FALSE

	Fade 0 3
	UUFade

END

VIG QPalFadeRPG FALSE

	Fade 0 3

END

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

VIG EnteringMap FALSE

	IF mj_DEFEAT_LILITH
		DeleteObjectsInWorldWithID mess2
		DeleteObjectsInWorldWithID mess3
	ENDIF

	IF THISLEVEL-altomb4

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-ash

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		//Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-barrowex

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-barrowin

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-blands

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-blood

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-constep

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-dhex1

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-dhex2

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-diamond

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-dune

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-efens

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-emerald

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-emoors

		//Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-eriv

		//Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-extras

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-faith

		//Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
		Remove gt_DONT_FEAR_THE_RAAL
	ENDIF
	IF THISLEVEL-faith1

		//Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-gthor

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-guild

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		//Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-hadesrim

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-jake

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
		Remove gt_DONT_FEAR_THE_RAAL
	ENDIF
	IF THISLEVEL-lilith

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-manorext

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		//Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-manorint

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-market

		//Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-market1

		//Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-mine

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-mires2

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-misc1

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-monex

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		//Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-moon

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		//Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-msewer

		//Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-newhex

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-newshad

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		//Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-nforest

		//Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-obelisk

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
		Remove gt_DONT_FEAR_THE_RAAL
	ENDIF
	IF THISLEVEL-rainbow

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-ravcar

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-ravint1

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-revcamp

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-rockpass

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
		Remove gt_DONT_FEAR_THE_RAAL
	ENDIF
	IF THISLEVEL-shadow

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		//Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-shadow1

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		//Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-shadpass

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		//Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-southsq
		Remove gt_DONT_FEAR_THE_RAAL
	ENDIF
	IF THISLEVEL-talen

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-tert1

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-tortoise

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-voc1

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-well

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		//Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF
	IF THISLEVEL-wsoul1

		Remove gt_RECENT_MUSIC_IN_MADRIGAL
		Remove gt_RECENT_MUSIC_IN_SHADOWGUARD
		Remove gt_RECENT_MUSIC_IN_THARDOLIN
	ENDIF

END

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

VIG GenericDR MSG-DR_GENERIC_FAIL
    SWITCH RAND-3
    CASE 0
        QuickSay Hxdr01
    CASE 1
        QuickSay Hxdr03
    CASE 2
        QuickSay Hxdr12
    ENDSWITCH    
END

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

VIG UndeadDR MSG-DR_UNDEAD_FAIL

	// Hxdr19 Dropped in the dutch version

	IF LANG-dutch
		SWITCH RAND-3
		CASE 0
			QuickSay Hxdr23
		CASE 1
			QuickSay Hxdr26
		CASE 2
			QuickSay Hxdr28
		ENDSWITCH    
	ELSE
		SWITCH RAND-4
		CASE 0
			QuickSay Hxdr19
		CASE 1
			QuickSay Hxdr23
		CASE 2
			QuickSay Hxdr26
		CASE 3
			QuickSay Hxdr28
		ENDSWITCH    
	ENDIF
END

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

VIG CrucibusPowerUp ONEMIN && gt_PLACED_CRUCIBUS_IN_HEX

	AddTo gt_CRUC_POWER_TICK 1

	IF gt_CRUC_POWER_TICK>2

		AddTo f_CRUCIBUS_POWER 1

		IF f_CRUCIBUS_POWER>10

			Set f_CRUCIBUS_POWER 10

		ENDIF

		Set gt_CRUC_POWER_TICK 0

	ENDIF

	IF gg_JUST_AFTER_FEST
		PleaseSteveDontMessWithTheLightingAfterThisVignette
		PlayerControl Off
	ENDIF
END

/////////////////////////////////////////////////////////////////////
//
//VIG CrucibusReadyToWork ONEMIN && !f_CRUCIBUS_WORK_READY
//
//	IF !gt_CRUCIBUS_TIMER
//		Set gt_CRUCIBUS_TIMER 1
//	ELSE
//		AddTo gt_CRUCIBUS_TIMER 1
//
//		IF gt_CRUCIBUS_TIMER>4
//			Add f_CRUCIBUS_WORK_READY
//			Remove gt_CRUCIBUS_TIMER
//		ENDIF
//	ENDIF
//
//	IF gg_JUST_AFTER_FEST
//		PleaseSteveDontMessWithTheLightingAfterThisVignette
//		PlayerControl Off
//	ENDIF
//END
//
/////////////////////////////////////////////////////////////////////

VIG AndrusWeather  FALSE

	IF f_ANDRUS_DEAD && !f_USED_FERRY
		//rain after death of Andrus
		Set gd_WEATHER_TYPE 2
	ELSE
		//snow at other times
		Set gd_WEATHER_TYPE 0
	ENDIF

END

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

VIG CueWeather  FALSE

	logoff

	CueRain     0   0
	CueHail     0   0
	CueSnow     0   0
	CueMist     0   0
	CueSand     0   0

	RunS WeatherControl
    UpdateWeather

	logon
END

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

VIG WeatherControl (TENSEC || (FIVESEC && gt_CHOPPY_WIND)) && gd_WEATHER_TYPE

	logoff

	Remove gt_STEADY_WIND
	Remove gt_CHOPPY_WIND

	// Precipitation type / Amount : set by major script events and entering areas
	// ---------------------------------------------------------------------------

	//CueRain     0   5
	//CueHail     0   5
	//CueSnow     0   5
	//CueMist     0   5
	//CueSand     0   5

	IF gd_WEATHER_TYPE=0
		// basic snow

		IF gd_WIND_TYPE=1 || gd_WIND_TYPE=5
			//gentler wind, less snow
			SWITCH RAND-8
				CASE 0
					CueSnow     0   5
				CASE 1
					CueSnow     1   5
				CASE 2
					CueSnow     1   5
				CASE 3
					CueSnow     2   5
				CASE 4
					CueSnow     2   5
				CASE 5
					CueSnow     2   5
				CASE 6
					CueSnow     3   5
				CASE 7
					CueSnow     3   5
			ENDSWITCH
		ELSE
			// high wind, more snow
			SWITCH RAND-8
				CASE 0
					CueSnow     2   5
				CASE 1
					CueSnow     3   5
				CASE 2
					CueSnow     3   5
				CASE 3
					CueSnow     4   5
				CASE 4
					CueSnow     4   5
				CASE 5
					CueSnow     4   5
				CASE 6
					CueSnow     5   5
				CASE 7
					CueSnow     5   5
			ENDSWITCH
		ENDIF

	ELSE
		IF gd_WEATHER_TYPE=1
        // weather is off

		Add gt_STEADY_WIND

	ELSE
		IF gd_WEATHER_TYPE=2
        // medium/heavy rain

		IF gd_WIND_TYPE=1 || gd_WIND_TYPE=5
			//gentler wind, less rain
			SWITCH RAND-8
				CASE 0
					CueRain     0   5
				CASE 1
					CueRain     1   5
				CASE 2
					CueRain     1   5
				CASE 3
					CueRain     2   5
				CASE 4
					CueRain     2   5
				CASE 5
					CueRain     3   5
				CASE 6
					CueRain     3   5
				CASE 7
					CueRain     4   5
			ENDSWITCH
		ELSE
			// high wind, more rain
			SWITCH RAND-8
				CASE 0
					CueRain     1   5
				CASE 1
					CueRain     2   5
				CASE 2
					CueRain     3   5
				CASE 3
					CueRain     3   5
				CASE 4
					CueRain     4   5
				CASE 5
					CueRain     4   5
				CASE 6
					CueRain     5   5
				CASE 7
					CueRain     5   5
			ENDSWITCH
		ENDIF

	ELSE
		IF gd_WEATHER_TYPE=3
		//light mist

		SWITCH RAND-16
			CASE 0
				CueMist     0	10
			CASE 1
				CueMist     1	10
			CASE 2
				CueMist     1	10
			CASE 3
				CueMist     1	10
			CASE 4
				CueMist     1	10
			CASE 5
				CueMist     1	10
			CASE 6
				CueMist     1	10
			CASE 7
				CueMist     1	10
			CASE 8
				CueMist     2	10
			CASE 9
				CueMist     2	10
			CASE 10
				CueMist     2	10
			CASE 11
				CueMist     2	10
			CASE 12
				CueMist     3	10
			CASE 13
				CueMist     3	10
			CASE 14
				CueMist     4	10
			CASE 15
				CueMist     5	10
		ENDSWITCH

	ELSE
		IF gd_WEATHER_TYPE=4
		//sand storm

		CueSand     5   0

		//actual sand levels are determined by wind strength!

	ENDIF
	ENDIF
	ENDIF
	ENDIF
	ENDIF

	IF !gt_STEADY_WIND || ONEMIN
	// Wind strength & variability : set by map / terrain type
	// -------------------------------------------------------

	IF gd_WIND_TYPE=1
		// steady, gentle wind for most areas

		IF gd_WEATHER_TYPE=2 || gd_WEATHER_TYPE=3
			//rain : southwesterly winds

			SWITCH RAND-16
				CASE 0
					CueWind 0	0	5
				CASE 1
					CueWind 0	0	5
				CASE 2
					CueWind 0	0	5
				CASE 3
					CueWind 0	0	5
				CASE 4
					CueWind 1	20	5
				CASE 5
					CueWind 1	35	5
				CASE 6
					CueWind 1	55	5
				CASE 7
					CueWind 1	70	5
				CASE 8
					CueWind 2	15	5
				CASE 9
					CueWind 2	30	5
				CASE 10
					CueWind 2	45	5
				CASE 11
					CueWind 2	60	5
				CASE 12
					CueWind 2	75	5
				CASE 13
					CueWind 2	90	5
				CASE 14
					CueWind 3	45	5
				CASE 15
					CueWind 4	45	5
			ENDSWITCH
		ELSE
			IF gd_WEATHER_TYPE=0
				//snow: variable northwesterly winds

				SWITCH RAND-16
					CASE 0
						CueWind 0	0	5
					CASE 1
						CueWind 0	0	5
					CASE 2
						CueWind 0	0	5
					CASE 3
						CueWind 0	0	5
					CASE 4
						CueWind 1	90	5
					CASE 5
						CueWind 1	120	5
					CASE 6
						CueWind 1	150	5
					CASE 7
						CueWind 1	180	5
					CASE 8
						CueWind 2	90	5
					CASE 9
						CueWind 2	110	5
					CASE 10
						CueWind 2	130	5
					CASE 11
						CueWind 2	150	5
					CASE 12
						CueWind 2	165	5
					CASE 13
						CueWind 2	180	5
					CASE 14
						CueWind 3	135	5
					CASE 15
						CueWind 4	135	5
				ENDSWITCH
			ELSE
				//sand: strong northwesterly winds

				SWITCH RAND-16
					CASE 0
						CueWind 3	90	5
					CASE 1
						CueWind 3	120	5
					CASE 2
						CueWind 3	150	5
					CASE 3
						CueWind 3	180	5
					CASE 4
						CueWind 4	90	5
					CASE 5
						CueWind 4	120	5
					CASE 6
						CueWind 4	150	5
					CASE 7
						CueWind 4	180	5
					CASE 8
						CueWind 5	90	5
					CASE 9
						CueWind 5	110	5
					CASE 10
						CueWind 5	130	5
					CASE 11
						CueWind 5	150	5
					CASE 12
						CueWind 5	165	5
					CASE 13
						CueWind 5	180	5
					CASE 14
						CueWind 5	135	5
					CASE 15
						CueWind 5	135	5
				ENDSWITCH
			ENDIF
		ENDIF

	ELSE
	IF gd_WIND_TYPE=2
		// strong wind for exposed areas
		
		IF gd_WEATHER_TYPE=2 || gd_WEATHER_TYPE=3
			//rain : southwesterly winds

			SWITCH RAND-16
				CASE 0
					CueWind 2	20	5
				CASE 1
					CueWind 2	35	5
				CASE 2
					CueWind 2	55	5
				CASE 3
					CueWind 2	70	5
				CASE 4
					CueWind 3	20	5
				CASE 5
					CueWind 3	35	5
				CASE 6
					CueWind 3	55	5
				CASE 7
					CueWind 3	70	5
				CASE 8
					CueWind 4	15	5
				CASE 9
					CueWind 4	30	5
				CASE 10
					CueWind 4	45	5
				CASE 11
					CueWind 4	60	5
				CASE 12
					CueWind 4	75	5
				CASE 13
					CueWind 4	90	5
				CASE 14
					CueWind 5	35	5
				CASE 15
					CueWind 5	55	5
			ENDSWITCH
		ELSE
			//snow : variable northwesterly winds

			SWITCH RAND-16
				CASE 0
					CueWind 2	90	5
				CASE 1
					CueWind 2	120	5
				CASE 2
					CueWind 2	150	5
				CASE 3
					CueWind 2	180	5
				CASE 4
					CueWind 3	90	5
				CASE 5
					CueWind 3	120	5
				CASE 6
					CueWind 3	150	5
				CASE 7
					CueWind 3	180	5
				CASE 8
					CueWind 4	90	5
				CASE 9
					CueWind 4	110	5
				CASE 10
					CueWind 4	130	5
				CASE 11
					CueWind 4	150	5
				CASE 12
					CueWind 4	165	5
				CASE 13
					CueWind 4	180	5
				CASE 14
					CueWind 5	165	5
				CASE 15
					CueWind 5	180	5
			ENDSWITCH
		ENDIF

	ELSE
	IF gd_WIND_TYPE=3
		// choppy northerly wind for passes etc.

		Add gt_CHOPPY_WIND

		SWITCH RAND-16
			CASE 0
				CueWind 0	0	3
			CASE 1
				CueWind 0	0	3
			CASE 2
				CueWind 1	170	3
			CASE 3
				CueWind 1	190	3
			CASE 4
				CueWind 2	170	3
			CASE 5
				CueWind 2	190	3
			CASE 6
				CueWind 1	0	3
			CASE 7
				CueWind 3	170	3
			CASE 8
				CueWind 3	190	3
			CASE 9
				CueWind 1	0	3
			CASE 10
				CueWind 4	170	3
			CASE 11
				CueWind 4	190	3
			CASE 12
				CueWind 2	0	3
			CASE 13
				CueWind 5	170	3
			CASE 14
				CueWind 5	190	3
			CASE 15
				CueWind 2	0	3
		ENDSWITCH

	ELSE
	IF gd_WIND_TYPE=4
		// high northerly wind for Lilith's Ice domain

		Add gt_CHOPPY_WIND

		SWITCH RAND-16
			CASE 0
				CueWind 0	0	2
			CASE 1
				CueWind 0	0	2
			CASE 2
				CueWind 0	0	2
			CASE 3
				CueWind 0	0	2
			CASE 4
				CueWind 3	145	2
			CASE 5
				CueWind 3	180	2
			CASE 6
				CueWind 3	205	2
			CASE 7
				CueWind 4	145	2
			CASE 8
				CueWind 4	180	2
			CASE 9
				CueWind 4	205	2
			CASE 10
				CueWind 5	145	2
			CASE 11
				CueWind 5	180	2
			CASE 12
				CueWind 5	205	2
			CASE 13
				CueWind 5	145	2
										Add gt_STEADY_WIND
			CASE 14
				CueWind 5	180	2
										Add gt_STEADY_WIND
			CASE 15
				CueWind 5	205	2
										Add gt_STEADY_WIND
		ENDSWITCH

	ELSE
	IF gd_WIND_TYPE=5
		// virtual calm for low-lying and sheltered areas

		SWITCH RAND-16
			CASE 0
				CueWind 0	0	10
			CASE 1
				CueWind 0	0	10
			CASE 2
				CueWind 0	0	10
			CASE 3
				CueWind 0	0	10
			CASE 4
				CueWind 0	0	10
			CASE 5
				CueWind 0	0	10
			CASE 6
				CueWind 0	0	10
			CASE 7
				CueWind 0	0	10
			CASE 8
				CueWind 0	0	10
			CASE 9
				CueWind 1	30	10
										Add gt_STEADY_WIND
			CASE 10
				CueWind 1	40	10
										Add gt_STEADY_WIND
			CASE 11
				CueWind 1	50	10
										Add gt_STEADY_WIND
			CASE 12
				CueWind 1	60	10
										Add gt_STEADY_WIND
			CASE 13
				CueWind 2	40	10
			CASE 14
				CueWind 2	50	10
			CASE 15
				CueWind 3	45	10

		ENDSWITCH

	ELSE
	IF gd_WIND_TYPE=6
		// choppy westerly wind for High Rock Pass

		IF gd_WEATHER_TYPE=3
			//mist, very light winds

			SWITCH RAND-16
				CASE 0
					CueWind 0	0	3
				CASE 1
					CueWind 0	0	3
				CASE 2
					CueWind 0	0	3
				CASE 3
					CueWind 0	0	3
				CASE 4
					CueWind 0	0	3
				CASE 5
					CueWind 0	0	3
				CASE 6
					CueWind 0	0	3
				CASE 7
					CueWind 1	80	3
				CASE 8
					CueWind 1	100	3
				CASE 9
					CueWind 1	270	3
				CASE 10
					CueWind 2	80	3
				CASE 11
					CueWind 2	100	3
				CASE 12
					CueWind 1	270	3
				CASE 13
					CueWind 3	80	3
				CASE 14
					CueWind 3	100	3
				CASE 15
					CueWind 2	270	3
			ENDSWITCH

		ELSE

			Add gt_CHOPPY_WIND

			SWITCH RAND-16
				CASE 0
					CueWind 0	0	3
				CASE 1
					CueWind 0	0	3
				CASE 2
					CueWind 0	0	3
				CASE 3
					CueWind 0	0	3
				CASE 4
					CueWind 2	80	3
				CASE 5
					CueWind 2	100	3
				CASE 6
					CueWind 1	270	3
				CASE 7
					CueWind 3	80	3
				CASE 8
					CueWind 3	100	3
				CASE 9
					CueWind 1	270	3
				CASE 10
					CueWind 4	80	3
				CASE 11
					CueWind 4	100	3
				CASE 12
					CueWind 2	270	3
				CASE 13
					CueWind 5	80	3
				CASE 14
					CueWind 5	100	3
				CASE 15
					CueWind 2	270	3
			ENDSWITCH
		ENDIF

	ENDIF
	ENDIF
	ENDIF
	ENDIF
	ENDIF
	ENDIF
	ENDIF

	logon
END

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

VIG TalkToDragonWarrior FALSE
    SWITCH  RAND-3
    CASE 0
        Say dsak01  DKMAGICN.BIN
    CASE 1
        Say dsak02  DKMAGICN.BIN
    CASE 2
        Say dsak03  DKMAGICN.BIN
    ENDSWITCH
END

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

VIG TalkToDragonKin FALSE
    SWITCH  RAND-2
    CASE 0
        Say dsak04  DKMAGICN.BIN
    CASE 1
        Say dsak05  DKMAGICN.BIN
    ENDSWITCH
END

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

VIG RandomTauntCapture FALSE

	StopC P
	SWITCH RAND-4
		CASE 0
			Capture P cM_BLINDED1
		CASE 1
			Capture P cM_BLINDED2
		CASE 2
			Capture P cM_CLUTCH_HEAD
		CASE 3
			Capture P cM_V4_DROP_TO_KNEES2 
	ENDSWITCH
	UUComplete P

END

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

VIG SkornTaunting ONEMIN && mj_DEFEAT_SKORN

	SWITCH RAND-8
		CASE 0
			UnimportantSay koeg03 SKORNDMN.BIN
			RunS RandomTauntCapture
		CASE 1
			UnimportantSay koeg04 SKORNDMN.BIN
			RunS RandomTauntCapture
		CASE 2
			UnimportantSay koeg05 SKORNDMN.BIN
			RunS RandomTauntCapture
		CASE 3
			UnimportantSay koeg06 SKORNDMN.BIN
			RunS RandomTauntCapture
	ENDSWITCH

END

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

VIG TestQL FALSE
	QLAdd	01	qlt001	qlb001 
	QLAdd	02	qlt002	qlb002 
	QLAdd	03	qlt003	qlb003 
	QLAdd	04	qlt004	qlb004 
	QLAdd	05	qlt005	qlb005 
	QLAdd	06	qlt006	qlb006 
	QLAdd	07	qlt007	qlb007 
	QLAdd	08	qlt008	qlb008 
	QLAdd	09	qlt009	qlb009 
	QLAdd	10	qlt010	qlb010 
	QLAdd	11	qlt011	qlb011 
	QLAdd	12	qlt012	qlb012 
	QLAdd	13	qlt013	qlb013 
	QLAdd	14	qlt014	qlb014 
	QLAdd	15	qlt015	qlb015 
	QLAdd	16	qlt016	qlb016 
	QLAdd	17	qlt017	qlb017 
	QLAdd	18	qlt018	qlb018 
	QLAdd	19	qlt019	qlb019 
	QLAdd	20	qmt001	qmb001 
	QLAdd	21	qmt002	qmb002 
	QLAdd	22	qlt020	qlb020 
	QLAdd	23	qlt021	qlb021 
	QLAdd	24	qlt022	qlb022 
	QLAdd	25	qlt023	qlb023 
	QLAdd	26	qlt024	qlb024 
	QLAdd	27	qlt025	qlb025 
	QLAdd	28	qlt026	qlb026 
	QLAdd	29	qlt027	qlb027 
	QLAdd	30	qlt028	qlb028 
	QLAdd	31	qlt029	qlb029 
	QLAdd	32	qlt030	qlb030 
	QLAdd	33	qlt031	qlb031 
	QLAdd	34	qlt201	qlb201 
	QLAdd	35	qlt301	qlb301 
	QLAdd	36	qlt302	qlb302 
	QLAdd	37	qlt303	qlb303 
	QLAdd	38	qlt304	qlb304 
	QLAdd	39	qlt401	qlb401 
	QLAdd	40	qlt402	qlb402 
	QLAdd	41	qlt403	qlb403 
	QLAdd	42	qlt503	qlb503 
	QLAdd	43	qlt504	qlb504 
	QLAdd	44	qlt505	qlb505 
	QLAdd	45	qlt506	qlb506 
	QLAdd	46	qlt507	qlb507 
	QLAdd	47	qlt508	qlb508 
	QLAdd	48	qlt509	qlb509 
	QLAdd	49	qlt510	qlb510 
	QLAdd	50	qlt511	qlb511 
	QLAdd	51	qlt512	qlb512 
END

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

VIG TestCharSets FALSE
	 SetCharSet	eriv	A41
	 SetCharSet	eriv	AS1
	 SetCharSet	eriv	BX1
	 SetCharSet	eriv	BI1
	 SetCharSet	eriv	BL1
	 SetCharSet	eriv	BD1
	 SetCharSet	eriv	CT1
	 SetCharSet	eriv	D11
	 SetCharSet	eriv	D21
	 SetCharSet	eriv	DI1
	 SetCharSet	eriv	DI2
	 SetCharSet	eriv	DU1
	 SetCharSet	eriv	EF1
	 SetCharSet	eriv	EF2
	 SetCharSet	eriv	EM1
	 SetCharSet	eriv	WM1
	 SetCharSet	eriv	ER1
	 SetCharSet	eriv	ER2
	 SetCharSet	eriv	EX1
	 SetCharSet	eriv	FS1
	 SetCharSet	eriv	FS2
	 SetCharSet	eriv	FS3
	 SetCharSet	eriv	FS4
	 SetCharSet	eriv	FI1
	 SetCharSet	eriv	GT1
	 SetCharSet	eriv	GU1
	 SetCharSet	eriv	RH1
	 SetCharSet	eriv	JF1
	 SetCharSet	eriv	LI1
	 SetCharSet	eriv	ME1
	 SetCharSet	eriv	MA1
	 SetCharSet	eriv	MM1
	 SetCharSet	eriv	PB1
	 SetCharSet	eriv	MI1
	 SetCharSet	eriv	MP1
	 SetCharSet	eriv	EC1
	 SetCharSet	eriv	MX1
	 SetCharSet	eriv	MN1
	 SetCharSet	eriv	MS1
	 SetCharSet	eriv	NX1
	 SetCharSet	eriv	NS1
	 SetCharSet	eriv	NF1
	 SetCharSet	eriv	HS1
	 SetCharSet	eriv	RA1
	 SetCharSet	eriv	RV1
	 SetCharSet	eriv	RI1
	 SetCharSet	eriv	RE1
	 SetCharSet	eriv	HR1
	 SetCharSet	eriv	SW1
	 SetCharSet	eriv	SG1
	 SetCharSet	eriv	SP1
	 SetCharSet	eriv	SD1
	 SetCharSet	eriv	SS1
	 SetCharSet	eriv	SS2
	 SetCharSet	eriv	SB1
	 SetCharSet	eriv	ST1
	 SetCharSet	eriv	TA1
	 SetCharSet	eriv	T11
	 SetCharSet	eriv	TD1
	 SetCharSet	eriv	CS1
	 SetCharSet	eriv	TP1
	 SetCharSet	eriv	V11
	 SetCharSet	eriv	WL1
	 SetCharSet	eriv	WS1
	 SetCharSet	eriv	RW1

	Message "IF YOU CAN READ THIS THEN THERE ARE NO PROBLEMS LOADING ANY OF THE CHARACTER SETS"
END

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

VIG CheckChars FALSE
	placec P		pTest1
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	SetCharSet eriv Set0
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     charon
	swapmodel mel   charon
	swapmodel alice charon
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     abhol
	swapmodel mel   abhol
	swapmodel alice abhol
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     nix
	swapmodel mel   nix
	swapmodel alice nix
	SetCharSet eriv Set1
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     delgar
	swapmodel mel   delgar
	swapmodel alice delgar
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     incubah
	swapmodel mel   incubah
	swapmodel alice incubah
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     chimera
	swapmodel mel   chimera
	swapmodel alice chimera
	SetCharSet eriv Set2
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     cerebella
	swapmodel mel   cerebella
	swapmodel alice cerebella
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     rafaella
	swapmodel mel   rafaella
	swapmodel alice rafaella
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     faywarriorm
	swapmodel mel   faywarriorm
	swapmodel alice faywarriorm
	SetCharSet eriv Set3
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     faywarriorf
	swapmodel mel   faywarriorf
	swapmodel alice faywarriorf
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     faywarrior2
	swapmodel mel   faywarrior2
	swapmodel alice faywarrior2
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     faywarrior1
	swapmodel mel   faywarrior1
	swapmodel alice faywarrior1
	SetCharSet eriv Set4
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     fayqueen2
	swapmodel mel   fayqueen2
	swapmodel alice fayqueen2
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     yarana
	swapmodel mel   yarana
	swapmodel alice yarana
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     styx
	swapmodel mel   styx
	swapmodel alice styx
	SetCharSet eriv Set5
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     stormchildmale
	swapmodel mel   stormchildmale
	swapmodel alice stormchildmale
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     stormchildfemale
	swapmodel mel   stormchildfemale
	swapmodel alice stormchildfemale
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     gargos
	swapmodel mel   gargos
	swapmodel alice gargos
	SetCharSet eriv Set6
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     durgar
	swapmodel mel   durgar
	swapmodel alice durgar
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     bishopmort
	swapmodel mel   bishopmort
	swapmodel alice bishopmort
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     melissa
	swapmodel mel   melissa
	swapmodel alice melissa
	SetCharSet eriv Set7
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     delgardim
	swapmodel mel   delgardim
	swapmodel alice delgardim
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     curt
	swapmodel mel   curt
	swapmodel alice curt
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     candice
	swapmodel mel   candice
	swapmodel alice candice
	SetCharSet eriv Set8
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     bkpowder
	swapmodel mel   bkpowder
	swapmodel alice bkpowder
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     araddhom
	swapmodel mel   araddhom
	swapmodel alice araddhom
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     undead2
	swapmodel mel   undead2
	swapmodel alice undead2
	SetCharSet eriv Set9
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     elsbeth
	swapmodel mel   elsbeth
	swapmodel alice elsbeth
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     undead
	swapmodel mel   undead
	swapmodel alice undead
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     skiff
	swapmodel mel   skiff
	swapmodel alice skiff
	SetCharSet eriv Set10
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     statue
	swapmodel mel   statue
	swapmodel alice statue
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     uncleandrus
	swapmodel mel   uncleandrus
	swapmodel alice uncleandrus
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     jaard
	swapmodel mel   jaard
	swapmodel alice jaard
	SetCharSet eriv Set11
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     hexkeeper
	swapmodel mel   hexkeeper
	swapmodel alice hexkeeper
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     crucibus
	swapmodel mel   crucibus
	swapmodel alice crucibus
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     caldor
	swapmodel mel   caldor
	swapmodel alice caldor
	SetCharSet eriv Set12
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     alvaris
	swapmodel mel   alvaris
	swapmodel alice alvaris
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     bkgenericfemale
	swapmodel mel   bkgenericfemale
	swapmodel alice bkgenericfemale
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     skornh
	swapmodel mel   skornh
	swapmodel alice skornh
	SetCharSet eriv Set13
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     SkeletonA
	swapmodel mel   SkeletonA
	swapmodel alice SkeletonA
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     SkeletonB
	swapmodel mel   SkeletonB
	swapmodel alice SkeletonB
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     SkeletonC
	swapmodel mel   SkeletonC
	swapmodel alice SkeletonC
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     SkeletonD
	swapmodel mel   SkeletonD
	swapmodel alice SkeletonD
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     SkeletonE
	swapmodel mel   SkeletonE
	swapmodel alice SkeletonE
	SetCharSet eriv Set14
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     farangis
	swapmodel mel   farangis
	swapmodel alice farangis
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     asmodeusguard
	swapmodel mel   asmodeusguard
	swapmodel alice asmodeusguard
	SetCharSet eriv Set15
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     asmodeus
	swapmodel mel   asmodeus
	swapmodel alice asmodeus
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     amoymon
	swapmodel mel   amoymon
	swapmodel alice amoymon
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     willfarshaw
	swapmodel mel   willfarshaw
	swapmodel alice willfarshaw
	SetCharSet eriv Set16
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     emma
	swapmodel mel   emma
	swapmodel alice emma
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     merchnt3
	swapmodel mel   merchnt3
	swapmodel alice merchnt3
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     merchnt2
	swapmodel mel   merchnt2
	swapmodel alice merchnt2
	SetCharSet eriv Set17
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     merchnt1
	swapmodel mel   merchnt1
	swapmodel alice merchnt1
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     skellord
	swapmodel mel   skellord
	swapmodel alice skellord
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     carran
	swapmodel mel   carran
	swapmodel alice carran
	SetCharSet eriv Set18
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     jake
	swapmodel mel   jake
	swapmodel alice jake
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     bklorddarius
	swapmodel mel   bklorddarius
	swapmodel alice bklorddarius
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     necronom
	swapmodel mel   necronom
	swapmodel alice necronom
	SetCharSet eriv Set19
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     bkundm2
	swapmodel mel   bkundm2
	swapmodel alice bkundm2
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     guildguardian
	swapmodel mel   guildguardian
	swapmodel alice guildguardian
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     lordcrux
	swapmodel mel   lordcrux
	swapmodel alice lordcrux
	SetCharSet eriv Set20
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     lilith
	swapmodel mel   lilith
	swapmodel alice lilith
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     gargomon
	swapmodel mel   gargomon
	swapmodel alice gargomon
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     ashatar
	swapmodel mel   ashatar
	swapmodel alice ashatar
	SetCharSet eriv Set21
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     alkadath
	swapmodel mel   alkadath
	swapmodel alice alkadath
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     rbeast
	swapmodel mel   rbeast
	swapmodel alice rbeast
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     hammer5
	swapmodel mel   hammer5
	swapmodel alice hammer5
	SetCharSet eriv Set22
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     elric
	swapmodel mel   elric
	swapmodel alice elric
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     alphonse
	swapmodel mel   alphonse
	swapmodel alice alphonse
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     barthelago
	swapmodel mel   barthelago
	swapmodel alice barthelago
	SetCharSet eriv Set23
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     aradsdeputy
	swapmodel mel   aradsdeputy
	swapmodel alice aradsdeputy
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     candice5
	swapmodel mel   candice5
	swapmodel alice candice5
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     hammer
	swapmodel mel   hammer
	swapmodel alice hammer
	SetCharSet eriv Set24
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     dove
	swapmodel mel   dove
	swapmodel alice dove
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     alice
	swapmodel mel   alice
	swapmodel alice alice
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     faywarrior3
	swapmodel mel   faywarrior3
	swapmodel alice faywarrior3
	SetCharSet eriv Set25
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     bkrenya
	swapmodel mel   bkrenya
	swapmodel alice bkrenya
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     spider
	swapmodel mel   spider
	swapmodel alice spider
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     sktent
	swapmodel mel   sktent
	swapmodel alice sktent
	SetCharSet eriv Set26
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     skraken
	swapmodel mel   skraken
	swapmodel alice skraken
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     mindslayer
	swapmodel mel   mindslayer
	swapmodel alice mindslayer
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     dkgrog
	swapmodel mel   dkgrog
	swapmodel alice dkgrog
	SetCharSet eriv Set27
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     farmerm
	swapmodel mel   farmerm
	swapmodel alice farmerm
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     farmerf
	swapmodel mel   farmerf
	swapmodel alice farmerf
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     comoro
	swapmodel mel   comoro
	swapmodel alice comoro
	SetCharSet eriv Set28
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     vampirelord
	swapmodel mel   vampirelord
	swapmodel alice vampirelord
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     skornd
	swapmodel mel   skornd
	swapmodel alice skornd
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     kinghades
	swapmodel mel   kinghades
	swapmodel alice kinghades
	SetCharSet eriv Set29
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     jalastor
	swapmodel mel   jalastor
	swapmodel alice jalastor
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     hexseeker
	swapmodel mel   hexseeker
	swapmodel alice hexseeker
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     barthelago5
	swapmodel mel   barthelago5
	swapmodel alice barthelago5
	SetCharSet eriv Set30
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     dkwing
	swapmodel mel   dkwing
	swapmodel alice dkwing
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     dkwarrior
	swapmodel mel   dkwarrior
	swapmodel alice dkwarrior
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     dkmagician
	swapmodel mel   dkmagician
	swapmodel alice dkmagician
	SetCharSet eriv Set31
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     dkkildarak
	swapmodel mel   dkkildarak
	swapmodel alice dkkildarak
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     raal
	swapmodel mel   raal
	swapmodel alice raal
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     brigand2
	swapmodel mel   brigand2
	swapmodel alice brigand2
	SetCharSet eriv Set32
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     brigand1
	swapmodel mel   brigand1
	swapmodel alice brigand1
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     allisham
	swapmodel mel   allisham
	swapmodel alice allisham
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     vampirevixen
	swapmodel mel   vampirevixen
	swapmodel alice vampirevixen
	SetCharSet eriv Set33
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     lightstealer
	swapmodel mel   lightstealer
	swapmodel alice lightstealer
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     laenchant
	swapmodel mel   laenchant
	swapmodel alice laenchant
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     vampiremale
	swapmodel mel   vampiremale
	swapmodel alice vampiremale
	SetCharSet eriv Set34
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     lordbane
	swapmodel mel   lordbane
	swapmodel alice lordbane
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     bkundm1
	swapmodel mel   bkundm1
	swapmodel alice bkundm1
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     bkgenericmale
	swapmodel mel   bkgenericmale
	swapmodel alice bkgenericmale
	SetCharSet eriv Set35
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     bkcredo
	swapmodel mel   bkcredo
	swapmodel alice bkcredo
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     rokbeast
	swapmodel mel   rokbeast
	swapmodel alice rokbeast
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     princetangaris
	swapmodel mel   princetangaris
	swapmodel alice princetangaris
	SetCharSet eriv Set36
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     lichelord
	swapmodel mel   lichelord
	swapmodel alice lichelord
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     gargoyle
	swapmodel mel   gargoyle
	swapmodel alice gargoyle
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     gargoshmn
	swapmodel mel   gargoshmn
	swapmodel alice gargoshmn
	SetCharSet eriv Set37
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     talos
	swapmodel mel   talos
	swapmodel alice talos
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     revsoldier
	swapmodel mel   revsoldier
	swapmodel alice revsoldier
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     shadow
	swapmodel mel   shadow
	swapmodel alice shadow
	SetCharSet eriv Set38
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     assassinguardm
	swapmodel mel   assassinguardm
	swapmodel alice assassinguardm
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     assassinguardf
	swapmodel mel   assassinguardf
	swapmodel alice assassinguardf
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     ash
	swapmodel mel   ash
	swapmodel alice ash
	SetCharSet eriv Set39
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     end
	swapmodel mel   end
	swapmodel alice end
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     evildragwar
	swapmodel mel   evildragwar
	swapmodel alice evildragwar
	SetCharSet eriv Set40
	placec will		pTest2
	placec mel		pTest3
	placec alice	pTest4
	swapmodel will     dragwarrior
	swapmodel mel   dragwarrior
	swapmodel alice dragwarrior
	message "FINISHED MODEL TESTING!"
END

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

VIG ReadAboutFlute FALSE

	IF !gt_READ_FLUTE_DOC && POS-P-dummyflute
		Add gt_READ_FLUTE_DOC

		MessagesOff

		DeleteObjectsinBackpackWithID P dummyflute
		AwardOb P flute "full-flute"

		MessagesOn

	ENDIF

END

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

VIG ReadAboutContract FALSE

	//get quest: warn Ash about assassins (unless you've done so already)

	IF !gt_READ_ASSASSIN_DOC && !f_ASH_WARNED
		Add gt_READ_ASSASSIN_DOC
		QLAdd ql024 qlt024 qlb024
	ENDIF

END

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

VIG CompleteQuest FALSE
	PlaySFX		hex-stone-activation.wav
END

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

VIG Bell ONESEC && gg_BELL_RINGS>0
	logoff
	IF gg_BELL_DELAY=2
		IF THISLEVEL-faith || THISLEVEL-newshad 
			logon
			PlaySFXPosid village.wav pBellTower
			logoff
		ENDIF
		AddTo gg_BELL_RINGS -1
		Set gg_BELL_DELAY 0
	ELSE
		AddTo gg_BELL_DELAY 1
	ENDIF
	logon
END

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

VIG TeleportTalen gg_TELEPORT_TALEN

	Remove gg_TELEPORT_TALEN

	FX_Invisible P
	StopC P
	Wait 2000
	PostMsg t_TA_ARRIVE_1
	Add gg_TALEN_TELE_INVIS

END

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


