// Created by Willy
// Date finished 08/23/11
// Script for B&W 2 land 3536
// posted on kaysplace
// Map created on the landscape edtior

define DEBUG = 0
define NUMBER_OF_TOWNS = 5
define NUMBER_OF_GATEHOUSES = 6
define MAX_PLATOONS = 100
define SIEGE_WEAPONS = 13
define ATTACK_DISTANCE = 70.0
define CAPTURE_TOWN_DISTANCE = 60.0
define NUMBER_OF_PLATOONS = 8
define EPIC_OFFSETX_POS = 6
define EPIC_OFFSETZ_POS = 3
define ROTATION_OF_EPIC = 8
define oHurricane = 0
define EPIC_OFFSETX_POS2 = 6
define EPIC_OFFSETZ_POS2 = 5
define ROTATION_OF_EPIC2 = 10

define script Intro1
define script AttackPlatoon
define script Takeover
define script utaattack
define script ttown2Def
define script ttown4Def
define script ttown0def
define script DefTown03
define script DefT0tT4
define script unDscrol
define script winning1
define script Losing1
define script VolcanoScript
define script HurricaneCinemaControl(oHurricane)
define script HurricaneScript
define script VolcanoCinemaControl
define script CreatureSelect
define script UnlockBuildings
define script MusicR
define script CreatureEvil
define script waves1
define script fireworks
define script TakingTowns
define script Objective1
define script NRFood
define script endingWaves
define script DefTown0
define script WoodOB
define script BreedOB
define script OreOB
define script PlatoonOB
define script GlobalIn
define script WinScripts
define script AttackHur
define script AttackHurCin(oHurricane)
define script actioncreature
define script selCstuff
define script CheatObb
define script CreatureA2
define script takeTownEOb 
define script FinishLand

global TownStatus[NUMBER_OF_TOWNS]
global Town[NUMBER_OF_TOWNS]
global MyTimer = 0
global Town0 = 0
global Town1 = 0
global Town2 = 0
global Town3 = 0
global Town4 = 0
global run1 = 0
global Platoon[MAX_PLATOONS]
global RPlatoon[MAX_PLATOONS]
global Siege1[SIEGE_WEAPONS]
global APlatoon1[MAX_PLATOONS]
global Siege2[SIEGE_WEAPONS]
global DPlatoon[MAX_PLATOONS] 
global DPlatoon2[MAX_PLATOONS]
global DPlatoon4[MAX_PLATOONS] 
global DPlatoon42[MAX_PLATOONS]
global numP = 30
global NumP2 = 100
global NumPLatoonW = 40
global NumPlatoon2 = 20
global Arher1 = 0
global run3 = 0
global Run4 = 0
global oCreature = 0
global CinemaFinish = 0
global Volcinema = 0
global oEarthquake = 0
global run4 = 0
global pikC = 0
global ChoNot = 0
global aCreature = 0 
global tCreature = 0
global lCreature = 0
global wCreature = 0
global cCreature = 0
global gCreature = 0
global Run6 = 0
global NumPlatoons = 20
global Fireweapone = 1
global run2 = 0
global eCreature = 0
global Nwave = 0
global NumT = 25000
global LightOb = 0

// Run main script.
run script MainScript
begin script MainScript
	
start
	
	Town0 = get town with id 0
	Town1 = get town with id 1
	Town2 = get town with id 2
	Town3 = get town with id 3
	Town4 = get town with id 4
	enable game can be lost
	disable load screen
	set fade in time 1
	run script Intro1
	run background script AttackPlatoon
	run background script ttown2Def
	run background script ttown4Def
	run background script ttown0def
	run background script DefTown03
	run background script DefT0tT4
	run background script unDscrol
	run background script winning1
	run background script Losing1
	run background script utaattack
	run background script HurricaneScript
	run background script VolcanoScript
	run background script HurricaneScript
	run background script UnlockBuildings
	run background script MusicR
	run background script WoodOB
	run background script BreedOB
	run background script OreOB
	run background script PlatoonOB
	run background script CreatureEvil
	run background script TakingTowns
	run background script Objective1
	run background script takeTownEOb 
	run background script NRFood
	run background script FinishLand
	increment tribute by 100000
	until 1!= 1

end script MainScript

begin script Intro1
	NorseT1 = 0
start
	begin loop
		if run1 == 0 
			run background script CreatureSelect
			set fade in time 5
			begin cinema
				start music "Intro3" loop 1
				move camera focus to {917.8, 300, 921} time 5 
				move camera position to {910, 450, 210} time 20
				wait 12 seconds
				stop music
				start music "cut_scene_celtic_air" loop forever
				wait 5 seconds
				move camera focus to {598, 32, 1421} time 5 
				move camera position to {917.8, 300, 921} time 10
				wait 7 seconds
				move camera focus to {1021, 23, 1537} time 5 
				move camera position to {598, 130, 1421} time 10
				wait 6.5 seconds
				move camera focus to {1014, 24, 1569} time 5 
				move camera position to {548, 130, 1522} time 8
				wait 4.3 seconds
				move camera focus to {1028, 40, 1947} time 5 
				move camera position to {1014, 130, 1569} time 15
				wait 12 seconds
				move camera focus to {1030, 63, 2178} time 5 
				move camera position to {1028, 100, 1947} time 15
				wait 17 seconds
				move camera focus to {1030, 63, 2178} time 5 
				move camera position to {1099, 40, 463} time 15
				wait 15 seconds 
				move camera focus to {1092, 23, 494} time 5 
				wait 5 seconds
				stop music with fadetime 5
				wait 4 seconds
			end cinema
			run1 = 1
		else
			run1 = 0
		end if
		until run1 == 1 or key KB_ESC down
		if key KB_ESC down
			skip current cutscene
			begin cinema
				set camera focus to {1092, 23, 494}  
				set camera position to {1099, 40, 463}
				stop music with fadetime 5
			end cinema
			wait 2 seconds
		end if
	end loop	
end script Intro1


begin script AttackPlatoon
	 RR = 0
	 xx = 0
	 Num = 0
	 SS = 0
	 GreekGate1 = marker at {882, 1140}
	 GreekGateHouse1 = 0
	 ggo = 0
	 isConverted = 0
	 isConverted2 = 0
	 isConverted3 = 0
	 isConverted4 = 0
	 isConverted5 = 0
	 getDistance = 0
	 GreekGateOpen = 1
start
	isConverted3 = variable get town Town2 method of last conversion
	isConverted4 = variable get town Town3 method of last conversion 
	isConverted5 = variable get town Town4 method of last conversion 
	if town Town1 is under takeover from player 1
		run script Takeover
	else
		if isConverted3 !=0
			NumPlatoons = 40
		end if
		wait 10 seconds
		xx = 1
		begin loop
			Platoon[xx] = recruit PLATOON_INFO_AZTEC_MELEE_1 town Town0 platoon of size NumPlatoons
			Num = get number of villagers in platoon Platoon[xx]
			xx = xx + 1
			until xx == 7
		end loop
		RR = 1
		begin loop
			RPlatoon[RR] = recruit PLATOON_INFO_AZTEC_RANGED_2 town Town0 platoon of size NumPlatoons
			Num = get number of villagers in platoon RPlatoon[RR]
			RR = RR + 1
			until RR == 6
		end loop
		SS = 1
		begin loop
			Siege1[SS] = recruit SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_5 town Town0 siege weapon
			SS = SS + 1
			until SS == 12
		end loop
		
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {849, 1225} to Platoon[1] action queue 
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {875, 1230} to Platoon[2] action queue 
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {824, 1215} to Platoon[3] action queue 
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {951, 1205} to Platoon[4] action queue
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {928, 1219} to Platoon[5] action queue 
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {977, 1156} to Platoon[6] action queue
	
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {794, 1184} to RPlatoon[1] action queue
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {812, 1204} to RPlatoon[2] action queue 
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {901, 1228} to RPlatoon[3] action queue 
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {968, 1184} to RPlatoon[4] action queue 
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {980, 1134} to RPlatoon[5] action queue
	
	
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {977, 1156} to siege weapon Siege1[1] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {794, 1184} to siege weapon Siege1[2] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {812, 1204} to siege weapon Siege1[3] action queue 
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {901, 1228} to siege weapon Siege1[4] action queue 
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {968, 1184} to siege weapon Siege1[5] action queue 
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {980, 1134} to siege weapon Siege1[6] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {849, 1225} to siege weapon Siege1[7] action queue 
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {875, 1230} to siege weapon Siege1[8] action queue 
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {824, 1215} to siege weapon Siege1[9] action queue 
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {951, 1205} to siege weapon Siege1[10] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {928, 1219} to siege weapon Siege1[11] action queue 
		disable siege weapon Siege1[SS] auto attack
		
		wait 170 seconds
		begin loop
		add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using GreekGateHouse1 to siege weapon Siege1[SS] action queue
		GreekGateHouse1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {GreekGate1} radius 150
		if GreekGateHouse1 exists
			if gate GreekGateHouse1 is open 
				GreekGateOpen = 1
			else
				GreekGateOpen = 0
			end if
		else
			GreekGateOpen = -1
		end if
			
		wait 1 second
		until GreekGateOpen != 0
		end loop
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1293, 1565} to siege weapon Siege1[1] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {861, 1577} to siege weapon Siege1[2] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1293, 1565} to siege weapon Siege1[3] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {861, 1577} to siege weapon Siege1[4] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1293, 1565} to siege weapon Siege1[5] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {861, 1577} to siege weapon Siege1[6] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1293, 1565} to siege weapon Siege1[7] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1015, 1573} to siege weapon Siege1[8] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1293, 1565} to siege weapon Siege1[9] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1015, 1573} to siege weapon Siege1[10] action queue
		add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1015, 1573} to siege weapon Siege1[11] action queue
		wait 2 seconds
		delete Siege1[1]
		delete Siege1[2]
		delete Siege1[3]
		delete Siege1[4]
		delete Siege1[5]
		delete Siege1[6]
		delete Siege1[7]
		delete Siege1[8]
		delete Siege1[9]
		delete Siege1[10]
		delete Siege1[11]
		wait 2 seconds
		run script Takeover
	end if
end script AttackPlatoon

begin script Takeover
	 isConverted = 0
	 isConverted2 = 0
	 isConverted3 = 0
	 isConverted4 = 0
	 isConverted5 = 0
	RR = 0
	xx = 0
	Num = 0
	SS = 0
	GreekGateOpen = 0
	Alter1 = 0
	p6num = 0
start
	begin loop
		Alter1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_ALTAR at {924, 474} radius 13
		add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {815, 708} to Platoon[1] action queue
		
		if Platoon[1] can navigate to {822, 623}
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {974, 540} to Platoon[2] action queue
			
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {922, 527} to Platoon[3] action queue
			
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {840, 524} to Platoon[4] action queue
			
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1158, 622} to Platoon[5] action queue
			
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {922, 527} to Platoon[6] action queue
			
		end if
		
		if Town1 exists			
			add action PLATOON_AGENDA_ACTION_LINK_TO_ARMY_MEMBER using Platoon[1] to RPlatoon[1] action queue
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to RPlatoon[1] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to RPlatoon[1] action queue
		
			add action PLATOON_AGENDA_ACTION_LINK_TO_ARMY_MEMBER using Platoon[2] to RPlatoon[2] action queue
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to RPlatoon[2] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to RPlatoon[2] action queue
			
			add action PLATOON_AGENDA_ACTION_LINK_TO_ARMY_MEMBER using Platoon[3] to RPlatoon[3] action queue
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to RPlatoon[3] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to RPlatoon[3] action queue
		
			add action PLATOON_AGENDA_ACTION_LINK_TO_ARMY_MEMBER using Platoon[4] to RPlatoon[4] action queue
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to RPlatoon[4] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to RPlatoon[4] action queue
		
			add action PLATOON_AGENDA_ACTION_LINK_TO_ARMY_MEMBER using Platoon[5] to RPlatoon[5] action queue
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to RPlatoon[5] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to RPlatoon[5] action queue
		end if
		
		
		if Platoon[2] can navigate to {974, 540} or GreekGateOpen == 0
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to Platoon[2] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to Platoon[2] action queue
		end if		
		wait 30 seconds
		if Platoon[3] can navigate to {922, 527} or GreekGateOpen == 0
			add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Alter1 to Platoon[3] action queue
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to Platoon[3] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to Platoon[3] action queue
		end if	
		wait 1 seconds	
		if Platoon[5] can navigate to {1158, 622} or GreekGateOpen == 0
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to Platoon[5] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to Platoon[5] action queue
		end if	
		wait 1 seconds
		if Platoon[4] can navigate to {840, 524} or GreekGateOpen == 0
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to Platoon[4] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to Platoon[4] action queue
		end if	
		wait 1 seconds	
		if Platoon[1] can navigate to {815, 708} or GreekGateOpen == 0
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to Platoon[1] action queue
			add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to Platoon[1] action queue
		end if	
		wait 1 seconds	
		if Platoon[6] can navigate to {922, 527}
			add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to Platoon[6] action queue
		end if
		begin loop
			wait 240 seconds 
			if town Town1 is under takeover from player 1
				run script AttackPlatoon
			else
				delete Platoon[1]
				delete Platoon[2]
				delete Platoon[3]
				delete Platoon[4]
				delete Platoon[5]
				delete Platoon[6]
			end if
			isConverted = variable get town Town0 method of last conversion
			isConverted2 = variable get town Town1 method of last conversion 
			if isConverted2 !=0
				delete Platoon[1]
				delete Platoon[2]
				delete Platoon[3]
				delete Platoon[4]
				delete Platoon[5]
				delete Platoon[6]
				run script winning1
			elsif isConverted !=0
				run script Losing1
			else
				run script AttackPlatoon
			end if
			until isConverted != 0 or isConverted2 != 0 
		end loop
	end loop
end script Takeover

begin script utaattack
	isConverted = 0
	isConverted2 = 0
	isConverted3 = 0
	isConverted4 = 0
	isConverted5 = 0
	Vol2 = 0
	Vol3 = 0
	Tele1 = 0
	aa = 0
	sss = 0
	oShip = 0
	oship2 = 0
	oship3 = 0
	oship4 = 0
	oship5 = 0
	BPlatoon1 = 0
	BPlatoon2 = 0
	BPlatoon3 = 0
	BPlatoon4 = 0 
	CPlatoon5 = 0
	CPlatoon1 = 0
	CPlatoon2 = 0
	CPlatoon3 = 0
	CPlatoon4 = 0
	BSiege1 = 0
	BSiege2 = 0
	BSiege3 = 0
	BSiege4 = 0 
	CSiege1 = 0
	CSiege2 = 0
	CSiege3 = 0
	CSiege4 = 0
	CSiege5 = 0
	Alter1 = 0
	GreekGate1 = marker at {882, 1140}
	GreekGateHouse1 = 0
	GreekGateOpen = 0
	wall1 = get wall segment nearest {1265, 1042} radius 150
	wall2 = get wall segment nearest {1024, 1106} radius 150
	wall3 = get wall segment nearest {781, 1158} radius 150
	wall4 = get wall segment nearest {564, 1170} radius 150
	warning1 = 0
	hEpic = 0
start
	begin loop
		isConverted = variable get town Town0 method of last conversion
		isConverted2 = variable get town Town1 method of last conversion 
		isConverted3 = variable get town Town2 method of last conversion
		isConverted4 = variable get town Town3 method of last conversion 
		isConverted5 = variable get town Town4 method of last conversion 
		if isConverted3 !=0 and isConverted4 !=0 and isConverted5 !=0
			if run2 == 0 
				set fade in time 10
				begin cinema 
					stop script "MusicR"
					stop music
					start music "alltowntake" loop 1
					move camera focus to {1027, 17, 1462} time 10 
					move camera position to {906, 50, 1241} time 20
					wait 18 seconds
					run background script MusicR
					Vol2 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {931, 23, 1290} time 7
					Vol3 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {931, 100, 1290} time 7
					wait 7 seconds
					Tele1 = create visual effect VISUAL_EFFECT_TELEPORTER_HOOP  at {931, 25, 1290} time 30
					wait 3 seconds
					set camera position to {939, 45, 1325}
					set camera focus to {931, 23, 1290}
					wait 3 seconds
					aa = 1
					sss = 1
					begin loop
						wait 2 seconds
						APlatoon1[aa] = create platoon PLATOON_INFO_NORSE_MELEE_2 at {931, 1290} with 35 men and 0 women
						set APlatoon1[aa] player 1
						aa = aa + 1
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {737, 1199} to APlatoon1[1] action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {798, 1190} to APlatoon1[2] action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {894, 1185} to APlatoon1[3] action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {975, 1168} to APlatoon1[4] action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1034, 1133} to APlatoon1[5] action queue
						wait 1 second
						Siege2[sss] = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_7 belonging to Town0 at {931, 1290}
						sss = sss + 1
						add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {737, 1199} to siege weapon Siege2[1] action queue
						add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {798, 1190} to siege weapon Siege2[2] action queue
						add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {894, 1185} to siege weapon Siege2[3] action queue
						add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {975, 1168} to siege weapon Siege2[4] action queue
						add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1034, 1133} to siege weapon Siege2[5] action queue
						until aa == 6 and sss == 6
					end loop
					wait 2 seconds
					set fade in time 10
				end cinema
				warning1 = create visual effect VISUAL_EFFECT_EPIC_TARGET_WARNING at {620, 24, 356} time 15
				wait 5 seconds
				run background script AttackHur
				run2 = 1
				BPlatoon1 = create platoon PLATOON_INFO_NORSE_MELEE_2 at {342, 1360} with 40 men and 0 women
				set BPlatoon1 player 1
				BPlatoon2 = create platoon PLATOON_INFO_NORSE_MELEE_3 at {387, 1297} with 50 men and 0 women
				set BPlatoon2 player 1
				BPlatoon3 = create platoon PLATOON_INFO_NORSE_RANGED_3 at {371, 1414} with 50 men and 0 women
				set BPlatoon3 player 1
				BPlatoon4 = create platoon PLATOON_INFO_NORSE_MELEE_2 at {342, 1360} with 40 men and 0 women
				set BPlatoon4 player 1
				
				CPlatoon5 = create platoon PLATOON_INFO_NORSE_RANGED_2 at {1671, 1356} with 40 men and 0 women
				set CPlatoon5 player 1
				CPlatoon1 = create platoon PLATOON_INFO_NORSE_MELEE_3 at {1671, 1356} with 50 men and 0 women
				set CPlatoon1 player 1
				CPlatoon2 = create platoon PLATOON_INFO_NORSE_RANGED_2 at {1682, 1250} with 50 men and 0 women
				set CPlatoon2 player 1
				CPlatoon3 = create platoon PLATOON_INFO_NORSE_MELEE_3 at {1671, 1356} with 40 men and 0 women
				set CPlatoon3 player 1
				CPlatoon4 = create platoon PLATOON_INFO_NORSE_RANGED_2 at {1682, 1250} with 40 men and 0 women
				set CPlatoon4 player 1
								
				BSiege1 = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town0 at {342, 1360}
				BSiege2 = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town0 at {387, 1297}
				BSiege3 = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town0 at {371, 1414}
				BSiege4 = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town0 at {342, 1360}
				
				CSiege1 = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town0 at {1671, 1356}
				CSiege2 = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town0 at {1671, 1356}
				CSiege3 = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town0 at {1682, 1250}
				CSiege4 = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town0 at {1671, 1356}
				CSiege5 = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town0 at {1682, 1250}
				
				add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {475, 1193} to BPlatoon1 action queue 
				add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {542, 1209} to BPlatoon2 action queue 
				add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {620, 1225} to BPlatoon3 action queue 
				add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {702, 1212} to BPlatoon4 action queue 
				
				add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1255, 1119} to CPlatoon1 action queue 
				add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1341, 1096} to CPlatoon2 action queue 
				add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1187, 1115} to CPlatoon3 action queue 
				add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1105, 1131} to CPlatoon4 action queue 
				add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1044, 1143} to CPlatoon5 action queue 
				
				add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {475, 1193} to siege weapon BSiege1 action queue
				add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {542, 1209} to siege weapon BSiege2 action queue
				add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {620, 1225} to siege weapon BSiege3 action queue
				add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {702, 1212} to siege weapon BSiege4 action queue
				
				add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1255, 1119} to siege weapon CSiege1 action queue
				add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1341, 1096} to siege weapon CSiege2 action queue
				add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1187, 1115} to siege weapon CSiege3 action queue
				add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1105, 1131} to siege weapon CSiege4 action queue
				add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {1044, 1143} to siege weapon CSiege5 action queue
				wait 10 seconds
				begin loop
					GreekGateHouse1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {GreekGate1} radius 150
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using wall1 to siege weapon CSiege1 action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using wall1 to siege weapon CSiege2 action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using wall2 to siege weapon CSiege3 action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using wall2 to siege weapon CSiege4 action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using wall2 to siege weapon CSiege5 action queue
				
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using wall4 to siege weapon BSiege1 action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using wall4 to siege weapon BSiege2 action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using wall3 to siege weapon BSiege3 action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using wall3 to siege weapon BSiege4 action queue
				
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using GreekGateHouse1 to siege weapon Siege2[1] action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using GreekGateHouse1 to siege weapon Siege2[2] action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using GreekGateHouse1 to siege weapon Siege2[3] action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using GreekGateHouse1 to siege weapon Siege2[4] action queue
					add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using GreekGateHouse1 to siege weapon Siege2[5] action queue
					
					//Checking if the gates are open
					if GreekGateHouse1 exists
						if gate GreekGateHouse1 is open
							GreekGateOpen = 1
						else
							GreekGateOpen = 0
						end if
					else
						GreekGateOpen = -1
					end if
					
					until GreekGateOpen != 0
				end loop
				
				wait 100 seconds
				//deleting siege weapons
				if GreekGateOpen != 0
						delete Siege2[1]
						delete Siege2[2]
						delete Siege2[3]
						delete Siege2[4]
						delete Siege2[5]
						delete BSiege1
						delete BSiege2
						delete BSiege3
						delete BSiege4
						delete CSiege1
						delete CSiege2
						delete CSiege3
						delete CSiege4
						delete CSiege5
					end if
				begin loop
					Alter1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_ALTAR at {924, 474} radius 13
					add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {815, 708} to BPlatoon1 action queue 
					if BPlatoon1 can navigate to {815, 708}
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {913, 698} to APlatoon1[1] action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {931, 582} to APlatoon1[2] action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {849, 624} to APlatoon1[3] action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {922, 527} to APlatoon1[4] action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {947, 677} to APlatoon1[5] action queue
				
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {753, 682} to BPlatoon1 action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {720, 604} to BPlatoon2 action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1196, 930} to BPlatoon3 action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {848, 707} to BPlatoon4 action queue 
				
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {979, 714} to CPlatoon1 action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1042, 582} to CPlatoon2 action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1146, 627} to CPlatoon3 action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {922, 540} to CPlatoon4 action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {972, 279} to CPlatoon5 action queue 
					end if
				
					// APlatoons
					if Town1 exists 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to APlatoon1[1] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to APlatoon1[1] action queue
					end if		
					wait 30 seconds
					if Town1 exists
						add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Alter1 to APlatoon1[2]  action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to APlatoon1[2]  action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to APlatoon1[2]  action queue
					end if	
					wait 1 seconds	
					if Town1 exists
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to APlatoon1[3] action queue
					end if	
					wait 1 seconds
					if Town1 exists
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to APlatoon1[4] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to APlatoon1[4] action queue
					end if	
					wait 1 seconds	
					if Town1 exists
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to APlatoon1[5] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to APlatoon1[5] action queue
					end if
			
					//BPlatoons
					if Town1 exists 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to BPlatoon1 action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to BPlatoon1 action queue
					end if		
					wait 30 seconds
					if Town1 exists
						add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Alter1 to BPlatoon2  action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to BPlatoon2  action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to BPlatoon2  action queue
					end if	
					wait 1 seconds	
					if Town1 exists
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to BPlatoon3 action queue
					end if	
					wait 1 seconds
					if Town1 exists
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to BPlatoon4 action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to BPlatoon4 action queue
					end if	
					//CPlatoons
					if Town1 exists 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to CPlatoon1 action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to CPlatoon1 action queue
					end if		
					wait 30 seconds
					if Town1 exists
						add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Alter1 to CPlatoon2 action queue
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to CPlatoon2 action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to CPlatoon2 action queue
					end if	
					wait 1 seconds	
					if Town1 exists
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to CPlatoon3 action queue
					end if	
					wait 1 seconds
					if Town1 exists
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to CPlatoon4 action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to CPlatoon4 action queue
					end if	
					if Town1 exists
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Town1} to CPlatoon5 action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_ENEMY_TOWN using Town1 to CPlatoon5 action queue
					end if
					begin loop
						isConverted = variable get town Town1 method of last conversion
						isConverted2 = variable get town Town0 method of last conversion 
						if isConverted !=0
							run script Losing1
						end if
						until isConverted != 0 or isConverted2 != 0 
					end loop
				end loop
			end if
		end if
	end loop
end script utaattack

begin script ttown2Def
	isConverted3 = 0
	dd = 0
	ddd = 0
	Num = 0
	Platoon1 = 0
	testPlatoon = 0
	DPlatoon3 = 0
	testPlatoon2 = 0
start
	begin loop
		isConverted3 = variable get town Town2 method of last conversion
		if town Town2 is under takeover from player 0
			dd = 1
			begin loop
				DPlatoon[dd] =  recruit PLATOON_INFO_AZTEC_MELEE_3 town Town2 platoon of size 20
				Num = get number of villagers in platoon DPlatoon[dd]
				dd = dd + 1
				until dd == 3
			end loop
			ddd = 1
			begin loop
				DPlatoon2[ddd] =  recruit PLATOON_INFO_AZTEC_RANGED_3 town Town2 platoon of size 20
				Num = get number of villagers in platoon DPlatoon[dd]
				ddd = ddd + 1
				until ddd == 3
			end loop
			testPlatoon = get platoon of player 0 nearest {Town2} radius 30
			testPlatoon2 = get platoon of player 0 nearest {Town2} radius 30
			add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon[1] action queue
			add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon2[1] action queue
			add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon[2] action queue
			add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon2[2] action queue
			if testPlatoon2 exists
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon2 to DPlatoon2[1] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon2 to DPlatoon2[2] action queue
			end if
			wait 60 seconds
			if town Town2 is under takeover from player 0
				DPlatoon3 =  recruit PLATOON_INFO_AZTEC_MELEE_4 town Town2 platoon of size 100
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon3 action queue
				wait 10 seconds
			end if
			if isConverted3 != 0
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon[1] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon2[1] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon[2] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon2[2] action queue
				add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using Town2 to DPlatoon3 action queue
				wait 60 seconds
			end if
		else
			delete DPlatoon[1]
			delete DPlatoon[2]
			delete DPlatoon2[1]
			delete DPlatoon2[2]
			delete DPlatoon3
		end if
		until isConverted3 !=0
	end loop	
end script ttown2Def

begin script ttown4Def
	isConverted4 = 0
	tt = 0
	ttt = 0
	Num = 0
	Platoon2 = 0
	testPlatoon = 0
	DPlatoon43 = 0
	testPlatoon2 = 0
	isConverted3 = 0
start
	begin loop
		isConverted4 = variable get town Town4 method of last conversion
		if town Town4 is under takeover from player 0
			tt = 1
			begin loop
				DPlatoon4[tt] =  recruit PLATOON_INFO_AZTEC_MELEE_3 town Town4 platoon of size 20
				Num = get number of villagers in platoon DPlatoon4[tt]
				tt = tt + 1
				until tt == 3
			end loop
			ttt = 1
			begin loop
				DPlatoon42[ttt] =  recruit PLATOON_INFO_AZTEC_RANGED_3 town Town4 platoon of size 20
				Num = get number of villagers in platoon DPlatoon42[ttt]
				ttt = ttt + 1
				until ttt == 3
			end loop
			testPlatoon = get platoon of player 0 nearest {Town4} radius 30
			testPlatoon2 = get platoon of player 0 nearest {Town4} radius 30
			add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon4[1] action queue
			add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon42[1] action queue
			add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon4[2] action queue
			add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon42[2] action queue
			if testPlatoon2 exists
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon2 to DPlatoon42[1] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon2 to DPlatoon42[2] action queue
			end if
			wait 60 seconds
			if town Town4 is under takeover from player 0
				DPlatoon43 =  recruit PLATOON_INFO_AZTEC_MELEE_4 town Town4 platoon of size 100
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon43 action queue
				wait 10 seconds
			end if
			if isConverted4 != 0
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon4[1] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon42[1] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon4[2] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_PLATOON using testPlatoon to DPlatoon42[2] action queue
				add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using Town4 to DPlatoon43 action queue
				wait 60 seconds
			end if
		else
				delete DPlatoon4[1]
				delete DPlatoon4[2]
				delete DPlatoon42[1]
				delete DPlatoon42[2]
				delete DPlatoon43
		end if
		until isConverted4 !=0
	end loop	

end script ttown4Def

begin script ttown0def
	GateHouse[NUMBER_OF_GATEHOUSES]
	GateTown[NUMBER_OF_GATEHOUSES]
	TestPlatoon = 0
	TestSiege = 0
	TestCreature = 0
	isConverted = 0
	Cnt = 0
	Siege9 = 0
start
	GateHouse[1] = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {1293, 1565} radius 10
	GateHouse[2] = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {808, 1578} radius 10
	GateHouse[3] = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {1015, 1573} radius 10
	GateHouse[4] = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {1030, 1853} radius 10
	GateHouse[5] = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {1030, 2079} radius 10
	begin loop
		if Cnt == NUMBER_OF_GATEHOUSES
			Cnt = 0
		end if
		isConverted = variable get town Town0 method of last conversion	
		TestPlatoon = get platoon of player 0 nearest {GateHouse[Cnt]} radius 102
		TestSiege = get siege weapon of player 0 nearest {GateHouse[Cnt]} radius 102
		//TestCreature = get distance from {GateHouse[0]} to {oCreature}
		
		if GateHouse[Cnt] exists
			if TestPlatoon exists or TestSiege exists 
				set gate GateHouse[Cnt] close
			else
				set gate GateHouse[Cnt] open
			end if
		end if
		
		Cnt++	
		until isConverted !=0
	end loop
end script ttown0def

begin script DefTown03
		Wall0 = get wall segment nearest {547, 1660} radius 20
		Wall1 = get wall segment nearest {767, 1581} radius 20
		Wall2 = get wall segment nearest {956, 1572} radius 20
		Wall3 = get wall segment nearest {1111, 1564} radius 20
		Wall4 = get wall segment nearest {1236, 1563} radius 20
		Wall5 = get wall segment nearest {1402, 1571} radius 20
		Wall6 = get wall segment nearest {1032, 2285} radius 20
		Wall7 = get wall segment nearest {985, 1855} radius 20
		Wall8 = get wall segment nearest {1065, 1853} radius 20
		Wall9 = get wall segment nearest {1063, 2050} radius 20
		Wall10 = get wall segment nearest {983, 2080} radius 20
		Wall11 = get wall segment nearest {1063, 2080} radius 20
		Platoon1[MAX_PLATOONS]
		GateHouse1 = 0
		GateHouse2 = 0
		GateHouse3 = 0
		GateHouse4 = 0
		GateHouse5 = 0
		TestPlatoon = 0
		TestPlatoon2 = 0
		TestPlatoon3 = 0
		TestPlatoon4 = 0
		TestPlatoon5 = 0
		TestSiege = 0
		TestSiege2 = 0
		TestSiege3 = 0
		TestSiege4 = 0
		TestSiege5 = 0
		GateOpen1 = 0
		isConverted = 0
		isConverted2 = 0
		Xx = 0
		Siege9 = 0
		NumP = 0
		PlatoonG = 0
		PlatoonG2 = 0
		PlatoonG3 = 0
		Moveattack = 0
		Attack101 = 0
		NumP17 = 0
start
	GateHouse1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {1293, 1565} radius 10
	GateHouse2 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {808, 1578} radius 10
	GateHouse3 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {1015, 1573} radius 10
	GateHouse4 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {1030, 1853} radius 10
	GateHouse5 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {1030, 2079} radius 10
	isConverted2 = variable get town Town1 method of last conversion
	begin loop
		isConverted = variable get town Town0 method of last conversion
		TestPlatoon = get platoon of player 0 nearest {GateHouse1} radius 102
		TestSiege = get siege weapon of player 0 nearest {GateHouse1} radius 102
		TestPlatoon2 = get platoon of player 0 nearest {GateHouse2} radius 102
		TestSiege2 = get siege weapon of player 0 nearest {GateHouse2} radius 102
		TestPlatoon3 = get platoon of player 0 nearest {GateHouse3} radius 102
		TestSiege3 = get siege weapon of player 0 nearest {GateHouse3} radius 102
		TestPlatoon4 = get platoon of player 0 nearest {GateHouse4} radius 102
		TestSiege4 = get siege weapon of player 0 nearest {GateHouse4} radius 102
		TestPlatoon5 = get platoon of player 0 nearest {GateHouse5} radius 102
		TestSiege5 = get siege weapon of player 0 nearest {GateHouse5} radius 102
		until TestPlatoon exists or TestSiege exists or TestPlatoon2 exists or TestSiege2 exists or TestPlatoon3 exists or TestSiege3 exists or isConverted !=0
	end loop
	stop script "ttown0def"
	set gate GateHouse1 close
	set gate GateHouse2 close
	set gate GateHouse3 close
	if isConverted == 0
		if TestPlatoon exists or TestSiege exists or TestPlatoon2 exists or TestSiege2 exists or TestPlatoon3 exists or TestSiege3 exists
			Xx = MAX_PLATOONS
			if Arher1 == 0
				Platoon1[1] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall0}+{10, 10} with 50 men and 0 women 
				set Platoon1[1] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall0 to Platoon1[1] action queue
				Platoon1[2] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall1}+{10, 10} with 50 men and 0 women 
				set Platoon1[2] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall1 to Platoon1[2] action queue
				Platoon1[3] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall2}+{10, 10} with 50 men and 0 women 
				set Platoon1[3] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall2 to Platoon1[3] action queue
				Platoon1[4] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall3}+{10, 10} with 50 men and 0 women 
				set Platoon1[4] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall3 to Platoon1[4] action queue
				Platoon1[5] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall4}+{10, 10} with 50 men and 0 women 
				set Platoon1[5] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall4 to Platoon1[5] action queue
				Platoon1[6] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall5}+{10, 10} with 50 men and 0 women 
				set Platoon1[6] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall5 to Platoon1[6] action queue
				Platoon1[7] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Town0}+{10, 0} with 50 men and 0 women 
				set Platoon1[7] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall6 to Platoon1[7] action queue
				Platoon1[8] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall7}+{10, 10} with 50 men and 0 women 
				set Platoon1[8] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall7 to Platoon1[8] action queue
				Platoon1[9] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall8}+{10, 10} with 50 men and 0 women
				set Platoon1[9] player 1		
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall8 to Platoon1[9] action queue
				Platoon1[10] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall9}-{10, 10} with 50 men and 0 women 
				set Platoon1[10] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall9 to Platoon1[10] action queue
				Platoon1[11] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {983, 2080} with 50 men and 0 women 
				set Platoon1[11] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall10 to Platoon1[11] action queue
				Platoon1[12] = create platoon PLATOON_INFO_NORSE_RANGED_5 at {Wall11}-{10, 10} with 50 men and 0 women 
				set Platoon1[12] player 1
				add action PLATOON_AGENDA_ACTION_GET_ON_WALL using Wall11 to Platoon1[12] action queue
				Arher1 = 1
			end if
		end if
		wait 10 seconds
		Platoon1[17] = create platoon PLATOON_INFO_NORSE_MELEE_2 at {1020, 1652} with 20 men and 0 women 
		set Platoon1[17] player 1
		begin loop
			if TestPlatoon exists or TestSiege exists
				begin loop
					add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using TestPlatoon to Platoon1[17] action queue
					if GateHouse1 exists
						if gate GateHouse1 is open
							GateOpen1 = 1
						else
							GateOpen1 = 0
						end if
					else
						GateOpen1 = -1
					end if
					NumP17 = get number of villagers in platoon Platoon1[17]
					until GateOpen1 !=0 or NumP17 == 0
				end loop
			elsif TestPlatoon2 exists or TestSiege2 exists
				begin loop
					add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using TestPlatoon2 to Platoon1[17] action queue
					if GateHouse2 exists
						if gate GateHouse2 is open
							GateOpen1 = 1
						else
							GateOpen1 = 0
						end if
					else
						GateOpen1 = -1
					end if
					NumP17 = get number of villagers in platoon Platoon1[17]
					until GateOpen1 !=0 or NumP17 == 0
				end loop
			elsif TestPlatoon3 exists or TestSiege3 exists 
				begin loop
					add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using TestPlatoon3 to Platoon1[17] action queue
					if GateHouse3 exists
						if gate GateHouse3 is open
							GateOpen1 = 1
						else
							GateOpen1 = 0
						end if
					else
						GateOpen1 = -1
					end if
					NumP17 = get number of villagers in platoon Platoon1[17]
					until GateOpen1 !=0 or NumP17 == 0
				end loop
			end if
			if GateOpen1 !=0 or NumP17 == 0
				set gate GateHouse4 close
				set gate GateHouse5 close
				begin loop
					NumP = get number of platoon of player 0 at {1030, 1948} radius 529
					if NumP > 0
						Attack101 = 1
					else 
						Attack101 = 0
					end if							
					if Attack101 == 1 and TestPlatoon exists or TestSiege exists or TestPlatoon2 exists or TestSiege2 exists or TestPlatoon3 exists or TestSiege3 exists
						Platoon1[13] = recruit PLATOON_INFO_AZTEC_MELEE_2 town Town0 platoon of size NumPlatoon2
						Platoon1[14] = recruit PLATOON_INFO_AZTEC_RANGED_4 town Town0 platoon of size NumPlatoon2
						Platoon1[15] = recruit PLATOON_INFO_AZTEC_MELEE_2 town Town0 platoon of size NumPlatoon2
						Platoon1[16] = recruit PLATOON_INFO_AZTEC_RANGED_4 town Town0 platoon of size NumPlatoon2
						Moveattack = 1							
						if TestPlatoon exists	
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon to Platoon1[13] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon to Platoon1[14] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon to Platoon1[15] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon to Platoon1[16] action queue
						elsif TestPlatoon2 exists	
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon2 to Platoon1[13] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon2 to Platoon1[14] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon2 to Platoon1[15] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon2 to Platoon1[16] action queue
						elsif TestPlatoon3 exists	
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon3 to Platoon1[13] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon3 to Platoon1[14] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon3 to Platoon1[15] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon3 to Platoon1[16] action queue
						elsif TestPlatoon4 exists	
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon4 to Platoon1[13] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon4 to Platoon1[14] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon4 to Platoon1[15] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon4 to Platoon1[16] action queue
						elsif TestPlatoon5 exists	
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon5 to Platoon1[13] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon5 to Platoon1[14] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon5 to Platoon1[15] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestPlatoon5 to Platoon1[16] action queue
						end if
						if TestSiege4 exists
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestSiege4 to Platoon1[9] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestSiege4 to Platoon1[10] action queue
						end if
						if TestSiege5 exists
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestSiege5 to Platoon1[11] action queue
							add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using TestSiege5 to Platoon1[12] action queue
						end if
						if town Town0 is under takeover from player 0
							wait 70 seconds
							NumPlatoon2 = NumPlatoon2 + 20
						else
							wait 90 seconds
							NumPlatoon2 = NumPlatoon2 + 10
						end if
						isConverted = variable get town Town0 method of last conversion
					end if
					if NumP == 0
						run background script ttown0def
					end if
					if NumP == 0 or isConverted !=0
						delete Platoon1[1]
						delete Platoon1[2]
						delete Platoon1[3]
						delete Platoon1[4]
						delete Platoon1[5]
						delete Platoon1[6]
						delete Platoon1[7]
						delete Platoon1[8]
						delete Platoon1[9]
						delete Platoon1[10]
						delete Platoon1[11]
						delete Platoon1[12]
						delete Platoon1[13]
						delete Platoon1[14]
						delete Platoon1[15]
						delete Platoon1[16]
						enable villagers can build GateHouse1
						enable villagers can build GateHouse2
						enable villagers can build GateHouse3
						enable villagers can build GateHouse4
						enable villagers can build GateHouse5
					end if
					until NumP == 0 or isConverted !=0
				end loop
			end if
			run script DefTown0
		end loop
	end if
end script DefTown03

begin script DefTown0
start
	NumPlatoon2 = 30
	Arher1 = 0
	run script DefTown03 
end script DefTown0

begin script DefT0tT4
	Platoon3 = 0
	Num = 0
	NumPlatoon = 20
	incamp = 0
	isConverted = 0
	isConverted2 = 0
	isConverted3 = 0
	isConverted4 = 0
	isConverted5 = 0
	MigrationParty1 = 0
	MigrationParty2 = 0
	GateHouse1 = 0
	GateOpen = 0
	PlatoonP0 = 0
	EnemyPlatoon = 0
	Takeover2 = 0
	Takeover3 = 0
	Takeover4 = 0
	Takeover5 = 0
start
	// By Willy this is the protal platoon.
	begin loop
		isConverted = variable get town Town0 method of last conversion
		isConverted2 = variable get town Town1 method of last conversion 
		isConverted3 = variable get town Town2 method of last conversion
		isConverted4 = variable get town Town3 method of last conversion 
		isConverted5 = variable get town Town4 method of last conversion 
		wait 20 seconds
		Num = get number of villagers in platoon Platoon3
		if Num == 0
			NumPlatoon = NumPlatoon + 10
			Platoon3 = recruit PLATOON_INFO_AZTEC_MELEE_1 town Town0 platoon of size NumPlatoon
			EnemyPlatoon = get number of platoon of player 0 at {Platoon3} radius 10000
			if {Platoon3} near {EnemyPlatoon} radius 50 
				set Platoon3 attack EnemyPlatoon with severity 1
			end if
			incamp = 1
		end if	
		if incamp == 1 or incamp == 0 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {1011, 1489} to Platoon3 action queue
			if {Platoon3} near {EnemyPlatoon} radius 50 
				set Platoon3 attack EnemyPlatoon with severity 1
			end if
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {870, 1427} to Platoon3 action queue
			if {Platoon3} near {EnemyPlatoon} radius 50 
				set Platoon3 attack EnemyPlatoon with severity 1
			end if
			if isConverted3 != 0			
				add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to Platoon3 action queue
			end if
			if town Town2 is under takeover from player 0
				Takeover2 = 1
				if Takeover2 == 1
					add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {599, 1458} to Platoon3 action queue
				end if	
			end if
			if {Platoon3} near {EnemyPlatoon} radius 50 
				set Platoon3 attack EnemyPlatoon with severity 1
			end if
			GateHouse1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {881, 1140} radius 10
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {926, 1286} to Platoon3 action queue
			if GateHouse1 exists
				if gate GateHouse1 is open
					GateOpen = 1
				else
					GateOpen = 0
				end if
			else
				GateOpen = -1
			end if
			if GateOpen != 0
				Num = get number of villagers in platoon Platoon3
				if Town1 exists
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to Platoon3 action queue
				end if
			end if
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {1140, 1253} to Platoon3 action queue
			if {Platoon3} near {EnemyPlatoon} radius 50 
				set Platoon3 attack EnemyPlatoon with severity 1
			end if
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {1251, 1351} to Platoon3 action queue
			wait 3 seconds
			if isConverted5 !=0 
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {1657, 1304} to Platoon3 action queue
			end if 
			if town Town3 is under takeover from player 0
				Takeover3 = 1
				if Takeover3 == 1
					add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {1375, 1304} to Platoon3 action queue
				end if	
			end if
			if town Town4 is under takeover from player 0
				Takeover4 = 1
				if Takeover4 == 1
					add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {1657, 1304} to Platoon3 action queue
				end if	
			end if
			if {Platoon3} near {EnemyPlatoon} radius 50 
				set Platoon3 attack EnemyPlatoon with severity 1
			end if
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {1126, 1489} to Platoon3 action queue
		end if
		until isConverted !=0 or isConverted2 !=0
	end loop
end script DefT0tT4

begin script unDscrol
	TScroll = create with angle 86 and scale 1.93 SCRIPT_OBJECT_TYPE_ROCK MOBILE_STATIC_INFO_NORSE_GRAVEYARD at {478, 869}
	ScrollVis = create visual effect VISUAL_EFFECT_GOLD_SCROLL on TScroll time -1
	BeamGlow = create visual effect VISUAL_EFFECT_SCROLL_BEAM on TScroll time -1
	Tmp = create influence at {TScroll} radius 30
	OtherVillager = 0
	Ring12 = 0
	Food101 = 0
	Fire1 = 0
	Fire2 = 0
	Fire3 = 0
	Fire4 = 0
	Fire5 = 0
	PtK = 0
	Platoon1G = 0
	complatet = 0
	fire6 = 0
	light1 = 0
	villager1 = 0
	food10 = 0
start
	wait until TScroll right clicked
	stop visual effect ScrollVis
	stop visual effect  BeamGlow
	wait 1 second
	Ring12 = create visual effect VISUAL_EFFECT_SCRIPT_TARGET at {500, 26, 869} time -1
	begin fullscreen cinema
		stop music
		start music "norsemarchinglarge_01" loop forever
		set fade in time 10
		villager1 = create SCRIPT_OBJECT_TYPE_VILLAGER VILLAGER_INFO_GREEK_FISHERMAN_MALE at {500, 26, 869}
		set camera focus to {TScroll}
		move camera position to {510, 30, 869} time 10
		wait 10 seconds
		stop music
		move camera focus to {villager1} time 3 
		start music "undeadscroll" loop 1
		wait 20 seconds
		set fade in time 5
		wait 1 second
	end cinema
	delete villager1
	begin loop
			Food101 = get adult at {500, 869} radius 20 excluding disciple VILLAGER_DISCIPLE_NONE
			if Food101 exists 
				complatet = 1
			end if
		until complatet == 1
	end loop
		wait 1 seconds
		stop music
		start music "norsemarchinglarge_01" loop forever
		move villager Food101 focus to {TScroll}
		stop Food101 moving
		if complatet == 1
			begin cinema
				set fade in time 5
				set camera focus to {TScroll}
				move camera position to {510, 30, 869} time 10
				wait 8 seconds
				delete Food101
				wait 1 second
				Fire1 = create visual effect VISUAL_EFFECT_TORCH_LARGE at {465, 28, 868} time -1 
				wait 1 second
				Fire2 = create visual effect VISUAL_EFFECT_TORCH_LARGE at {478, 28, 882} time -1 
				wait 1 second
				Fire3 = create visual effect VISUAL_EFFECT_TORCH_LARGE at {494, 28, 877} time -1 
				wait 1 second
				Fire4 = create visual effect VISUAL_EFFECT_TORCH_LARGE at {493, 28, 860} time -1 
				wait 1 second
				Fire5 = create visual effect VISUAL_EFFECT_TORCH_LARGE at {478, 28, 854} time -1 
				wait 5 seconds
				move camera position to {530, 50, 869} time 10
				wait 10 seconds
				Platoon1G = create platoon PLATOON_INFO_SKELETON_MELEE at {500, 26, 869} with 100 men and 0 women
				set Platoon1G player 0
				wait 3 seconds
				stop music with fadetime 5
			end cinema
			stop visual effect Ring12
			increment tribute by 60000
			light1 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2154, 40, 1509} time -1
			LightOb = LightOb + 1
		end if
end script unDscrol

begin script winning1
	isConverted = 0
	fire1 = 0
	fire2 = 0
	Num0P = 0
	light2 = 0
start
	begin loop
		isConverted = variable get town Town0 method of last conversion
		until isConverted !=0
	end loop
	if Run6 == 0
		if isConverted !=0
			begin cinema
				run background script fireworks
				set fade red 0 green 0 blue 0 time 4
				wait 2 second
				stop music
				start music "Losing" loop 1
				set fade in time 1
				set camera focus to {432, 140, 2165}  
				set camera position to {305, 148, 551}
				wait 1 seconds
				move camera position to {337, 210, 566} time 5
				wait 5 seconds
				move camera focus to {1031, 63, 2257} time 3
				move camera position to {1023, 180, 1203} time 10
				wait 8 seconds
				move camera position to {1249, 160, 1534} time 10
				wait 8 seconds
				move camera position to {1025, 120, 2244} time 10
				wait 8 seconds
				stop music
				start music "cut_scene_happy_02" loop forever
				move camera position to {686, 100, 1847} time 10
				wait 8 seconds
				move camera position to {1010, 80, 1510} time 10
				wait 8 seconds
				move camera position to {1010, 60, 1127} time 10
				wait 8 seconds
				move camera focus to {921, 23, 618} time 5
				move camera position to {1075, 100, 823} time 10
				wait 13 seconds
				stop music with fadetime 10
				wait 4 seconds
			end cinema
			Run6 = 1
			enable global influence
			light2 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2152, 23, 1398} time -1 
			LightOb = LightOb + 1
			run background script waves1
			run background script GlobalIn
		end if
	end if
end script winning1

begin script Losing1
	isConverted2 = 0
	Flas = 0
	Flas2 = 0
	Flas3 = 0
	Flas4 = 0
	Flas5 = 0
	Flas6 = 0
start
	begin loop
	isConverted2 = variable get town Town1 method of last conversion 
	until isConverted2 !=0
	end loop
	if isConverted2 !=0
		set game time 20
		begin cinema
			set fade in time 10
			wait 1 second
			set camera focus to {1032, 121, 2380}  
			set camera position to {1035, 140, 2288}
			wait 2 seconds
			move camera position to {1035, 121, 2288} time 7
			Flas = create visual effect VISUAL_EFFECT_WEATHER_LIGHTNING_FLASH at {1035, 121, 2288} time -1
			wait 8 seconds
			move camera position to {1030, 100, 2051} time 10
			wait 10 seconds
			Flas2 = create visual effect VISUAL_EFFECT_WEATHER_LIGHTNING_FLASH at {1030, 100, 2051} time -1
			wait 1 second
			move camera position to {1023, 100, 1707} time 10
			wait 10 seconds
			move camera focus to {925, 23, 423} time 5
			move camera position to {1017, 100, 1287} time 10
			Flas3 = create visual effect VISUAL_EFFECT_WEATHER_LIGHTNING_FLASH at {1017, 100, 1287} time -1
			wait 10 seconds
			move camera position to {905, 100, 921} time 10
			Flas4 = create visual effect VISUAL_EFFECT_WEATHER_LIGHTNING_FLASH at {905, 100, 921} time -1
			wait 1 second
			Flas5 = create visual effect VISUAL_EFFECT_WEATHER_LIGHTNING_FLASH at {905, 100, 921} time -1
			wait 8 seconds
			wait 3 seconds
			set fade in time 10
			wait 4 seconds
		end cinema
	end if
end script Losing1

begin script VolcanoCinemaControl
          vEpic = get SCRIPT_OBJECT_TYPE_WONDER EPIC_WONDER_NUMBER_VOLCANO at {Town1} radius 300
          vEpicFoc = marker at {vEpic}+{0,-0,0}
          VolcanoPos = marker at hand position
          oVolcano = 0
          Volcano = marker at future position of epic miracle oVolcano with time 0 seconds
          EpicZOffsetVol = marker at (EPIC_OFFSETZ_POS2 * {vEpic})
start
   if Volcinema == 0
          oVolcano = get spell EPIC_WONDER_NUMBER_VOLCANO at {VolcanoPos} radius 5
               begin cinema
                 wait 2 seconds
               move camera focus to {VolcanoPos} time 5
               move camera position to {VolcanoPos} time 5
                 wait 2 seconds
               set fade red 255 green 255 blue 255 time 1
                 wait 1 second
               play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH4"
               set fade in time 1
               enable fixed camera rotation at {vEpic}
               start music "norse_chant_vocal"
               play string sound "SCRIPT1_VEPIC_EPICTOWERELECTRIC2"
               set camera focus to {vEpicFoc}+{0,10,0}
               set camera position to {vEpic}+{EPIC_OFFSETX_POS2 * ROTATION_OF_EPIC2/2,10, EpicZOffsetVol}
                 wait 7 seconds
               move camera focus to {vEpic}+{0,30,0} time 13
               move camera position to {vEpic}+{EPIC_OFFSETX_POS2 * ROTATION_OF_EPIC2/2,30, EpicZOffsetVol} time 13 
                 wait 1.5 seconds
               enable predefined sky "volcano" time 5
                 wait 10.5 seconds
               move camera focus to {vEpic}+{0,170,5} time 1
               disable fixed camera rotation at {vEpic}
                 wait 2 seconds
               set fade red 255 green 255 blue 255 time 1
                 wait 1 second
               set camera focus to {VolcanoPos}+{0,50,0}
               set camera position to {VolcanoPos}+{0,90,80}
               set fade in time 3
                 wait 2 seconds
               move camera focus to {VolcanoPos} time 5
               stop music with fadetime -5
                 wait 8 seconds
               set camera roll 30 time -1
               set camera position to {VolcanoPos}+{8,180,46}
                 wait 6 seconds
               set camera roll 0 time -10
               set camera focus to {VolcanoPos}+{0,60,0}
               set camera position to {VolcanoPos}+{0,60,43}
		wait 3.5 seconds
               shake camera strength 6.3
                 wait 3.5 seconds
               set camera focus to {VolcanoPos}
               set camera position to {VolcanoPos}+{0,90,40}
                 wait 4.5 seconds
               stop camera shake
               set camera focus to {VolcanoPos}+{30,0,0}
               set camera position to {VolcanoPos}+{0,50,40}
                 wait 7.5 seconds
               set camera position to {VolcanoPos}+{0,120,120}
               set camera roll 0 time -100
                 wait 9 seconds
               enable predefined sky "mainsky" time 5
                 wait 5 seconds
               end cinema
                     clear right clicked object
                     clear right clicked position
                     clear left clicked object
                     clear left clicked position
               Volcinema = 1
               else
               Volcinema = 0
               end if
             until Volcinema == 1 or key KB_ESC down

    if key KB_ESC down
  skip current cutscene
   wait 2 seconds
    end if
end script VolcanoCinemaControl

begin script VolcanoScript

oTown = 0
vEpic = 0
oVolcano = 0


// Visual effects for the Volcano - 1 to 12
oVisual = 0
oVisual2 = 0
oVisual3 = 0
oVisual3Pos = 0
oVisual4 = 0
oVisual5 = 0
oVisual6 = 0
oVisual7 = 0
oVisual8 = 0
oVisual9 = 0
oVisual10 = 0
oVisual11 = 0
oVisual12 = 0

// Visual effects for the Volcano - 13 to 26
oVisual13 = 0
oVisual14 = 0
oVisual15 = 0
oVisual16 = 0
oVisual17 = 0
oVisual18 = 0
oVisual19 = 0
oVisual20 = 0
oVisual21 = 0
oVisual22 = 0
oVisual23 = 0
oVisual24 = 0
oVisual25 = 0
oVisual26 = 0

// Unused variables
VolcanoPos = 0
VolcanoMixer = 0
VolcanoWorldPos = 0
Sound = 0

// Volcano Epic Positions and focuses
vEpicFoc = 0
vEpicPos = 0
RelativePos = 0
Cam = marker at camera position
PosX = 0
PosZ = 0

// Front of Wonder Pos
WonderPos = 0

start
WonderPos = 0

begin loop
	oVolcano = 0
	vEpic = get SCRIPT_OBJECT_TYPE_WONDER EPIC_WONDER_NUMBER_VOLCANO at {Town1} radius 300
        PosX = marker at {vEpic}+{-20,0,0}
        PosZ = marker at (vEpic * {0,0,10})
        RelativePos = marker at get world position from vEpic to {vEpic}
        vEpicPos = marker at {vEpic}+(vEpicPos * {RelativePos})
        vEpicFoc = marker at {vEpic}+{0,-0,0}
	if vEpic left clicked or vEpic right clicked
		wait 1 second
		if wonder in hand
		begin loop
			if wonder fire near hand position radius 0.5
								Fireweapone = 1
								run background script CheatObb
                                VolcanoPos = marker at hand position
		    oVolcano = create volcano at {VolcanoPos} player 0
                            run background script VolcanoCinemaControl
                                wait 5 seconds
                                start music "norse_chant_vocal"
                                play string sound "SCRIPT1_VEPIC_SYNTH2"
                                wait 5 seconds
                                invoke vEpic EPIC_WONDER_STAGE_1
                                play string sound "SCRIPT1_SEPIC_SYNTH2"
                                play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH4"
                                wait 4 seconds
                                play string sound "SCRIPT1_SEPIC_SYNTH2"
                                play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH2"
                                invoke vEpic EPIC_WONDER_STAGE_2
                                wait 4.2 seconds
                                play string sound "SCRIPT1_SEPIC_SYNTH2"
                                play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH1"
                                invoke vEpic EPIC_WONDER_STAGE_3
                                invoke vEpic EPIC_WONDER_STAGE_4
                                wait 2.5 seconds
                                invoke vEpic EPIC_WONDER_STAGE_5
                                invoke vEpic EPIC_WONDER_STAGE_6
                                invoke vEpic EPIC_WONDER_STAGE_7
                                wait 2 seconds
                                invoke vEpic EPIC_WONDER_STAGE_8
                                invoke vEpic EPIC_WONDER_STAGE_9
                                invoke vEpic EPIC_WONDER_STAGE_10
                                invoke vEpic EPIC_WONDER_STAGE_START_BEAM
                                wait 1.5 seconds
                                oVisual = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM on vEpic time 1
                                oVisual20 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM on vEpic time 1
                                oVisual2 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_UP at {vEpic} time 1
                                oVisual16 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_UP at {vEpic}+{0,5,0} time 1
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                stop sound "SCRIPT1_SEPIC_SYNTH2"
                                wait 2 seconds
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 1 second
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                stop visual effect oVisual
                                stop visual effect oVisual2
                                stop music with fadetime -5
                                wait 2 seconds
                                oVisual3 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {VolcanoPos} time -1
                                play string sound "SCRIPT1_VEPIC_BEAMOFLIGHTSTART1"
                                invoke oVolcano EPIC_START_SWIRL
                                wait 1 second
                                oVisual4 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual10 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual5 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual11 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual6 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual12 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                invoke oVolcano EPIC_START_SHOCKWAVE
                                start music "volcano_music"
                                wait 1 second
				invoke oVolcano EPIC_START_RISING
                                invoke oVolcano EPIC_START_SMOKE
                                wait 1 second
                                oVisual7 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual13 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual7 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual13 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual8 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual14 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual9 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual15 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
				wait 2 seconds
                                oVisual21 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual22 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 3 seconds
                                oVisual25 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual26 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                play string sound "SCRIPT1_VEPIC_VOLCANOSHOCKWAVHIGHPITCHED"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                oVisual16 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual17 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 2 seconds
                                oVisual23 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,200,0} time 1
                                oVisual24 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM_PULSE_DOWN at {oVolcano}+{0,205,0} time 1
                                play string sound "SCRIPT1_VEPIC_DECAYCHARGESPELL"
                                wait 3.5 seconds
                                stop visual effect oVisual3
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
				invoke oVolcano EPIC_START_BUBBLING_LAVA
				invoke oVolcano EPIC_START_LAVA
                                wait 6 seconds
				invoke oVolcano EPIC_START_ASH
				invoke oVolcano EPIC_START_SMOKE
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 0.2 seconds
				invoke oVolcano EPIC_START_ROCK_SHOWER
				invoke oVolcano EPIC_SPAWN_ROCKS
                                wait 4 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 4.2 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 5 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                enable predefined sky "mainsky" time 5
                                wait 5 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 2 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
                                invoke oVolcano EPIC_START_EXPLOSION
                                invoke oVolcano EPIC_FLASH
                                invoke oVolcano EPIC_FLASH
                                wait 2 seconds
                                play string sound "SCRIPT1_VEPIC_EXPLOSION3"
				wait 28 seconds
				invoke oVolcano EPIC_STOP_ASH
				invoke oVolcano EPIC_STOP_SMOKE
				invoke oVolcano EPIC_END_ROCK_SHOWER
				invoke oVolcano EPIC_START_FALLING
				invoke oVolcano EPIC_STOP_BUBBLING_LAVA
				wait 10 seconds
				invoke oVolcano EPIC_STOP_LAVA
				wait 5 seconds
				delete oVolcano
                                invoke vEpic EPIC_WONDER_STAGE_LAST
                                clear right clicked object
                                clear right clicked position
                                clear left clicked object
                                clear left clicked position
                               oVolcano = 1
                               else oVolcano = 0
                               end if
                              until oVolcano == 1
		      end loop
		end if
	end if
if oVolcano == 1
release loop
end if
end loop
end script VolcanoScript

 
begin script HurricaneCinemaControl(oHurricane)
         
          hEpic = get SCRIPT_OBJECT_TYPE_WONDER EPIC_WONDER_NUMBER_HURRICANE at {Town1} radius 300
          hEpicFoc = marker at {hEpic}+{0,-0,0}
          HurricanePos = marker at hand position
          Hurricane = marker at future position of epic miracle oHurricane with time 0 seconds
          EpicZOffsetHur = marker at (EPIC_OFFSETZ_POS * {hEpic})
start
	begin loop
   if CinemaFinish == 0
		 begin cinema
                           
			wait 2 seconds
                                move camera focus to {HurricanePos} time 5
                                move camera position to {HurricanePos} time 5
			wait 2 seconds
                                set fade red 255 green 255 blue 255 time 2
			wait 2 seconds
                                set fade in time 1
                                set camera focus to {hEpicFoc}+{0,10,0}
                                set camera position to {hEpic}+{EPIC_OFFSETX_POS * ROTATION_OF_EPIC/2, 10,EpicZOffsetHur}
			wait 7 seconds
                                move camera focus to {hEpic}+{0,30,0} time 13
                                move camera position to {hEpic}+{EPIC_OFFSETX_POS * ROTATION_OF_EPIC/2,30,EpicZOffsetHur} time 13
			wait 14 seconds
                                move camera focus to {hEpic}+{0,140,3} time 1
			wait 2 seconds
                                set fade red 255 green 255 blue 255 time 1
			wait 1 second
                                set camera focus to {HurricanePos}
                                set camera position to {HurricanePos}+{0,250,180}
				set fade in time 1
			wait 4 seconds
                                set camera focus follow oHurricane offset {0,240,0}
                                set camera position follow oHurricane offset {80,240,130}
			wait 5 seconds
                                set camera focus follow oHurricane
                                set camera position follow oHurricane offset {40,100,60}
			wait 6 seconds
                                set camera position to {oHurricane}+{80,30,0}
                                set camera focus to {oHurricane}+{10,30,0}
			wait 4 seconds
                                set camera focus follow oHurricane
                                set camera position follow oHurricane offset {40,200,-150}
			wait 5 seconds
                                set camera focus follow oHurricane
                                set camera position follow oHurricane offset {40,100,60}
			wait 12 seconds
                                
               			enable predefined sky "mainsky" time 5
			wait 5 seconds
                    end cinema
		CinemaFinish = 1
	else
		CinemaFinish = 0
	end if
		until CinemaFinish == 1 or key KB_ESC down

    if key KB_ESC down
  skip current cutscene
   wait 2 seconds
    end if	
	end loop
end script HurricaneCinemaControl


begin script HurricaneScript

// Other Variables
hEpic = 0
oVisual = 0
oVisual2 = 0
oVisual3 = 0

// Hurricane Specific variables
HurricanePhysics = 0
HurricanePos = 0
HurricaneReady = 0
oHurricane = 0
HurricaneHeld = 0

// Visual effects to replace wonder's miracle
Rock1 = 0
HurricaneSeed = 0

// Camera variables to put cam directly in front of wonder
RelativePos = 0
hEpicPos = 0
hEpicFoc = 0


start

begin loop
	oHurricane = 0
	hEpic = get SCRIPT_OBJECT_TYPE_WONDER EPIC_WONDER_NUMBER_HURRICANE at {Town1} radius 300
        RelativePos = marker at get world position from hEpic to {hEpic}
        hEpicPos = marker at {hEpic}+(hEpic * {RelativePos}+{-20,10,hEpic})
        hEpicFoc = marker at {hEpic}+{0,-0,0}
      if hEpic exists and SCRIPT_OBJECT_PROPERTY_TYPE_BUILT_PERCENTAGE of hEpic == 1.0
        wait 1 second
        if hEpic right clicked and wonder in hand or hEpic left clicked and wonder in hand
        empty player hand
         wait 0.2 seconds
         Rock1 = create SCRIPT_OBJECT_TYPE_MOBILE_STATIC MOBILE_STATIC_INFO_BOULDER_ROUND at hand position
         HurricaneSeed = create visual effect VISUAL_EFFECT_HURRICANE_SEED on Rock1 time -1
         set Rock1 in player 0 hand
         HurricaneHeld = get object held
         HurricaneHeld = Rock1
             wait 1 second
		begin loop
              if bindable action BINDABLE_ACTION_TYPE_ACTION performed
                HurricanePos = marker at hand position
                oHurricane = create hurricane at {HurricanePos} player 0 direction {125,0,223}
                     clear player 0 spell charging
                     stop visual effect HurricaneSeed
                     delete Rock1
			run background script HurricaneCinemaControl(oHurricane)
                                wait 7 seconds
                                play string sound "SCRIPT1_VEPIC_FLAMETHROWERWHOOSH4"
                                start music "egypt_chant"
                                wait 5 seconds
                                invoke hEpic EPIC_WONDER_STAGE_1
                                play string sound "SCRIPT3_HEPIC_SYNTH3"
                                play string sound "SCRIPT1_VEPIC_BEAMOFLIGHTLOOP10"
                                wait 5 seconds
                                invoke hEpic EPIC_WONDER_STAGE_2
                                play string sound "SCRIPT3_HEPIC_SYNTH3"
                                play string sound "SCRIPT1_VEPIC_BEAMOFLIGHTLOOP10"
                                wait 1 second
                                enable predefined sky "hurricane" time 5
                                wait 3 seconds
                                play string sound "SCRIPT3_HEPIC_SYNTH3"
                                play string sound "SCRIPT1_VEPIC_BEAMOFLIGHTLOOP10"
                                invoke hEpic EPIC_WONDER_STAGE_3
                                invoke hEpic EPIC_WONDER_STAGE_4
                                invoke hEpic EPIC_WONDER_STAGE_5
                                invoke hEpic EPIC_WONDER_STAGE_6
                                invoke hEpic EPIC_WONDER_STAGE_7
                                invoke hEpic EPIC_WONDER_STAGE_8
                                play string sound "SCRIPT4_SEPIC_BEAMOFLIGHTLOOP7"
                                wait 2 seconds
                                play string sound "HURRICANELIGHTNING3"
                                play string sound "SCRIPT3_HEPIC_SYNTH3"
                                invoke hEpic EPIC_WONDER_STAGE_9
                                invoke hEpic EPIC_WONDER_STAGE_10
                                wait 3 seconds
                                stop sound "SCRIPT4_SEPIC_BEAMOFLIGHTLOOP7"
                                wait 1 second
                                oVisual = create visual effect VISUAL_EFFECT_HURRICANE_BEAM on hEpic time 1
                                oVisual2 = create visual effect VISUAL_EFFECT_HURRICANE_PULSE on hEpic time 1
                                play string sound "SCRIPT3_HEPIC_HURRICANELIGHTNING1"
                                stop sound "HURRICANELIGHTNING2"
                                wait 2 seconds
                                wait 1 second
                                set fade in time 1
                                invoke oHurricane EPIC_WONDER_STAGE_START_BEAM
                                oVisual3 = create visual effect VISUAL_EFFECT_HURRICANE_BEAM at {HurricanePos} time -1
                                play string sound "SCRIPT2_EEPIC_BEAMOFLIGHTSTART1"
                                stop sound "SCRIPT3_HEPIC_SYNTH2"
                                stop sound "SCRIPT3_HEPIC_SYNTH3"
                                stop sound "SCRIPT1_VEPIC_BEAMOFLIGHTLOOP10"
                                invoke oHurricane EPIC_WONDER_STAGE_END_BEAM
                                stop music with fadetime 1
                                start music "hurricane_music"
				invoke oHurricane EPIC_CREATE_CLOUDS
				invoke oHurricane EPIC_SET_CLOUDS_STORM
				invoke oHurricane EPIC_ENTER_TORNADO
                                wait 0.3 seconds
                                invoke oHurricane EPIC_START_GROUND_SWIRL
				invoke oHurricane EPIC_START_TOP_SWIRL
                                stop visual effect oVisual3
                                wait 9 seconds
                                invoke oHurricane EPIC_MOVE_TORNADO
				invoke oHurricane EPIC_CRUMBLE_BUILDINGS
				invoke oHurricane EPIC_ENABLE_TORNADO_DESTRUCTION
                                wait 28 seconds                                
				invoke oHurricane EPIC_DISABLE_TORNADO_DESTRUCTION
				invoke oHurricane EPIC_STOP_TORNADO
				invoke oHurricane EPIC_EXIT_TORNADO
				invoke oHurricane EPIC_CLEAR_CLOUDS
				invoke oHurricane EPIC_END_TORNADO
				delete oHurricane
                                enable predefined sky "mainsky" time 5
                                wait 5 seconds
                                stop music with fadetime 2
                                delete oHurricane
                                invoke hEpic EPIC_WONDER_STAGE_LAST
                                clear right clicked object
                                clear right clicked position
                                clear left clicked object
                                clear left clicked position
				oHurricane = 1
                           elsif HurricaneHeld != Rock1 or bindable action BINDABLE_ACTION_TYPE_CANCEL_CURRENT_ACTION performed
                                skip current cutscene
                                stop visual effect HurricaneSeed
                                delete Rock1
                                stop spell oHurricane
                                delete oHurricane
                                wait 1 second 
			end if
                              until oHurricane == 1
		 end loop
             end if
       end if
end loop

end script HurricaneScript

begin script CreatureSelect
	oTown = 0
	Tele1 = 0
	lPos = 0
	nTown = 0 
	sPos = marker at {1021, 23, 470}
	camerapos = marker at {1099, 40, 463}
	field1 = 0
	Player01 = 0
	oPen = 0
	vis1 = 0

start
	//By Willy (Creating the creatures)
	gCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_GORILLA at {1099, 23, 495} using only alignment good neutral evil
	set creature gCreature energy to 1.0
	set creature gCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
	set creature gCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0
	wCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_WOLF at {1105, 23, 487} using only alignment good neutral evil
	set creature wCreature energy to 1.0
	set creature wCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
	set creature wCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0
	aCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_APE at {1072, 23, 484} using only alignment good neutral evil
	set creature aCreature energy to 1.0
	set creature aCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
	set creature aCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0
	lCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_LION at {1077, 23, 491} using only alignment good neutral evil
	set creature lCreature energy to 1.0
	set creature lCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
	set creature lCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0
	tCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_TIGER at {1085, 23, 498} using only alignment good neutral evil
	set creature tCreature energy to 1.0
	set creature tCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
	set creature tCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0
	cCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_COW at {1107, 23, 481} using only alignment good neutral evil
	set creature cCreature energy to 1.0
	set creature cCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
	set creature cCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT 0
	wait 1 seconds
	force tCreature CREATURE_IDLE tCreature at {1085, 23, 498}
	force cCreature CREATURE_IDLE cCreature at {1107, 23, 481}
	force lCreature CREATURE_IDLE lCreature at {1077, 23, 491}
	force aCreature CREATURE_IDLE aCreature at {1072, 23, 484}
	force wCreature CREATURE_IDLE wCreature at {1105, 23, 487}
	force gCreature CREATURE_IDLE gCreature at {1099, 23, 495}
	wait 1 seconds
	snap creature cCreature focus to {camerapos}
	snap creature tCreature focus to {camerapos}
	snap creature lCreature focus to {camerapos}
	snap creature gCreature focus to {camerapos}
	snap creature wCreature focus to {camerapos}
	snap creature aCreature focus to {camerapos}
	wait 2 seconds
	run background script actioncreature
	run background script selCstuff
end script CreatureSelect

begin script actioncreature
	HandPos = 0
	sadMaker = 0
	camerapos = marker at {1099, 40, 463}
	oPen = 0
	sPos = marker at {1021, 23, 470}
	Tele1 = 0
start
	//By Willy (the creatures actions)
	if pikC == 0
		begin loop
			play anim C_CS_DANCE_BASIC on gCreature
			play anim C_INDIVIDUAL_SCRATCH on aCreature
			play anim C_INDIVIDUAL_EMBARRASSED on wCreature
			play anim C_IDLE_FIDGET02 on tCreature
			play anim C_INDIVIDUAL_TAUNT on lCreature
			play anim C_INDIVIDUAL_FRIENDLY_WAVE on cCreature
			wait 3 seconds
			play anim C_DANCE_A on gCreature
			play anim C_IDLE_FIDGET03 on aCreature
			play anim C_FACE_GROWL on wCreature
			play anim C_INDIVIDUAL_SHAKEOFF on tCreature
			play anim C_CS_INTRO_TURN_ROAR on lCreature
			play anim C_INDIVIDUAL_IMPRESS on cCreature
			wait 3 seconds
		end loop
	end if
end script actioncreature

begin script selCstuff
	camerapos = marker at {1099, 40, 463}
	oPen = 0
	sPos = marker at {1021, 23, 470}
	Tele1 = 0
	food001 = 0
	Statue1 = 0
	Statue2 = 0
	CreatFin = 0
	PickAlR = 0
start
	// By Willy controling the actions.
	begin loop
		if gCreature right clicked
			pikC = 1
		elsif tCreature right clicked
			pikC = 2	
		elsif wCreature right clicked
			pikC = 3	
		elsif aCreature right clicked
			pikC = 4				
		elsif lCreature right clicked
			pikC = 5				
		elsif cCreature right clicked
			pikC = 6					
		end if	
		until pikC !=0
	end loop
	stop script "actioncreature" 
	clear right clicked object
	clear left clicked object
	clear right button clicked
	clear left button clicked
	if pikC !=0
		begin loop
			run background script CreatureA2
			if ChoNot == 1
				clear right clicked object
				clear left clicked object
				clear right button clicked
				clear left button clicked
				PickAlR = 1
			end if
			ChoNot = 0
			if pikC == 1
				Tele1 = create visual effect VISUAL_EFFECT_CREATURE_SELECT at {1099, 23, 495} time -1
				begin loop
					if gCreature right clicked 
						pikC = 7
						CreatFin = 1
						ChoNot = 0
					elsif tCreature right clicked
						pikC = 2
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif wCreature right clicked
						pikC = 3
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif aCreature right clicked
						pikC = 4
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif lCreature right clicked
						pikC = 5
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif cCreature right clicked
						pikC = 6
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					end if
					until pikC == 7 or ChoNot == 1
				end loop
			elsif pikC == 3
				Tele1 = create visual effect VISUAL_EFFECT_CREATURE_SELECT at {1105, 23, 487} time -1
				begin loop
					if wCreature right clicked 
						pikC = 7
						CreatFin = 1
						ChoNot = 0
					elsif tCreature right clicked
						pikC = 2
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif gCreature right clicked
						pikC = 1
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif aCreature right clicked
						pikC = 4
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif lCreature right clicked
						pikC = 5
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"						
					elsif cCreature right clicked
						pikC = 6
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					end if	
					until pikC == 7 or ChoNot == 1
				end loop
			elsif pikC == 4
				Tele1 = create visual effect VISUAL_EFFECT_CREATURE_SELECT at {1072, 23, 484} time -1
				begin loop
					if aCreature right clicked 
						pikC = 7
						CreatFin = 1
						ChoNot = 0
					elsif tCreature right clicked
						pikC = 2
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif gCreature right clicked
						pikC = 1
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif wCreature right clicked
						pikC = 3
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif lCreature right clicked
						pikC = 5	
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif cCreature right clicked
						pikC = 6
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					end if	
					until pikC == 7 or ChoNot == 1
				end loop
			elsif pikC == 2
				Tele1 = create visual effect VISUAL_EFFECT_CREATURE_SELECT at {1085, 23, 498} time -1
				begin loop
					if tCreature right clicked 
						pikC = 7
						CreatFin = 1
						ChoNot = 0
					elsif aCreature right clicked
						pikC = 4
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif gCreature right clicked
						pikC = 1
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif wCreature right clicked
						pikC = 3
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif lCreature right clicked
						pikC = 5
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"						
					elsif cCreature right clicked
						pikC = 6
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					end if	
					until pikC == 7 or ChoNot == 1
				end loop
			elsif pikC == 5
				Tele1 = create visual effect VISUAL_EFFECT_CREATURE_SELECT at {1077, 23, 491} time -1
				begin loop
					if lCreature right clicked 
						pikC = 7
						CreatFin = 1
						ChoNot = 0
					elsif aCreature right clicked
						pikC = 4
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif gCreature right clicked
						pikC = 1
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif wCreature right clicked
						pikC = 3
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif tCreature right clicked
						pikC = 2
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"						
					elsif cCreature right clicked
						pikC = 6
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					end if	
					until pikC == 7 or ChoNot == 1
				end loop
			elsif pikC == 6
				Tele1 = create visual effect VISUAL_EFFECT_CREATURE_SELECT at {1107, 23, 481} time -1
				begin loop
					if cCreature right clicked 
						pikC = 7
						CreatFin = 1
						ChoNot = 0
					elsif aCreature right clicked
						pikC = 4
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif gCreature right clicked
						pikC = 1
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif wCreature right clicked
						pikC = 3
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					elsif tCreature right clicked
						pikC = 2
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"						
					elsif lCreature right clicked
						pikC = 5
						ChoNot = 1
						stop visual effect Tele1
						stop script "CreatureA2"
					end if	
					until pikC == 7 or ChoNot == 1
				end loop
			end if
			until CreatFin == 1 and ChoNot == 0
		end loop
	end if
	wait until aCreature right clicked or gCreature right clicked or wCreature right clicked or lCreature right clicked or tCreature right clicked or cCreature right clicked 
		if pikC == 7
			if gCreature right clicked
				begin fullscreen cinema
					move camera focus to {gCreature}+{0,7,0} time 5
					move camera position to {gCreature}+{0,9,0} time 5
					wait 2 seconds
					set fade red 0 green 0 blue 0 time 2
					wait 4 seconds
					delete gCreature
					oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_GORILLA at {1099, 23, 495} using only alignment good neutral
					stop visual effect Tele1
					set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
					delete wCreature
					delete tCreature
					delete aCreature
					delete cCreature
					delete lCreature
					oPen = get OBJECT_TYPE_ABODE ABODE_NUMBER_CREATURE_PEN at {Town1} radius 200 
					set camera position to {oCreature}+{50, 40, 0}
					set fade in time 3
					wait 3 seconds
				end cinema
				set player 0 creature to oCreature
				set oCreature home position {oPen}
				Statue1 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_APE_STATUE at {868, 1169} 
				Statue2 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_APE_STATUE at {910, 1157} 
			elsif aCreature right clicked
				begin fullscreen cinema
					move camera focus to {aCreature}+{0,7,0} time 5
					move camera position to {aCreature}+{0,9,0} time 5
					wait 2 seconds
					set fade red 0 green 0 blue 0 time 2
					wait 4 seconds
					delete aCreature
					oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_APE at {1072, 23, 484} using only alignment good neutral evil
					stop visual effect Tele1
					set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
					delete wCreature
					delete tCreature
					delete gCreature
					delete cCreature
					delete lCreature
					oPen = get OBJECT_TYPE_ABODE ABODE_NUMBER_CREATURE_PEN at {Town1} radius 200 
					set camera position to {oCreature}+{50, 40, 0}
					set fade in time 3
					wait 3 seconds
				end cinema
				set player 0 creature to oCreature
				set oCreature home position {oPen}
				Statue1 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_APE_STATUE at {868, 1169} 
				Statue2 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_APE_STATUE at {910, 1157} 
			elsif wCreature right clicked
				begin fullscreen cinema
					move camera focus to {wCreature}+{0,7,0} time 5
					move camera position to {wCreature}+{0,9,0} time 5
					wait 2 seconds
					set fade red 0 green 0 blue 0 time 2
					wait 4 seconds
					delete wCreature
					oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_WOLF at {1105, 23, 487} using only alignment good neutral evil
					stop visual effect Tele1
					set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
					delete gCreature
					delete tCreature
					delete aCreature
					delete cCreature
					delete lCreature
					oPen = get OBJECT_TYPE_ABODE ABODE_NUMBER_CREATURE_PEN at {Town1} radius 200 
					set camera position to {oCreature}+{50, 40, 0}
					set fade in time 3
					wait 3 seconds
				end cinema
				set player 0 creature to oCreature
				set oCreature home position {oPen}
				Statue1 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_WOLF_STATUE at {868, 1169} 
				Statue2 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_WOLF_STATUE at {910, 1157} 
			elsif lCreature right clicked
				begin fullscreen cinema
					move camera focus to {lCreature}+{0,7,0} time 5
					move camera position to {lCreature}+{0,9,0} time 5
					wait 2 seconds
					set fade red 0 green 0 blue 0 time 2
					wait 4 seconds
					delete lCreature
					oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_LION at {1077, 23, 491} using only alignment good neutral evil
					stop visual effect Tele1
					set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
					delete wCreature
					delete tCreature
					delete aCreature
					delete cCreature
					delete gCreature
					oPen = get OBJECT_TYPE_ABODE ABODE_NUMBER_CREATURE_PEN at {Town1} radius 200 
					set camera position to {oCreature}+{50, 40, 0}
					set fade in time 3
					wait 3 seconds
				end cinema
				set player 0 creature to oCreature
				set oCreature home position {oPen}
				Statue1 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_LION_STATUE at {868, 1169} 
				Statue2 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_LION_STATUE at {910, 1157} 
			elsif tCreature right clicked
				begin fullscreen cinema
					move camera focus to {tCreature}+{0,7,0} time 5
					move camera position to {tCreature}+{0,9,0} time 5
					wait 2 seconds
					set fade red 0 green 0 blue 0 time 2
					wait 4 seconds
					delete tCreature
					oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_TIGER at {1085, 23, 498} using only alignment good neutral evil
					stop visual effect Tele1
					set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
					delete wCreature
					delete gCreature
					delete aCreature
					delete cCreature
					delete lCreature
					oPen = get OBJECT_TYPE_ABODE ABODE_NUMBER_CREATURE_PEN at {Town1} radius 200 
					set camera position to {oCreature}+{50, 40, 0}
					set fade in time 3
					wait 3 seconds
				end cinema
				set player 0 creature to oCreature
				set oCreature home position {oPen}
				Statue1 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_TIGER_STATUE at {868, 1169} 
				Statue2 = create with angle 180 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_TIGER_STATUE at {910, 1157} 
			elsif cCreature right clicked
				begin fullscreen cinema
					move camera focus to {cCreature}+{0,7,0} time 5
					move camera position to {cCreature}+{0,9,0} time 5
					wait 2 seconds
					set fade red 0 green 0 blue 0 time 2
					wait 4 seconds
					delete cCreature
					oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_COW at {1107, 23, 481} using only alignment good neutral evil
					stop visual effect Tele1
					set creature oCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 0.5
					delete wCreature
					delete tCreature
					delete aCreature
					delete gCreature
					delete lCreature
					oPen = get OBJECT_TYPE_ABODE ABODE_NUMBER_CREATURE_PEN at {Town1} radius 200 
					set camera position to {oCreature}+{50, 40, 0}
					set fade in time 3
					wait 3 seconds
				end cinema
				set player 0 creature to oCreature
				set oCreature home position {oPen}
				Statue1 = create with angle 175 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_COW_STATUE at {868, 1169} 
				Statue2 = create with angle 175 and scale 2.0 SCRIPT_OBJECT_TYPE_FEATURE FEATURE_INFO_COW_STATUE at {910, 1157} 
			end if
		end if
	teach oCreature all
	set oCreature DEVELOPMENT_PHASE_FULLY_MATURE development
	set oCreature desire CREATURE_DESIRE_TO_LOOK_AROUND to 1.0
	set oCreature desire CREATURE_DESIRE_WANDERLUST to 1.0
	set oCreature desire CREATURE_DESIRE_TO_IMPRESS to 1.0
	set oCreature desire CREATURE_DESIRE_CURIOSITY to 1.0
	set oCreature desire CREATURE_DESIRE_TO_STAY_NEAR_HOME to 0
	set oCreature desire CREATURE_DESIRE_TO_HANG_AROUND_AT_HOME to 0
	set oCreature desire CREATURE_DESIRE_TO_STEAL to 1.0
	set oCreature desire CREATURE_DESIRE_TO_ATTACK_TOWN to 1.0
	set oCreature desire CREATURE_DESIRE_MISCHIEF to 1.0
	set oCreature desire CREATURE_DESIRE_TO_PERFORM_EXPRESSIVE_IDLE to 0
	set oCreature desire CREATURE_DESIRE_TO_STAY_IN_FRIENDLY_TERRITORY to 0
	set oCreature desire CREATURE_DESIRE_ANGER to 1.0
	set oCreature desire CREATURE_DESIRE_HUNGER to 0.3
end script selCstuff

begin script CreatureA2

start
	if pikC == 6
		begin loop
			play anim C_CS_SAD_LOOP1 on gCreature
			play anim C_CS_SAD_LOOP1 on aCreature
			play anim C_CS_SAD_LOOP1 on wCreature
			play anim C_CS_SAD_LOOP1 on tCreature
			play anim C_CS_SAD_LOOP2 on lCreature
			play anim C_INDIVIDUAL_HAPPY3 on cCreature
			wait 3 seconds
		end loop
	elsif pikC == 1
		begin loop
			play anim C_CS_SAD_LOOP1 on cCreature
			play anim C_CS_SAD_LOOP2 on aCreature
			play anim C_CS_SAD_LOOP2 on wCreature
			play anim C_CS_SAD_LOOP1 on tCreature
			play anim C_CS_SAD_LOOP1 on lCreature
			play anim C_INDIVIDUAL_HAPPY3 on gCreature
			wait 3 seconds
		end loop
	elsif pikC == 3
		begin loop
			play anim C_CS_SAD_LOOP2 on cCreature
			play anim C_CS_SAD_LOOP1 on aCreature
			play anim C_CS_SAD_LOOP2 on gCreature
			play anim C_CS_SAD_LOOP1 on tCreature
			play anim C_CS_SAD_LOOP2 on lCreature
			play anim C_INDIVIDUAL_HAPPY3 on wCreature
			wait 3 seconds
		end loop
	elsif pikC == 2
		begin loop
			play anim C_CS_SAD_LOOP2 on cCreature
			play anim C_CS_SAD_LOOP1 on aCreature
			play anim C_CS_SAD_LOOP2 on wCreature
			play anim C_CS_SAD_LOOP2 on gCreature
			play anim C_CS_SAD_LOOP1 on lCreature
			play anim C_INDIVIDUAL_HAPPY3 on tCreature
			wait 3 seconds
		end loop
	elsif pikC == 5
		begin loop
			play anim C_CS_SAD_LOOP2 on cCreature
			play anim C_CS_SAD_LOOP1 on aCreature
			play anim C_CS_SAD_LOOP1 on wCreature
			play anim C_CS_SAD_LOOP1 on tCreature
			play anim C_CS_SAD_LOOP2 on gCreature
			play anim C_INDIVIDUAL_HAPPY3 on lCreature
			wait 3 seconds
		end loop
	elsif pikC == 4
		begin loop
			play anim C_CS_SAD_LOOP1 on cCreature
			play anim C_CS_SAD_LOOP2 on gCreature
			play anim C_CS_SAD_LOOP2 on wCreature
			play anim C_CS_SAD_LOOP1 on tCreature
			play anim C_CS_SAD_LOOP1 on lCreature
			play anim C_INDIVIDUAL_HAPPY3 on aCreature
			wait 3 seconds
		end loop
	end if

end script CreatureA2

begin script UnlockBuildings
start
	set research ARTEFACT_ABODE_NUMBER_A available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_CREATURE_PEN available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_SMELTER available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_GRAVEYARD available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_C available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_PUB available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_TEMPLE available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_CRECHE available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_UNIVERSITY available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_B available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_D available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_ALTAR available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_STORAGE_PIT available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_ABODE_NUMBER_FIELD available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_FERTILITY_STATUE available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_FOUNTAIN available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_STREETLAMP available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_COLUMN available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_CREATURE_ROLE_GATHERER_1 available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_CREATURE_ROLE_GATHERER_2 available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_CREATURE_ROLE_BUILDER_1 available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_CREATURE_ROLE_BUILDER_2 available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_CREATURE_ROLE_ENTERTAINER_1 available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_CREATURE_ROLE_ENTERTAINER_2 available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_CREATURE_MAGIC_TYPE_HEAL available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_CREATURE_MAGIC_TYPE_WATER available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_MAGIC_TYPE_LIFE_HEAL available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_MAGIC_TYPE_FIRE_FIRE available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_MAGIC_TYPE_WATER_RAIN available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_HAND_MULTIPICKUP available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_HAND_FISTING available to RESEARCH_AVAILABILITY_RESEARCHED
	set research ARTEFACT_EPIC_WONDER_NUMBER_SIREN available to RESEARCH_AVAILABILITY_NOT_AVAILABLE
	set research ARTEFACT_EPIC_WONDER_NUMBER_EARTHQUAKE available to RESEARCH_AVAILABILITY_NOT_AVAILABLE
end script UnlockBuildings

begin script MusicR
	Rand = 0 
	isConverted = 0
	isConverted2 = 0
start
	begin loop
		isConverted = variable get town Town0 method of last conversion
		Rand = number from 1 to 100
		wait until Rand != 0
		if Rand <= 33
			stop music
			start music "NorseFotRan1" loop 1
			wait 30 seconds
			stop music
			start music "NorseFotRan2" loop 1
			wait 4 seconds
			stop music
			start music "epicspell_01" loop 1
			wait 198.6 seconds
		elsif Rand <= 67 and Rand > 33
			stop music
			start music "Ran3" loop 1
			wait 10 seconds
			stop music
			start music "Ran4" loop 1
			wait 7 seconds
			stop music
			start music "big_battle_01" loop 1
			wait 198.6 seconds
		else 
			stop music
			start music "ran5" loop 1
			wait 10 seconds
			stop music
			start music "Ran6" loop 1
			wait 12 seconds
			stop music
			start music "nutoilsong" loop 1
			wait 198.6 seconds
		end if
		until isConverted !=0
	end loop
	if isConverted !=0
		begin loop
			if Rand <= 33
				stop music
				start music "cut_scene_happy_01" loop 1
				wait 72 seconds
			elsif Rand <= 67 and Rand > 33
				stop music
				start music "cut_scene_happy_02" loop 1
				wait 60 seconds
			else 
				stop music
				start music "nutoilsong" loop 1
				wait 198.6 seconds
			end if
		end loop
	end if
end script MusicR

begin script CreatureEvil
// by LUCINDREA
	oPen = get building ABODE_NUMBER_CREATURE_PEN in Town0 min built 1.0
	mPos = marker at {oPen}
	isConverted = 0
	isConverted2 = 0
	isConverted3 = 0
	isConverted4 = 0
	isConverted5 = 0
	GateHouse1 = 0
	GateOpen = 0
	oCreature2 = 0
	Alter1 = 0
	Num = 0
start
		eCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_WOLF at {oPen} 
		set creature eCreature happiness to maximum
		set creature eCreature energy to 1.0
		set creature eCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_ALIGNMENT -1
		set player 1 creature to eCreature
		set eCreature DEVELOPMENT_PHASE_FULLY_MATURE development
		set creature eCreature CREATURE_SCRIPT_TRANSITIONAL_ATTRIBUTE_TYPE_SIZE 1.0
			teach eCreature all
			set eCreature desire CREATURE_DESIRE_TO_LOOK_AROUND to 1.0
			set eCreature desire CREATURE_DESIRE_WANDERLUST to 1.0
			set eCreature desire CREATURE_DESIRE_TO_IMPRESS to 1.0
			set eCreature desire CREATURE_DESIRE_CURIOSITY to 1.0
			set eCreature desire CREATURE_DESIRE_TO_STAY_NEAR_HOME to 0
			set eCreature desire CREATURE_DESIRE_TO_HANG_AROUND_AT_HOME to 0
			set eCreature desire CREATURE_DESIRE_TO_STEAL to 1.0
			set eCreature desire CREATURE_DESIRE_TO_ATTACK_TOWN to 1.0
			set eCreature desire CREATURE_DESIRE_MISCHIEF to 1.0
			set eCreature desire CREATURE_DESIRE_TO_PERFORM_EXPRESSIVE_IDLE to 0
			set eCreature desire CREATURE_DESIRE_TO_STAY_IN_FRIENDLY_TERRITORY to 0
			set eCreature desire CREATURE_DESIRE_ANGER to 1.0
			set eCreature desire CREATURE_DESIRE_HUNGER to 0.3
			enable leash on eCreature
			detach eCreature leash
			wait 3 seconds
			disable leash on eCreature

			enable eCreature can learn LA_EAT
			enable eCreature can learn LA_SLEEP
			enable eCreature can learn LA_POO
			enable eCreature can learn LA_STEAL
			enable eCreature can learn LA_WEIGHTLIFT
			//enable eCreature can learn LA_GATHER
			enable eCreature can learn LA_BUILD
			//enable eCreature can learn LA_PLAY
			//enable eCreature can learn LA_WATER
			enable eCreature can learn LA_HEAL
			enable eCreature can learn LA_ATTACK
			enable eCreature can learn LA_SACRIFICE
			enable eCreature can learn LA_EXPLORE
			enable eCreature can learn LA_MAX
			set eCreature home position {mPos}
			release eCreature
		begin loop
			isConverted3 = variable get town Town2 method of last conversion
			isConverted4 = variable get town Town3 method of last conversion 
			isConverted5 = variable get town Town4 method of last conversion 
			until isConverted3 !=0 
		end loop
			oCreature2 = get player 0 creature
			if isConverted3 != 0 and isConverted4 != 0 and isConverted5 != 0
				GateHouse1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {881, 1140} radius 10
				force eCreature CREATURE_RUN_TO_OBJECT GateHouse1 
				wait 160 seconds
				if GateHouse1 exists
					if gate GateHouse1 is open
						GateOpen = 1
					else
						GateOpen = 0
					end if
				else
					GateOpen = -1
				end if
				if GateOpen == 0
					begin loop
						force eCreature CREATURE_CAST_FIREBALL GateHouse1
						wait 5 second
						force eCreature CREATURE_KICK GateHouse1
						if GateHouse1 exists
							if gate GateHouse1 is open
									GateOpen = 1
							else
									GateOpen = 0
							end if
						else
							GateOpen = -1
						end if
						until GateOpen !=0
					end loop
					Alter1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_ALTAR at {924, 474} radius 300
					force eCreature CREATURE_RUN_TO_OBJECT Alter1 
					wait 160 seconds
				else
					Alter1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_ALTAR at {924, 474} radius 300
					force eCreature CREATURE_RUN_TO_OBJECT Alter1 
					wait 160 seconds
				end if
			end if
			isConverted = variable get town Town0 method of last conversion 
end script CreatureEvil

begin script waves1
	TScroll = create with angle 90 and scale 1.0 SCRIPT_OBJECT_TYPE_ROCK MOBILE_STATIC_INFO_NORSESHIP at {398, 1360} 
	ScrollVis = create visual effect VISUAL_EFFECT_GOLD_SCROLL on TScroll time -1
	BeamGlow = create visual effect VISUAL_EFFECT_SCROLL_BEAM on TScroll time -1
	TScroll2 = 0
	ScrollVis2 = 0
	BeamGlow2 = 0
	PlatoonW[NUMBER_OF_PLATOONS]
	Wave = 0
	PlatoonG = 0
	PlatoonG2 = 0
	Num = 0
	Num2 = 0
	Num1 = 0
	Num3 = 0
	Num4 = 0
	oship2 = 0
	oship3 = 0
	oship4 = 0
	oship5 = 0
	isConverted = 0
	isConverted2 = 0
	isConverted3 = 0
	isConverted4 = 0
	isConverted5 = 0
	GateHouse1 = 0
	GateHouse4 = 0
	GateHouse2 = 0
	GateHouse3 = 0
	GateOpen = 0
	GateOpen1 = 0
	Light3 = 0
	NumP4 = 0
	NumP5 = 0
	NumP9 = 0
	NumP10 = 0
	NumP11 = 0
	NumP15 = 0
	TownConversion = 0
	NumTP1 = 0
	HandP = marker at hand position
	oLightning = 0
start
	// By Willy
	wait until TScroll right clicked
	TScroll2 = create with angle 90 and scale 1.0 SCRIPT_OBJECT_TYPE_ROCK MOBILE_STATIC_INFO_NORSESHIP at {939, 10, 1325} 
	ScrollVis2 = create visual effect VISUAL_EFFECT_SILVER_SCROLL on TScroll2 time -1
	BeamGlow2 = create visual effect VISUAL_EFFECT_SCROLL_BEAM on TScroll2 time -1
	stop visual effect BeamGlow
	stop visual effect ScrollVis
	wait 1 second
	oship2 = create with angle 90 and scale 1.0 SCRIPT_OBJECT_TYPE_ROCK MOBILE_STATIC_INFO_NORSESHIP at {366, 1414}
	oship3 = create with angle 90 and scale 1.0 SCRIPT_OBJECT_TYPE_ROCK MOBILE_STATIC_INFO_NORSESHIP at {382, 1297}
	oship4 = create with angle 270 and scale 1.0 SCRIPT_OBJECT_TYPE_ROCK MOBILE_STATIC_INFO_NORSESHIP at {1686, 1356}
	oship5 = create with angle 270 and scale 1.0 SCRIPT_OBJECT_TYPE_ROCK MOBILE_STATIC_INFO_NORSESHIP at {1678, 1250}
	isConverted2 = variable get town Town1 method of last conversion 
	isConverted3 = variable get town Town2 method of last conversion
	isConverted4 = variable get town Town3 method of last conversion 
	isConverted5 = variable get town Town4 method of last conversion 
	begin loop
		Wave = NUMBER_OF_PLATOONS
		Nwave = Nwave + 1
		oLightning = create visual effect VISUAL_EFFECT_WEATHER_LIGHTNING_TRAVEL_D at {HandP} time -1
		wait 1 second
		stop visual effect oLightning 
		if NumPLatoonW !=0
			if NumPLatoonW >= 40
				PlatoonW[1] = create platoon PLATOON_INFO_NORSE_MELEE_3 at {342, 1360} with NumPLatoonW men and 0 women
				set PlatoonW[1] player 1
				PlatoonW[2] = create platoon PLATOON_INFO_NORSE_MELEE_3 at {342, 1360} with NumPLatoonW men and 0 women
				set PlatoonW[2] player 1
				PlatoonW[3] = create platoon PLATOON_INFO_NORSE_MELEE_3 at {342, 1360} with NumPLatoonW men and 0 women
				set PlatoonW[3] player 1
			end if	
			if NumPLatoonW >= 80
				PlatoonW[4] = create platoon PLATOON_INFO_NORSE_MELEE_4 at {1671, 1356} with NumPLatoonW men and 0 women
				set PlatoonW[4] player 1
				PlatoonW[5] = create platoon PLATOON_INFO_NORSE_MELEE_4 at {1682, 1250} with NumPLatoonW men and 0 women
				set PlatoonW[5] player 1
			end if 
			if NumPLatoonW >= 120
				PlatoonW[6] = create platoon PLATOON_INFO_NORSE_MELEE_5 at {387, 1297} with NumPLatoonW men and 0 women
				set PlatoonW[6] player 1
				PlatoonW[7] = create platoon PLATOON_INFO_NORSE_MELEE_5 at {348, 1534} with NumPLatoonW men and 0 women
				set PlatoonW[7] player 1
				PlatoonW[8] = create platoon PLATOON_INFO_NORSE_MELEE_5 at {310, 1227} with NumPLatoonW men and 0 women
				set PlatoonW[8] player 1
				PlatoonW[9] = create platoon PLATOON_INFO_NORSE_MELEE_5 at {1671, 1356} with NumPLatoonW men and 0 women
				set PlatoonW[9] player 1
				PlatoonW[10] = create platoon PLATOON_INFO_NORSE_MELEE_5 at {1682, 1250} with NumPLatoonW men and 0 women
				set PlatoonW[10] player 1
			end if 
			if NumPLatoonW >= 200
				PlatoonW[11] = create platoon PLATOON_INFO_NORSE_MELEE_6 at {310, 1227} with NumPLatoonW men and 0 women
				set PlatoonW[11] player 1
				PlatoonW[12] = create platoon PLATOON_INFO_NORSE_MELEE_6 at {337, 1289} with NumPLatoonW men and 0 women
				set PlatoonW[12] player 1
				PlatoonW[13] = create platoon PLATOON_INFO_NORSE_MELEE_6 at {348, 1534} with NumPLatoonW men and 0 women
				set PlatoonW[13] player 1
				PlatoonW[14] = create platoon PLATOON_INFO_NORSE_MELEE_6 at {338, 1589} with NumPLatoonW men and 0 women
				set PlatoonW[14] player 1
				PlatoonW[15] = create platoon PLATOON_INFO_NORSE_MELEE_6 at {1682, 1250} with NumPLatoonW men and 0 women
				set PlatoonW[15] player 1
			end if
			if NumPLatoonW >= 300
				PlatoonW[16] = create platoon PLATOON_INFO_NORSE_MELEE_10 at {348, 1534} with NumPLatoonW men and 0 women
				set PlatoonW[16] player 1
			end if
		end if
			Num2 = get platoon of player 0 nearest {1637, 1262} radius 100
			Num = get platoon of player 0 nearest {414, 1456} radius 100
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {380, 1435} to PlatoonW[1] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {380, 1435} to PlatoonW[2] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {380, 1435} to PlatoonW[3] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1639, 1262} to PlatoonW[4] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1639, 1262} to PlatoonW[5] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {380, 1435} to PlatoonW[6] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {380, 1435} to PlatoonW[7] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {380, 1435} to PlatoonW[8] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1639, 1262} to PlatoonW[9] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1639, 1262} to PlatoonW[10] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {385, 1245} to PlatoonW[11] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {398, 1302} to PlatoonW[12] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {376, 1530} to PlatoonW[13] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {380, 1567} to PlatoonW[14] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1639, 1262} to PlatoonW[15] action queue 
			add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {376, 1530} to PlatoonW[16] action queue 
			wait 1 second
			if Num !=0
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[1] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[2] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[3] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[6] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[7] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[8] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[11] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[12] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[13] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[14] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num to PlatoonW[16] action queue
			end if
			if Num2 !=0
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num2 to PlatoonW[4] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num2 to PlatoonW[5] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num2 to PlatoonW[9] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num2 to PlatoonW[10] action queue
				add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num2 to PlatoonW[15] action queue
			end if
			begin loop		
				Num = get platoon of player 0 nearest {414, 1456} radius 100
				Num2 = get platoon of player 0 nearest {1637, 1262} radius 100
				Num1 = get number of platoon warriors belonging to player 1
				until Num == 0 or Num1 == 0
			end loop
			begin loop
				Num = get platoon of player 0 nearest {414, 1456} radius 100
				Num2 = get platoon of player 0 nearest {1637, 1262} radius 100
				if Num == 0
					if Town2 exists
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[1] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[2] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[3] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[6] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[7] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[8] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[11] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[12] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[13] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[14] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {599, 1458} to PlatoonW[16] action queue
					end if
				end if
				if Num2 == 0
					if Town4 exists
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[4] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[5] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[9] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[10] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[15] action queue
					end if
				end if
				until isConverted3 !=0
			end loop
			if isConverted3 != 0
				begin loop
					if Town4 exists
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[1] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[2] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[3] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[6] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[7] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[8] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[11] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[12] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[13] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[14] action queue
						add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town4} to PlatoonW[16] action queue
					end if
					until isConverted5 !=0
				end loop
			end if
			if isConverted5 !=0
				Num = get platoon of player 0 nearest {Town4} radius 500
				Num3 = get distance from {Town4} to {Num}
				if Num3 < 100
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[1] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[2] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[3] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[4] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[5] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[6] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[7] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[8] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[9] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[10] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[11] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[12] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[13] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[14] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[15] action queue
					add action PLATOON_AGENDA_ACTION_MELEE_ATTACK_THING using Num3 to PlatoonW[16] action queue
				end if
			end if
				isConverted = variable get town Town0 method of last conversion 
				if isConverted == 2
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[1] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[2] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[3] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[4] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[5] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[6] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[7] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[8] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[9] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[10] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[11] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[12] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[13] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[14] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[15] action queue
					add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town0} to PlatoonW[16] action queue
				end if	
					GateHouse1 = get SCRIPT_OBJECT_TYPE_ABODE ABODE_NUMBER_GATEHOUSE_F at {881, 1140} radius 10
					if GateHouse1 exists
						if gate GateHouse1 is open
							GateOpen = 1
						else
							GateOpen = 0
						end if
					else
						GateOpen = -1
					end if
					if GateOpen != 0 or PlatoonW[1] can navigate to {876, 1104} or PlatoonW[10] can navigate to {876, 1104} or PlatoonW[7] can navigate to {876, 1104}
						if Town1 exists
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[1] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[2] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[3] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[4] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[5] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[6] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[7] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[8] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[9] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[10] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[11] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[12] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[13] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[14] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[15] action queue
							add action PLATOON_AGENDA_ACTION_ATTACK_TOWN_CENTRE_FOR_TAKE_OVER using {Town1} to PlatoonW[16] action queue
						end if
					elsif GateOpen == 0 and isConverted == 1
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1011, 1489} to PlatoonW[1] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {870, 1427} to PlatoonW[2] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {926, 1286} to PlatoonW[3] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1140, 1253} to PlatoonW[4] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1251, 1351} to PlatoonW[5] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1126, 1489} to PlatoonW[6] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1011, 1489} to PlatoonW[7] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {870, 1427} to PlatoonW[8] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {926, 1286} to PlatoonW[9] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1140, 1253} to PlatoonW[10] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1251, 1351} to PlatoonW[11] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1126, 1489} to PlatoonW[12] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1011, 1489} to PlatoonW[13] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {870, 1427} to PlatoonW[14] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {926, 1286} to PlatoonW[15] action queue 
						add action PLATOON_AGENDA_ACTION_MOVE_TO_POS using {1140, 1253} to PlatoonW[16] action queue 
					end if
		begin loop
			Num1 = get number of platoon warriors belonging to player 1 
			until Num1 == 0
		end loop
		if NumPLatoonW == 200 
			Light3 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2150, 23, 1437} time -1
			LightOb = LightOb + 1
		end if
		if Num1 == 0
			increment tribute by NumT
		end if
		wait 150 seconds
		NumPLatoonW = NumPLatoonW + 20
		NumT = NumT + 25000
		if NumPLatoonW == 260
			NumT = NumT + 25000
		end if
		until TScroll2 right clicked
	end loop
	if TScroll2 right clicked
		stop visual effect BeamGlow
		stop visual effect ScrollVis
		delete TScroll2
		delete oship2
		delete oship5
		delete oship3
		delete oship4
		delete TScroll
		run script endingWaves
	end if
end script waves1

begin script fireworks
	fire1 = 0
	fire2 = 0
	fire4 = 0
	fire5 = 0
	fire6 = 0
	fire7 = 0
	fireworksn = 0
start
	begin loop
		fire1 = create visual effect VISUAL_EFFECT_FIREWORK_3 at {1031, 63, 2257} time -1
		fire2 = create visual effect VISUAL_EFFECT_FIREWORK_3 at {890, 23, 407} time -1
		wait 0.5 seconds
		fire4 = create visual effect VISUAL_EFFECT_FIREWORK_2 at {1031, 63, 2257} time -1
		fire5 = create visual effect VISUAL_EFFECT_FIREWORK_2 at {890, 23, 407} time -1
		wait 0.5 seconds
		fire6 = create visual effect VISUAL_EFFECT_FIREWORK_1 at {1031, 63, 2257} time -1
		fire7 = create visual effect VISUAL_EFFECT_FIREWORK_1 at {890, 23, 407} time -1
		fireworksn = fireworksn + 1
		wait 0.5 seconds
		until fireworksn == 40
	end loop
end script fireworks

begin script TakingTowns
	isConverted = 0
	isConverted2 = 0
	isConverted3 = 0
	isConverted4 = 0
	isConverted5 = 0
	complete4 = 0
	complete3 = 0
	complete2 = 0
	complete1 = 0
	hEpic = 0
start
	begin loop
		if Run4 == 0
			begin loop
				isConverted4 = variable get town Town3 method of last conversion 
				if isConverted4 != 0 and complete4 == 0
					increment tribute by 10000
					complete4 = 1
				end if
							
				isConverted5 = variable get town Town4 method of last conversion 
				if isConverted5 != 0 and complete3 == 0
					increment tribute by 15000
					complete3 = 1
					stop music 
					start music "town4taken"
					wait 15 seconds
					create 20 worshippers at hEpic
					start music "big_battle_01"
				end if
				
				isConverted3 = variable get town Town2 method of last conversion 
				if isConverted3 != 0 and complete2 == 0
					increment tribute by 20000
					complete2 = 1
				end if
				
				isConverted = variable get town Town0 method of last conversion 
				if isConverted != 0 and complete1 == 0
					increment tribute by 100000
					complete1 = 1
				end if
				
			end loop
		end if
		Run4 = 1
	end loop
end script TakingTowns

begin script Objective1
	ItoG = 0
	NumTT = 0
	Impress = 0
	light4 = 0
start
	begin loop
		ItoG = ItoG + 25000
		NumTT = NumTT + 25000
		begin loop
			Impress = get town Town1 impressiveness
			until Impress >= ItoG
		end loop
		if Impress >= ItoG
			increment tribute by NumTT
			if Impress >= 200000
				light4 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2153, 24, 1486} time -1
				LightOb = LightOb + 1
			end if
		end if
	end loop
end script Objective1

begin script NRFood
	Food1 = 0
	isConverted = 0
	Light5 = 0
	LightL5 = 0
start
	begin loop
		isConverted = variable get town Town0 method of last conversion
		Food1 = get town Town1 RESOURCE_TYPE_FOOD total
		until isConverted !=0 or Food1 == 0
	end loop
	if isConverted !=0 and Food1 !=0
		increment tribute by 5000
		Light5 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2149, 20, 1463} time -1
		LightOb = LightOb + 1
	end if
	if Food1 == 0
		LightL5 = create visual effect VISUAL_EFFECT_HURRICANE_BEAM at {2149, 20, 1463} time -1
	end if
end script NRFood

begin script endingWaves
	// The waves script does not work without this script. 
start
	NumPLatoonW = 40
	NumT = 25000
	run script waves1
end script endingWaves

begin script WoodOB
	WoodT = 0
	Light6 = 0
start
	begin loop
		WoodT = get town Town1 RESOURCE_TYPE_WOOD total
		until WoodT >= 40000
	end loop
	increment tribute by 10000
	Light6 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2151, 20, 1366} time -1
	LightOb = LightOb + 1
end script WoodOB

begin script BreedOB
	POPu = 0
	Light7 = 0
start
	begin loop
		POPu = adult size of Town1
		until POPu >= 1000
	end loop
	increment tribute by 20000
	Light7 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2149, 20, 1335} time -1
	LightOb = LightOb + 1
end script BreedOB

begin script OreOB
	OreT = 0
	Light8 = 0
start
	begin loop
		OreT = get town Town1 RESOURCE_TYPE_ORE total
		until OreT >= 60000
	end loop
	increment tribute by 50000
	Light8 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2148, 20, 1309} time -1
	LightOb = LightOb + 1
end script OreOB

begin script PlatoonOB
	WorriorsOB = 0
	Light9 = 0
start
	begin loop
		WorriorsOB = get number of platoon warriors belonging to player 0
		until WorriorsOB >= 200
	end loop
	increment tribute by 25000
	Light9 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2151, 13, 1235} time -1
	LightOb = LightOb + 1
end script PlatoonOB

begin script GlobalIn
	TScroll = 0
	ScrollVis = 0
	TScroll2 = 0
	ScrollVis2 = 0
start
	TScroll = create with angle 90 and scale 2.0 SCRIPT_OBJECT_TYPE_ROCK MOBILE_STATIC_INFO_TOMBMARKERS at {817, 189}
	ScrollVis = create visual effect VISUAL_EFFECT_GOLD_SCROLL on TScroll time -1
	TScroll2 = create with angle 90 and scale 2.0 SCRIPT_OBJECT_TYPE_ROCK MOBILE_STATIC_INFO_TOMBMARKERS at {787, 179}
	ScrollVis2 = create visual effect  VISUAL_EFFECT_SILVER_SCROLL at {TScroll2}+{0, 10, 0} time -1
	begin loop
		if TScroll right clicked
			enable global influence
		end if
		if TScroll2 right clicked
			disable global influence
		end if
	end loop
end script GlobalIn 

begin script WinScripts
start
	run background script GlobalIn
	run background script waves1
end script WinScripts

begin script AttackHur
	hEpic = 0
	oHurricane = 0
	warning1 = 0
	oVisual = 0
	Impress = 0
	isConverted = 0
	isConverted2 = 0
start
	// This is the hurricane he usings on the player, if you are looking of the warning, its in the script utaattack.
	begin loop
		stop script "MusicR" 
		isConverted = variable get town Town0 method of last conversion
		isConverted2 = variable get town Town1 method of last conversion
		oHurricane = 0
		hEpic = get SCRIPT_OBJECT_TYPE_WONDER EPIC_WONDER_NUMBER_HURRICANE at {1102, 63, 2253} radius 200
		if run3 == 0
			begin loop
				wait 12 seconds
				if run3 == 0
					oVisual = create visual effect VISUAL_EFFECT_HURRICANE_BEAM on oHurricane time 1
					wait 1 second
					oHurricane = create hurricane at {620, 24, 357} player 0 direction {10, 0 , 0}
					stop music with fadetime 1
					start music "hurricane_music"
					run background script AttackHurCin(oHurricane)
					invoke oHurricane EPIC_START_GROUND_SWIRL
					invoke oHurricane EPIC_START_TOP_SWIRL
					invoke oHurricane EPIC_CREATE_CLOUDS
					invoke oHurricane EPIC_SET_CLOUDS_STORM
					wait 9 seconds
					invoke oHurricane EPIC_ENTER_TORNADO
					invoke oHurricane EPIC_MOVE_TORNADO
					invoke oHurricane EPIC_CRUMBLE_BUILDINGS
					invoke oHurricane EPIC_ENABLE_TORNADO_DESTRUCTION
					wait 32 seconds
					invoke oHurricane EPIC_DISABLE_TORNADO_DESTRUCTION
					wait 1 second
					invoke oHurricane EPIC_STOP_TORNADO
					wait 1 second
					invoke oHurricane EPIC_EXIT_TORNADO
					wait 1 second
					invoke oHurricane EPIC_CLEAR_CLOUDS
					wait 1 second
					invoke oHurricane EPIC_END_TORNADO
					wait 1 second
					delete oHurricane
					wait 1 second
					invoke hEpic EPIC_WONDER_STAGE_LAST
					wait 5 seconds
					oHurricane = 1
				end if
				until oHurricane == 1
			end loop
		end if
		run background script MusicR
		wait 900 seconds
		stop music
		start music "Fire" loop 1
		wait 3 seconds
		warning1 = create visual effect VISUAL_EFFECT_EPIC_TARGET_WARNING at {620, 24, 356} time 15
		wait 5 seconds
		run3 = 0
		until isConverted !=0 or isConverted2 !=0
	end loop
end script AttackHur

begin script AttackHurCin(oHurricane)
start
	if run3 == 0 
		begin cinema 
			set fade in time 3
			set camera focus to {oHurricane}+{0, 200, 0}
			set camera position to {850, 300, 477}
			wait 9 seconds
			set camera focus follow oHurricane
			set camera position follow oHurricane offset {40, 100, 60}
			wait 28 seconds
			set camera focus to {oHurricane}+{0, 200, 0}
			set camera position to {oHurricane}+{150, 100, 400}
			wait 12 seconds
			set fade in time 3
			wait 1 second
		end cinema
		run3 = 1
	else
		run3 = 0
	end if
		until run3 == 1 or key KB_ESC down
	if key KB_ESC down
		skip current cutscene
		run3 = 1
		wait 2 seconds
    end if				
end script AttackHurCin

begin script CheatObb
	Alig = 0
	Light10 = 0
start
	// Hey!!! CHEAT! DO NOT READ THIS SCRIPT!!!!! ITS THE SECERT OBJECTIVE!
	begin loop
		if Fireweapone == 1
			Light10 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2154, 16, 1536} time -1 
			LightOb = LightOb + 1
			increment tribute by 75000
		end if
		until Fireweapone == 1
	end loop
end script CheatObb

begin script takeTownEOb 
	isConverted = 0
	isConverted2 = 0
	isConverted3 = 0
	isConverted4 = 0
	Light11 = 0
start
	begin loop
		isConverted = variable get town Town0 method of last conversion
		isConverted2 = variable get town Town1 method of last conversion
		isConverted3 = variable get town Town2 method of last conversion
		isConverted4 = variable get town Town4 method of last conversion
		if isConverted == 1 and isConverted3 == 1 and isConverted4 == 1
			increment tribute by 50000
			Light11 = create visual effect VISUAL_EFFECT_EPIC_VOLCANO_BEAM at {2150, 19, 1276} time -1 
			LightOb = LightOb + 1
		end if
		until isConverted == 1 and isConverted3 == 1 and isConverted4 == 1
	end loop
end script takeTownEOb 

begin script FinishLand
start
	wait until LightOb >= 11
	begin cinema
		set fade red 0 green 0 blue 0 time 4
		wait 4 seconds
		set camera position to {2100, 50, 1210}
		set camera focus to {2152, 23, 1398}
		wait 2 second
		move camera position to {2100, 50, 1500} time 10
		wait 10 seconds
		set fade in time 4
		wait 1 second
	end cinema
	increment tribute by 200000	
end script FinishLand

