"S4L1_tactic.sce"
{
	//bit flag  ---- start from 1 ----
	INT flag_sword_reward
	INT flag_cross_reward
	INT flag_abtower_destroy
	INT flag_camp_captured_e_d
	INT flag_camp_captured_e_e
	INT flag_camp_captured_e_f
	INT flag_camp_captured_e_g
	
	INT flag_triggered_objective_priest
	INT flag_triggered_objective_rescue
	INT flag_triggered_objective_missing

	//for e5
	INT flag_e_d_free_prisoner_a
	INT flag_e_d_free_prisoner_b
	INT flag_e_d_relief_force_supported

	//for e2
	INT flag_e_b_retreat
	INT flag_e_c_retreat
	
	//for town fierbois
	INT flag_fierbois_town_spawn
	INT flag_missing_citizen_init

	//for forest fierbois
	INT flag_fierbois_missing_villager_a
	INT flag_fierbois_missing_villager_b
	INT flag_fierbois_missing_villager_c
	INT flag_fierbois_missing_villager_d
	INT flag_fierbois_missing_villager_e
	INT	flag_fierbois_all_villagers_delivered

	//for church
	INT flag_fierbois_church_spawn_snipers
	INT flag_fierbois_church_spawn_snipers_init
	INT flag_looted_good_found

	//for tourelles e7
	INT flag_fierbois_tourelles_spawn
	INT flag_fierbois_wait_for_command 
	INT flag_tourelles_broken

	//for metz
	INT flag_fierbois_recue_metz

	//abtower
	INT flag_abtower_broken
	INT flag_all_attack
	
	//e4
	
	//loches
	INT flag_loches_talbot_refight
	INT flag_loches_talbot_retreat
	INT flag_loches_crossman_spawn

	//abtower
	INT flag_abtower_door_opened

	//general retreat flag
	INT flag_general_retreat_a
	INT flag_general_retreat_b
	INT flag_general_retreat_c
	INT flag_general_retreat_d
	INT flag_general_retreat_e

	INT flag_dead_earl
	INT flag_dead_alexander
	INT flag_dead_william
	INT flag_dead_john
	INT flag_dead_talbot

	//camp init cut-scene flag
	INT flag_camp_init_cutscene_e_a
	INT flag_camp_init_cutscene_e_c
	INT flag_camp_init_cutscene_e_d
	INT flag_camp_init_cutscene_tourelles

	INT flag_objective_menu
	INT flag_support_spawn
	INT flag_support_msg

	INT flag_all_abbow_dead
	INT flag_abbow_dead_1
	INT flag_abbow_dead_2
	INT flag_abbow_dead_3
	INT flag_abbow_dead_4
	INT flag_abbow_dead_5
	INT flag_abbow_dead_6
			
	//unit recno 

	//french
	INT unit_recno
	INT joan_recno
	INT lahire_recno
	INT jean_recno
	INT alencon_recno
	INT dunois_recno
	INT diller_recno

	//siege
	INT cannon_ctl_a
	INT cannon_ctl_b
	INT cannon_ctl_c
	INT cannon_ctl_d
	INT cannon_ctl_1
	INT cannon_ctl_2
	INT cannon_ctl_3
	INT cannon_ctl_4


	INT cannon_a
	INT cannon_b
	INT cannon_c
	INT cannon_d

	INT priest_recno
	INT councillor_recno
	INT prisoner_recno_a
	INT prisoner_recno_b

	INT weapon_seller_tours_recno 
	INT potion_seller_tours_recno
	INT potion_seller_fierbois_recno
	INT weapon_seller_fierbois_recno 

	
	//english
	INT earl_recno
	INT alexander_recno
	INT william_recno
	INT talbot_recno
	INT john_recno
	INT cs_alencon_recno
	INT cs_jean_recno

	//e5
	INT e_e_tower_archer_recno_a
	INT e_e_tower_archer_recno_b
	INT e_e_archer_team_recno

	//e4
	INT e_d_enemy_count
	INT e_d_heavy_infant_cap_recno_a
	INT e_d_heavy_infant_cap_recno_b
	INT e_d_maceman_cap_recno_a
	INT e_d_maceman_cap_recno_b
	INT e_d_poleman_cap_recno_a
	INT e_d_poleman_cap_recno_b
	INT e_d_crossbow_man_cap_recno_a
	INT e_d_archer_cap_recno_a
	
	//e1
	INT e_a_patriol_light_infant_recno
	INT e_a_ra_heavy_infant_recno_a
	INT e_a_ra_heavy_infant_recno_b
	INT e_a_ra_heavy_infant_recno_c
	INT e_a_ra_heavy_infant_recno_d

	INT e_a_rb_heavy_infant_recno_a
	INT e_a_rb_heavy_infant_recno_b
	INT e_a_rb_poleman_recno_a
	INT e_a_rb_poleman_recno_b
	INT e_a_rb_poleman_recno_c
	INT e_a_rb_poleman_recno_d

	INT e_a_rc_light_infant_recno_a
	INT e_a_rc_light_infant_recno_b
	INT e_a_rc_light_infant_recno_c
	INT e_a_rc_light_infant_recno_d
	
	INT e_a_ra_enemy_count
	INT e_a_rb_enemy_count
	INT e_a_rc_enemy_count

	//e2
	INT e_b_retreat_light_infant_recno_a
	INT e_b_retreat_light_infant_recno_b
	INT e_b_retreat_heavy_infant_recno_a
	INT e_b_retreat_maceman_recno_a
	INT e_b_retreat_maceman_recno_b

	//e3
	INT e_c_retreat_light_infant_recno_a 
	INT	e_c_retreat_light_infant_recno_b 
	INT	e_c_retreat_maceman_recno_a 

	//fierbois town
	INT fierbois_town_spawn_light_infantry_recno
	//INT camp_gate_recno

	//forest
	INT missing_villager_a
	INT missing_villager_b
	INT missing_villager_c
	INT missing_villager_d
	INT missing_villager_e

	//church
	INT church_enemy_count
	INT church_sniper_a
	INT church_sniper_b

	INT wagon_recno
	INT wagon_driver_recno
	INT wagon_track_id

	//e7 tourelles
	INT tourelles_crossman_a
	INT tourelles_crossman_b
	INT tourelles_crossman_c
	INT tourelles_crossman_d

	INT tourelles_archer_a
	INT tourelles_archer_b
	INT tourelles_light_infantry_a
	INT tourelles_light_infantry_b
	INT tourelles_maceman_a
	INT tourelles_maceman_b
	INT tourelles_maceman_c
	INT tourelles_maceman_d

	INT tourelles_maceman_e
	INT tourelles_maceman_f
	
	INT tourelles_poleman_a
	INT tourelles_poleman_b
	INT tourelles_poleman_c
	INT tourelles_gate_recno
	INT tourelles_patrol_a
	INT tourelles_patrol_b
			
	//e6 ab tower
	INT abtower_archer_a
	INT abtower_archer_b
	INT abtower_archer_c
	INT abtower_archer_d

	INT abtower_abbow_a
	INT abtower_abbow_b
	INT abtower_abbow_c
	INT abtower_abbow_d
	INT abtower_abbow_e
	INT abtower_abbow_f

	INT abtower_infant
	INT abtower_enemy_count
	INT abtower_recno
	INT abtower_gate_recno
					
	//spawn unit id 
	INT earcher_id
	INT elinfant_id
	INT ehinfant_id
	INT epoleman_id
	INT emaceman_id
	INT ecrossman_id

	INT earchercap_id
	INT elinfantcap_id
	INT ehinfantcap_id
	INT epolemancap_id
	INT emacemancap_id
	INT ecrossmancap_id

	INT farcher_id
	INT flinfant_id
	INT fhinfant_id
	INT fhinfantcap_id
	INT fpoleman_id
	INT fmaceman_id
	
	INT citizen_a_id
	INT citizen_b_id
	INT citizen_c_id
	INT citizen_d_id

	INT metz_id_a
	INT metz_id_b

	INT english_flag_id 
	INT french_flag_id 

	//item id
	INT key_metz_id
	INT key_prisoner_id
	INT key_abtower_id
	INT quartz_id
	INT alexandrite_id
	INT Yhwh_id
			
	//place recno
	INT place_recno_general_retreat
	INT place_recno_e_a_ra
	INT place_recno_e_a_rb
	INT place_recno_e_a_rc
	INT place_recno_e_b
	INT place_recno_e_b_retreat
	INT place_recno_e_c
	INT place_recno_e_c_retreat
	INT place_recno_e_d
	INT place_recno_e_e
	INT place_recno_e_f
	INT place_recno_e_f_inside
	INT place_recno_e_g
	INT place_recno_e_g_inside
	INT place_recno_e_g_outside

	INT place_recno_ready_to_fight

	INT place_recno_cannon_a
	INT place_recno_cannon_b
	INT place_recno_cannon_c
	INT place_recno_cannon_d

	INT place_recno_tours
	INT place_recno_loches_forest_a
	INT place_recno_loches_forest_b
	INT place_recno_loches_forest_c
	INT place_recno_loches_forest_d
	INT place_recno_talbot_retreat
	INT place_recno_fierbois_town
	INT place_recno_fierbois_forest
	INT place_recno_fierbois_church
	INT place_recno_siege
	INT place_recno_looted_good

	INT place_recno_patrol_area_a
	INT place_recno_metz_prison
	INT place_recno_metz_prison_defend

	INT place_recno_church_spawn
	
	INT weapon_shop_tours_recno 
	INT potion_shop_tours_recno
	INT potion_shop_fierbois_recno
	INT weapon_shop_fierbois_recno

	INT place_recno_priest_location
	INT place_recno_priest_retreat
	INT place_recno_councillor_location
	INT place_recno_councillor_retreat

	INT place_recno_ready

	//facility recno
	INT facility_spawn_point_fierbois_recno_a
	INT facility_spawn_point_fierbois_recno_b
	INT facility_spawn_point_fierbois_recno_c
	INT facility_spawn_point_fierbois_recno_d
	INT facility_spawn_point_church_recno_a 
	INT facility_spawn_point_church_recno_b
	INT facility_spawn_point_church_recno_c 
	INT facility_spawn_point_church_recno_d

	INT facility_spawn_point_ff_a_a_recno
	INT facility_spawn_point_ff_a_b_recno
	INT facility_spawn_point_ff_a_c_recno
	INT facility_spawn_point_ff_a_d_recno
	INT facility_spawn_point_ff_b_a_recno
	INT facility_spawn_point_ff_b_b_recno
	INT facility_spawn_point_ff_b_c_recno
	INT facility_spawn_point_ff_b_d_recno
	INT facility_spawn_point_ff_c_a_recno
	INT facility_spawn_point_ff_c_b_recno
	INT facility_spawn_point_ff_c_c_recno
	INT facility_spawn_point_ff_c_d_recno
	INT facility_spawn_point_ff_d_a_recno
	INT facility_spawn_point_ff_d_b_recno
	INT facility_spawn_point_ff_d_c_recno
	INT facility_spawn_point_ff_d_d_recno
	INT facility_spawn_point_ff_e_a_recno
	INT facility_spawn_point_ff_e_b_recno
	INT facility_spawn_point_ff_e_c_recno
	INT facility_spawn_point_ff_e_d_recno
	INT facility_spawn_point_ff_f_a_recno
	INT facility_spawn_point_ff_f_b_recno
	INT facility_spawn_point_ff_f_c_recno
	INT facility_spawn_point_ff_f_d_recno
	INT facility_spawn_point_ff_g_a_recno
	INT facility_spawn_point_ff_g_b_recno
	INT facility_spawn_point_ff_g_c_recno
	INT facility_spawn_point_ff_g_d_recno
	INT facility_spawn_point_ff_h_a_recno
	INT facility_spawn_point_ff_h_b_recno
	INT facility_spawn_point_ff_h_c_recno
	INT facility_spawn_point_ff_h_d_recno
	INT facility_spawn_point_ff_Ca_recno
	INT facility_spawn_point_ff_Cb_recno
	INT facility_spawn_point_ff_Cc_recno
	INT facility_spawn_point_ff_Cd_recno
	INT facility_spawn_point_ff_Ce_recno

	INT facility_spawn_point_e_a_Ra_a_recno
	INT facility_spawn_point_e_a_Ra_b_recno
	INT facility_spawn_point_e_a_Rb_a_recno
	INT facility_spawn_point_e_a_Rc_a_recno
	INT facility_spawn_point_e_a_Rc_b_recno

	INT facility_spawn_point_e_d_a_recno
	INT facility_spawn_point_e_d_b_recno
	INT facility_spawn_point_e_d_c_recno
	INT facility_spawn_point_e_d_d_recno
	INT facility_spawn_point_e_d_1_recno
	INT facility_spawn_point_e_d_2_recno
	INT facility_spawn_point_e_d_3_recno
	INT facility_spawn_point_e_d_4_recno

	//Tourelles
	INT facility_spawn_point_e_g_metz_recno
	INT facility_spawn_point_e_g_a_recno
	INT facility_spawn_point_e_g_b_recno
	INT facility_spawn_point_e_g_c_recno
	INT facility_spawn_point_e_g_d_recno
	INT facility_spawn_point_e_g_e_recno
	INT facility_spawn_point_e_g_f_recno
	INT facility_spawn_point_e_g_g_recno
	INT facility_spawn_point_e_g_h_recno
	INT facility_spawn_point_e_g_9_recno
	INT facility_spawn_point_e_g_10_recno
	INT facility_spawn_point_e_g_11_recno
	INT facility_spawn_point_e_g_12_recno
	
	INT facility_spawn_point_e_g_13_recno
	INT facility_spawn_point_e_g_14_recno
	INT facility_spawn_point_e_g_15_recno
	INT facility_spawn_point_e_g_16_recno
	
	INT facility_spawn_point_e_g_17_recno
	INT facility_spawn_point_e_g_18_recno
	INT facility_spawn_point_e_g_19_recno
	INT facility_spawn_point_e_g_20_recno
	
	INT facility_spawn_point_e_g_21_recno
	INT facility_spawn_point_e_g_22_recno
	INT facility_spawn_point_e_g_23_recno
	INT facility_spawn_point_e_g_24_recno
	
	INT facility_spawn_point_e_g_25_recno
	INT facility_spawn_point_e_g_26_recno
	INT facility_spawn_point_e_g_27_recno
	INT facility_spawn_point_e_g_28_recno
	
	INT facility_spawn_point_e_g_29_recno
	INT facility_spawn_point_e_g_30_recno
	INT facility_spawn_point_e_g_31_recno
	INT facility_spawn_point_e_g_32_recno
			
	//loches
	INT facility_spawn_point_loches_recno_a
	INT facility_spawn_point_loches_recno_b
	INT facility_spawn_point_loches_recno_c
	INT facility_spawn_point_loches_recno_d
	INT facility_spawn_point_loches_recno_e
	INT facility_spawn_point_loches_recno_f
	INT facility_spawn_point_loches_recno_g
	INT facility_spawn_point_loches_recno_h
	INT facility_spawn_point_loches_recno_i
	INT facility_spawn_point_loches_recno_j
	INT facility_spawn_point_loches_recno_k
	INT facility_spawn_point_loches_recno_l
	INT facility_spawn_point_loches_recno_m
	INT facility_spawn_point_loches_recno_n

	INT facility_recno_cartman 

	INT facility_recno_support_1
	INT facility_recno_support_2
	INT facility_recno_support_3
	INT facility_recno_support_4
	INT facility_recno_support_5
	INT facility_recno_support_6
	INT facility_recno_support_7
	INT facility_recno_support_8
	INT facility_recno_support_9
	INT facility_recno_support_10
	INT facility_recno_support_11
	INT facility_recno_support_12
	INT facility_recno_support_13
	INT facility_recno_support_14
	INT facility_recno_support_15
	INT facility_recno_support_16
	INT facility_recno_support_17
	INT facility_recno_support_18
	INT facility_recno_support_19
	INT facility_recno_support_20
	INT facility_recno_support_21
	INT facility_recno_support_22

	//script vars
	INT random_number 
	INT talk_unit_recno	
	INT interact_item_recno 
	INT curr_task
	INT follow_unit_recno
	INT unit_dist
	INT bool_var

	INT jean_arrow_count

	INT rotation
	INT direction
	INT armor_id

	INT enemy_count
	INT spawn_count
	INT spawn_team_id

	INT para_a
	INT para_b
	INT para_c
	INT para_d
	INT para_e
	INT para_f

	INT temp_unit_recno
	
	init 
	{
		//french
		unit_recno = FUNC("get_main_character") 		

		joan_recno = FUNC("search_unit_by_name", "Jeanne d'Arc") 		
		lahire_recno = FUNC("search_unit_by_name", "La Hire")
		jean_recno = FUNC("search_unit_by_name", "Jean von Metz")
		alencon_recno = FUNC("search_unit_by_name", "Herzog von Alençon")
	//	dunois_recno = FUNC("search_unit_by_name", "Dunois")
	//	diller_recno = FUNC("search_unit_by_name", "Dlllier")

		cannon_ctl_a = FUNC("search_unit_by_name", "Cannon Controller 1") 		
		cannon_ctl_b = FUNC("search_unit_by_name", "Cannon Controller 2") 		
		cannon_ctl_c = FUNC("search_unit_by_name", "Cannon Controller 3") 		
		cannon_ctl_d = FUNC("search_unit_by_name", "Cannon Controller 4") 		
		cannon_ctl_1 = FUNC("search_unit_by_name", "Cannon Controller 5") 		
		cannon_ctl_2 = FUNC("search_unit_by_name", "Cannon Controller 6") 		
		cannon_ctl_3 = FUNC("search_unit_by_name", "Cannon Controller 7") 		
		cannon_ctl_4 = FUNC("search_unit_by_name", "Cannon Controller 8") 		

		missing_villager_a = FUNC("search_unit_by_name", "Missing Villager Hugues Miroerier")
		missing_villager_b = FUNC("search_unit_by_name", "Missing Villager Baudouin Oier")
		missing_villager_c = FUNC("search_unit_by_name", "Missing Villager Bohemond Lingier")
		missing_villager_d = FUNC("search_unit_by_name", "Missing Villager Richard Gruier")
		missing_villager_e = FUNC("search_unit_by_name", "Missing Villager Garnier Hiaumier")

		cannon_a = FUNC("search_unit_by_name", "Cannon 1") 		
		cannon_b = FUNC("search_unit_by_name", "Cannon 2") 		
		cannon_c = FUNC("search_unit_by_name", "Cannon 3") 		
		cannon_d = FUNC("search_unit_by_name", "Cannon 4") 	
		
		diller_recno = FUNC("search_unit_by_name", "d'Illiers")	

		priest_recno = FUNC("search_unit_by_name", "Priest")
		councillor_recno = FUNC("search_unit_by_name", "Councillor")
		prisoner_recno_a = FUNC("search_unit_by_name", "Bohemond Chamberier")
		prisoner_recno_b = FUNC("search_unit_by_name", "Guignes Espicier")
		
		weapon_seller_tours_recno = FUNC("search_unit_by_name", "Richard Goulier")
		potion_seller_tours_recno = FUNC("search_unit_by_name", "Louis Esperonnier")
		potion_seller_fierbois_recno = FUNC("search_unit_by_name", "Gerard Messagier")
		weapon_seller_fierbois_recno = FUNC("search_unit_by_name", "Macaire Hougier")
		
		//english
		earl_recno = FUNC("search_unit_by_name", "William de la Pole") 		
		alexander_recno = FUNC("search_unit_by_name", "Alexander de la Pole") 		
		william_recno = FUNC("search_unit_by_name", "Sir William Glasdale") 		
		john_recno = FUNC("search_unit_by_name", "John de la Pole") 		
		talbot_recno = FUNC("search_unit_by_name", "Lord Talbot") 		

		cs_alencon_recno = FUNC("search_unit_by_name", "CS alencon")
		cs_jean_recno = FUNC("search_unit_by_name", "CS metz")
		
		//e1
		e_a_patriol_light_infant_recno = FUNC("search_unit_by_name", "Everard Attelane")
	
		e_a_ra_heavy_infant_recno_a = FUNC("search_unit_by_name", "Alan Bolle")
		e_a_ra_heavy_infant_recno_b = FUNC("search_unit_by_name", "Petr Hordercolor")
		e_a_ra_heavy_infant_recno_c = FUNC("search_unit_by_name", "Raulf Bisbrooke")
		e_a_ra_heavy_infant_recno_d = FUNC("search_unit_by_name", "Stephanus Clericus")

		e_a_rb_heavy_infant_recno_a = FUNC("search_unit_by_name", "Christopher Hugonis")
		e_a_rb_heavy_infant_recno_b = FUNC("search_unit_by_name", "Bertram Braunston")
		e_a_rb_poleman_recno_a = FUNC("search_unit_by_name", "John Neucomen")
		e_a_rb_poleman_recno_b = FUNC("search_unit_by_name", "Brian Quilter")
		e_a_rb_poleman_recno_c = FUNC("search_unit_by_name", "Dionisi Fithien")
		e_a_rb_poleman_recno_d = FUNC("search_unit_by_name", "Geffrey Essendine")

		e_a_rc_light_infant_recno_a = FUNC("search_unit_by_name", "Galfridus Godehusband")
		e_a_rc_light_infant_recno_b = FUNC("search_unit_by_name", "Willlelmus Baldewyn")
		e_a_rc_light_infant_recno_c = FUNC("search_unit_by_name", "Roland Baldewyne")
		e_a_rc_light_infant_recno_d = FUNC("search_unit_by_name", "Thomas Ashwell")

		//e2
		e_b_retreat_light_infant_recno_a = FUNC("search_unit_by_name", "Clemente Grangea")
		e_b_retreat_light_infant_recno_b = FUNC("search_unit_by_name", "Michael Formatrix")
		e_b_retreat_heavy_infant_recno_a = FUNC("search_unit_by_name", "Edwardus Empingham")

		e_b_retreat_maceman_recno_a = FUNC("search_unit_by_name", "Gilbertus Bedel")
		e_b_retreat_maceman_recno_b = FUNC("search_unit_by_name", "Bartholomew Hardepeny")

		//e3
		e_c_retreat_light_infant_recno_a = FUNC("search_unit_by_name", "Lowis Beatricis")
		e_c_retreat_light_infant_recno_b = FUNC("search_unit_by_name", "Asselin Cocus")
		e_c_retreat_maceman_recno_a = FUNC("search_unit_by_name", "Gernagoun Ecclesiam")

		//e5
		e_e_tower_archer_recno_a  = FUNC("search_unit_by_name", "e_e_tow_arc_1") 		
		e_e_tower_archer_recno_b  = FUNC("search_unit_by_name", "e_e_tow_arc_2") 		
		e_e_archer_team_recno  = FUNC("search_unit_by_name", "Edmund Bothe") 		

		//fierbois town
		//camp_gate_recno = FUNC("search_item_by_name", "Camp Gate")
		abtower_gate_recno = FUNC("search_item_by_name", "ab_gate")

		//fierbois forest 
		//missing_villager_a = FUNC("search_unit_by_name", "Missing Villager 1")
		//missing_villager_b = FUNC("search_unit_by_name", "Missing Villager 2")
		//missing_villager_c = FUNC("search_unit_by_name", "Missing Villager 3")
		//missing_villager_d = FUNC("search_unit_by_name", "Missing Villager 4")
		//missing_villager_e = FUNC("search_unit_by_name", "Missing Villager 5")

		//church
		church_sniper_a = FUNC("search_unit_by_name", "Guy Caldecott") 		
		church_sniper_b = FUNC("search_unit_by_name", "Walran Arrowden") 		

		//tourelles
		tourelles_crossman_a = FUNC("search_unit_by_name", "Daniel Goldesone") 		
		tourelles_crossman_b = FUNC("search_unit_by_name", "Bernard Jocei") 		
		tourelles_crossman_c = FUNC("search_unit_by_name", "Charles Angulo") 		
		tourelles_crossman_d = FUNC("search_unit_by_name", "Norman Barrow") 		

		tourelles_poleman_a = FUNC("search_unit_by_name", "Hugone Arre") 		
		tourelles_poleman_b = FUNC("search_unit_by_name", "Robertus Andrewe") 		
		tourelles_poleman_c = FUNC("search_unit_by_name", "Guidonis Bischop") 		

		tourelles_maceman_e = FUNC("search_unit_by_name", "Grimbaldus Breyteywe") 		
		tourelles_maceman_f = FUNC("search_unit_by_name", "Godhuwe Borel") 		
		tourelles_gate_recno = FUNC( "search_item_by_name" , "Tourelles gate")

		tourelles_patrol_a = FUNC("search_unit_by_name", "Rauf Stather") 		
		tourelles_patrol_b = FUNC("search_unit_by_name", "Roger Taylor") 		
					
		//ab tower
		abtower_archer_a = FUNC("search_unit_by_name", "Mauger Derlyng") 		
		abtower_archer_b = FUNC("search_unit_by_name", "Abelot Burrel") 		
		abtower_archer_c = FUNC("search_unit_by_name", "Nicholl Normanton") 		
		abtower_archer_d = FUNC("search_unit_by_name", "Radulph Osberne") 		
		abtower_infant	= FUNC("search_unit_by_name", "Fulk Toky") 		
		abtower_recno = FUNC( "search_item_by_name" , "Abtower")

		abtower_abbow_a = FUNC("search_unit_by_name", "abbow 1") 		
		abtower_abbow_b = FUNC("search_unit_by_name", "abbow 2") 		
		abtower_abbow_c = FUNC("search_unit_by_name", "abbow 3") 		
		abtower_abbow_d = FUNC("search_unit_by_name", "abbow 4") 		
		abtower_abbow_e = FUNC("search_unit_by_name", "abbow 5") 		
		abtower_abbow_f = FUNC("search_unit_by_name", "abbow 6") 		

		wagon_recno = FUNC("search_unit_by_name", "Horse Wagon Driver")
		//wagon_driver_recno = FUNC("search_unit_by_name", "Wagon Driver")
				
		//place recno
		place_recno_general_retreat = FUNC("search_place_by_name", "general retreat")
		place_recno_e_a_ra = FUNC("search_place_by_name", "Large_English_Camp_E1_R1")
		place_recno_e_a_rb = FUNC("search_place_by_name", "Large_English_Camp_E1_R2")
		place_recno_e_a_rc = FUNC("search_place_by_name", "Large_English_Camp_E1_R3")
		place_recno_e_b = FUNC("search_place_by_name", "Small_English_Troops") 
		place_recno_e_b_retreat = FUNC("search_place_by_name", "E2 retreat") 
		place_recno_e_c = FUNC("search_place_by_name", "Large_English_Camp_E3") 
		place_recno_e_c_retreat = FUNC("search_place_by_name", "E3 retreat") 
		place_recno_e_d = FUNC("search_place_by_name", "Boulevard") 
		place_recno_e_e = FUNC("search_place_by_name", "HiddenArcher") 
		place_recno_e_f = FUNC("search_place_by_name", "Augustin") 
		place_recno_e_g = FUNC("search_place_by_name", "Tourelles")
		place_recno_e_g_inside = FUNC("search_place_by_name", "Tourelles Inside") 
		place_recno_e_f_inside = FUNC("search_place_by_name", "Abtower Inside") 
		place_recno_e_g_outside = FUNC("search_place_by_name", "Tourelles outside") 
		place_recno_ready_to_fight = FUNC("search_place_by_name", "ready fight") 

		place_recno_tours = FUNC("search_place_by_name", "Tours")
		place_recno_loches_forest_a = FUNC("search_place_by_name", "Loches1")
		place_recno_loches_forest_b = FUNC("search_place_by_name", "Loches2")
		place_recno_loches_forest_c = FUNC("search_place_by_name", "Loches3")
		place_recno_loches_forest_d = FUNC("search_place_by_name", "Loches4")
		place_recno_talbot_retreat = FUNC("search_place_by_name", "Talbot retreat place")
		place_recno_fierbois_town = FUNC("search_place_by_name", "Fierbois")
		place_recno_fierbois_forest = FUNC("search_place_by_name", "Fierbois_Forest")
		place_recno_fierbois_church = FUNC("search_place_by_name", "Church")
		place_recno_patrol_area_a = FUNC("search_place_by_name", "Patrol Area 1")
		place_recno_metz_prison = FUNC("search_place_by_name", "Metz Prison")
		place_recno_metz_prison_defend = FUNC("search_place_by_name", "metz prison defend place")

		place_recno_church_spawn = FUNC("search_place_by_name", "church spawn")
		place_recno_siege = FUNC("search_place_by_name", "Siege")
		place_recno_looted_good = FUNC("search_place_by_name", "Looted Good")

		place_recno_cannon_a = FUNC("search_place_by_name", "Place Cannon 1")
		place_recno_cannon_b = FUNC("search_place_by_name", "Place Cannon 2")
		place_recno_cannon_c = FUNC("search_place_by_name", "Place Cannon 3")
		place_recno_cannon_d = FUNC("search_place_by_name", "Place Cannon 4")

		place_recno_priest_location = FUNC("search_place_by_name", "priest location")
		place_recno_priest_retreat = FUNC("search_place_by_name", "priest retreat")
		place_recno_councillor_location = FUNC("search_place_by_name", "counciller location")
		place_recno_councillor_retreat = FUNC("search_place_by_name", "counciller retreat")

		place_recno_ready = FUNC("search_place_by_name", "ready place")

		//facility recno
		weapon_shop_tours_recno = FUNC("search_facility_by_name" , "Tours Weapon Shop") 
		potion_shop_tours_recno = FUNC("search_facility_by_name" , "Tours Potion Shop") 
		potion_shop_fierbois_recno = FUNC("search_facility_by_name" , "Fierbois Potion Shop") 
		weapon_shop_fierbois_recno = FUNC("search_facility_by_name" , "Fierbois Weapon Shop") 
		
		facility_spawn_point_fierbois_recno_a = FUNC("search_facility_by_name" , "Fierbois Town Spawn Point 1") 
		facility_spawn_point_fierbois_recno_b = FUNC("search_facility_by_name" , "Fierbois Town Spawn Point 2") 
		facility_spawn_point_fierbois_recno_c = FUNC("search_facility_by_name" , "Fierbois Town Spawn Point 3") 
		facility_spawn_point_fierbois_recno_d = FUNC("search_facility_by_name" , "Fierbois Town Spawn Point 4") 

		facility_spawn_point_church_recno_a = FUNC("search_facility_by_name" , "Church Sniper Spawn Point 1")
		facility_spawn_point_church_recno_b = FUNC("search_facility_by_name" , "Church Sniper Spawn Point 2")
		facility_spawn_point_church_recno_c = FUNC("search_facility_by_name" , "Church Sniper Spawn Point 3")
		facility_spawn_point_church_recno_d = FUNC("search_facility_by_name" , "Church Sniper Spawn Point 4")

		facility_spawn_point_ff_a_a_recno = FUNC("search_facility_by_name" , "FF_91_1")
		facility_spawn_point_ff_a_b_recno = FUNC("search_facility_by_name" , "FF_91_2")
		facility_spawn_point_ff_a_c_recno = FUNC("search_facility_by_name" , "FF_91_3")
		facility_spawn_point_ff_a_d_recno = FUNC("search_facility_by_name" , "FF_91_4")
		facility_spawn_point_ff_b_a_recno = FUNC("search_facility_by_name" , "FF_92_1")
		facility_spawn_point_ff_b_b_recno = FUNC("search_facility_by_name" , "FF_92_2")
		facility_spawn_point_ff_b_c_recno = FUNC("search_facility_by_name" , "FF_92_3")
		facility_spawn_point_ff_b_d_recno = FUNC("search_facility_by_name" , "FF_92_4")
		facility_spawn_point_ff_c_a_recno = FUNC("search_facility_by_name" , "FF_93_1")
		facility_spawn_point_ff_c_b_recno = FUNC("search_facility_by_name" , "FF_93_2")
		facility_spawn_point_ff_c_c_recno = FUNC("search_facility_by_name" , "FF_93_3")
		facility_spawn_point_ff_c_d_recno = FUNC("search_facility_by_name" , "FF_93_4")
		facility_spawn_point_ff_d_a_recno = FUNC("search_facility_by_name" , "FF_94_1")
		facility_spawn_point_ff_d_b_recno = FUNC("search_facility_by_name" , "FF_94_2")
		facility_spawn_point_ff_d_c_recno = FUNC("search_facility_by_name" , "FF_94_3")
		facility_spawn_point_ff_d_d_recno = FUNC("search_facility_by_name" , "FF_94_4")
		facility_spawn_point_ff_e_a_recno = FUNC("search_facility_by_name" , "FF_95_1")
		facility_spawn_point_ff_e_b_recno = FUNC("search_facility_by_name" , "FF_95_2")
		facility_spawn_point_ff_e_c_recno = FUNC("search_facility_by_name" , "FF_95_3")
		facility_spawn_point_ff_e_d_recno = FUNC("search_facility_by_name" , "FF_95_4")
		facility_spawn_point_ff_f_a_recno = FUNC("search_facility_by_name" , "FF_96_1")
		facility_spawn_point_ff_f_b_recno = FUNC("search_facility_by_name" , "FF_96_2")
		facility_spawn_point_ff_f_c_recno = FUNC("search_facility_by_name" , "FF_96_3")
		facility_spawn_point_ff_f_d_recno = FUNC("search_facility_by_name" , "FF_96_4")
		facility_spawn_point_ff_g_a_recno = FUNC("search_facility_by_name" , "FF_97_1")
		facility_spawn_point_ff_g_b_recno = FUNC("search_facility_by_name" , "FF_97_2")
		facility_spawn_point_ff_g_c_recno = FUNC("search_facility_by_name" , "FF_97_3")
		facility_spawn_point_ff_g_d_recno = FUNC("search_facility_by_name" , "FF_97_4")
		facility_spawn_point_ff_h_a_recno = FUNC("search_facility_by_name" , "FF_98_1")
		facility_spawn_point_ff_h_b_recno = FUNC("search_facility_by_name" , "FF_98_2")
		facility_spawn_point_ff_h_c_recno = FUNC("search_facility_by_name" , "FF_98_3")
		facility_spawn_point_ff_h_d_recno = FUNC("search_facility_by_name" , "FF_98_4")
		facility_spawn_point_ff_Ca_recno = FUNC("search_facility_by_name" , "FF_C1")
		facility_spawn_point_ff_Cb_recno = FUNC("search_facility_by_name" , "FF_C2")
		facility_spawn_point_ff_Cc_recno = FUNC("search_facility_by_name" , "FF_C3")
		facility_spawn_point_ff_Cd_recno = FUNC("search_facility_by_name" , "FF_C4")
		facility_spawn_point_ff_Ce_recno = FUNC("search_facility_by_name" , "FF_C5")

		facility_spawn_point_e_a_Ra_a_recno = FUNC("search_facility_by_name" , "E1_R1_1")
		facility_spawn_point_e_a_Ra_b_recno = FUNC("search_facility_by_name" , "E1_R1_2")
		facility_spawn_point_e_a_Rb_a_recno = FUNC("search_facility_by_name" , "E1_R2_1")
		facility_spawn_point_e_a_Rc_a_recno = FUNC("search_facility_by_name" , "E1_R3_1")

		facility_spawn_point_e_d_a_recno = FUNC("search_facility_by_name" , "Boulevard spawn point 1")
		facility_spawn_point_e_d_b_recno = FUNC("search_facility_by_name" , "Boulevard spawn point 2")
		facility_spawn_point_e_d_c_recno = FUNC("search_facility_by_name" , "Boulevard spawn point 3")
		facility_spawn_point_e_d_d_recno = FUNC("search_facility_by_name" , "Boulevard spawn point 4")
		facility_spawn_point_e_d_1_recno = FUNC("search_facility_by_name" , "Boulevard spawn point 5")
		facility_spawn_point_e_d_2_recno = FUNC("search_facility_by_name" , "Boulevard spawn point 6")
		facility_spawn_point_e_d_3_recno = FUNC("search_facility_by_name" , "Boulevard spawn point 7")
		facility_spawn_point_e_d_4_recno = FUNC("search_facility_by_name" , "Boulevard spawn point 8")

		facility_spawn_point_e_g_metz_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point Metz")
		facility_spawn_point_e_g_a_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 1")
		facility_spawn_point_e_g_b_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 2")
		facility_spawn_point_e_g_c_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 3")
		facility_spawn_point_e_g_d_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 4")
		facility_spawn_point_e_g_e_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 5")
		facility_spawn_point_e_g_f_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 6")
		facility_spawn_point_e_g_g_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 7")
		facility_spawn_point_e_g_h_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 8")
		facility_spawn_point_e_g_9_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 9")
		facility_spawn_point_e_g_10_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 10")
		facility_spawn_point_e_g_11_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 11")
		facility_spawn_point_e_g_12_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 12")
		facility_spawn_point_e_g_13_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 13")
		facility_spawn_point_e_g_14_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 14")
		facility_spawn_point_e_g_15_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 15")
		facility_spawn_point_e_g_16_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 16")
		facility_spawn_point_e_g_17_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 17")
		facility_spawn_point_e_g_18_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 18")
		facility_spawn_point_e_g_19_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 19")
		facility_spawn_point_e_g_20_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 20")
		facility_spawn_point_e_g_21_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 21")
		facility_spawn_point_e_g_22_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 22")
		facility_spawn_point_e_g_23_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 23")
		facility_spawn_point_e_g_24_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 24")
		facility_spawn_point_e_g_25_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 25")
		facility_spawn_point_e_g_26_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 26")
		facility_spawn_point_e_g_27_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 27")
		facility_spawn_point_e_g_28_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 28")
		facility_spawn_point_e_g_29_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 29")
		facility_spawn_point_e_g_30_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 30")
		facility_spawn_point_e_g_31_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 31")
		facility_spawn_point_e_g_32_recno = FUNC("search_facility_by_name" , "Tourelles Spawn Point 32")

		facility_spawn_point_loches_recno_a = FUNC("search_facility_by_name" , "Loches Spawn Point 1")
		facility_spawn_point_loches_recno_b = FUNC("search_facility_by_name" , "Loches Spawn Point 2")
		facility_spawn_point_loches_recno_c = FUNC("search_facility_by_name" , "Loches Spawn Point 3")
		facility_spawn_point_loches_recno_d = FUNC("search_facility_by_name" , "Loches Spawn Point 4")
		facility_spawn_point_loches_recno_e = FUNC("search_facility_by_name" , "Loches Spawn Point 5")
		facility_spawn_point_loches_recno_f = FUNC("search_facility_by_name" , "Loches Spawn Point 6")
		facility_spawn_point_loches_recno_g = FUNC("search_facility_by_name" , "Loches Spawn Point 7")
		facility_spawn_point_loches_recno_h = FUNC("search_facility_by_name" , "Loches Spawn Point 8")
		facility_spawn_point_loches_recno_i = FUNC("search_facility_by_name" , "Loches Spawn Point 9")
		facility_spawn_point_loches_recno_j = FUNC("search_facility_by_name" , "Loches Spawn Point 10")
		facility_spawn_point_loches_recno_k = FUNC("search_facility_by_name" , "Loches Spawn Point 11")
		facility_spawn_point_loches_recno_l = FUNC("search_facility_by_name" , "Loches Spawn Point 12")
		facility_spawn_point_loches_recno_m = FUNC("search_facility_by_name" , "Loches Spawn Point 13")
		facility_spawn_point_loches_recno_n = FUNC("search_facility_by_name" , "Loches Spawn Point 14")

		facility_recno_cartman = FUNC("search_facility_by_name" , "church spawn 1") 

		facility_recno_support_1 = FUNC("search_facility_by_name" , "support spawn 1") 
		facility_recno_support_2 = FUNC("search_facility_by_name" , "support spawn 2") 
		facility_recno_support_3 = FUNC("search_facility_by_name" , "support spawn 3") 
		facility_recno_support_4 = FUNC("search_facility_by_name" , "support spawn 4") 
		facility_recno_support_5 = FUNC("search_facility_by_name" , "support spawn 5") 
		facility_recno_support_6 = FUNC("search_facility_by_name" , "support spawn 6") 
		facility_recno_support_7 = FUNC("search_facility_by_name" , "support spawn 7") 
		facility_recno_support_8 = FUNC("search_facility_by_name" , "support spawn 8") 
		facility_recno_support_9 = FUNC("search_facility_by_name" , "support spawn 9") 
		facility_recno_support_10 = FUNC("search_facility_by_name" , "support spawn 10") 
		facility_recno_support_11 = FUNC("search_facility_by_name" , "support spawn 11") 
		facility_recno_support_12 = FUNC("search_facility_by_name" , "support spawn 12") 
		facility_recno_support_13 = FUNC("search_facility_by_name" , "support spawn 13") 
		facility_recno_support_14 = FUNC("search_facility_by_name" , "support spawn 14") 
		facility_recno_support_15 = FUNC("search_facility_by_name" , "support spawn 15") 
		facility_recno_support_16 = FUNC("search_facility_by_name" , "support spawn 16") 
		facility_recno_support_17 = FUNC("search_facility_by_name" , "support spawn 17") 
		facility_recno_support_18 = FUNC("search_facility_by_name" , "support spawn 18") 
		facility_recno_support_19 = FUNC("search_facility_by_name" , "support spawn 19") 
		facility_recno_support_20 = FUNC("search_facility_by_name" , "support spawn 20") 
		facility_recno_support_21 = FUNC("search_facility_by_name" , "support spawn 21") 
		facility_recno_support_22 = FUNC("search_facility_by_name" , "support spawn 22") 

		earcher_id = FUNC("unit_code_to_id", "ENGLISH_ARCHER") 
		FUNC("add_unit_ref", "ENGLISH_ARCHER") 
		elinfant_id = FUNC("unit_code_to_id", "ENGLISH_LIGHT_INFANTRY") 
		FUNC("add_unit_ref", "ENGLISH_LIGHT_INFANTRY") 
		ehinfant_id = FUNC("unit_code_to_id", "ENGLISH_HEAVY_INFANTRY") 
		FUNC("add_unit_ref", "ENGLISH_HEAVY_INFANTRY") 
		ecrossman_id = FUNC("unit_code_to_id", "ENGLISH_CROSSBOW_MAN") 
		FUNC("add_unit_ref", "ENGLISH_CROSSBOW_MAN") 
		emaceman_id = FUNC("unit_code_to_id", "ENGLISH_MACEMAN") 
		FUNC("add_unit_ref", "ENGLISH_MACEMAN") 
		epoleman_id = FUNC("unit_code_to_id", "ENGLISH_POLEMAN") 
		FUNC("add_unit_ref", "ENGLISH_POLEMAN") 
		
		ecrossmancap_id = FUNC("unit_code_to_id", "ENGLISH_CROSSBOW_MAN_CAPTAIN") 
		FUNC("add_unit_ref", "ENGLISH_CROSSBOW_MAN_CAPTAIN") 
		emacemancap_id = FUNC("unit_code_to_id", "ENGLISH_MACEMAN_CAPTAIN") 
		FUNC("add_unit_ref", "ENGLISH_MACEMAN_CAPTAIN") 
		epolemancap_id = FUNC("unit_code_to_id", "ENGLISH_POLEMAN_CAPTAIN") 
		FUNC("add_unit_ref", "ENGLISH_POLEMAN_CAPTAIN") 
		elinfantcap_id = FUNC("unit_code_to_id", "ENGLISH_LIGHT_INFANTRY_CAPTAIN")
		FUNC("add_unit_ref", "ENGLISH_LIGHT_INFANTRY_CAPTAIN") 
		ehinfantcap_id = FUNC("unit_code_to_id", "ENGLISH_HEAVY_INFANTRY_CAPTAIN")
		FUNC("add_unit_ref", "ENGLISH_HEAVY_INFANTRY_CAPTAIN") 
		earchercap_id = FUNC("unit_code_to_id", "ENGLISH_ARCHER_CAPTAIN")
		FUNC("add_unit_ref", "ENGLISH_ARCHER_CAPTAIN") 
		citizen_a_id = FUNC("unit_code_to_id", "CITIZEN_01_2")
		FUNC("add_unit_ref", "CITIZEN_01_2") 
		citizen_b_id = FUNC("unit_code_to_id", "CITIZEN_02A_2")
		FUNC("add_unit_ref", "CITIZEN_02A_2") 
		citizen_c_id = FUNC("unit_code_to_id", "CITIZEN_03_2")
		FUNC("add_unit_ref", "CITIZEN_03_2") 
		citizen_d_id = FUNC("unit_code_to_id", "CITIZEN_04B_2")
		FUNC("add_unit_ref", "CITIZEN_04B_2") 
		metz_id_a = FUNC("unit_code_to_id", "JEAN_DE_METZ")
		FUNC("add_unit_ref", "JEAN_DE_METZ") 

		farcher_id = FUNC("unit_code_to_id", "FRENCH_ARCHER")
		FUNC("add_unit_ref", "FRENCH_ARCHER") 
		flinfant_id = FUNC("unit_code_to_id", "FRENCH_LIGHT_INFANTRY")
		FUNC("add_unit_ref", "FRENCH_LIGHT_INFANTRY") 
		fhinfant_id = FUNC("unit_code_to_id", "FRENCH_HEAVY_INFANTRY")
		FUNC("add_unit_ref", "FRENCH_HEAVY_INFANTRY") 
		fhinfantcap_id = FUNC("unit_code_to_id", "FRENCH_HEAVY_INFANTRY_CAPTAIN")
		FUNC("add_unit_ref", "FRENCH_HEAVY_INFANTRY_CAPTAIN") 
		fpoleman_id = FUNC("unit_code_to_id", "FRENCH_POLEMAN")
		FUNC("add_unit_ref", "FRENCH_POLEMAN") 
		fmaceman_id = FUNC("unit_code_to_id", "FRENCH_MACEMAN")
		FUNC("add_unit_ref", "FRENCH_MACEMAN") 
	

		//metz_id_b = FUNC("unit_code_to_id", "JEAN_DE_METZ_2")
		//FUNC("add_unit_ref", "JEAN_DE_METZ_2") 

		key_metz_id = FUNC( "item_code_to_id", "keyS4_02")
		key_prisoner_id = FUNC( "item_code_to_id", "keyS4_01")
		key_abtower_id = FUNC( "item_code_to_id", "keyS4_03")

		quartz_id = FUNC( "item_code_to_id", "Quartz")
		alexandrite_id = FUNC( "item_code_to_id", "Alexandrite")
		Yhwh_id = FUNC( "item_code_to_id", "Yhwh")

		english_flag_id = FUNC("item_code_to_id", "Object\Models_Items\Flags\EnglishFlag\english_flag" )
		french_flag_id = FUNC("item_code_to_id", "Object\Models_Items\Flags\FrenchFlag\french_flag" )

		//rotate minimap
		FUNC("set_minimap_rotation" , 1)

		//minimap icon
		if(FUNC( "get_place_captured" , place_recno_e_a_ra) == 1)
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE1S4L1" , 1 )
			FUNC("set_minimap_icon_display_enable" , "e_campE1S4L1" , 0 )
			FUNC("set_territory_nation", "de l'eau bleue", "French")
		}	
		else 
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE1S4L1" , 0 )
			FUNC("set_minimap_icon_display_enable" , "e_campE1S4L1" , 1 )
		}

		if( FUNC( "get_place_captured" , place_recno_e_d ) == 1 )
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE4S4L4" , 1 )
			FUNC("set_minimap_icon_display_enable" , "e_campE4S4L4" , 0 )
			FUNC("set_territory_nation", "Saint Jean le Blanc", "French")
		}
		else
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE4S4L4" , 0 )
			FUNC("set_minimap_icon_display_enable" , "e_campE4S4L4" , 1 )
		}

		if( FUNC( "get_place_captured" , place_recno_e_c ) == 1 )
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE3S4L1" , 1 )
			FUNC("set_minimap_icon_display_enable" , "e_campE3S4L1" , 0 )
			FUNC("set_territory_nation", "le fort", "French")
		}
		else
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE3S4L1" , 0 )
			FUNC("set_minimap_icon_display_enable" , "e_campE3S4L1" , 1 )
		}
		
		if( FUNC( "get_place_captured" , place_recno_e_b ) == 1 )
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE2S4L1" , 1 )
			FUNC("set_minimap_icon_display_enable" , "e_campE2S4L1" , 0 )
			FUNC("set_territory_nation", "de la petite coline", "French")
		}
		else
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE2S4L1" , 0 )
			FUNC("set_minimap_icon_display_enable" , "e_campE2S4L1" , 1 )
		}

		if( FUNC( "get_place_captured" , place_recno_e_f ) == 1 )
		{
			FUNC("set_territory_nation", "Saint Augustin", "French")
			FUNC("set_minimap_icon_display_enable" , "tower_s4l3_f" , 1 )
			FUNC("set_minimap_icon_display_enable" , "tower_s4l3_e" , 0 )
		}
		else
		{
			FUNC("set_minimap_icon_display_enable" , "tower_s4l3_f" , 0 )
			FUNC("set_minimap_icon_display_enable" , "tower_s4l3_e" , 1 )
		}

		if( FUNC( "get_place_captured" , place_recno_e_g ) == 1 )
		{
			FUNC("set_territory_nation", "Tourelles", "French")
			FUNC("set_minimap_icon_display_enable" , "castle_s4l3_f" , 1 )
			FUNC("set_minimap_icon_display_enable" , "castle_s4l3_e" , 0 )
		}
		else
		{
			FUNC("set_minimap_icon_display_enable" , "castle_s4l3_f" , 0 )
			FUNC("set_minimap_icon_display_enable" , "castle_s4l3_e" , 1 )
		}

		FUNC("set_kill_citizen_limit", 5)
							
		if( FUNC("get_scenario_stage") == 0)
		{
			FUNC("set_citizen_saved")

			//init unit status
	 		FUNC("set_can_interact_flag", priest_recno, 1)
			//FUNC("set_can_interact_flag", councillor_recno, 1)

			FUNC("set_can_interact_flag", prisoner_recno_a, 1)
			FUNC("set_can_interact_flag", prisoner_recno_b, 1)
		
			FUNC("set_can_interact_flag", weapon_seller_tours_recno, 1)
			FUNC("set_can_interact_flag", potion_seller_tours_recno, 1)
			FUNC("set_can_interact_flag", potion_seller_fierbois_recno, 1)
			FUNC("set_can_interact_flag", weapon_seller_fierbois_recno, 1)

			FUNC("set_can_interact_flag", talbot_recno, 1)
			FUNC("set_can_interact_flag", tourelles_patrol_b, 1)
		
			//FUNC("add_gate_trigger", camp_gate_recno, 0)

			FUNC("set_control_flag" , jean_recno , 0)

			ACTION("give_task", priest_recno, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", councillor_recno, "IDLE", 1, 0, 0, 0, 0) 

			ACTION("give_task", prisoner_recno_a, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_b, "IDLE", 1, 0, 0, 0, 0) 
			
			ACTION("give_task", weapon_seller_tours_recno, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", potion_seller_tours_recno, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", potion_seller_fierbois_recno, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", weapon_seller_fierbois_recno, "IDLE", 1, 0, 0, 0, 0) 

			ACTION("give_task", talbot_recno, "IDLE", 1, 0, 0, 0, 0) 
			//ACTION("give_task", wagon_driver_recno, "IDLE", 1, 0, 0, 0, 0) 

			ACTION("give_task", lahire_recno,  "FOLLOW_UNIT", 1, joan_recno, 200, 0, 0)

			//tourelles
			ACTION("give_task", tourelles_maceman_e , "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", tourelles_maceman_f , "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", tourelles_poleman_a , "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", tourelles_poleman_b , "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", tourelles_poleman_c , "IDLE", 1, 0, 0, 0, 0) 

			//siege weapon
			ACTION("give_task", cannon_ctl_a, "LARGE_WEAPON_PUSH", 2, cannon_a, 0, 0, 0)
			ACTION("give_task", cannon_ctl_b, "LARGE_WEAPON_PUSH", 2, cannon_b, 0, 0, 0)
			ACTION("give_task", cannon_ctl_c, "LARGE_WEAPON_PUSH", 2, cannon_c, 0, 0, 0)
			ACTION("give_task", cannon_ctl_d, "LARGE_WEAPON_PUSH", 2, cannon_d, 0, 0, 0)
			ACTION("give_task", cannon_ctl_1, "LARGE_WEAPON_PUSH", 2, cannon_a, 1, 0, 0)
			ACTION("give_task", cannon_ctl_2, "LARGE_WEAPON_PUSH", 2, cannon_b, 1, 0, 0)
			ACTION("give_task", cannon_ctl_3, "LARGE_WEAPON_PUSH", 2, cannon_c, 1, 0, 0)
			ACTION("give_task", cannon_ctl_4, "LARGE_WEAPON_PUSH", 2, cannon_d, 1, 0, 0)

			ACTION("give_task", cannon_a, "IDLE", 2, 0, 0, 0, 0) 
			ACTION("give_task", cannon_b, "IDLE", 2, 0, 0, 0, 0) 
			ACTION("give_task", cannon_c, "IDLE", 2, 0, 0, 0, 0) 
			ACTION("give_task", cannon_d, "IDLE", 2, 0, 0, 0, 0) 

			ACTION("give_task", jean_recno, "IDLE", 1, 0, 0, 0, 0) 

			ACTION("give_team_task", abtower_archer_a, "TOWER_ATTACK", 2, 2000, 0, 0, 0)
			ACTION("give_team_task", abtower_archer_b, "TOWER_ATTACK", 2, 2000, 0, 0, 0)
			ACTION("give_team_task", abtower_archer_c, "TOWER_ATTACK", 2, 2000, 0, 0, 0)
			ACTION("give_team_task", abtower_archer_d, "TOWER_ATTACK", 2, 2000, 0, 0, 0)

			FUNC( "set_control_flag" , jean_recno , 0 ) 
			FUNC("set_prisoner", jean_recno, 2 )
			FUNC("set_unit_vision_range" , jean_recno, 200 )

			FUNC( "give_item_to_unit", "ARROW_EXPLOSIVE", 1, 30, unit_recno )
			FUNC( "give_item_to_unit", "fd_bread_s", 1, 3, alencon_recno )
			FUNC( "give_item_to_unit", "fd_bread_L", 1, 2, alencon_recno )
			FUNC( "give_item_to_unit", "fd_apple", 1, 3, alencon_recno )

			FUNC( "set_unit_drop_item_id" , talbot_recno, key_metz_id ) 
			FUNC( "set_unit_drop_item_level", talbot_recno, 1)

			FUNC( "set_unit_drop_item_id" , william_recno , key_abtower_id ) 
			FUNC( "set_unit_drop_item_level", william_recno , 1)

			FUNC( "set_unit_drop_item_id" , earl_recno, key_prisoner_id  ) 
			FUNC( "set_unit_drop_item_level", earl_recno , 1)
			
			FUNC( "set_unit_drop_item_id" , alexander_recno, Yhwh_id ) 
			FUNC( "set_unit_drop_item_level", alexander_recno, 2)

			FUNC( "set_unit_drop_item_id" , john_recno, alexandrite_id ) 
			FUNC( "set_unit_drop_item_level", john_recno, 7)
	
			FUNC ("set_end_condition_enabled", 3, 1) 
			FUNC ("set_end_condition_enabled", 4, 0) 
			FUNC ("set_end_condition_enabled", 9, 0) 
			FUNC ("set_end_condition_enabled", 8, 0) 
			
			//FUNC("set_unit_retreat", dunois_recno, 1)
			//FUNC("set_unit_retreat", diller_recno, 1)
			FUNC("set_unit_retreat", lahire_recno, 1)
			FUNC("set_unit_retreat", jean_recno, 1)
			FUNC("set_unit_retreat", alencon_recno, 1)
			
			//FUNC("set_unit_retreat", talbot_recno, 1)
			
			FUNC("set_unit_retreat", earl_recno, 1)
			FUNC("set_unit_retreat", alexander_recno, 1)
			FUNC("set_unit_retreat", william_recno, 1)
			FUNC("set_unit_retreat", john_recno, 1)
			
			//FUNC("set_unit_ride_cart", wagon_driver_recno, wagon_recno)

			// task initialize
			ACTION("give_team_task", e_e_archer_team_recno, "TOWER_ATTACK", 2, 3000, 0, 0, 0)
			ACTION("give_team_task", e_e_tower_archer_recno_a, "TOWER_ATTACK", 2, 3000, 0, 0, 0)
			ACTION("give_team_task", e_e_tower_archer_recno_b, "TOWER_ATTACK", 2, 3000, 0, 0, 0)

			ACTION("give_team_task", tourelles_crossman_a, "TOWER_ATTACK", 2, 2000, 0, 0, 0)
			ACTION("give_team_task", tourelles_crossman_b, "TOWER_ATTACK", 2, 2000, 0, 0, 0)
			ACTION("give_team_task", tourelles_crossman_c, "TOWER_ATTACK", 2, 2000, 0, 0, 0)
			ACTION("give_team_task", tourelles_crossman_d, "TOWER_ATTACK", 2, 2000, 0, 0, 0)
	
			ACTION("give_team_task", e_a_patriol_light_infant_recno, "DEFEND_PLACE", 1, place_recno_patrol_area_a, 0, 0, 0)

			armor_id = FUNC("get_unit_armor_id" , jean_recno ) 
			FUNC("set_unit_armor_id" , cs_jean_recno, armor_id )

			armor_id = FUNC("get_unit_armor_id" , alencon_recno ) 
			FUNC("set_unit_armor_id" , cs_alencon_recno, armor_id )

			jean_arrow_count = FUNC("get_item_quantity_in_unit_inventory", FUNC("item_code_to_id", "arrow"), jean_recno)
			if ( jean_arrow_count < 90 )
			{
				FUNC("give_item_to_unit", "arrow", 1, ( 90 - jean_arrow_count ), jean_recno)
			}

			FUNC("give_item_to_unit", "fd_bread_L", 1, 1, alexander_recno)
			FUNC("give_item_to_unit", "fd_bread_L", 1, 1, john_recno)
			FUNC("give_item_to_unit", "fd_bread_L", 1, 2, earl_recno)
			FUNC("give_item_to_unit", "fd_bread_L", 1, 3, william_recno)
			FUNC("give_item_to_unit", "fd_meat", 1, 1, talbot_recno)

			ACTION("give_task", john_recno, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", william_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", earl_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", alexander_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", tourelles_maceman_e , "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", tourelles_maceman_f , "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", tourelles_poleman_a , "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", tourelles_poleman_b , "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", tourelles_poleman_c , "IDLE", 1, 1, 0, 0, 0) 
		}
	}

	if( FUNC("get_scenario_stage") == 0)
	{
		exit
	}
	
	unit_recno = FUNC("get_main_character") 		

	//get scenario flag status
	talk_unit_recno	= FUNC("get_interact_unit_recno", unit_recno)
	interact_item_recno = FUNC("get_interact_item_recno", unit_recno)

	//get bit flag status
	flag_sword_reward = FUNC("get_scenario_bit_flag", 1) 
	flag_cross_reward = FUNC("get_scenario_bit_flag", 2) 
	flag_abtower_destroy = FUNC("get_scenario_bit_flag", 3) 
	flag_camp_captured_e_d = FUNC("get_scenario_bit_flag", 4) 
	flag_camp_captured_e_e = FUNC("get_scenario_bit_flag", 5) 
	flag_camp_captured_e_f = FUNC("get_scenario_bit_flag", 6) 
	flag_camp_captured_e_g = FUNC("get_scenario_bit_flag", 7) 
	flag_triggered_objective_priest = FUNC("get_scenario_bit_flag", 8) 
	flag_triggered_objective_rescue = FUNC("get_scenario_bit_flag", 9) 
	flag_triggered_objective_missing = FUNC("get_scenario_bit_flag", 10) 
	
	flag_e_b_retreat = FUNC("get_scenario_bit_flag", 14)
	flag_e_c_retreat = FUNC("get_scenario_bit_flag", 15)
	
	//e4
	flag_e_d_free_prisoner_a = FUNC("get_scenario_bit_flag", 11) 
	flag_e_d_free_prisoner_b = FUNC("get_scenario_bit_flag", 12) 
	flag_e_d_relief_force_supported = FUNC("get_scenario_bit_flag", 13) 
	
	// fierbois_town
	flag_fierbois_town_spawn = FUNC("get_scenario_bit_flag", 16)
	flag_missing_citizen_init = FUNC("get_scenario_bit_flag", 17)

	// fierbois_forest
	flag_fierbois_missing_villager_a = FUNC("get_scenario_bit_flag", 18)  
	flag_fierbois_missing_villager_b = FUNC("get_scenario_bit_flag", 19)
	flag_fierbois_missing_villager_c = FUNC("get_scenario_bit_flag", 20)
	flag_fierbois_missing_villager_d = FUNC("get_scenario_bit_flag", 21)
	flag_fierbois_missing_villager_e = FUNC("get_scenario_bit_flag", 22)
	flag_fierbois_all_villagers_delivered = FUNC("get_scenario_bit_flag", 23)
	flag_fierbois_church_spawn_snipers = FUNC("get_scenario_bit_flag", 24)
	flag_fierbois_church_spawn_snipers_init = FUNC("get_scenario_bit_flag", 25)
	flag_fierbois_tourelles_spawn = FUNC("get_scenario_bit_flag", 26)		
	flag_fierbois_recue_metz = FUNC("get_scenario_bit_flag", 27)		
	flag_fierbois_wait_for_command = FUNC("get_scenario_bit_flag", 28)		
	flag_tourelles_broken = FUNC("get_scenario_bit_flag", 29)		
	flag_abtower_broken = FUNC("get_scenario_bit_flag", 30)		
	flag_all_attack = FUNC("get_scenario_bit_flag", 31)		
	flag_looted_good_found = FUNC("get_scenario_bit_flag", 32)		
	
	// loches 
	flag_loches_talbot_refight = FUNC("get_scenario_event_bit_flag", 3)
	flag_loches_talbot_retreat = FUNC("get_scenario_event_bit_flag", 4)
	flag_loches_crossman_spawn = FUNC("get_scenario_event_bit_flag", 5)

	flag_abtower_door_opened = FUNC("get_scenario_event_bit_flag", 6)

	flag_general_retreat_a = FUNC("get_scenario_event_bit_flag", 7)
	flag_general_retreat_b = FUNC("get_scenario_event_bit_flag", 8) 
	flag_general_retreat_c = FUNC("get_scenario_event_bit_flag", 9)
	flag_general_retreat_d = FUNC("get_scenario_event_bit_flag", 10)
	flag_general_retreat_e = FUNC("get_scenario_event_bit_flag", 11)

	flag_camp_init_cutscene_e_a = FUNC("get_scenario_event_bit_flag", 12)
	flag_camp_init_cutscene_e_c = FUNC("get_scenario_event_bit_flag", 13)
	flag_camp_init_cutscene_e_d = FUNC("get_scenario_event_bit_flag", 14)
	flag_camp_init_cutscene_tourelles = FUNC("get_scenario_event_bit_flag", 15)

	flag_objective_menu = FUNC("get_scenario_event_bit_flag", 16)
	flag_support_spawn = FUNC("get_scenario_event_bit_flag", 17)
	flag_support_msg = FUNC("get_scenario_event_bit_flag", 18)

	flag_dead_earl = FUNC("get_scenario_event_bit_flag", 19)
	flag_dead_alexander = FUNC("get_scenario_event_bit_flag", 20)
	flag_dead_william = FUNC("get_scenario_event_bit_flag", 21)
	flag_dead_john = FUNC("get_scenario_event_bit_flag", 22)
	flag_dead_talbot = FUNC("get_scenario_event_bit_flag", 23)
	flag_all_abbow_dead = FUNC("get_scenario_event_bit_flag", 24)
	flag_abbow_dead_1 = FUNC("get_scenario_event_bit_flag", 25)
	flag_abbow_dead_2 = FUNC("get_scenario_event_bit_flag", 26)
	flag_abbow_dead_3 = FUNC("get_scenario_event_bit_flag", 27)
	flag_abbow_dead_4 = FUNC("get_scenario_event_bit_flag", 28)
	flag_abbow_dead_5 = FUNC("get_scenario_event_bit_flag", 29)
	flag_abbow_dead_6 = FUNC("get_scenario_event_bit_flag", 30)

	//initial cut_scene 
	if( FUNC("get_scenario_stage") == 1 )
	{
		if( flag_objective_menu == 0 )
		{
			WAIT
			{
				FUNC("start_cut_scene", 0,  0, 18749, 961, 65, 187, 95, 0 )
				FUNC("set_end_cut_scene_type", 1)
			}

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			
			FUNC("set_idle", joan_recno)
			
			//WAIT{ FUNC("is_cut_scene_status_black_screen") }
			
			FUNC("change_camera_in_cut_scene", 0, 18587, 959, 46, 187, 177, 3 )

			WAIT{ DIALOG("add_dialog", lahire_recno, "[0001N]Ah, yes... the beautiful Loire river basin is much more pleasant, now that we have driven the English from the surroundings of Orléans." ) }
			WAIT{ DIALOG("add_dialog", jean_recno, "[0002N]Indeed, my dear Etienne, but this is not the moment to bask in our success, for if we are to deliver our dauphin to Reims for his coronation, we will need to expel the enemy from Tourelles. Mind you, this is no easy task:" ) }

			FUNC("change_camera_in_cut_scene", 0, 18592, 222, 778, 187, 83, 46)

			WAIT{ DIALOG("add_dialog", jean_recno, "[0003N]Tourelles is fortified by an adjacent military installation, that of Saint Augustin, a tower that features formidable arbalests controlled by numerous mechanical pulleys." ) }

			FUNC("set_unit_can_process_in_cut_scene", joan_recno, 1)
			FUNC("set_unit_can_process_in_cut_scene", lahire_recno, 1)

			FUNC("set_unit_degree" , joan_recno, FUNC("get_rotation" , joan_recno, lahire_recno))
			FUNC("set_unit_degree" , lahire_recno, FUNC("get_rotation" , lahire_recno, joan_recno))
		
			FUNC("change_camera_in_cut_scene", 0, 18537, 943, 40, 187, -10, 0)
						
			WAIT{ DIALOG("add_dialog", lahire_recno, "[0004N]This does sound quite dangerous. Fortunately, we can count on our master siege engineer and poleman general, the Duke of Alencon, to aid our cause." ) }
			
			//FUNC("change_camera_in_cut_scene", 0, 18717, 884, 98, 187, 105, 0 )

			temp_unit_recno =  FUNC("get_unit_team_leader_by_team_id" , 990 )
			FUNC("set_unit_can_process_in_cut_scene", temp_unit_recno , 1)
			
			FUNC("set_unit_degree" , temp_unit_recno , FUNC("get_rotation" , temp_unit_recno , joan_recno) )
			FUNC("set_unit_degree" , joan_recno, FUNC("get_rotation" , joan_recno, temp_unit_recno ))
			
			temp_unit_recno =  FUNC("get_unit_team_leader_by_team_id" , 991 )
			FUNC("set_unit_can_process_in_cut_scene", temp_unit_recno , 1)

			FUNC("set_unit_degree" , lahire_recno, FUNC("get_rotation" , lahire_recno, joan_recno))
			FUNC("set_unit_degree" , temp_unit_recno , FUNC("get_rotation" , temp_unit_recno , joan_recno))
		
			WAIT{ DIALOG("add_dialog", jean_recno, "[0005N]Milady, I would like to introduce you to Jean, Duke of Alencon." ) }

			FUNC("change_camera_in_cut_scene", 0, 18786, 950, 40, 187, -175, -1 )

			WAIT{ DIALOG("add_dialog", alencon_recno, "[0006N]Glad to meet your acquaintance, milady. After hearing of the plight of our innocent citizens in Orléans, I felt compelled to be here to assist you and your noble cause." ) }


			WAIT{ DIALOG("add_dialog", lahire_recno, "[0007N]Very well, then, let's move on and destroy the ruffianly English! Let's go, there's some head-banging to be done!") }

			FUNC("set_unit_degree" , joan_recno, FUNC("get_rotation" , joan_recno, temp_unit_recno))

			FUNC("change_camera_in_cut_scene", 0, 18749, 961, 65, 187, 95, 0 )
			WAIT{ DIALOG("add_dialog", alencon_recno, "[0008N]I will head towards the vicinity of Tourelles so I may scout the area. I shall inform you of any enemy activity in the area.") }		

			temp_unit_recno =  FUNC("get_unit_team_leader_by_team_id" , 991 )
			FUNC("set_unit_team_can_process_in_cut_scene", temp_unit_recno , 1)
			FUNC("set_unit_can_process_in_cut_scene", temp_unit_recno , 0)
						
			FUNC("enable_unit_team_bounding_volume", temp_unit_recno, 0)

			ACTION("give_team_task", temp_unit_recno, "APPROACH_PLACE", 5, place_recno_general_retreat , 0, 0 , 0)			
			
			if( FUNC("is_cut_scene_finished", 1) == 0 )
			{
				WAIT{ FUNC("pause_script", 1000) }	
				FUNC("set_unit_can_process_in_cut_scene", temp_unit_recno , 1)
				WAIT{ FUNC("pause_script", 2000) }	
			}

			FUNC("change_camera_in_cut_scene", 0, 19776, 1276, 59, 187, -179, -9 )
			WAIT{ DIALOG("add_dialog", jean_recno, "[0009N]And I shall head towards Chinon to rendezvous with the French siege forces, led by Dunois and d'Illiers.") }		

			temp_unit_recno =  FUNC("get_unit_team_leader_by_team_id" , 990 )
			FUNC("set_unit_team_can_process_in_cut_scene", temp_unit_recno , 1)
			FUNC("set_unit_can_process_in_cut_scene", temp_unit_recno , 0)
			FUNC("enable_unit_team_bounding_volume", temp_unit_recno, 0)
			ACTION("give_team_task", temp_unit_recno  , "APPROACH_PLACE", 5, place_recno_general_retreat , 0, 0 , 0)			

			if( FUNC("is_cut_scene_finished" , 1) == 0 )
			{
				WAIT{ FUNC("pause_script", 1000) }	
				FUNC("set_unit_can_process_in_cut_scene", temp_unit_recno , 1)
				WAIT{ FUNC("pause_script", 2000) }
			}

			FUNC( "del_unit_team" , 990 )
			FUNC( "del_unit_team" , 991 )

			FUNC("change_camera_in_cut_scene", 0, 18630, 984, 40, 187, -93, -1 )

			FUNC("set_unit_degree" , joan_recno, FUNC("get_rotation" , joan_recno, lahire_recno))
			FUNC("set_unit_degree" , lahire_recno, FUNC("get_rotation" , lahire_recno, joan_recno))
		
			WAIT{ DIALOG("add_dialog", lahire_recno, "[0010N]The English are retreating towards the west. We may either head west and take the initiative against them or capture English camps due south.") }		
				
			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene_2", 0, 1 )
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			WAIT{FUNC("show_scenario_brief")}
			//WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_scenario_event_bit_flag", 16, 1)
		
		}
		
		FUNC("set_scenario_stage", 2)
		exit
	}
	
	// init cut scene
	if( flag_camp_init_cutscene_e_a == 0 && william_recno ) 
	{
		if( FUNC("is_unit_inside_place", place_recno_e_a_ra, unit_recno) || FUNC("is_unit_inside_place", place_recno_e_a_rb, unit_recno) )
		{
			FUNC("start_cut_scene", 0, 0, 3940, 3530, 389, 284, -166, 9)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", william_recno, 1)

			FUNC("set_idle", william_recno)
			FUNC("stop_curr_task", william_recno)
			ACTION("give_task", william_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", william_recno)
			
			WAIT{ FUNC("pause_script", 1) }
			ACTION("give_task", william_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", william_recno)
			FUNC("set_idle", william_recno)
			
			WAIT{ DIALOG("add_dialog", william_recno, "[0011N]I pity the fool that has the gall to enter our largest camp, and yet you come with so little support. I shall ensure that you never reach Tourelles, if not in a coffin!") }
			
			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene", 0)
			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_unit_can_process_in_cut_scene", 0, 1)

			FUNC("stop_curr_task", william_recno)
			ACTION("give_task", william_recno, "DEFEND_PLACE", 10, place_recno_e_a_rb, 0, 0, 0)
				
			FUNC("set_scenario_event_bit_flag", 12, 1 )
		}
	}

	if( flag_camp_init_cutscene_e_c == 0 && alexander_recno) 
	{
		if( FUNC("is_unit_inside_place", place_recno_e_c, unit_recno) )
		{
			FUNC("start_cut_scene", 0, 0, 12366, 11238, 140, 284, 24, 9)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", alexander_recno, 1)

			FUNC("set_idle", alexander_recno)
			FUNC("stop_curr_task", alexander_recno)
			ACTION("give_task", alexander_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", alexander_recno)
			
			WAIT{ FUNC("pause_script", 1) }
			ACTION("give_task", alexander_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", alexander_recno)
			FUNC("set_idle", alexander_recno)
			
			WAIT{ DIALOG("add_dialog", alexander_recno, "[0012N]We meet again, French fool! I shall be swift this time, and put you out of your misery. You shall not leave this camp alive.") }
			
			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene", 0)
			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_unit_can_process_in_cut_scene", 0, 1)

			FUNC("stop_curr_task", alexander_recno)
			ACTION("give_task", alexander_recno, "DEFEND_PLACE", 10, place_recno_e_c, 0, 0, 0)
	
			FUNC("set_scenario_event_bit_flag", 13, 1 )
		}
	}

	if( flag_camp_init_cutscene_e_d == 0 && earl_recno) 
	{
		if( FUNC("is_unit_inside_place", place_recno_e_d, unit_recno) )
		{
			FUNC("start_cut_scene", 0, 0, 19055, 12820, 30, 284, 88, 14)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", earl_recno, 1)

			FUNC("set_idle", earl_recno)
			FUNC("stop_curr_task", earl_recno)
			ACTION("give_task", earl_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", earl_recno)
			
			WAIT{ FUNC("pause_script", 1) }
			ACTION("give_task", earl_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", earl_recno)
			FUNC("set_idle", earl_recno)
			
			WAIT{ DIALOG("add_dialog", earl_recno, "[0013N]The French seem intent on breaching our camp, men! Polemen, protect the gate! Archers, fire at will! We must not allow the enemy entrance!") }
			
			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene", 0)
			WAIT{ FUNC("is_cut_scene_finished") }
			FUNC("set_unit_can_process_in_cut_scene", 0, 1)

			FUNC("stop_curr_task", earl_recno)
			ACTION("give_task", earl_recno, "DEFEND_PLACE", 10, place_recno_e_d, 0, 0, 0)
	
			FUNC("set_scenario_event_bit_flag", 14, 1 )
		}
	}

	if( flag_camp_init_cutscene_tourelles == 0 && john_recno ) 
	{
		if( FUNC("is_unit_inside_place", place_recno_e_g_outside, unit_recno) )
		{
			FUNC("start_cut_scene", 0, 0, john_recno, 200, ( 180 - FUNC("get_unit_dir", john_recno) ), 10)
			//FUNC("start_cut_scene", 0, 0, 23456, 23511, 40, 284, 16, 5)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", john_recno, 1)

			FUNC("set_idle", john_recno)
			FUNC("stop_curr_task", john_recno)
			ACTION("give_task", john_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", john_recno)
			
			WAIT{ FUNC("pause_script", 1) }
			ACTION("give_task", john_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", john_recno)
			FUNC("set_idle", john_recno)
			
			WAIT{ DIALOG("add_dialog", john_recno, "[0014N]You have made it this far - I must say I am surprised. It's too bad that you shall suffer your demise in Tourelles, for this time you will not escape my wrath!") }
			
			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene", 0)
			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_unit_can_process_in_cut_scene", 0, 1)

			FUNC("stop_curr_task", john_recno)
			ACTION("give_task", john_recno, "DEFEND_PLACE", 2, place_recno_e_g, 0, 0, 0)
			ACTION("give_team_task", tourelles_maceman_e , "DEFEND_PLACE", 2, place_recno_e_g, 0, 0, 0)
			ACTION("give_team_task", tourelles_maceman_f , "DEFEND_PLACE", 2, place_recno_e_g, 0, 0, 0)
			ACTION("give_team_task", tourelles_poleman_a , "DEFEND_PLACE", 2, place_recno_e_g, 0, 0, 0)
			ACTION("give_team_task", tourelles_poleman_b , "DEFEND_PLACE", 2, place_recno_e_g, 0, 0, 0)
			ACTION("give_team_task", tourelles_poleman_c , "DEFEND_PLACE", 2, place_recno_e_g, 0, 0, 0)
	
			FUNC("set_scenario_event_bit_flag", 15, 1 )
		}
	}

	// english genenal retreat
	if(	FUNC("get_unit_retreat", john_recno) == -1 )
	{
		if(FUNC("get_unit_dist", john_recno, unit_recno) < 2000 ) 
		{
			FUNC("start_cut_scene_2", 1, 0, john_recno, 200, ( 180 - FUNC("get_unit_dir", john_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", john_recno, 1)

			WAIT{ FUNC("is_cut_scene_status_black_screen") }

			FUNC("set_idle", john_recno)
			FUNC("stop_curr_task", john_recno)
			ACTION("give_task", john_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", john_recno)
			
			WAIT{ FUNC("pause_script", 1) }
			ACTION("give_task", john_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", john_recno)
			FUNC("set_idle", john_recno)
						
			FUNC("change_camera_in_cut_scene", 0, john_recno, 200, ( 180 - FUNC("get_unit_dir", john_recno) ), 10)
			
			WAIT{ DIALOG("add_dialog", john_recno, "[0015N]You have drained me of my strength in this encounter, foul heathen, but I shall recover and give you a taste of your own medicine soon enough!") }

			FUNC("enable_unit_bounding_volume", john_recno, 0)
			WAIT{ ACTION("give_order", john_recno, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

			
			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene_2", 0, 1)
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			
			FUNC( "del_unit", john_recno )

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("attention_call_message", "[0016N]You have defeated John de la Pole! There seems to be a shining gem he left in his hasty departure...")

			john_recno = 0
			FUNC("set_scenario_event_bit_flag", 22, 1)
	
		}	
		else
		{
			FUNC("attention_call_message_2", "[0015N]You have drained me of my strength in this encounter, foul heathen, but I shall recover and give you a taste of your own medicine soon enough!" , john_recno )
			FUNC("attention_call_message", "[0016N]You have defeated John de la Pole! There seems to be a shining gem he left in his hasty departure...")
			FUNC( "del_unit", john_recno )
			FUNC("set_scenario_event_bit_flag", 22, 1)

			john_recno = 0
		}
	}	

	if(	FUNC("get_unit_retreat", earl_recno) == -1 )
	{
		if(FUNC("get_unit_dist", earl_recno, unit_recno) < 2000 ) 
		{
			FUNC("start_cut_scene_2", 1, 0, earl_recno, 200, ( 180 - FUNC("get_unit_dir", earl_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", earl_recno, 1)

			FUNC("set_idle", earl_recno)
			FUNC("stop_curr_task", earl_recno)
			ACTION("give_task", earl_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", earl_recno)
			
			WAIT{ FUNC("pause_script", 1) }
			ACTION("give_task", earl_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", earl_recno)
			FUNC("set_idle", earl_recno)

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, earl_recno, 200, ( 180 - FUNC("get_unit_dir", earl_recno) ), 10)
			
			WAIT{ DIALOG("add_dialog", earl_recno, "[0017N]No! I refuse to believe that my superior training has been overwhelmed by these riotous peasants! You and your filthy ilk will meet with me again, mark my words!") }

			FUNC("enable_unit_bounding_volume", earl_recno, 0)

			WAIT{ ACTION("give_order", earl_recno, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene_2", 0, 1)
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
						
			FUNC( "del_unit", earl_recno )

			WAIT{ FUNC("is_cut_scene_finished") }

			earl_recno = 0
			FUNC("set_scenario_event_bit_flag", 19, 1)

			FUNC("attention_call_message", "[0018N]In his retreat, William de la Pole has dropped a key!")
		}	
		else
		{
			FUNC("attention_call_message_2", "[0017N]No! I refuse to believe that my superior training has been overwhelmed by these riotous peasants! You and your filthy ilk will meet with me again, mark my words!", earl_recno )
			FUNC("attention_call_message", "[0018N]In his retreat, William de la Pole has dropped a key!")
			FUNC( "del_unit", earl_recno )
			FUNC("set_scenario_event_bit_flag", 19, 1)

			earl_recno = 0
		}
	}	
	
	if(	FUNC("get_unit_retreat", alexander_recno) == -1 )
	{
		if(FUNC("get_unit_dist", alexander_recno, unit_recno) < 2000 ) 
		{
			FUNC("start_cut_scene_2", 1, 0, alexander_recno, 200, ( 180 - FUNC("get_unit_dir", alexander_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", alexander_recno, 1)

			FUNC("set_idle", alexander_recno)
			FUNC("stop_curr_task", alexander_recno)
			ACTION("give_task", alexander_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", alexander_recno)
			
			WAIT{ FUNC("pause_script", 1) }
			ACTION("give_task", alexander_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", alexander_recno)
			FUNC("set_idle", alexander_recno)

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, alexander_recno, 200, ( 180 - FUNC("get_unit_dir", alexander_recno) ), 10)
			
			WAIT{ DIALOG("add_dialog", alexander_recno, "[0019N]But - how? It escapes me how you can defeat me again! Never mind, you shall never pass Saint Augustin and Tourelles anyway - if you succeeded against me, you shall surely meet failure upon reaching our armed towers!") }

			FUNC("enable_unit_bounding_volume", alexander_recno, 0)

			WAIT{ ACTION("give_order", alexander_recno, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene_2", 0, 1)
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			
			FUNC( "del_unit", alexander_recno )

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_scenario_bit_flag", 15, 1) 
			FUNC("set_scenario_event_bit_flag", 20, 1)

			alexander_recno = 0
		}	
		else
		{
			FUNC("attention_call_message_2", "[0019N]But - how? It escapes me how you can defeat me again! Never mind, you shall never pass Saint Augustin and Tourelles anyway - if you succeeded against me, you shall surely meet failure upon reaching our armed towers!", alexander_recno )
			FUNC( "del_unit", alexander_recno )
			FUNC("set_scenario_bit_flag", 15, 1) 
			FUNC("set_scenario_event_bit_flag", 20, 1)

			alexander_recno = 0
		}
	}	

	if(	FUNC("get_unit_retreat", william_recno) == -1 )
	{
		if(FUNC("get_unit_dist", william_recno, unit_recno) < 2000 ) 
		{
			FUNC("start_cut_scene_2", 1, 0, william_recno, 200, ( 180 - FUNC("get_unit_dir", william_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", william_recno, 1)

			FUNC("set_idle", william_recno)
			FUNC("stop_curr_task", william_recno)
			ACTION("give_task", william_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", william_recno)
			
			WAIT{ FUNC("pause_script", 1) }
			ACTION("give_task", william_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("stop_all_order", william_recno)
			FUNC("set_idle", william_recno)

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, william_recno, 200, ( 180 - FUNC("get_unit_dir", william_recno) ), 10)
			
			WAIT{ DIALOG("add_dialog", william_recno, "[0020N]You have won this battle, but this war is far from over. Your lands - everything and everyone - shall always belong to England! Until we meet again!") }

			FUNC("enable_unit_bounding_volume", william_recno, 0)

			WAIT{ ACTION("give_order", william_recno, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene_2", 0, 1)
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			
			FUNC( "del_unit", william_recno )

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("attention_call_message", "[0021N]Sir William has dropped a key!")
			FUNC("set_scenario_event_bit_flag", 21, 1)

			william_recno = 0
		}	
		else
		{
			FUNC("attention_call_message_2", "[0020N]You have won this battle, but this war is far from over. Your lands - everything and everyone - shall always belong to England! Until we meet again!", william_recno )
			FUNC("attention_call_message", "[0021N]Sir William has dropped a key!")
			FUNC( "del_unit", william_recno )
			FUNC("set_scenario_event_bit_flag", 21, 1)

			william_recno = 0
		}
	}	

	
	// french genenal retreat
	if(	FUNC("get_unit_retreat", dunois_recno) == -1 )
	{
		if( flag_general_retreat_a == 0 )
		{
			if(FUNC("get_unit_dist", dunois_recno, unit_recno) < 2000 ) 
			{
				FUNC("start_cut_scene_2", 1, 0, dunois_recno, 200, ( 180 - FUNC("get_unit_dir", dunois_recno) ), 10, 1)
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
				FUNC("set_unit_can_process_in_cut_scene", dunois_recno, 1)

				FUNC("set_idle", dunois_recno)
				FUNC("stop_curr_task", dunois_recno)
				ACTION("give_task", dunois_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", dunois_recno)
				
				WAIT{ FUNC("pause_script", 1) }
				ACTION("give_task", dunois_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", dunois_recno)
				FUNC("set_idle", dunois_recno)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, dunois_recno, 200, ( 180 - FUNC("get_unit_dir", dunois_recno) ), 10)
				
				WAIT{ DIALOG("add_dialog", dunois_recno, "[0022N]I've been badly hit! I am retreating to safer grounds!") }

				FUNC("enable_unit_bounding_volume", dunois_recno, 0)

				WAIT{ ACTION("give_order", dunois_recno, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

				DIALOG("del_all_dialog") 
				FUNC("end_cut_scene_2", 0, 1)
				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				
				FUNC( "del_unit_team" , 126)

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC( "set_scenario_event_bit_flag", 7, 1)  			
			}
			else
			{
				FUNC("attention_call_message_2", "[0022N]I've been badly hit! I am retreating to safer grounds!", dunois_recno )
				FUNC( "set_scenario_event_bit_flag", 7, 1)  			
				FUNC( "del_unit_team" , 126)
			}
		}
	}

	if( FUNC("get_unit_retreat", diller_recno) == -1 )
	{
		if( flag_general_retreat_b == 0 )
		{
			if(FUNC("get_unit_dist", diller_recno, unit_recno) < 2000 ) 
			{
				FUNC("start_cut_scene_2", 1, 0, diller_recno, 200, ( 180 - FUNC("get_unit_dir", diller_recno) ), 10, 1)

				FUNC("set_idle", unit_recno) 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
				FUNC("set_unit_can_process_in_cut_scene", diller_recno, 1)

				FUNC("set_idle", diller_recno)
				FUNC("stop_curr_task", diller_recno)
				ACTION("give_task", diller_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", diller_recno)
				
				WAIT{ FUNC("pause_script", 1) }
				ACTION("give_task", diller_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", diller_recno)
				FUNC("set_idle", diller_recno)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, diller_recno, 200, ( 180 - FUNC("get_unit_dir", diller_recno) ), 10)
				
				WAIT{ DIALOG("add_dialog", diller_recno, "[0022N]I've been badly hit! I am retreating to safer grounds!") }

				FUNC("enable_unit_bounding_volume", diller_recno, 0)

				WAIT{ ACTION("give_order", diller_recno, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

				DIALOG("del_all_dialog") 
				FUNC("end_cut_scene_2", 0, 1)
				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				
				FUNC( "del_unit_team" , 127)

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC( "set_scenario_event_bit_flag", 8, 1)  			
			}
			else
			{
				FUNC("attention_call_message_2", "[0022N]I've been badly hit! I am retreating to safer grounds!", diller_recno )
				FUNC( "set_scenario_event_bit_flag", 8, 1)  			
				FUNC( "del_unit_team" , 127)
			}
		}
			
	}
	
	if(	FUNC("get_unit_retreat", lahire_recno) == -1 )
	{
		if( flag_general_retreat_c == 0 )
		{
			if(FUNC("get_unit_dist", lahire_recno, unit_recno) < 2000 ) 
			{
				FUNC("start_cut_scene_2", 1, 0, lahire_recno, 200, ( 180 - FUNC("get_unit_dir", lahire_recno) ), 10, 1)

				FUNC("set_idle", unit_recno) 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
				FUNC("set_unit_can_process_in_cut_scene", lahire_recno, 1)

				FUNC("set_idle", lahire_recno)
				FUNC("stop_curr_task", lahire_recno)
				ACTION("give_task", lahire_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", lahire_recno)
				
				WAIT{ FUNC("pause_script", 1) }
				ACTION("give_task", lahire_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", lahire_recno)
				FUNC("set_idle", lahire_recno)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, lahire_recno, 200, ( 180 - FUNC("get_unit_dir", lahire_recno) ), 10)
				
				WAIT{ DIALOG("add_dialog", lahire_recno, "[0023N]Joan, the enemy has inflicted on me grave damage! I'm afraid I can battle no longer!") }

				FUNC("enable_unit_bounding_volume", lahire_recno, 0)

				WAIT{ ACTION("give_order", lahire_recno, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

				DIALOG("del_all_dialog") 
				FUNC("end_cut_scene_2", 0, 1)
				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				
				FUNC( "del_unit_team" , 123)

				WAIT{ FUNC("is_cut_scene_finished") }
			
				FUNC( "set_scenario_event_bit_flag", 9, 1)  			
			}
			else
			{
				FUNC("attention_call_message_2", "[0024N]The enemy has inflicted on me grave damage! I'm afraid I can battle no longer!", lahire_recno )
				FUNC( "set_scenario_event_bit_flag", 9, 1)  			
				FUNC( "del_unit_team" , 123)
			}
		}
	}
	
	if(	FUNC("get_unit_retreat", jean_recno) == -1 )
	{
		if( flag_general_retreat_d == 0 )
		{
			if(FUNC("get_unit_dist", jean_recno, unit_recno) < 2000 ) 
			{
				FUNC("start_cut_scene_2", 1, 0, jean_recno, 200, ( 180 - FUNC("get_unit_dir", jean_recno) ), 10, 1)

				FUNC("set_idle", unit_recno) 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
				FUNC("set_unit_can_process_in_cut_scene", jean_recno, 1)

				FUNC("set_idle", jean_recno)
				FUNC("stop_curr_task", jean_recno)
				ACTION("give_task", jean_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", jean_recno)
				
				WAIT{ FUNC("pause_script", 1) }
				ACTION("give_task", jean_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", jean_recno)
				FUNC("set_idle", jean_recno)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, jean_recno, 200, ( 180 - FUNC("get_unit_dir", jean_recno) ), 10)
				
				WAIT{ DIALOG("add_dialog", jean_recno, "[0025N]I can assist you no more, for my weakening health no longer allows me to fight!") }

				FUNC("enable_unit_bounding_volume", jean_recno, 0)

				WAIT{ ACTION("give_order", jean_recno, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

				DIALOG("del_all_dialog") 
				FUNC("end_cut_scene_2", 0, 1)
				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				
				FUNC( "del_unit_team" , 122)

				WAIT{ FUNC("is_cut_scene_finished") }
				
				FUNC( "set_scenario_event_bit_flag", 10, 1)  			
			}
			else
			{
				FUNC("attention_call_message_2", "[0025N]I can assist you no more, for my weakening health no longer allows me to fight!", jean_recno )
				FUNC( "set_scenario_event_bit_flag", 10, 1)  			
				FUNC( "del_unit_team" , 122)
			}
		}
	}
			
	if( FUNC("get_unit_retreat", alencon_recno) == -1 )
	{
		if( flag_general_retreat_e == 0 )
		{
			if(FUNC("get_unit_dist", alencon_recno, unit_recno) < 2000 ) 
			{
				FUNC("start_cut_scene_2", 1, 0, alencon_recno, 200, ( 180 - FUNC("get_unit_dir", alencon_recno) ), 10, 1)

				FUNC("set_idle", unit_recno) 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
				FUNC("set_unit_can_process_in_cut_scene", alencon_recno, 1)

				FUNC("set_idle", alencon_recno)
				FUNC("stop_curr_task", alencon_recno)
				ACTION("give_task", alencon_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", alencon_recno)
				
				WAIT{ FUNC("pause_script", 1) }
				ACTION("give_task", alencon_recno, "IDLE", 1, 1, 0, 0, 0)
				ACTION("stop_all_order", alencon_recno)
				FUNC("set_idle", alencon_recno)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, alencon_recno, 200, ( 180 - FUNC("get_unit_dir", alencon_recno) ), 10)
				
				WAIT{ DIALOG("add_dialog", alencon_recno, "[0026N]I'm wounded! I must seek refuge before my moribund state takes its toll!") }

				FUNC("enable_unit_bounding_volume", alencon_recno, 0)

				WAIT{ ACTION("give_order", alencon_recno, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

				DIALOG("del_all_dialog") 
				FUNC("end_cut_scene_2", 0, 1)
				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				
				FUNC( "del_unit_team" , 124)

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC( "set_scenario_event_bit_flag", 11, 1)  			
			}
			else
			{
				FUNC( "attention_call_message_2", "[0026N]I'm wounded! I must seek refuge before my moribund state takes its toll!", alencon_recno )
				FUNC( "del_unit_team" , 124)
				FUNC( "set_scenario_event_bit_flag", 11, 1)  			
			}
		}
	}

	//process item gate
	if( FUNC( "is_item_deleted_by_name", tourelles_gate_recno , "Tourelles gate") == 1 )
	{
		tourelles_gate_recno = 0

		FUNC("stop_curr_task" , tourelles_maceman_e )
		FUNC("stop_curr_task" , tourelles_maceman_f )
		FUNC("stop_curr_task" , tourelles_poleman_a )
		FUNC("stop_curr_task" , tourelles_poleman_b )
		FUNC("stop_curr_task" , tourelles_poleman_c )
			
		FUNC("set_scenario_bit_flag", 29, 1)  
	} 
	 	
	//process weapon shop
	if( talk_unit_recno != 0 && talk_unit_recno == weapon_seller_tours_recno )	
	{
		FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
		// set main character to idle
		FUNC("set_idle", unit_recno) 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
		FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
		FUNC("set_unit_can_process_in_cut_scene", weapon_seller_tours_recno, 1)

		// set weapon seller to idle and rotate him
		ACTION("stop_all_order", weapon_seller_tours_recno ) 
		ACTION("give_order" , weapon_seller_tours_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , weapon_seller_tours_recno , unit_recno) , 0 , 0 , 0, 2500)

		WAIT { DIALOG("add_dialog", weapon_seller_tours_recno, "[0027N]Now, how may be of service?") }
		DIALOG("del_all_dialog") 
		
		// change to buy weapon interface, wait until finish buying
		WAIT { FUNC("start_buy_interface", weapon_shop_tours_recno, weapon_seller_tours_recno) } 

		WAIT { DIALOG("add_dialog", weapon_seller_tours_recno, "[0028N]Thanks for stopping by!") }
		DIALOG("del_all_dialog") 


		FUNC("set_cut_scene_flag" , 0)	// leave cut scene!

		WAIT { FUNC("is_cut_scene_finished" ) }
		FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
	}

	if( talk_unit_recno != 0 && talk_unit_recno == weapon_seller_fierbois_recno )	
	{
		FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
		// set main character to idle
		FUNC("set_idle", unit_recno) 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
		FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
		FUNC("set_unit_can_process_in_cut_scene", weapon_seller_fierbois_recno, 1)

		// set weapon seller to idle and rotate him
		ACTION("stop_all_order", weapon_seller_fierbois_recno ) 
		ACTION("give_order" , weapon_seller_fierbois_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , weapon_seller_fierbois_recno , unit_recno) , 0 , 0 , 0, 2500)

		WAIT { DIALOG("add_dialog", weapon_seller_fierbois_recno, "[0029N]Do have a look - we are mighty proud of our weapons, that we are!") }

		// leave cut scene
		DIALOG("del_all_dialog") 
				
		// change to buy weapon interface, wait until finish buying
		WAIT { FUNC("start_buy_interface", weapon_shop_fierbois_recno, weapon_seller_fierbois_recno) } 

		WAIT { DIALOG("add_dialog", weapon_seller_fierbois_recno, "[0030N]Good luck in your quest for freedom!") }
		DIALOG("del_all_dialog") 

		FUNC("set_cut_scene_flag" , 0)	// leave cut scene!

		WAIT { FUNC("is_cut_scene_finished" ) }
		FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
	}


	//process tours potion shop
	if( talk_unit_recno != 0 && talk_unit_recno == potion_seller_tours_recno ) 
	{
		FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 

		// set main character to idle
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
		FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
		FUNC("set_unit_can_process_in_cut_scene", potion_seller_tours_recno, 1)
		FUNC("set_idle", unit_recno) 

		// set weapon seller to idle and rotate him
		ACTION("stop_all_order", potion_seller_tours_recno ) 
		ACTION("give_order" , potion_seller_tours_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , potion_seller_tours_recno , unit_recno) , 0 , 0 , 0, 2500)

		WAIT { DIALOG("add_dialog", potion_seller_tours_recno, "[0031N]Good day! Our shoppe carries fine produce - all the villagers seem to think so!") }

		// change to buy weapon interface, wait until finish buying
		WAIT { FUNC("start_buy_interface", potion_shop_tours_recno, potion_seller_tours_recno) } 

		WAIT { DIALOG("add_dialog", potion_seller_tours_recno, "[0032N]Thank you for your purchase!") }
		DIALOG("del_all_dialog") 
		FUNC("set_cut_scene_flag" , 0)	// leave cut scene!

		FUNC( "set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
	}

	//process fierbois potion shop
	if( talk_unit_recno != 0 && talk_unit_recno == potion_seller_fierbois_recno ) 
	{
		FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 

		// set main character to idle
		FUNC("set_idle", unit_recno) 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
		FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
		FUNC("set_unit_can_process_in_cut_scene", potion_seller_fierbois_recno , 1)

		// set weapon seller to idle and rotate him
		ACTION("stop_all_order", potion_seller_fierbois_recno ) 
		ACTION("give_order" , potion_seller_fierbois_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , potion_seller_fierbois_recno , unit_recno) , 0 , 0 , 0, 2500)

		WAIT { DIALOG("add_dialog", potion_seller_fierbois_recno, "[0033N]How are we this fine day? I hope the war bodes well in your favor.") }

		// change to buy weapon interface, wait until finish buying
		WAIT { FUNC("start_buy_interface", potion_shop_fierbois_recno, potion_seller_fierbois_recno) } 

		WAIT { DIALOG("add_dialog", potion_seller_fierbois_recno, "[0034N]I do wish you good luck in your valiant battle for our behalf!") }


		DIALOG("del_all_dialog") 
		FUNC("set_cut_scene_flag" , 0)	// leave cut scene!

		FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
	}

	//e5
	if( FUNC( "get_place_captured" , place_recno_e_e ) == 0)
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_e_e, "ENGLISH" ) == 0 )
		{
			FUNC("change_all_item_in_place", place_recno_e_e, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_recno_e_e, 1)
		}
	}
	
	//e4
	if( flag_camp_captured_e_d == 0 )
	{
		e_d_enemy_count = FUNC( "people_by_nation_exist_in_place" , place_recno_e_d, "ENGLISH" )

		if( e_d_enemy_count == 0 )
		{		
			if( flag_general_retreat_c == 0 )
			{
				if( FUNC("get_place_captured", place_recno_e_g ) == 0 )
				{
					//FUNC("attention_call_message_2", "[0001N]We should head south and consolidate the area before heading further west. If English reinforcements are due east, then we would not want to be caught between them and Tourelles.", lahire_recno )
				}
			}

			if ( FUNC("get_end_condition_finish", 5) == 1 )
			{
				FUNC("attention_call_message", "[0035N]French forces have successfully captured the Saint Jean le Blanc!")
			}
			
			FUNC("set_minimap_icon_display_enable" , "fcampE4S4L4" , 1 )
			FUNC("set_minimap_icon_display_enable" , "e_campE4S4L4" , 0 )
			FUNC("set_territory_nation", "Saint Jean le Blanc", "French")

			FUNC("set_scenario_bit_flag", 4, 1) 		

			FUNC("change_all_item_in_place", place_recno_e_d, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_recno_e_d, 1)

		}
	}

	if( flag_e_d_relief_force_supported == 0 )
	{
		if( FUNC("is_unit_inside_place", place_recno_e_d, unit_recno) )
		{
			//spawn_supported force
			FUNC("facility_barrack_add_leader", facility_spawn_point_e_d_a_recno , ehinfantcap_id, 60, 14, "Gyles Breuster", "Breuster")
			FUNC("facility_barrack_add_member", facility_spawn_point_e_d_a_recno , ehinfant_id, 60, 3, 14)

			FUNC("facility_barrack_add_leader", facility_spawn_point_e_d_b_recno , ehinfantcap_id, 61, 1, "Adam Ayston", "Ayston")
			FUNC("facility_barrack_add_member", facility_spawn_point_e_d_b_recno , ehinfant_id, 61, 3, 14)
		
			FUNC("facility_barrack_add_leader", facility_spawn_point_e_d_c_recno , emacemancap_id, 62, 14, "Conan Ode", "Ode")
			FUNC("facility_barrack_add_member", facility_spawn_point_e_d_c_recno , emaceman_id, 62, 3, 14)

			FUNC("facility_barrack_add_leader", facility_spawn_point_e_d_d_recno , emacemancap_id, 63, 14, "Denston Manan", "Manan")
			FUNC("facility_barrack_add_member", facility_spawn_point_e_d_d_recno , emaceman_id, 63, 3, 14)

			FUNC("facility_barrack_add_leader", facility_spawn_point_e_d_1_recno , epolemancap_id, 58, 14, "Edward Helpringham", "Helpringham")
			FUNC("facility_barrack_add_member", facility_spawn_point_e_d_1_recno , epoleman_id, 58, 3, 14)

			FUNC("facility_barrack_add_leader", facility_spawn_point_e_d_2_recno , epolemancap_id, 59, 14, "Gervase Hamelyn", "Hamelyn")
			FUNC("facility_barrack_add_member", facility_spawn_point_e_d_2_recno , epoleman_id, 59, 3, 14)
		
			FUNC("facility_barrack_add_leader", facility_spawn_point_e_d_3_recno , ecrossmancap_id, 64, 14, "Helmin Cobelyn", "Cobelyn")
			FUNC("facility_barrack_add_member", facility_spawn_point_e_d_3_recno , ecrossman_id, 64, 3, 14)

			FUNC("facility_barrack_add_leader", facility_spawn_point_e_d_4_recno , earchercap_id, 65, 14, "Joce Day", "Day")
			FUNC("facility_barrack_add_member", facility_spawn_point_e_d_4_recno , earcher_id, 65, 3, 14)
				
			FUNC("set_scenario_bit_flag", 13, 1) 
		}
	}

	if( flag_e_d_relief_force_supported )
	{
		if( e_d_heavy_infant_cap_recno_a == 0 )
		{
			e_d_heavy_infant_cap_recno_a = FUNC("search_unit_by_name", "Gyles Breuster") 		
		
			if( e_d_heavy_infant_cap_recno_a )
			{
				ACTION("give_task", e_d_heavy_infant_cap_recno_a, "DEFEND_PLACE", 1, place_recno_e_d, 0, 0, 0)
			}
		}
			
		if( e_d_heavy_infant_cap_recno_b == 0 )
		{
			e_d_heavy_infant_cap_recno_b = FUNC("search_unit_by_name", "Adam Ayston") 		
		
			if( e_d_heavy_infant_cap_recno_b )
			{
				ACTION("give_task", e_d_heavy_infant_cap_recno_b, "DEFEND_PLACE", 1, place_recno_e_d, 0, 0, 0)
			}
		}

		if( e_d_maceman_cap_recno_a == 0 )
		{
			e_d_maceman_cap_recno_a = FUNC("search_unit_by_name", "Conan Ode")
		
			if( e_d_maceman_cap_recno_a )
			{
				ACTION("give_task", e_d_maceman_cap_recno_a , "DEFEND_PLACE", 1, place_recno_e_d, 0, 0, 0)
			}
		}

		if( e_d_maceman_cap_recno_b == 0 )
		{
			e_d_maceman_cap_recno_b = FUNC("search_unit_by_name", "Denston Manan")
		
			if( e_d_maceman_cap_recno_b )
			{
				ACTION("give_task", e_d_maceman_cap_recno_b , "DEFEND_PLACE", 1, place_recno_e_d, 0, 0, 0)
			}
		}

		if( e_d_poleman_cap_recno_a == 0 )
		{
			e_d_poleman_cap_recno_a = FUNC("search_unit_by_name", "Edward Helpringham")
		
			if( e_d_poleman_cap_recno_a )
			{
				ACTION("give_task", e_d_poleman_cap_recno_a , "DEFEND_PLACE", 1, place_recno_e_d, 0, 0, 0)
			}
		}
		
		if( e_d_poleman_cap_recno_b == 0 )
		{
			e_d_poleman_cap_recno_b = FUNC("search_unit_by_name", "Gervase Hamelyn")
		
			if( e_d_poleman_cap_recno_b )
			{
				ACTION("give_task", e_d_poleman_cap_recno_b , "DEFEND_PLACE", 1, place_recno_e_d, 0, 0, 0)
			}
		}

		if( e_d_crossbow_man_cap_recno_a == 0)
		{
			e_d_crossbow_man_cap_recno_a = FUNC("search_unit_by_name", "Helmin Cobelyn")
		
			if( e_d_crossbow_man_cap_recno_a )	
			{
				ACTION("give_task", e_d_crossbow_man_cap_recno_a, "DEFEND_PLACE", 1, place_recno_e_d, 0, 0, 0)
			}
		}
		
		if( e_d_archer_cap_recno_a  == 0 )
		{
			e_d_archer_cap_recno_a = FUNC("search_unit_by_name", "Joce Day")
		
			if( e_d_archer_cap_recno_a ) 
			{
				ACTION("give_task", e_d_archer_cap_recno_a , "DEFEND_PLACE", 1, place_recno_e_d, 0, 0, 0)
			}
		}
	}

	if(flag_e_d_free_prisoner_a == 0)
	{
		FUNC("set_prisoner", prisoner_recno_a)
		FUNC("set_unit_vision_range" , prisoner_recno_a, 200 )
	}

	if(flag_e_d_free_prisoner_b == 0)
	{
		FUNC("set_prisoner", prisoner_recno_b)
		FUNC("set_unit_vision_range" , prisoner_recno_b, 200 )
	}
	
	if( talk_unit_recno != 0 && talk_unit_recno == prisoner_recno_a )	
	{
		FUNC("start_cut_scene", 0, 0, 19501, 14248, 95, 187, 88, 6)
	
		// set main character to idle
		FUNC("set_idle", unit_recno) 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
		FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
		FUNC("set_unit_can_process_in_cut_scene", prisoner_recno_a, 1)	// joan can process
		
		if( ( FUNC("get_item_quantity_in_unit_inventory", key_prisoner_id, unit_recno) > 0 || flag_e_d_free_prisoner_a ) )
		{
			
			// set weapon seller to idle and rotate him
			FUNC("set_unit_can_process_in_cut_scene", prisoner_recno_a , 1)	
			ACTION("stop_all_order", prisoner_recno_a ) 

			if(flag_e_d_free_prisoner_a == 0)
			{
				FUNC("free_prisoner", prisoner_recno_a) 
			}
	
			ACTION("give_order" , prisoner_recno_a, "TURN" , 3 , 0 , FUNC("get_rotation" , prisoner_recno_a , unit_recno) , 0 , 0 , 0, 2500)
				
			if(flag_e_d_free_prisoner_a == 0)
			{
				WAIT { DIALOG("add_dialog", prisoner_recno_a, "[0036N]I must thank you for rescuing me! It is my understanding that English forces are fortifying Tourelles and have assembled a tower with devastating firepower.") }
			
				if(flag_e_d_free_prisoner_b)
				{
					FUNC("remove_item_from_unit_inventory", key_prisoner_id, unit_recno)
					FUNC("give_item_to_unit", "Quartz", 2, 1, unit_recno )

					WAIT { DIALOG("add_dialog", prisoner_recno_a, "[0037N]The English did not confiscate this little family heirloom I have on me - here, please keep this quartz crystal - it might serve your purposes well." ) }
				}
					
				FUNC("set_unit_vision_range" , prisoner_recno_a, 2000 )
				FUNC("set_scenario_bit_flag", 11, 1) 
			}
			else
			{
				WAIT { DIALOG("add_dialog", prisoner_recno_a, "[0038N]Thank you again for freeing me! Please don't let me burden your mission. I can get myself to a friendly town from here, just need to rest a while now.") }
			}

		}
		else 
		{
			WAIT { DIALOG("add_dialog", prisoner_recno_a, "[0039N]Alors - We are chained and shackled! The English general in charge of the camp holds the only key.") }
		}

		// leave cut scene
		DIALOG("del_all_dialog") 
		
		FUNC("end_cut_scene" , 0)	// stop cut scene! 
		WAIT{ FUNC("is_cut_scene_finished") }

		FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
	}

	if( talk_unit_recno != 0 && talk_unit_recno == prisoner_recno_b )	
	{
		FUNC("start_cut_scene", 0, 0, 19501, 14248, 95, 187, 88, 6)
		
		// set main character to idle
		FUNC("set_idle", unit_recno) 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
		FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
		FUNC("set_unit_can_process_in_cut_scene", prisoner_recno_b, 1)	// joan can process

		if( ( FUNC("get_item_quantity_in_unit_inventory", key_prisoner_id, unit_recno) > 0 || flag_e_d_free_prisoner_a ) )
		{
			
			// set weapon seller to idle and rotate him
			FUNC("set_unit_can_process_in_cut_scene", prisoner_recno_b , 1)	
			ACTION("stop_all_order", prisoner_recno_b ) 

			if(flag_e_d_free_prisoner_b == 0)
			{
				FUNC("free_prisoner", prisoner_recno_b) 
			}
	
			ACTION("give_order" , prisoner_recno_b, "TURN" , 3 , 0 , FUNC("get_rotation" , prisoner_recno_b , unit_recno) , 0 , 0 , 0, 2500)
			
			if(flag_e_d_free_prisoner_b == 0)
			{
				WAIT { DIALOG("add_dialog", prisoner_recno_b, "[0040N]Mon Dieu - I am free once again! I overheard that the English are heavily garrisoned in Saint Augustin, but they have relocated the key a good distance away.") }
				WAIT { DIALOG("add_dialog", prisoner_recno_b, "[0041N]If you wish to enter Saint Augustin, you will find the key in the south-easternmost enemy camp.") }
				
				if(flag_e_d_free_prisoner_a)
				{
					FUNC("remove_item_from_unit_inventory", key_prisoner_id, unit_recno)
					FUNC("give_item_to_unit", "Quartz", 2, 1, unit_recno )

					WAIT { DIALOG("add_dialog", prisoner_recno_b, "[0037N]The English did not confiscate this little family heirloom I have on me - here, please keep this quartz crystal - it might serve your purposes well.") }
				}

				FUNC("set_unit_vision_range" , prisoner_recno_b, 2000 )
				FUNC("set_scenario_bit_flag", 12, 1) 
			}
			else
			{
				WAIT { DIALOG("add_dialog", prisoner_recno_b, "[0038N]Thank you again for freeing me! Please don't let me burden your mission. I can get myself to a friendly town from here, just need to rest a while now.") }
			}
		}
		else 
		{
			WAIT { DIALOG("add_dialog", prisoner_recno_b, "[0042N]Alas - I am chained and shackled! The general in charge of the camp must be carrying the key on him!") }
		}

		// leave cut scene
		DIALOG("del_all_dialog") 
		FUNC("end_cut_scene" , 0)	// stop cut scene! 
		WAIT{ FUNC("is_cut_scene_finished") }

		FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
	}

	//e1
	//patrol place
	

	if( FUNC("is_unit_inside_place", place_recno_e_a_ra, unit_recno) || FUNC("is_unit_inside_place", place_recno_e_a_rb, unit_recno) || FUNC("is_unit_inside_place", place_recno_e_a_rc, unit_recno) )
	{
		e_a_ra_heavy_infant_recno_a = FUNC("search_unit_by_name", "Alan Bolle")
		e_a_ra_heavy_infant_recno_b = FUNC("search_unit_by_name", "Petr Hordercolor")
		e_a_ra_heavy_infant_recno_c = FUNC("search_unit_by_name", "Raulf Bisbrooke")
		e_a_ra_heavy_infant_recno_d = FUNC("search_unit_by_name", "Stephanus Clericus")

		e_a_rb_heavy_infant_recno_a = FUNC("search_unit_by_name", "Christopher Hugonis")
		e_a_rb_heavy_infant_recno_b = FUNC("search_unit_by_name", "Bertram Braunston")
		e_a_rb_poleman_recno_a = FUNC("search_unit_by_name", "John Neucomen")
		e_a_rb_poleman_recno_b = FUNC("search_unit_by_name", "Brian Quilter")
		e_a_rb_poleman_recno_c = FUNC("search_unit_by_name", "Dionisi Fithien")
		e_a_rb_poleman_recno_d = FUNC("search_unit_by_name", "Geffrey Essendine")

		e_a_rc_light_infant_recno_a = FUNC("search_unit_by_name", "Galfridus Godehusband")
		e_a_rc_light_infant_recno_b = FUNC("search_unit_by_name", "Willlelmus Baldewyn")
		e_a_rc_light_infant_recno_c = FUNC("search_unit_by_name", "Roland Baldewyne")
		e_a_rc_light_infant_recno_d = FUNC("search_unit_by_name", "Thomas Ashwell")

		para_a = FUNC( "number_of_enemy_in_place" , place_recno_e_a_ra, unit_recno)
		para_b = FUNC( "number_of_enemy_in_place" , place_recno_e_a_rb, unit_recno)
		para_c = FUNC( "number_of_enemy_in_place" , place_recno_e_a_rc, unit_recno)

		enemy_count = ( para_a + para_b + para_c )

		if( FUNC( "get_place_captured" , place_recno_e_a_ra) == 0 && enemy_count == 0 )
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE1S4L1" , 1 )
			FUNC("set_minimap_icon_display_enable" , "e_campE1S4L1" , 0 )
			FUNC("set_territory_nation", "de l'eau bleue", "French")

			FUNC( "set_place_captured" , place_recno_e_a_ra, 1)
			FUNC( "set_place_captured" , place_recno_e_a_rb, 1)
			FUNC( "set_place_captured" , place_recno_e_a_rc, 1)

			FUNC("change_all_item_in_place", place_recno_e_a_ra, english_flag_id, french_flag_id )
			FUNC("change_all_item_in_place", place_recno_e_a_rb, english_flag_id, french_flag_id )
			FUNC("change_all_item_in_place", place_recno_e_a_rc, english_flag_id, french_flag_id )
			FUNC("attention_call_message", "[0043N]You have captured the English Camp de l'eau bleue!")
		}
		
		if( e_a_ra_heavy_infant_recno_a != 0 || e_a_ra_heavy_infant_recno_b != 0 || e_a_ra_heavy_infant_recno_c != 0 || e_a_ra_heavy_infant_recno_d != 0 )
		{
			para_a = FUNC( "get_team_size" , 9 )
			para_b = FUNC( "get_team_size" , 10 )
			para_c = FUNC( "get_team_size" , 11 )
			para_d = FUNC( "get_team_size" , 12 )

			e_a_ra_enemy_count = ( para_a + para_b + para_c + para_d )
		
			if( e_a_ra_enemy_count < 12 )
			{
				spawn_team_id = 0

				if( FUNC( "get_unit_team_leader_by_team_id", 9 ) != 0 )
				{
					spawn_team_id = 9
				}
				else if( FUNC( "get_unit_team_leader_by_team_id", 10 ) != 0 )
				{
					spawn_team_id = 10
				}
				else if( FUNC( "get_unit_team_leader_by_team_id", 11 ) != 0 )
				{
					spawn_team_id = 11
				}
				else if( FUNC( "get_unit_team_leader_by_team_id", 12 ) != 0 )
				{
					spawn_team_id = 12
				}

				if( spawn_team_id != 0 )
				{
					random_number = FUNC("random_number" , 2)

					if( random_number == 0 )
					{
						if( FUNC("is_unit_inside_facility", facility_spawn_point_e_a_Ra_a_recno) == 0 )
						{
							FUNC( "facility_barrack_add_member", facility_spawn_point_e_a_Ra_a_recno , ehinfant_id, spawn_team_id, 1, 14 )
						}
					}
					else if( random_number == 1 )
					{
						if ( FUNC("is_unit_inside_facility", facility_spawn_point_e_a_Ra_b_recno) == 0 )
						{
							FUNC( "facility_barrack_add_member", facility_spawn_point_e_a_Ra_b_recno , ehinfant_id, spawn_team_id, 1, 14 )
						}
					}
				}
			}
		}

		if( e_a_rb_heavy_infant_recno_a != 0 || e_a_rb_heavy_infant_recno_b != 0 || e_a_rb_poleman_recno_a != 0 || e_a_rb_poleman_recno_b != 0 || e_a_rb_poleman_recno_c != 0 || e_a_rb_poleman_recno_d != 0 )
		{ 
			para_a = FUNC( "get_team_size" , 13 )
			para_b = FUNC( "get_team_size" , 14 )
			para_c = FUNC( "get_team_size" , 15 )
			para_d = FUNC( "get_team_size" , 16 )
			para_e = FUNC( "get_team_size" , 19 )
			para_f = FUNC( "get_team_size" , 20 )

			e_a_rb_enemy_count = ( para_a + para_b + para_c + para_d + para_e + para_f )

			if(  e_a_rb_enemy_count < 18 )
			{
				if( FUNC("is_unit_inside_facility", facility_spawn_point_e_a_Rb_a_recno) == 0 )
				{
				
					spawn_team_id = 0

					if( FUNC( "get_unit_team_leader_by_team_id", 13 ) != 0 )
					{
						spawn_team_id = 13
					}
					else if( FUNC( "get_unit_team_leader_by_team_id", 14 ) != 0 )
					{
						spawn_team_id = 14
					}
					else if( FUNC( "get_unit_team_leader_by_team_id", 15 ) != 0 )
					{
						spawn_team_id = 15
					}
					else if( FUNC( "get_unit_team_leader_by_team_id", 16 ) != 0 )
					{
						spawn_team_id = 16
					}
					else if( FUNC( "get_unit_team_leader_by_team_id", 19 ) != 0 )
					{
						spawn_team_id = 19
					}
					else if( FUNC( "get_unit_team_leader_by_team_id", 20 ) != 0 )
					{
						spawn_team_id = 20
					}

					if( spawn_team_id != 0 )
					{
						FUNC("facility_barrack_add_member", facility_spawn_point_e_a_Rb_a_recno , epoleman_id, spawn_team_id, 1, 14)
					}
				}
			}
		}

		if( e_a_rc_light_infant_recno_a != 0 || e_a_rc_light_infant_recno_b != 0 || e_a_rc_light_infant_recno_c != 0 || e_a_rc_light_infant_recno_d != 0 )
		{
			para_a = FUNC( "get_team_size" , 24 )
			para_b = FUNC( "get_team_size" , 25 )
			para_c = FUNC( "get_team_size" , 26 )
			para_d = FUNC( "get_team_size" , 23 )
		
			e_a_rc_enemy_count = ( para_a + para_b + para_c + para_d )

			if( e_a_rc_enemy_count < 12 )
			{
				if( FUNC("is_unit_inside_facility", facility_spawn_point_e_a_Rc_a_recno) == 0 )
				{
				
					spawn_team_id = 0

					if( FUNC( "get_unit_team_leader_by_team_id", 24 ) != 0 )
					{
						spawn_team_id = 24
					}
					else if( FUNC( "get_unit_team_leader_by_team_id", 25 ) != 0 )
					{
						spawn_team_id = 25
					}
					else if( FUNC( "get_unit_team_leader_by_team_id", 26 ) != 0 )
					{
						spawn_team_id = 26
					}
					else if( FUNC( "get_unit_team_leader_by_team_id", 23 ) != 0 )
					{
						spawn_team_id = 23
					}

					if( spawn_team_id != 0 )
					{
						FUNC("facility_barrack_add_member", facility_spawn_point_e_a_Rc_a_recno , elinfant_id, spawn_team_id, 1, 14)
					}
				}
			}	
		}
	}

	//e2
	if( FUNC( "get_place_captured" , place_recno_e_b ) == 0 )
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_e_b, "ENGLISH" ) == 0 )
		{
			FUNC("set_minimap_icon_display_enable" , "e_campE2S4L1" , 0 )
			FUNC("set_minimap_icon_display_enable" , "fcampE2S4L1" , 1 )
			FUNC("set_territory_nation", "de la petite coline", "French")

			FUNC("change_all_item_in_place", place_recno_e_b, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_recno_e_b, 1)
			FUNC("attention_call_message", "[0044N]You have captured the English Camp de la petite coline!")

		}
	}

	if( flag_e_b_retreat == 0 )
	{
		if( FUNC("is_unit_inside_place", place_recno_e_b, unit_recno) )
		{
			if( FUNC("is_unit_dead", e_b_retreat_light_infant_recno_a))
			{
			//	ACTION("give_team_task", e_b_retreat_light_infant_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_heavy_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_maceman_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_maceman_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	FUNC("set_unit_track", e_b_retreat_light_infant_recno_b, "default" )
			//	FUNC("set_unit_track", e_b_retreat_heavy_infant_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_maceman_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_maceman_recno_b, "default" )

				FUNC("set_scenario_bit_flag", 14, 1)	
			}
			else if ( FUNC("is_unit_dead", e_b_retreat_light_infant_recno_b) )
			{
			//	ACTION("give_team_task", e_b_retreat_light_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_heavy_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_maceman_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_maceman_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			

			//	FUNC("set_unit_track", e_b_retreat_light_infant_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_heavy_infant_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_maceman_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_maceman_recno_b, "default" )

				FUNC("set_scenario_bit_flag", 14, 1)	
			}
			else if ( FUNC("is_unit_dead", e_b_retreat_heavy_infant_recno_a) )
			{
			//	ACTION("give_team_task", e_b_retreat_light_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_light_infant_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_maceman_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_maceman_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			

			//	FUNC("set_unit_track", e_b_retreat_light_infant_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_heavy_infant_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_maceman_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_maceman_recno_b, "default" )

				FUNC("set_scenario_bit_flag", 14, 1)	
			}
			else if ( FUNC("is_unit_dead", e_b_retreat_maceman_recno_a) )
			{
			//	ACTION("give_team_task", e_b_retreat_light_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_light_infant_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_heavy_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_maceman_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			

			//	FUNC("set_unit_track", e_b_retreat_light_infant_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_heavy_infant_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_light_infant_recno_b, "default" )
			//	FUNC("set_unit_track", e_b_retreat_maceman_recno_b, "default" )
				
				FUNC("set_scenario_bit_flag", 14, 1)	
			}
			else if ( FUNC("is_unit_dead", e_b_retreat_maceman_recno_b) ) 
			{
			//	ACTION("give_team_task", e_b_retreat_light_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_light_infant_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_heavy_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_b_retreat_maceman_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			

			//	FUNC("set_unit_track", e_b_retreat_light_infant_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_heavy_infant_recno_a, "default" )
			//	FUNC("set_unit_track", e_b_retreat_light_infant_recno_b, "default" )
			//	FUNC("set_unit_track", e_b_retreat_maceman_recno_a, "default" )
												
				FUNC("set_scenario_bit_flag", 14, 1)	
			}
		}
	}
	
	//e3
	if( FUNC( "get_place_captured" , place_recno_e_c ) == 0 )
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_e_c, "ENGLISH" ) == 0 )
		{
			FUNC("set_minimap_icon_display_enable" , "fcampE3S4L1" , 1 )
			FUNC("set_minimap_icon_display_enable" , "e_campE3S4L1" , 0 )
			FUNC("set_territory_nation", "le fort", "French")
		
			FUNC("change_all_item_in_place", place_recno_e_c, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_recno_e_c, 1)
			FUNC("attention_call_message", "[0045N]You have captured the English Camp le fort!")
			
		}
	}

	if( flag_e_c_retreat == 0 )
	{
		if( FUNC("is_unit_inside_place", place_recno_e_c, unit_recno) )
		{
			if ( FUNC("is_unit_dead", e_c_retreat_light_infant_recno_a))
			{
				
			//	ACTION("give_team_task", e_c_retreat_light_infant_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_c_retreat_maceman_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			

			//	FUNC("set_unit_track", e_c_retreat_light_infant_recno_b , "default" )
			//	FUNC("set_unit_track", e_c_retreat_maceman_recno_a , "default" )
								
				FUNC("set_scenario_bit_flag", 15, 1) 
			}
			else if ( FUNC("is_unit_dead", e_c_retreat_light_infant_recno_b))
			{
			//	ACTION("give_team_task", e_c_retreat_light_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_c_retreat_maceman_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			

			//	FUNC("set_unit_track", e_c_retreat_light_infant_recno_a , "default" )
			//	FUNC("set_unit_track", e_c_retreat_maceman_recno_a , "default" )
												
				FUNC("set_scenario_bit_flag", 15, 1) 
			}
			else if ( FUNC("is_unit_dead", e_c_retreat_maceman_recno_a)) 
			{
			//	ACTION("give_team_task", e_c_retreat_light_infant_recno_a , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			
			//	ACTION("give_team_task", e_c_retreat_light_infant_recno_b , "APPROACH_PLACE", 5, place_recno_e_g , 0, 0 , 0)			

			//	FUNC("set_unit_track", e_c_retreat_light_infant_recno_a , "default" )
			//	FUNC("set_unit_track", e_c_retreat_light_infant_recno_b , "default" )
																
				FUNC("set_scenario_bit_flag", 15, 1) 
			}
		}
	}
	
	//Town of Fierbois
	if( flag_triggered_objective_priest)
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_fierbois_town, "ENGLISH" ) != 0 )
		{
			if( FUNC("get_unit_retreat", priest_recno ) == 0 )
			{
				FUNC("stop_curr_task" , priest_recno )
			}

			if( FUNC("get_unit_retreat", councillor_recno ) == 0 )
			{
				FUNC("stop_curr_task" , councillor_recno )
			}

			FUNC("set_unit_retreat", priest_recno, 1)
			FUNC("set_unit_retreat", councillor_recno, 1)
		}
		else
		{
			if( FUNC("get_unit_retreat", priest_recno ) == 1 )
			{
				FUNC("stop_curr_task" , priest_recno )
			}

			if( FUNC("get_unit_retreat", councillor_recno ) == 1 )
			{
				FUNC("stop_curr_task" , councillor_recno )
			}

			FUNC("set_unit_retreat", priest_recno, 0)
			FUNC("set_unit_retreat", councillor_recno, 0)
		}
	}
	
	curr_task =	FUNC("get_curr_task", priest_recno )

	if( FUNC("get_unit_retreat", priest_recno ) )
	{
		if( FUNC("is_unit_inside_place", place_recno_priest_retreat , priest_recno) )
		{
			if( curr_task == 14 )
			{
				FUNC("stop_curr_task" , priest_recno )
			}

			ACTION("give_task", priest_recno, "IDLE", 2, 0, 0, 0, 0) 
		}
		else
		{
			if( curr_task == 7 )
			{
				FUNC("stop_curr_task" , priest_recno )
			}

			ACTION("give_task", priest_recno , "APPROACH_PLACE", 2, place_recno_priest_retreat , 0, 0 , 0)			
		}
	}
	else
	{
		if( FUNC("is_unit_inside_place", place_recno_priest_location , priest_recno) )
		{
			if( curr_task == 14 )
			{
				FUNC("stop_curr_task" , priest_recno )
			}

			ACTION("give_task", priest_recno, "IDLE", 2, 0, 0, 0, 0) 
		}
		else
		{
			if( curr_task == 7 )
			{
				FUNC("stop_curr_task" , priest_recno )
			}

			ACTION("give_task", priest_recno , "APPROACH_PLACE", 2, place_recno_priest_location , 0, 0 , 0)			
		}
	}

	curr_task =	FUNC("get_curr_task", councillor_recno )

	if( FUNC("get_unit_retreat", councillor_recno ) )
	{
		if( FUNC("is_unit_inside_place", place_recno_councillor_retreat , councillor_recno) )
		{
			if( curr_task == 14 )
			{
				FUNC("stop_curr_task" , councillor_recno )
			}

			ACTION("give_task", councillor_recno, "IDLE", 2, 0, 0, 0, 0) 
		}
		else
		{
			if( curr_task == 7 )
			{
				FUNC("stop_curr_task" , councillor_recno )
			}

			ACTION("give_task", councillor_recno , "APPROACH_PLACE", 2, place_recno_councillor_retreat , 0, 0 , 0)			
		}
	}
	else
	{
		if( FUNC("is_unit_inside_place", place_recno_councillor_location , councillor_recno) )
		{
			if( curr_task == 14 )
			{
				FUNC("stop_curr_task" , councillor_recno )
			}

			ACTION("give_task", councillor_recno, "IDLE", 2, 0, 0, 0, 0) 
		}
		else
		{
			if( curr_task == 7 )
			{
				FUNC("stop_curr_task" , councillor_recno )
			}

			ACTION("give_task", councillor_recno , "APPROACH_PLACE", 2, place_recno_councillor_location , 0, 0 , 0)		
		}
	}

	if( flag_triggered_objective_priest && wagon_driver_recno == 0 )
	{
		wagon_driver_recno = FUNC("search_unit_by_name", "Wagon Driver")

		if( wagon_driver_recno )
		{
			FUNC("set_unit_ride_cart", wagon_driver_recno, wagon_recno)
		}
	}

	// process the wagon, for villager and looted good
	if( talk_unit_recno != 0 && talk_unit_recno == wagon_recno ) 
	{
		curr_task =	FUNC("get_curr_task", wagon_recno )

		if ( curr_task == 0 )
		{
			if( flag_looted_good_found == 0 && flag_triggered_objective_priest)
			{
				FUNC("attention_call_message_2", "[0046N]You must have come here to salvage the looted goods from the church. All the goods are in the cart. Please lead the way, and I will follow.", wagon_driver_recno )
				FUNC("set_scenario_bit_flag", 32, 1)  
			}
			else
			{
				FUNC("attention_call_message_2", "[0047N]I will follow your lead.", wagon_driver_recno )
			}

			ACTION("give_task", wagon_recno ,  "FOLLOW_UNIT", 1, unit_recno, 0, 0, 0)
		}
		else if ( curr_task == 10 ) // TASK_FOLLOW_UNIT
		{
			follow_unit_recno = FUNC("get_curr_task_para" , wagon_recno, 1) 
			
			if( follow_unit_recno == unit_recno )
			{
				if( flag_looted_good_found == 0 && flag_triggered_objective_priest)
				{
					FUNC("attention_call_message_2", "[0046N]You must have come here to salvage the looted goods from the church. All the goods are in the cart. Please lead the way, and I will follow.", wagon_driver_recno )
					FUNC("set_scenario_bit_flag", 32, 1)  
				}
				else
				{
					FUNC("stop_curr_task" , wagon_recno)
					FUNC("attention_call_message_2", "[0048N]I shall remain here until further instructions.", wagon_driver_recno )
				}
			}
			else
			{
				FUNC("stop_curr_task" , wagon_recno)
				ACTION("give_task", wagon_recno ,  "FOLLOW_UNIT", 1, unit_recno, 0, 0, 0)
				FUNC("attention_call_message_2", "[0047N]I will follow your lead.", wagon_driver_recno )
			}
		}
	}

	//process wagon
	curr_task =	FUNC("get_curr_task", wagon_recno )

	if ( curr_task == 10 ) 
	{
		follow_unit_recno = FUNC("get_curr_task_para" , wagon_recno, 1) 

		if ( FUNC("unit_track_to_id", follow_unit_recno, "CartTrk" ) )
		{
			FUNC( "set_unit_track" , wagon_recno, "CartTrk")
		}
		else
		{
			FUNC("attention_call_message_2", "[0048N]I shall remain here until further instructions.", wagon_driver_recno )
			FUNC("stop_curr_task" , wagon_recno)
		}
		
		if( FUNC( "is_died" , follow_unit_recno ) )
		{
			FUNC("stop_curr_task" , wagon_recno)
		}
	}
	
	if( talk_unit_recno != 0 && talk_unit_recno == priest_recno ) 
	{
		FUNC("start_cut_scene", 1, 0, 0, 0, 0, 0, 0, 0)

		bool_var = 0
		
		// set main character to idle
		FUNC("set_idle", unit_recno) 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
		//FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
		//FUNC("set_unit_can_process_in_cut_scene", priest_recno, 1)	// joan can process
		//FUNC("set_unit_can_process_in_cut_scene", councillor_recno, 1)	// joan can process

		// set weapon seller to idle and rotate him
		ACTION("stop_all_order", priest_recno ) 
		FUNC("give_order" , priest_recno , "TURN" , 3 , 0 , FUNC("get_rotation" , priest_recno  , unit_recno) , 0 , 0 , 0, 2500)

		if( FUNC("get_unit_retreat", priest_recno ) == 0) 
		{
			if( flag_looted_good_found == 0 ) 
			{
				ACTION("stop_all_order", councillor_recno ) 
				ACTION("give_order" , councillor_recno , "TURN" , 3 , 0 , FUNC("get_rotation" , councillor_recno  , unit_recno) , 0 , 0 , 0, 2500)
			
				if ( flag_triggered_objective_priest == 0 )
				{
					WAIT { DIALOG("add_dialog", priest_recno , "[0049N]Your exploits are famous and your intentions loud and clear - everyone around here has heard about them!") }
					WAIT { DIALOG("add_dialog", priest_recno , "[0050N]I hope you are able and willing to help us: during the last raid, the English vandals ransacked the church and stole the valuables from within!") }
					WAIT { DIALOG("add_dialog", councillor_recno , "[0051N]...and now they prepare to transport the looted valuables back to their homeland!") }
					WAIT { DIALOG("add_dialog", priest_recno , "[0052N]The enemy is most likely to be still near the church, packing away our valuables! Please return them to us.") }

					FUNC("set_can_interact_flag", wagon_recno , 1)
					
					FUNC("facility_barrack_add_leader", facility_recno_cartman, citizen_a_id, 994, 1, "Wagon Driver", "Driver")

					FUNC ("set_end_condition_enabled", 3, 1) 
					FUNC("set_end_condition_des_2", 3, "[0053N]Help the priest recover the looted goods from the church.") 
					FUNC("set_end_condition_territory_link", 3, "Église de lumière")
				}
				else
				{
					WAIT { DIALOG("add_dialog", priest_recno , "[0054N]Have you met with the cartman next to the Église de lumiére? Please help us recover our stolen valuables.") }
					WAIT { DIALOG("add_dialog", councillor_recno , "[0055N]Methinks you should head to Église de lumiére and aid us in salvaging our valuables. Please help us.") }
				}

			}
			
			curr_task =	FUNC("get_curr_task", wagon_recno )
			if( curr_task == 10 )
			{
				follow_unit_recno = FUNC("get_curr_task_para" , wagon_recno, 1) 
			}

			unit_dist = FUNC("get_unit_dist", unit_recno, wagon_recno)

			if( flag_sword_reward == 0 && flag_looted_good_found == 1 )
			{
				//if(unit_dist < 600 && curr_task == 10 && follow_unit_recno == unit_recno )
				if(unit_dist < 600)
				{
					WAIT { DIALOG("add_dialog", priest_recno , "[0056N]Our otherworldly valuables have been returned! The least I can do is present you with this sword - many say it is blessed, you know.") }
					FUNC( "give_item_to_unit", "JOAN_SWORD_LV10", 1, 1, unit_recno )

					FUNC ("set_end_condition_enabled", 4, 1) 
					FUNC("set_can_interact_flag", councillor_recno, 1)

					FUNC("set_scenario_bit_flag", 1, 1)  
					
					FUNC("set_can_interact_flag", wagon_recno , 0)
					bool_var = 1 
				}
				else 	
				{
					WAIT { DIALOG("add_dialog", priest_recno , "[0057N]Have you met with the cartman next to the Église de lumière? Please help us recover our stolen valuables.") }
					WAIT { DIALOG("add_dialog", councillor_recno , "[0058N]Methinks you should head to Église de lumière and aid us in salvaging our valuables. Please help us.") }
				}	
			}
						
			if( flag_sword_reward && flag_looted_good_found )
			{
				WAIT { DIALOG("add_dialog", priest_recno , "[0059N]Bonjour - How are you my friend? I shall never tire of thanking you for returning our stolen artifacts from the church! I hope the battle fares well in your favor!") }
			}
			
		}
		else
		{
			WAIT { DIALOG("add_dialog", priest_recno , "[0060N]Not now! The English tyrants are fast approaching, and we need to seek refuge!") }
		}

		// leave cut scene
		DIALOG("del_all_dialog") 
			
		if ( bool_var )
		{
			FUNC("end_cut_scene_2", 0, 1)
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
						
			FUNC("stop_curr_task" , wagon_recno)
			FUNC("set_unit_ride_off_cart", wagon_driver_recno )
			FUNC("del_unit", wagon_driver_recno )
			FUNC("del_unit", wagon_recno )

			WAIT { FUNC("is_cut_scene_finished" ) }
		}
		else
		{
			FUNC("end_cut_scene" , 0)	// stop cut scene! 
			WAIT { FUNC("is_cut_scene_finished" ) }
		}

		
		FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
								
		//spawn english troops 
		if( flag_triggered_objective_priest == 0 && FUNC("get_unit_retreat", priest_recno ) == 0 )
		{
			FUNC("facility_barrack_add_leader", facility_spawn_point_fierbois_recno_a , elinfantcap_id, 87, 16, "George Capello", "Capello")
			FUNC("facility_barrack_add_member", facility_spawn_point_fierbois_recno_b , elinfant_id, 87, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_fierbois_recno_c , elinfant_id, 87, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_fierbois_recno_d , elinfant_id, 87, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_fierbois_recno_a , elinfant_id, 87, 1, 16)
			
			FUNC("set_scenario_bit_flag", 8, 1)  
		}
	}

	if( flag_triggered_objective_priest )
	{
		if( fierbois_town_spawn_light_infantry_recno == 0 ) 
		{
			fierbois_town_spawn_light_infantry_recno = FUNC("search_unit_by_name", "George Capello")
		}

		ACTION("give_team_task", fierbois_town_spawn_light_infantry_recno, "DEFEND_PLACE", 3, place_recno_fierbois_town, 0, 0, 0)
	}

	if(flag_sword_reward && talk_unit_recno != 0 && talk_unit_recno == councillor_recno ) 
	{
		bool_var = 0 

		FUNC("start_cut_scene" , 1, 0, 0, 0, 0, 0, 0, 0 )					// enter cut scene! 

		// set main character to idle
		FUNC("set_idle", unit_recno) 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
		//FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
		//FUNC("set_unit_can_process_in_cut_scene", councillor_recno, 1)
		
		// set weapon seller to idle and rotate him
		ACTION("stop_all_order", councillor_recno ) 
		ACTION("give_order" , councillor_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , councillor_recno , unit_recno) , 0 , 0 , 0, 2500)

		if( FUNC("get_unit_retreat", councillor_recno ) == 0 ) 
		{
//			curr_task =	FUNC("get_curr_task", wagon_recno )
//			if( curr_task == 10 )
//			{
//				follow_unit_recno = FUNC("get_curr_task_para" , wagon_recno, 1) 
//			}
//
//			unit_dist = FUNC("get_unit_dist", unit_recno, wagon_recno)
//
			if( flag_cross_reward == 0 && flag_fierbois_all_villagers_delivered )
			{
//				if(unit_dist < 600 && curr_task == 10 && follow_unit_recno == unit_recno )
//				{
					WAIT { DIALOG("add_dialog", councillor_recno, "[0061N]Magnifique - you have guided our missing villagers back to safety! Please, accept this gift in exchange for our gratitude...") }
					WAIT { DIALOG("add_dialog", councillor_recno, "[0062N]The cross is no longer our only protection, for now we have you to protect us! May this cross bless your soul and protect you in your mission!") }
								
					FUNC( "give_item_to_unit", "CROSS_A", 0, 1, unit_recno )

					bool_var = 1
					
					FUNC( "end_kill_interface" )
					FUNC("set_scenario_bit_flag", 2, 1) 	
					flag_cross_reward = 1 
//				}
//				else
//				{
//					WAIT { DIALOG("add_dialog", councillor_recno, "[0004N]Oh, woe has befallen our poor town! Have you seen any of our poor, stranded citizens? They must be hiding in the Forêt Fierbois - please find and return them to our village.") }
//				}
			}

			if( flag_cross_reward && flag_fierbois_all_villagers_delivered )
			{
				WAIT { DIALOG("add_dialog", councillor_recno, "[0063N]Your tireless efforts to save our villagers will never be forgotten. You will be eternally honored in our hometown!") }
			}
			
			if( flag_fierbois_all_villagers_delivered == 0 )
			{
				if( flag_triggered_objective_missing == 0 )
				{
					WAIT { DIALOG("add_dialog", councillor_recno, "[0064N]Your grace, the enemy indeed launched a most cruel assault upon our poor town. Their looting was so savage that most of our townsfolk had to flee for safety into our neighboring Forêt Fierbois, which lies in a northeasterly position from here.") }
					WAIT { DIALOG("add_dialog", councillor_recno, "[0065N]Please, I implore you, bring them back to safety. We are certain that there are at least five of our loved ones lost and stranded in the forest, too afraid to return!") }

					FUNC("set_end_condition_des_2", 4, "[0066N]Find and deliver the missing villagers.")
					FUNC("set_end_condition_territory_link", 4, "Forêt Fierbois") 
					FUNC ("set_end_condition_enabled", 4, 1) 

					//FUNC("set_can_interact_flag", wagon_recno , 1)
				}
				else
				{
					WAIT { DIALOG("add_dialog", councillor_recno, "[0063N]Your tireless efforts to save our villagers will never be forgotten. You will be eternally honored in our hometown!") }
				}
			}
		}
		else
		{
			WAIT { DIALOG("add_dialog", councillor_recno, "[0060N]Not now! The English tyrants are fast approaching, and we need to seek refuge!") }
		}

		// leave cut scene
		DIALOG("del_all_dialog") 
	
		//FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
		
		if( bool_var )
		{
			FUNC("end_cut_scene_2", 0, 1)
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			
			FUNC("del_unit" , missing_villager_a )
			FUNC("del_unit" , missing_villager_b )
			FUNC("del_unit" , missing_villager_c )
			FUNC("del_unit" , missing_villager_d )
			FUNC("del_unit" , missing_villager_e )
		}
		else
		{
			FUNC("end_cut_scene", 0 )
			WAIT { FUNC("is_cut_scene_finished" ) }
		}


		FUNC("set_unit_can_process_in_cut_scene", 0, 1)	

		if( flag_triggered_objective_missing == 0 && FUNC("get_unit_retreat", councillor_recno ) == 0 )
		{
			//spawn villager && troops
			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_a_a_recno , elinfantcap_id, 91, 16, "Thoams Wiggetoft", "Wiggetoft")
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_a_b_recno , elinfant_id, 91, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_a_c_recno , elinfant_id, 91, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_a_d_recno , elinfant_id, 91, 1, 16)

			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_b_a_recno , emacemancap_id, 92, 16, "Andreu Wing", "Wing")
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_b_b_recno , emaceman_id, 92, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_b_c_recno , emaceman_id, 92, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_b_d_recno , emaceman_id, 92, 1, 16)

			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_c_a_recno , elinfantcap_id, 93, 16, "Jacobus Edryck", "Edryck")
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_c_b_recno , elinfant_id, 93, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_c_c_recno , elinfant_id, 93, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_c_d_recno , elinfant_id, 93, 1, 16)

			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_d_a_recno , ehinfantcap_id, 94, 16, "Ricardus Fouler", "Fouler")
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_d_b_recno , ehinfant_id, 94, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_d_c_recno , ehinfant_id, 94, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_d_d_recno , ehinfant_id, 94, 1, 16)

			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_e_a_recno , emacemancap_id, 95, 16, "Athelard Gladewyn", "Gladewyn")
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_e_b_recno , emaceman_id, 95, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_e_c_recno , emaceman_id, 95, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_e_d_recno , emaceman_id, 95, 1, 16)

			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_f_a_recno , ehinfantcap_id, 96, 16, "Clement Lauman", "Lauman")
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_f_b_recno , ehinfant_id, 96, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_f_c_recno , ehinfant_id, 96, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_f_d_recno , ehinfant_id, 96, 1, 16)

			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_g_a_recno , ehinfantcap_id, 97, 16, "Ayuer Muller", "Muller")
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_g_b_recno , ehinfant_id, 97, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_g_c_recno , ehinfant_id, 97, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_g_d_recno , ehinfant_id, 97, 1, 16)

			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_h_a_recno , ehinfantcap_id, 98, 16, "Mathe Nicholai", "Nicholai")
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_h_b_recno , ehinfant_id, 98, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_h_c_recno , ehinfant_id, 98, 1, 16)
			FUNC("facility_barrack_add_member", facility_spawn_point_ff_h_d_recno , ehinfant_id, 98, 1, 16)

			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_Ca_recno , citizen_a_id, 130, 1, "Missing Villager Hugues Miroerier", "Villager")
			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_Cb_recno , citizen_a_id, 131, 1, "Missing Villager Baudouin Oier", "Villager")
			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_Cc_recno , citizen_a_id, 132, 1, "Missing Villager Bohemond Lingier", "Villager")
			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_Cd_recno , citizen_a_id, 133, 1, "Missing Villager Richard Gruier", "Villager")
			FUNC("facility_barrack_add_leader", facility_spawn_point_ff_Ce_recno , citizen_a_id, 134, 1, "Missing Villager Garnier Hiaumier", "Villager")
			
			FUNC("start_kill_interface", 4 )
			FUNC("set_scenario_bit_flag", 10, 1) 
		}
	}

	if( flag_triggered_objective_missing && flag_cross_reward == 0 )
	{
		FUNC("start_kill_interface", 4 )
	}

	if( flag_triggered_objective_missing && flag_fierbois_all_villagers_delivered == 0 )
	{
		if(  missing_villager_a == 0 )
		{
			missing_villager_a = FUNC("search_unit_by_name", "Missing Villager Hugues Miroerier")
			
			if( missing_villager_a )
			{
				FUNC( "set_unit_nation" , missing_villager_a, "French")

				if( flag_fierbois_missing_villager_a == 0 )
				{
					FUNC("set_can_interact_flag", missing_villager_a , 1)
				}

				ACTION("give_task", missing_villager_a, "IDLE", 1, 0, 0, 0, 0) 
			}
		}

		if(  missing_villager_b == 0 )
		{
			missing_villager_b = FUNC("search_unit_by_name", "Missing Villager Baudouin Oier")
			
			if( missing_villager_b )
			{
				FUNC( "set_unit_nation" , missing_villager_b, "French")
				
				if( flag_fierbois_missing_villager_b == 0 )
				{
					FUNC("set_can_interact_flag", missing_villager_b , 1)
				}

				ACTION("give_task", missing_villager_b, "IDLE", 1, 0, 0, 0, 0) 
			}
		}

		if(  missing_villager_c == 0 )
		{
			missing_villager_c = FUNC("search_unit_by_name", "Missing Villager Bohemond Lingier")
			
			if( missing_villager_c )
			{
				FUNC( "set_unit_nation" , missing_villager_c, "French")

				if( flag_fierbois_missing_villager_c == 0 )
				{
					FUNC("set_can_interact_flag", missing_villager_c , 1)
				}

				ACTION("give_task", missing_villager_c, "IDLE", 1, 0, 0, 0, 0) 
			}
		}

		if(  missing_villager_d == 0 )
		{
			missing_villager_d = FUNC("search_unit_by_name", "Missing Villager Richard Gruier")
			
			if( missing_villager_d )
			{
				FUNC( "set_unit_nation" , missing_villager_d, "French")

				if( flag_fierbois_missing_villager_d == 0 )
				{
					FUNC("set_can_interact_flag", missing_villager_d , 1)
				}

				ACTION("give_task", missing_villager_d, "IDLE", 1, 0, 0, 0, 0) 
			}
		}

		if(  missing_villager_e == 0 )
		{
			missing_villager_e = FUNC("search_unit_by_name", "Missing Villager Garnier Hiaumier")
			
			if( missing_villager_e )
			{
				FUNC( "set_unit_nation" , missing_villager_e, "French")
				
				if( flag_fierbois_missing_villager_e == 0 )
				{
					FUNC("set_can_interact_flag", missing_villager_e , 1)
				}

				ACTION("give_task", missing_villager_e, "IDLE", 1, 0, 0, 0, 0) 
			}
		}

		//all delivered
		if( flag_fierbois_missing_villager_a && flag_fierbois_missing_villager_b && flag_fierbois_missing_villager_c && flag_fierbois_missing_villager_d && flag_fierbois_missing_villager_e )
		{
			FUNC("set_scenario_bit_flag", 23, 1)  
		}
	
		if( flag_triggered_objective_missing && flag_missing_citizen_init == 0 )
		{ 
			FUNC("set_can_interact_flag", wagon_recno , 1)
			FUNC("set_scenario_bit_flag", 17, 1) 
		}

		if( flag_fierbois_missing_villager_a == 0 && talk_unit_recno != 0 && talk_unit_recno == missing_villager_a ) 
		{
			//check ... is the wagon here?
//			curr_task =	FUNC("get_curr_task", wagon_recno )
//
//			if ( curr_task == 0 )
//			{
//				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//				// set main character to idle
//				FUNC("set_idle", unit_recno) 
//				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//				FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//				FUNC("set_unit_can_process_in_cut_scene", missing_villager_a, 1)	
//				
//				// set weapon seller to idle and rotate him
//				ACTION("stop_all_order", missing_villager_a ) 
//				ACTION("give_order" , missing_villager_a, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_a , unit_recno) , 0 , 0 , 0, 2500)
//
//				WAIT { DIALOG("add_dialog", missing_villager_a , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }			
//
//				// leave cut scene
//				DIALOG("del_all_dialog") 
//				
//				FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//				WAIT { FUNC("is_cut_scene_finished" ) }
//
//				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//			}
//			else if ( curr_task == 10 ) // TASK_FOLLOW_UNIT
//			{
//				follow_unit_recno = FUNC("get_curr_task_para" , wagon_recno, 1) 
//				unit_dist = FUNC("get_unit_dist", unit_recno, wagon_recno)
//
//				if( follow_unit_recno == unit_recno && unit_dist < 600)
//				{
					FUNC("start_cut_scene_2", 1, 0, missing_villager_a, 200, ( 180 - FUNC("get_unit_dir", missing_villager_a) ), 10, 1)

					FUNC("set_idle", unit_recno) 
					FUNC("set_unit_can_process_in_cut_scene", 0, 0)
					FUNC("set_unit_can_process_in_cut_scene", missing_villager_a, 1)

					FUNC("set_idle", missing_villager_a)
					FUNC("stop_curr_task", missing_villager_a)
					ACTION("give_task", missing_villager_a, "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_a)
					
					WAIT{ FUNC("pause_script", 1) }
					ACTION("give_task", missing_villager_a, "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_a)
					FUNC("set_idle", missing_villager_a)

					WAIT{ FUNC("is_cut_scene_status_black_screen") }
					FUNC("change_camera_in_cut_scene", 0, missing_villager_a, 200, ( 180 - FUNC("get_unit_dir", missing_villager_a) ), 10)
					
					WAIT { DIALOG("add_dialog", missing_villager_a , "[0067N]Merci - I thank you.") }

					//FUNC("enable_unit_bounding_volume", missing_villager_a, 0)
					//WAIT{ ACTION("give_order", missing_villager_a, "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

					DIALOG("del_all_dialog") 
					FUNC("end_cut_scene_2", 0, 1)
					WAIT{ FUNC("is_cut_scene_status_black_screen") }
									
					//deliver villager
					if( flag_fierbois_missing_villager_a == 0)
					{
						//FUNC("del_unit", missing_villager_a)
						FUNC("increase_citizen_saved")
						
						FUNC("stop_curr_task" , missing_villager_a )
						ACTION("give_team_task", missing_villager_a ,  "FOLLOW_UNIT", 5, unit_recno, 0, 0, 0)
						FUNC("set_can_interact_flag", missing_villager_a, 0)

						FUNC("set_scenario_bit_flag", 18, 1)  
					}

					WAIT{ FUNC("is_cut_scene_finished") }
//				}
//				else
//				{
//					FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//					// set main character to idle
//					FUNC("set_idle", unit_recno) 
//					FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//					FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//					FUNC("set_unit_can_process_in_cut_scene", missing_villager_a, 1)	
//					
//					// set weapon seller to idle and rotate him
//					ACTION("stop_all_order", missing_villager_a ) 
//					ACTION("give_order" , missing_villager_a, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_a , unit_recno) , 0 , 0 , 0, 2500)
//
//					WAIT { DIALOG("add_dialog", missing_villager_a , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }
//
//					// leave cut scene
//					DIALOG("del_all_dialog") 
//					
//					FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//					WAIT{ FUNC("is_cut_scene_finished") }
//					FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//				}
//			}
		}

		if( flag_fierbois_missing_villager_b == 0 && talk_unit_recno != 0 && talk_unit_recno == missing_villager_b ) 
		{
			//check ... is the wagon here?
//			curr_task =	FUNC("get_curr_task", wagon_recno )
//
//			if ( curr_task == 0 )
//			{
//				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//				// set main character to idle
//				FUNC("set_idle", unit_recno) 
//				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//				FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//				FUNC("set_unit_can_process_in_cut_scene", missing_villager_b, 1)	// joan can process
//				
//				// set weapon seller to idle and rotate him
//				ACTION("stop_all_order", missing_villager_b ) 
//				ACTION("give_order" , missing_villager_b, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_b , unit_recno) , 0 , 0 , 0, 2500)
//
//				WAIT { DIALOG("add_dialog", missing_villager_b , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }			
//
//							// leave cut scene
//				DIALOG("del_all_dialog") 
//				
//				FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//				WAIT{ FUNC("is_cut_scene_finished") }
//				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//			}
//			else if ( curr_task == 10 ) // TASK_FOLLOW_UNIT
//			{
//				follow_unit_recno = FUNC("get_curr_task_para" , wagon_recno, 1) 
//				unit_dist = FUNC("get_unit_dist", unit_recno, wagon_recno)
//
//				if( follow_unit_recno == unit_recno && unit_dist < 600)
//				{
					FUNC("start_cut_scene_2", 1, 0, missing_villager_b , 200, ( 180 - FUNC("get_unit_dir", missing_villager_b ) ), 10, 1)

					FUNC("set_idle", unit_recno) 
					FUNC("set_unit_can_process_in_cut_scene", 0, 0)
					FUNC("set_unit_can_process_in_cut_scene", missing_villager_b , 1)

					FUNC("set_idle", missing_villager_b )
					FUNC("stop_curr_task", missing_villager_b )
					ACTION("give_task", missing_villager_b , "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_b )
					
					WAIT{ FUNC("pause_script", 1) }
					ACTION("give_task", missing_villager_b , "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_b )
					FUNC("set_idle", missing_villager_b )

					WAIT{ FUNC("is_cut_scene_status_black_screen") }
					FUNC("change_camera_in_cut_scene", 0, missing_villager_b , 200, ( 180 - FUNC("get_unit_dir", missing_villager_b ) ), 10)
					
					WAIT { DIALOG("add_dialog", missing_villager_b  , "[0068N]Merci - I thank You." ) }
					
					//FUNC("enable_unit_bounding_volume", missing_villager_b , 0)
					//WAIT{ ACTION("give_order", missing_villager_b , "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

					DIALOG("del_all_dialog") 
					FUNC("end_cut_scene_2", 0, 1)
					WAIT{ FUNC("is_cut_scene_status_black_screen") }
					
					if( flag_fierbois_missing_villager_b == 0)
					{
						FUNC("increase_citizen_saved")
						//FUNC("del_unit", missing_villager_b)
						FUNC("set_scenario_bit_flag", 19, 1)  

						FUNC("stop_curr_task" , missing_villager_b )
						ACTION("give_team_task", missing_villager_b ,  "FOLLOW_UNIT", 5, unit_recno, 0, 0, 0)
						FUNC("set_can_interact_flag", missing_villager_b, 0)
					}

					WAIT{ FUNC("is_cut_scene_finished") }
//				}
//				else
//				{
//					FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//					// set main character to idle
//					FUNC("set_idle", unit_recno) 
//					FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//					FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//					FUNC("set_unit_can_process_in_cut_scene", missing_villager_b, 1)	// joan can process
//					
//					// set weapon seller to idle and rotate him
//					ACTION("stop_all_order", missing_villager_b ) 
//					ACTION("give_order" , missing_villager_b, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_b , unit_recno) , 0 , 0 , 0, 2500)
//
//					WAIT { DIALOG("add_dialog", missing_villager_b , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }
//
//					// leave cut scene
//					DIALOG("del_all_dialog") 
//					
//					FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//					WAIT{ FUNC("is_cut_scene_finished") }
//					FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//				}
//			}
		}

		if( flag_fierbois_missing_villager_c == 0 && talk_unit_recno != 0 && talk_unit_recno == missing_villager_c ) 
		{
//			curr_task =	FUNC("get_curr_task", wagon_recno )
//
//			if ( curr_task == 0 )
//			{
//				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//				// set main character to idle
//				FUNC("set_idle", unit_recno) 
//				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//				FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//				FUNC("set_unit_can_process_in_cut_scene", missing_villager_c, 1)	// joan can process
//				
//				// set weapon seller to idle and rotate him
//				ACTION("stop_all_order", missing_villager_c ) 
//				ACTION("give_order" , missing_villager_c, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_c , unit_recno) , 0 , 0 , 0, 2500)
//
//				WAIT { DIALOG("add_dialog", missing_villager_c , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }			
//
//				// leave cut scene
//				DIALOG("del_all_dialog") 
//				
//				FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//				WAIT{ FUNC("is_cut_scene_finished") }
//				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//
//			}
//			else if ( curr_task == 10 ) // TASK_FOLLOW_UNIT
//			{
//				follow_unit_recno = FUNC("get_curr_task_para" , wagon_recno, 1) 
//				unit_dist = FUNC("get_unit_dist", unit_recno, wagon_recno)
//
//				if( follow_unit_recno == unit_recno && unit_dist < 600)
//				{
					FUNC("start_cut_scene_2", 1, 0, missing_villager_c , 200, ( 180 - FUNC("get_unit_dir", missing_villager_c ) ), 10, 1)

					FUNC("set_idle", unit_recno) 
					FUNC("set_unit_can_process_in_cut_scene", 0, 0)
					FUNC("set_unit_can_process_in_cut_scene", missing_villager_c , 1)

					FUNC("set_idle", missing_villager_c )
					FUNC("stop_curr_task", missing_villager_c )
					ACTION("give_task", missing_villager_c , "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_c )
					
					WAIT{ FUNC("pause_script", 1) }
					ACTION("give_task", missing_villager_c , "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_c )
					FUNC("set_idle", missing_villager_c )

					WAIT{ FUNC("is_cut_scene_status_black_screen") }
					FUNC("change_camera_in_cut_scene", 0, missing_villager_c , 200, ( 180 - FUNC("get_unit_dir", missing_villager_c ) ), 10)
					
					WAIT { DIALOG("add_dialog", missing_villager_c , "[0069N]Thank you for rescuing me.") }

					//FUNC("enable_unit_bounding_volume", missing_villager_c , 0)
					//WAIT{ ACTION("give_order", missing_villager_c , "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

					DIALOG("del_all_dialog") 
					FUNC("end_cut_scene_2", 0, 1)
					WAIT{ FUNC("is_cut_scene_status_black_screen") }
						
					if( flag_fierbois_missing_villager_c == 0)
					{
						FUNC("increase_citizen_saved")

						FUNC("stop_curr_task" , missing_villager_c )
						ACTION("give_team_task", missing_villager_c ,  "FOLLOW_UNIT", 5, unit_recno, 0, 0, 0)
						FUNC("set_can_interact_flag", missing_villager_c, 0)

						//FUNC("del_unit", missing_villager_c)
						FUNC("set_scenario_bit_flag", 20, 1)  
					}

					WAIT{ FUNC("is_cut_scene_finished") }
//				}
//				else
//				{
//					FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//					// set main character to idle
//					FUNC("set_idle", unit_recno) 
//					FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//					FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//					FUNC("set_unit_can_process_in_cut_scene", missing_villager_c, 1)	// joan can process
//					
//					
//					// set weapon seller to idle and rotate him
//					ACTION("stop_all_order", missing_villager_c ) 
//					ACTION("give_order" , missing_villager_c, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_c , unit_recno) , 0 , 0 , 0, 2500)
//
//					WAIT { DIALOG("add_dialog", missing_villager_c , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }
//
//					// leave cut scene
//					DIALOG("del_all_dialog") 
//					
//					FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//					WAIT{ FUNC("is_cut_scene_finished") }
//					FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//				}
//			}
//
		}

		if( flag_fierbois_missing_villager_d == 0 && talk_unit_recno != 0 && talk_unit_recno == missing_villager_d ) 
		{
//			curr_task =	FUNC("get_curr_task", wagon_recno )
//
//			if ( curr_task == 0 )
//			{
//				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//				// set main character to idle
//				FUNC("set_idle", unit_recno) 
//				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//				FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//				FUNC("set_unit_can_process_in_cut_scene", missing_villager_d, 1)	// joan can process
//				
//				// set weapon seller to idle and rotate him
//				ACTION("stop_all_order", missing_villager_d ) 
//				ACTION("give_order" , missing_villager_d, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_d , unit_recno) , 0 , 0 , 0, 2500)
//
//				WAIT { DIALOG("add_dialog", missing_villager_d , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }			
//
//				// leave cut scene
//				DIALOG("del_all_dialog") 
//				
//				FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//				WAIT{ FUNC("is_cut_scene_finished") }
//				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//			
//			}
//			else if ( curr_task == 10 ) // TASK_FOLLOW_UNIT
//			{
//				follow_unit_recno = FUNC("get_curr_task_para" , wagon_recno, 1) 
//				unit_dist = FUNC("get_unit_dist", unit_recno, wagon_recno)
//
//				if( follow_unit_recno == unit_recno && unit_dist < 600)
//				{
					FUNC("start_cut_scene_2", 1, 0, missing_villager_d  , 200, ( 180 - FUNC("get_unit_dir", missing_villager_d  ) ), 10, 1)

					FUNC("set_idle", unit_recno) 
					FUNC("set_unit_can_process_in_cut_scene", 0, 0)
					FUNC("set_unit_can_process_in_cut_scene", missing_villager_d  , 1)

					FUNC("set_idle", missing_villager_d  )
					FUNC("stop_curr_task", missing_villager_d  )
					ACTION("give_task", missing_villager_d  , "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_d  )
					
					WAIT{ FUNC("pause_script", 1) }
					ACTION("give_task", missing_villager_d  , "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_d  )
					FUNC("set_idle", missing_villager_d  )

					//WAIT{ FUNC("is_cut_scene_status_black_screen") }
					//FUNC("change_camera_in_cut_scene", 0, missing_villager_d , 200, ( 180 - FUNC("get_unit_dir", missing_villager_d ) ), 10)
					
					WAIT { DIALOG("add_dialog", missing_villager_d , "[0069N]Thank you for rescuing me.") }

					//FUNC("enable_unit_bounding_volume", missing_villager_d , 0)
					//WAIT{ ACTION("give_order", missing_villager_d , "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

					DIALOG("del_all_dialog") 
					FUNC("end_cut_scene_2", 0, 1)
					WAIT{ FUNC("is_cut_scene_status_black_screen") }
					
					if( flag_fierbois_missing_villager_d == 0)
					{
						FUNC("increase_citizen_saved")
//						FUNC("del_unit", missing_villager_d)
						FUNC("set_scenario_bit_flag", 21, 1)  
						
						FUNC("stop_curr_task" , missing_villager_d )
						ACTION("give_team_task", missing_villager_d ,  "FOLLOW_UNIT", 5, unit_recno, 0, 0, 0)
						FUNC("set_can_interact_flag", missing_villager_d, 0)
					}

					WAIT{ FUNC("is_cut_scene_finished") }
//				}
//				else
//				{
//					FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//					// set main character to idle
//					FUNC("set_idle", unit_recno) 
//					FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//					FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//					FUNC("set_unit_can_process_in_cut_scene", missing_villager_d, 1)	// joan can process
//					
//					// set weapon seller to idle and rotate him
//					ACTION("stop_all_order", missing_villager_d ) 
//					ACTION("give_order" , missing_villager_d, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_d , unit_recno) , 0 , 0 , 0, 2500)
//
//					WAIT { DIALOG("add_dialog", missing_villager_d , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }
//
//					// leave cut scene
//					DIALOG("del_all_dialog") 
//					
//					FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//					WAIT{ FUNC("is_cut_scene_finished") }
//					FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//				}
//			}
//
			
		}

		if( flag_fierbois_missing_villager_e == 0 && talk_unit_recno != 0 && talk_unit_recno == missing_villager_e ) 
		{
//			curr_task =	FUNC("get_curr_task", wagon_recno )
//
//			if ( curr_task == 0 )
//			{
//				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//				// set main character to idle
//				FUNC("set_idle", unit_recno) 
//				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//				FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//				FUNC("set_unit_can_process_in_cut_scene", missing_villager_e, 1)	// joan can process
//						
//				// set weapon seller to idle and rotate him
//				ACTION("stop_all_order", missing_villager_e ) 
//				ACTION("give_order" , missing_villager_e, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_e , unit_recno) , 0 , 0 , 0, 2500)
//
//				WAIT { DIALOG("add_dialog", missing_villager_e , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }			
//
//				// leave cut scene
//				DIALOG("del_all_dialog") 
//				
//				FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//				WAIT { FUNC("is_cut_scene_finished" ) }
//				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//			}
//			else if ( curr_task == 10 ) // TASK_FOLLOW_UNIT
//			{
//				follow_unit_recno = FUNC("get_curr_task_para" , wagon_recno, 1) 
//				unit_dist = FUNC("get_unit_dist", unit_recno, wagon_recno)
//
//				if( follow_unit_recno == unit_recno && unit_dist < 600)
//				{
					FUNC("start_cut_scene_2", 1, 0, missing_villager_e , 200, ( 180 - FUNC("get_unit_dir", missing_villager_e   ) ), 10, 1)

					FUNC("set_idle", unit_recno) 
					FUNC("set_unit_can_process_in_cut_scene", 0, 0)
					FUNC("set_unit_can_process_in_cut_scene", missing_villager_e , 1)

					FUNC("set_idle", missing_villager_e   )
					FUNC("stop_curr_task", missing_villager_e   )
					ACTION("give_task", missing_villager_e , "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_e )
					
					WAIT{ FUNC("pause_script", 1) }
					ACTION("give_task", missing_villager_e  , "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", missing_villager_e )
					FUNC("set_idle", missing_villager_e )

					WAIT{ FUNC("is_cut_scene_status_black_screen") }
					FUNC("change_camera_in_cut_scene", 0, missing_villager_e , 200, ( 180 - FUNC("get_unit_dir", missing_villager_e ) ), 10)
					
					WAIT { DIALOG("add_dialog", missing_villager_e , "[0069N]Thank you for rescuing me.") }

					//FUNC("enable_unit_bounding_volume", missing_villager_e  , 0)
					//WAIT{ ACTION("give_order", missing_villager_e , "APPROACH_PLACE", 99, 1, place_recno_general_retreat, 0, 0, 0, 3000) }

					DIALOG("del_all_dialog") 
					FUNC("end_cut_scene_2", 0, 1)
					WAIT{ FUNC("is_cut_scene_status_black_screen") }
					
					if( flag_fierbois_missing_villager_e == 0)
					{
						FUNC("increase_citizen_saved")
//						FUNC("del_unit", missing_villager_e)
						FUNC("set_scenario_bit_flag", 22, 1)  

						FUNC("stop_curr_task" , missing_villager_e )
						ACTION("give_team_task", missing_villager_e ,  "FOLLOW_UNIT", 5, unit_recno, 0, 0, 0)
						FUNC("set_can_interact_flag", missing_villager_e, 0)
					}

					WAIT{ FUNC("is_cut_scene_finished") }
//				}
//				else
//				{
//					FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
//			
//					// set main character to idle
//					FUNC("set_idle", unit_recno) 
//					FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//					FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
//					FUNC("set_unit_can_process_in_cut_scene", missing_villager_e, 1)	// joan can process
//							
//					// set weapon seller to idle and rotate him
//					ACTION("stop_all_order", missing_villager_e ) 
//					ACTION("give_order" , missing_villager_e, "TURN" , 3 , 0 , FUNC("get_rotation" , missing_villager_e , unit_recno) , 0 , 0 , 0, 2500)
//
//					WAIT { DIALOG("add_dialog", missing_villager_e , "[0004N]I will go with you if you can grant me the protection of a cart for me to hide in.") }
//
//					// leave cut scene
//					DIALOG("del_all_dialog") 
//					
//					FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 
//					WAIT { FUNC("is_cut_scene_finished" ) }
//					FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
//				}
//			}
		}
	}	
	
	//church
	if( flag_fierbois_church_spawn_snipers && flag_fierbois_church_spawn_snipers_init == 0 )
	{
		church_sniper_a = FUNC("search_unit_by_name", "Guy Caldecott") 		
		church_sniper_b = FUNC("search_unit_by_name", "Walran Arrowden") 		
		
		FUNC("set_scenario_bit_flag", 25, 1)  
	}
	
	if( flag_fierbois_church_spawn_snipers_init )
	{
		ACTION("give_team_task", church_sniper_a, "TOWER_ATTACK", 2, 3000, 0, 0, 0)
		ACTION("give_team_task", church_sniper_b, "TOWER_ATTACK", 2, 3000, 0, 0, 0)
	}
	
	if( flag_fierbois_church_spawn_snipers == 0 )
	{
		church_enemy_count = FUNC( "number_of_enemy_in_place" , place_recno_fierbois_church, unit_recno )

		//spawn unit
		if( church_enemy_count == 0 )
		{
			FUNC("facility_barrack_add_leader", facility_spawn_point_church_recno_a, ecrossman_id, 85, 15, "Guy Caldecott", "Caldecott")
			FUNC("facility_barrack_add_member", facility_spawn_point_church_recno_b , ecrossman_id, 85, 1, 15)
			FUNC("facility_barrack_add_leader", facility_spawn_point_church_recno_c, ecrossman_id, 86, 15, "Walran Arrowden", "Arrowden")
			FUNC("facility_barrack_add_member", facility_spawn_point_church_recno_d , ecrossman_id, 86, 1, 15)
			FUNC("set_scenario_bit_flag", 24, 1)  
		}
	}
	
	//loches && rescue metz
	if( FUNC("get_can_interact_flag", tourelles_patrol_b) )
	{
		if( FUNC("is_unit_inside_place", place_recno_metz_prison_defend , unit_recno) )
		{
			FUNC("stop_curr_task" , tourelles_patrol_b  )
			ACTION("give_team_task", tourelles_patrol_b , "IDLE", 1, 0, 0, 0, 0) 
			FUNC("start_cut_scene" , 0, 0, 25664, 24197, 125, 350, -6, 16 )
					
			// set main character to idle
			FUNC("set_idle", unit_recno) 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			//FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", tourelles_patrol_b, 1)	// joan can process
			//FUNC("set_unit_can_process_in_cut_scene", jean_recno, 1)	// joan can process

			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", jean_recno ) 
			ACTION("stop_all_order", tourelles_patrol_b ) 

			FUNC("set_unit_degree" , tourelles_patrol_b , FUNC("get_rotation" , tourelles_patrol_b , unit_recno ))
			ACTION("give_task", tourelles_patrol_b, "IDLE", 1, 0, 0, 0, 0) 

			WAIT { DIALOG("add_dialog", tourelles_patrol_b, "[0070N]The callous French have come to rescue their general! Let us live up to our oath, men, and finish them off, come hell or high water!") }

			FUNC ( "change_camera_in_cut_scene" , 0, 26196, 24261, 82, 187, -42, 10 )

			WAIT { DIALOG("add_dialog", jean_recno, "[0071N]Quickly, free me! I hope you’ve brought the key to unlock my shackled hands!") }

			// leave cut scene
			DIALOG("del_all_dialog") 
			
			FUNC("end_cut_scene" , 0)	// leave cut scene!
			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process

			FUNC("stop_curr_task" , tourelles_patrol_b  )
			ACTION("give_team_task", tourelles_patrol_b, "DEFEND_PLACE", 10, place_recno_metz_prison_defend, 0, 0, 0)
				
			FUNC("set_can_interact_flag", tourelles_patrol_b, 0)
		}
	}

	if( jean_recno == 0 && flag_fierbois_recue_metz == 1)
	{
		jean_recno = FUNC("search_unit_by_name", "Jean von Metz")
		
		if( jean_recno )
		{
			FUNC( "stop_curr_task" , jean_recno )
			ACTION("give_task", jean_recno, "DEFEND_PLACE", 4, place_recno_siege, 0, 0, 0)
			FUNC("set_unit_retreat", jean_recno, 1)
			FUNC("set_control_flag" , jean_recno , 1)
		}
	}

	if( jean_recno == 0 && flag_triggered_objective_rescue && flag_fierbois_recue_metz == 0)
	{
		jean_recno = FUNC("search_unit_by_name", "Jean von Metz")
		
		if( jean_recno )
		{
			FUNC("set_can_interact_flag", jean_recno, 1)
			FUNC("set_unit_retreat", jean_recno, 1)
			ACTION("give_task", jean_recno, "IDLE", 1, 0, 0, 0, 0) 
			FUNC("set_control_flag" , jean_recno , 0)
			// FUNC("set_unit_id", jean_recno, metz_id_b)
		}
	}
	else if ( flag_triggered_objective_rescue && flag_fierbois_recue_metz == 0)
	{
		FUNC("set_prisoner", jean_recno, 2 )
	}
	
	if( flag_fierbois_recue_metz == 0 && talk_unit_recno != 0 && talk_unit_recno == jean_recno )	
	{
		if( FUNC("get_item_quantity_in_unit_inventory", key_metz_id, unit_recno) > 0 )
		{
			FUNC("start_cut_scene", 0, 0, 26196, 24261, 82, 187, -42, 10)
					
			// set main character to idle
			FUNC("set_idle", unit_recno) 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			//UNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
			//FUNC("set_unit_can_process_in_cut_scene", jean_recno, 1)	// joan can process

			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", joan_recno ) 
			ACTION("stop_all_order", jean_recno ) 
			//ACTION("give_order" , jean_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , jean_recno , unit_recno) , 0 , 0 , 0, 2500)

			FUNC("free_prisoner", jean_recno) 

			WAIT { DIALOG("add_dialog", jean_recno, "[0072N]You have my utmost gratitude. I owe you my freedom!") }

			if( flag_abtower_broken == 0 && FUNC("get_place_captured", place_recno_e_f) == 0 )
			{
				WAIT { DIALOG("add_dialog", jean_recno, "[0073N]The enemy has constructed a large fort in front of Tourelles. It has four perimeter turrets armed with deadly arbalests that can easily destroy our siege weapons. We must find a way to disable this formidable structure!") }
			}

			// leave cut scene
			DIALOG("del_all_dialog") 
			
			FUNC("end_cut_scene" , 0)	// leave cut scene!
			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
			
			//FUNC("del_unit_team" , 122)
			//FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_metz_recno , metz_id_a, 122, 1, "Jean von Metz", "Jean")		
			
			// FUNC("set_unit_id", jean_recno, metz_id_a)		
			
			FUNC("set_unit_vision_range" , jean_recno, 2000 )
			FUNC("set_can_interact_flag", jean_recno, 0)
			
			jean_recno = 0
			
			FUNC("remove_item_from_unit_inventory", key_metz_id, unit_recno)
		
			FUNC("set_scenario_bit_flag", 27, 1)  
		}
		else 
		{
			FUNC("start_cut_scene", 0, 0, 26196, 24261, 82, 187, -42, 10)
					
			// set main character to idle
			FUNC("set_idle", unit_recno) 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			//FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
			//FUNC("set_unit_can_process_in_cut_scene", jean_recno, 1)	// joan can process

			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", jean_recno ) 
			//ACTION("give_order" , jean_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , jean_recno , unit_recno) , 0 , 0 , 0, 2500)

			WAIT { DIALOG("add_dialog", jean_recno, "[0074N]Quickly, free me! I hope you have brought the key to unlock my shackled hands!") }
			
			// leave cut scene
			DIALOG("del_all_dialog") 
			
			FUNC("end_cut_scene" , 0)	// leave cut scene!
			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
		}
	}
	
	if( flag_triggered_objective_rescue == 0 )
	{
		if( FUNC("is_unit_inside_place", place_recno_e_a_ra , unit_recno) || FUNC("is_unit_inside_place", place_recno_e_b, unit_recno) || FUNC("is_unit_inside_place", place_recno_e_d, unit_recno) || FUNC("is_unit_inside_place", place_recno_patrol_area_a , unit_recno) )
		{
			FUNC("attention_call_message_2", "[0075N]We have captured Jean de Metz, your so-called ‘general’. If you want to see him alive again, meet me in the de la forêt sombre if you want to see him alive again.", talbot_recno )
			FUNC("del_unit_team_member" , 122)

			//FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_metz_recno , metz_id_b, 122, 7, "Jean von Metz", "Jean")		
			//FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_metz_recno , metz_id_a, 122, 7, "Jean von Metz", "Jean")		
		
			jean_recno = 0
		
			FUNC("minimap_set_way_point", 1, 12364.0, 13759.0, 109.484, 1, 0)
			FUNC("minimap_set_way_point_follow_unit", 1, talbot_recno, 0)
			FUNC("set_scenario_bit_flag", 9, 1)  
			FUNC("set_end_condition_enabled", 9, 1) 
		}
	}

	//if(	FUNC( "get_can_interact_flag" , talbot_recno ) )
	//{
		//ACTION("give_order" , talbot_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , talbot_recno , unit_recno) , 0 , 0 , 0, 2500)
	//}

	if(	FUNC( "get_can_interact_flag" , talbot_recno )  )
	{
		if( FUNC( "get_unit_retreat" , talbot_recno) == 0 )
		{
			if( flag_triggered_objective_rescue )
			{
				if( FUNC("is_unit_inside_place", place_recno_loches_forest_c , unit_recno) || FUNC("get_unit_hp_percentage", talbot_recno ) < 100 )
				{
					FUNC("start_cut_scene", 0, 0, 6544, 17382, -371, 187, 90, 5)
									
					// set main character to idle
					FUNC("set_idle", unit_recno) 
					FUNC( "stop_curr_task" , talbot_recno )
					ACTION("give_task", talbot_recno, "IDLE", 1, 0, 0, 0, 0) 
				
					FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
					//FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
					//FUNC("set_unit_can_process_in_cut_scene", talbot_recno, 1)	

					// set weapon seller to idle and rotate him
					ACTION("stop_all_order", talbot_recno ) 
					//ACTION("give_order" , talbot_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , talbot_recno , unit_recno) , 0 , 0 , 0, 2500)

					WAIT { DIALOG("add_dialog", talbot_recno  , "[0076N]Ah, so there you are, you scum! Come, I shall put a swift end to your miserable existence!") }

					// leave cut scene
					DIALOG("del_all_dialog") 
					
					FUNC("end_cut_scene" , 0)	// stop cut scene! 
					WAIT{ FUNC("is_cut_scene_finished") }

					FUNC("set_unit_can_process_in_cut_scene", 0, 1)	
					
					FUNC("set_can_interact_flag", talbot_recno, 0)		
					FUNC("stop_curr_task" , talbot_recno )
					FUNC("set_unit_retreat" , talbot_recno, 1 )
				}
			}
		}
	}

	if(	flag_loches_crossman_spawn == 0 && flag_triggered_objective_rescue )
	{
		if( FUNC( "get_unit_hp_percentage" , talbot_recno ) < 50 && FUNC( "get_unit_hp_percentage" , talbot_recno ) > 0 )
		{
			ACTION("give_task", talbot_recno, "IDLE", 1, 0, 0, 0, 0) 

			// set main character to idle

			FUNC("start_cut_scene_2" , 1, 0, talbot_recno, 200, ( 90 - FUNC("get_unit_dir", talbot_recno) ), 10 , 1 )
									
			FUNC("set_idle", unit_recno) 
			FUNC( "stop_curr_task" , talbot_recno )
			ACTION("give_task", talbot_recno, "IDLE", 1, 0, 0, 0, 0) 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			//FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
			//FUNC("set_unit_can_process_in_cut_scene", talbot_recno, 1)	

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene" , 0, talbot_recno, 200, ( 90 - FUNC("get_unit_dir", talbot_recno) ), 10)
			
			// set weapon seller to idle and rotate him
			FUNC( "set_unit_degree" , talbot_recno, FUNC("get_rotation" , talbot_recno , unit_recno) ) 
			//ACTION("give_order" , talbot_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , talbot_recno , unit_recno) , 0 , 0 , 0, 2500)

			WAIT { DIALOG("add_dialog", talbot_recno  , "[0077N]Hmph - you have proved to be tougher than I expected, but let's see how well you fare against my crossbowmen!") }

			// leave cut scene
			DIALOG("del_all_dialog") 
			
			FUNC("end_cut_scene_2", 0, 1)
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_unit_can_process_in_cut_scene", 0, 1)	

			ACTION("stop_all_order", talbot_recno ) 
			FUNC("stop_curr_task" , talbot_recno )

			//spawn troops
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_a , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_b , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_c , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_d , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_e , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_f , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_g , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_h , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_i , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_j , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_k , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_l , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_m , ecrossman_id, 81, 1, 15)
			FUNC("facility_barrack_add_member", facility_spawn_point_loches_recno_n , ecrossman_id, 81, 1, 15)

			ACTION("give_task", talbot_recno, "DEFEND_PLACE", 99, place_recno_loches_forest_d, 0, 0, 0)			

			//FUNC( "reset_unit_hp" , talbot_recno )
			FUNC( "set_scenario_event_bit_flag", 5, 1)  
		}
	}
	
	if( flag_loches_talbot_retreat == 0  && FUNC( "get_unit_retreat" , talbot_recno) == -1 ) 
	{
		FUNC("start_cut_scene_2", 1, 0, talbot_recno, 200, ( 180 - FUNC("get_unit_dir", talbot_recno) ), 10, 1)
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)
		FUNC("set_unit_can_process_in_cut_scene", talbot_recno, 1)

		WAIT{ FUNC("is_cut_scene_status_black_screen") }

		FUNC("set_idle", talbot_recno)
		FUNC("stop_curr_task", talbot_recno)
		ACTION("give_task", talbot_recno, "IDLE", 1, 1, 0, 0, 0)
		ACTION("stop_all_order", talbot_recno)
		
		WAIT{ FUNC("pause_script", 1) }
		ACTION("give_task", talbot_recno, "IDLE", 1, 1, 0, 0, 0)
		ACTION("stop_all_order", talbot_recno)
		FUNC("set_idle", talbot_recno)
		
		FUNC("change_camera_in_cut_scene", 0, talbot_recno, 200, ( 180 - FUNC("get_unit_dir", talbot_recno) ), 10)
		
		WAIT { DIALOG("add_dialog", talbot_recno  , "[0078N]You may have got the better of me today, but I swear by my sword and my crown, we will meet again!!") }

		FUNC("enable_unit_bounding_volume", talbot_recno, 0)

		WAIT{ ACTION("give_order", talbot_recno, "APPROACH_PLACE", 99, 1, place_recno_talbot_retreat, 0, 0, 0, 3000) }

		DIALOG("del_all_dialog") 
		FUNC("end_cut_scene_2", 0, 1)
		WAIT{ FUNC("is_cut_scene_status_black_screen") }
		
		FUNC( "del_unit" , talbot_recno)

		WAIT{ FUNC("is_cut_scene_finished") }
		FUNC("set_scenario_event_bit_flag", 23, 1)

		FUNC("minimap_set_way_point_follow_unit", 1, 0, 0)
		FUNC("minimap_set_way_point", 1, 12364.0, 13759.0, 109.484, 0, 0)

		FUNC( "set_scenario_event_bit_flag", 3, 1)
		FUNC( "set_scenario_event_bit_flag", 4, 1)  
		FUNC( "set_scenario_event_bit_flag", 5, 1)

		if( flag_support_spawn == 0 ) 
		{
			FUNC("facility_barrack_add_leader", facility_recno_support_1, fhinfantcap_id, 126, 16, "Dunois", "Dunois" )
			FUNC("facility_barrack_add_member", facility_recno_support_2, fhinfant_id, 126, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_3, fhinfant_id, 126, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_4, fhinfant_id, 126, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_5, fhinfant_id, 126, 1, 16)

			FUNC("facility_barrack_add_member", facility_recno_support_6, fmaceman_id, 126, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_7, fmaceman_id, 126, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_8, fmaceman_id, 126, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_9, fmaceman_id, 126, 1, 16)

			FUNC("facility_barrack_add_member", facility_recno_support_10, fpoleman_id, 126, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_11, fpoleman_id, 126, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_12, fpoleman_id, 126, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_13, fpoleman_id, 126, 1, 16)

			FUNC("facility_barrack_add_leader", facility_recno_support_14, fhinfantcap_id, 127, 16, "d'Illiers", "d'Illiers" ) 
			FUNC("facility_barrack_add_member", facility_recno_support_15, fpoleman_id, 127, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_16, fpoleman_id, 127, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_17, fpoleman_id, 127, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_18, fpoleman_id, 127, 1, 16)

			FUNC("facility_barrack_add_member", facility_recno_support_19, farcher_id, 127, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_20, farcher_id, 127, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_21, farcher_id, 127, 1, 16)
			FUNC("facility_barrack_add_member", facility_recno_support_22, farcher_id, 127, 1, 16)

			FUNC("set_scenario_event_bit_flag", 17, 1)
		}
	}


	if( flag_support_spawn ) 
	{
		if( dunois_recno == 0 )
		{
			dunois_recno = FUNC("search_unit_by_name", "Dunois")

			if( dunois_recno )
			{
				ACTION("give_team_task", dunois_recno, "IDLE", 1, 0, 0, 0, 0) 
				FUNC("set_unit_retreat", dunois_recno, 1)
			}
		}

		if( diller_recno == 0 )
		{
			diller_recno = FUNC("search_unit_by_name", "d'Illiers")

			if( diller_recno )
			{
				FUNC("attention_call_message_2", "[0079N]We have arrived near the town of Fierbois, under the will of our king. We await your presence so we may serve your needs, and conquer Saint Augustin and Tourelles. Vive la France!", diller_recno )
				ACTION("give_team_task", diller_recno , "IDLE", 1, 0, 0, 0, 0) 
				FUNC("set_unit_retreat", diller_recno, 1)
			}
		}
	
		if( flag_support_msg == 0 ) 
		{
			if( FUNC("is_unit_inside_place",  place_recno_church_spawn, unit_recno) )
			{
				dunois_recno = FUNC("search_unit_by_name", "Dunois")
				diller_recno = FUNC("search_unit_by_name", "d'Illiers")

				FUNC("stop_curr_task" , dunois_recno )
				FUNC("stop_curr_task" , diller_recno )
	
				FUNC("start_cut_scene_2", 1, 0, 1441, 18563, 383, 270, -174, 38, 1)
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
					
				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, 1441, 18563, 383, 270, -174, 38 )

				WAIT{ DIALOG("add_dialog", dunois_recno, "[0080N]Greetings from a fellow soldier. We have come to your aid. Tourelles is strong and heavily armed, but there is strength to be had in numbers!") }

				if( flag_fierbois_recue_metz == 0)
				{
					FUNC("change_camera_in_cut_scene", 0, 21754, 27001, 132 , 270, -120, 3 )
					WAIT{ DIALOG("add_dialog", dunois_recno, "[0081N]Our well-trained siege cannon unit, led by general _Jean De Metz_, is already in position, awaiting your command to strike! The enemy has been expecting us, but I scarcely believe they expected to encounter so much French support!") }
					WAIT{ DIALOG("add_dialog", dunois_recno, "[0082N]If you encounter general Metz, please have him go and direct our siege troops!") }
				}

				FUNC("change_camera_in_cut_scene", 0, 1290, 18557, 49, 350, -163,7)
				WAIT{ DIALOG("add_dialog", dunois_recno, "[0083N]We shall follow your leadership now, general. Lead us to Tourelles, lead us to Saint Augustin - lead us to victory!") }
					
				DIALOG("del_all_dialog") 
				FUNC("end_cut_scene_2", 0, 1)
				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				WAIT{ FUNC("is_cut_scene_finished") }
				
				ACTION("give_team_task", dunois_recno ,  "FOLLOW_UNIT", 5, unit_recno, 0, 0, 0)
				ACTION("give_team_task", diller_recno ,  "FOLLOW_UNIT", 5, unit_recno, 0, 0, 0)
		
				FUNC("set_scenario_event_bit_flag", 18, 1)
			}
		}
	}

	if(	flag_loches_crossman_spawn && flag_loches_talbot_refight == 0 )
	{
		if( FUNC("contain_team_member", 81) == 0 )
		{
			talbot_recno = FUNC("search_unit_by_name", "Lord Talbot") 		 

			if(talbot_recno != 0 && FUNC( "get_unit_retreat" , talbot_recno) != -1  )
			{
				ACTION("stop_all_order", talbot_recno ) 
				FUNC("stop_curr_task" , talbot_recno )
				ACTION("give_task", talbot_recno, "IDLE", 1, 0, 0, 0, 0) 
			
				FUNC("start_cut_scene" , 0, 0, talbot_recno, 200, ( 90 - FUNC("get_unit_dir", talbot_recno) ), 10 )
				
				FUNC("set_idle", unit_recno) 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
				FUNC("set_unit_can_process_in_cut_scene", unit_recno, 1)	// joan can process
				//FUNC("set_unit_can_process_in_cut_scene", talbot_recno, 1)	

				// set weapon seller to idle and rotate him
				ACTION("give_order" , talbot_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , talbot_recno , unit_recno) , 0 , 0 , 0, 2500)

				WAIT { DIALOG("add_dialog", talbot_recno  , "[0084N]I may have underestimated you, but you have also underestimated me! Prepare for your fall!") }

				// leave cut scene
				DIALOG("del_all_dialog") 
				
				FUNC("end_cut_scene" , 0)	// stop cut scene! 
				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	

				FUNC( "stop_curr_task" , talbot_recno )

				FUNC( "set_scenario_event_bit_flag", 3, 1)  
			}
		}
	}

	
	
	//tourelles
	if( FUNC( "get_place_captured" , place_recno_e_g ) == 0 )
	{
		if ( FUNC( "people_by_nation_exist_in_place" , place_recno_e_g, "ENGLISH" ) == 0 )
		{
			FUNC("change_all_item_in_place", place_recno_e_g, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_recno_e_g, 1)
			FUNC("set_territory_nation", "Tourelles", "French")
			FUNC("set_minimap_icon_display_enable" , "castle_s4l3_f" , 1 )
			FUNC("set_minimap_icon_display_enable" , "castle_s4l3_e" , 0 )
		}
	}

	if( flag_fierbois_wait_for_command == 0  )	
	{
		if( FUNC("is_unit_inside_place", place_recno_ready_to_fight, unit_recno) )
		{
			FUNC("attention_call_message", "[0085N]All your units are waiting for your command to attack - just strike the weapons tower, and they will all follow suit.")
			FUNC("set_scenario_bit_flag", 28, 1)  		
		}
	}
	
	if( FUNC("is_unit_inside_place", place_recno_e_g_inside , alencon_recno) || FUNC("is_unit_inside_place", place_recno_e_g_inside , joan_recno) || FUNC("is_unit_inside_place", place_recno_e_g_inside , unit_recno) || FUNC("is_unit_inside_place", place_recno_e_g_inside , jean_recno) )
	{
		ACTION("give_team_task", tourelles_maceman_e , "DEFEND_PLACE", 3, place_recno_e_g_inside, 0, 0, 0)
		ACTION("give_team_task", tourelles_maceman_f , "DEFEND_PLACE", 3, place_recno_e_g_inside, 0, 0, 0)
		ACTION("give_team_task", tourelles_poleman_a , "DEFEND_PLACE", 3, place_recno_e_g_inside, 0, 0, 0)
		ACTION("give_team_task", tourelles_poleman_b , "DEFEND_PLACE", 3, place_recno_e_g_inside, 0, 0, 0)
		ACTION("give_team_task", tourelles_poleman_c , "DEFEND_PLACE", 3, place_recno_e_g_inside, 0, 0, 0)
		ACTION("give_task", john_recno, "DEFEND_PLACE", 3, place_recno_e_g_inside, 0, 0, 0)
	}
	
	//process spawn unit
	if( flag_fierbois_tourelles_spawn )
	{	
		if( tourelles_light_infantry_a == 0)
		{
			tourelles_light_infantry_a = FUNC("search_unit_by_name", "Geffrey Grene") 		
		}
		else
		{
			ACTION("give_team_task", tourelles_light_infantry_a, "DEFEND_PLACE", 1, place_recno_e_f, 0, 0, 0)
		}

		if( tourelles_maceman_a == 0)
		{
			tourelles_maceman_a = FUNC("search_unit_by_name", "Alexander Humfridi") 		
		}
		else
		{
			ACTION("give_team_task", tourelles_maceman_a, "DEFEND_PLACE", 1, place_recno_e_f, 0, 0, 0)
		}

		if( tourelles_maceman_b == 0)
		{
			tourelles_maceman_b = FUNC("search_unit_by_name", "Baldric Kyng")
		}
		else
		{
			ACTION("give_team_task", tourelles_maceman_b, "DEFEND_PLACE", 1, place_recno_e_f, 0, 0, 0)
		}

		if( tourelles_archer_a == 0)
		{
			tourelles_archer_a = FUNC("search_unit_by_name", "Ebulus Lyngedraper")
		}
		else
		{
			ACTION("give_team_task", tourelles_archer_a , "DEFEND_PLACE", 1, place_recno_e_f, 0, 0, 0)
		}

		if( tourelles_light_infantry_b == 0)
		{
			tourelles_light_infantry_b = FUNC("search_unit_by_name", "Firmin Molot")
		}
		else
		{
			ACTION("give_team_task", tourelles_light_infantry_b , "DEFEND_PLACE", 1, place_recno_e_f, 0, 0, 0)
		}
		
		if( tourelles_maceman_c == 0 )
		{
			tourelles_maceman_c  = FUNC("search_unit_by_name", "Gocelin More")
		}
		else
		{
			ACTION("give_team_task", tourelles_maceman_c , "DEFEND_PLACE", 1, place_recno_e_f, 0, 0, 0)
		}

		if( tourelles_maceman_d == 0 )
		{
			tourelles_maceman_d  = FUNC("search_unit_by_name", "Huberdus Officialis")
		}
		else
		{
			ACTION("give_team_task", tourelles_maceman_d , "DEFEND_PLACE", 1, place_recno_e_f, 0, 0, 0)
		}
		
		if( tourelles_archer_b == 0 )
		{
			tourelles_archer_b = FUNC("search_unit_by_name", "Joel Peroun")
		}
		else
		{
			ACTION("give_team_task", tourelles_archer_b , "DEFEND_PLACE", 1, place_recno_e_f, 0, 0, 0)
		}
	}
	
	if( flag_fierbois_tourelles_spawn == 0 && flag_abtower_broken == 0 && FUNC( "get_wall_hp", abtower_recno) == 0 )
	{
		//spawn troops to help
		FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_a_recno, elinfantcap_id, 114, 16, "Geffrey Grene", "Grene")
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_b_recno, elinfant_id, 114, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_c_recno, elinfant_id, 114, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_d_recno, elinfant_id, 114, 1, 16)

		FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_21_recno, emacemancap_id, 115, 16, "Alexander Humfridi", "Humfridi")
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_22_recno, emaceman_id, 115, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_23_recno, emaceman_id, 115, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_24_recno, emaceman_id, 115, 1, 16)

		FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_25_recno, elinfantcap_id, 116, 16, "Baldric Kyng", "Kyng")
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_26_recno, elinfant_id, 116, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_27_recno, elinfant_id, 116, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_28_recno, elinfant_id, 116, 1, 16)

		FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_29_recno, earchercap_id, 117, 16, "Ebulus Lyngedraper", "Lyngedraper")
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_30_recno, earcher_id, 117, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_31_recno, earcher_id, 117, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_32_recno, earcher_id, 117, 1, 16)

		FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_e_recno, elinfantcap_id, 118, 16, "Firmin Molot", "Molot")
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_f_recno, elinfant_id, 118, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_g_recno, elinfant_id, 118, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_h_recno, elinfant_id, 118, 1, 16)

		FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_9_recno, emacemancap_id, 119, 16, "Gocelin More", "More")
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_10_recno, emaceman_id, 119, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_11_recno, emaceman_id, 119, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_12_recno, emaceman_id, 119, 1, 16)

		FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_13_recno, emacemancap_id, 120, 16, "Huberdus Officialis", "Officialis")
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_14_recno, emaceman_id, 120, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_15_recno, emaceman_id, 120, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_16_recno, emaceman_id, 120, 1, 16)

		FUNC("facility_barrack_add_leader", facility_spawn_point_e_g_17_recno, earchercap_id, 120, 16, "Joel Peroun", "Peroun")
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_18_recno, earcher_id, 120, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_19_recno, earcher_id, 120, 1, 16)
		FUNC("facility_barrack_add_member", facility_spawn_point_e_g_20_recno, earcher_id, 120, 1, 16)

		FUNC("kill_team" , 110)
		FUNC("kill_team" , 111)
		FUNC("kill_team" , 112)
		FUNC("kill_team" , 113)
		FUNC("kill_team" , 152)

		FUNC("set_unit_dead", abtower_archer_a)
		FUNC("set_unit_dead", abtower_archer_b)
		FUNC("set_unit_dead", abtower_archer_c)
		FUNC("set_unit_dead", abtower_archer_d)

		FUNC("set_unit_dead", abtower_abbow_a)
		FUNC("set_unit_dead", abtower_abbow_b)
		FUNC("set_unit_dead", abtower_abbow_c)
		FUNC("set_unit_dead", abtower_abbow_d)
		FUNC("set_unit_dead", abtower_abbow_e)
		FUNC("set_unit_dead", abtower_abbow_f)

		FUNC("set_scenario_event_bit_flag", 24, 1)

		FUNC("attention_call_message", "[0086N]Saint Augustin has been destroyed." )
		
		FUNC("set_scenario_bit_flag", 26, 1)  
		FUNC("set_scenario_bit_flag", 30, 1)  
		FUNC("set_scenario_event_bit_flag", 25, 1)
		FUNC("set_scenario_event_bit_flag", 26, 1)
		FUNC("set_scenario_event_bit_flag", 27, 1)
		FUNC("set_scenario_event_bit_flag", 28, 1)
		FUNC("set_scenario_event_bit_flag", 29, 1)
		FUNC("set_scenario_event_bit_flag", 30, 1)
	}

	if( flag_all_abbow_dead == 0 )
	{
		if( flag_abbow_dead_1 == 0 )
		{
			if ( FUNC("is_unit_dead", abtower_abbow_a ) || FUNC("get_place_captured", place_recno_e_f) )
			{	
				FUNC("set_scenario_event_bit_flag", 25, 1)
			}
		}

		if( flag_abbow_dead_2 == 0 )
		{
			if ( FUNC("is_unit_dead", abtower_abbow_b ) || FUNC("get_place_captured", place_recno_e_f) )
			{	
				FUNC("set_scenario_event_bit_flag", 26, 1)
			}
		}

		if( flag_abbow_dead_3 == 0 )
		{
			if ( FUNC("is_unit_dead", abtower_abbow_c ) || FUNC("get_place_captured", place_recno_e_f) )
			{	
				FUNC("set_scenario_event_bit_flag", 27, 1)
			}
		}

		if( flag_abbow_dead_4 == 0 )
		{
			if ( FUNC("is_unit_dead", abtower_abbow_d ) || FUNC("get_place_captured", place_recno_e_f) )
			{	
				FUNC("set_scenario_event_bit_flag", 28, 1)
			}
		}

		if( flag_abbow_dead_5 == 0 )
		{
			if ( FUNC("is_unit_dead", abtower_abbow_e ) || FUNC("get_place_captured", place_recno_e_f) )
			{	
				FUNC("set_scenario_event_bit_flag", 29, 1)
			}
		}

		if( flag_abbow_dead_6 == 0 )
		{
			if ( FUNC("is_unit_dead", abtower_abbow_f ) || FUNC("get_place_captured", place_recno_e_f) )
			{	
				FUNC("set_scenario_event_bit_flag", 30, 1)
			}
		}

		if( flag_abbow_dead_6 && flag_abbow_dead_5 && flag_abbow_dead_4 && flag_abbow_dead_3 && flag_abbow_dead_2 && flag_abbow_dead_1 )
		{

			FUNC("set_scenario_event_bit_flag", 24, 1)
			
		}
	}

	if( flag_tourelles_broken == 0 )
	{
		if( FUNC( "get_gate_state" , tourelles_gate_recno ) == 1 )
		{
			FUNC("stop_curr_task" , tourelles_maceman_e )
			FUNC("stop_curr_task" , tourelles_maceman_f )
			FUNC("stop_curr_task" , tourelles_poleman_a )
			FUNC("stop_curr_task" , tourelles_poleman_b )
			FUNC("stop_curr_task" , tourelles_poleman_c )
				
			FUNC("set_scenario_bit_flag", 29, 1)  
		}
	}

	ACTION("give_team_task", tourelles_patrol_a, "DEFEND_PLACE", 1, place_recno_e_g, 0, 0, 0)
	ACTION("give_team_task", tourelles_patrol_b, "DEFEND_PLACE", 1, place_recno_metz_prison_defend, 0, 0, 0)

	//abtower
	if ( flag_abtower_door_opened == 0 && interact_item_recno == abtower_gate_recno )
	{
		if ( FUNC("get_item_quantity_in_unit_inventory", key_abtower_id, unit_recno) > 0 )
		{
			FUNC("add_gate_trigger", abtower_gate_recno, 0)
			FUNC("remove_item_from_unit_inventory", key_abtower_id, unit_recno)
			
			WAIT{ FUNC("pause_script", 2000) }
			
			if( flag_abtower_broken == 0 )
			{
				FUNC("start_cut_scene" , 0, 0, 20064, 24232, 681, 97, -67, 8 )
					
				FUNC("set_idle", unit_recno) 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

				WAIT { DIALOG("add_dialog", abtower_infant , "[0087N]The tower contains six automatic arbalests - you will have to destroy them all to disable their operation!") }

				// leave cut scene
				DIALOG("del_all_dialog") 
				
				FUNC("end_cut_scene" , 0)	// stop cut scene! 
				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC ("set_end_condition_enabled", 8, 1)							
			}

			FUNC("set_scenario_event_bit_flag", 6, 1)  
		}
		else
		{
			FUNC("attention_call_message", "[0088N]You need the Saint Augustin Tower Key to open this gate.")
		}
	}

	if( flag_all_attack == 0 )
	{
		if( FUNC( "get_wall_hp" , abtower_recno ) < FUNC( "get_wall_max_hp" , abtower_recno ) || FUNC("is_unit_inside_place", place_recno_e_f_inside , unit_recno) )
		{
			FUNC("attention_call_message", "[0089N]The attack on Saint Augustin and Tourelles has commenced!")

			ACTION("give_team_task", alencon_recno , "ATTACK_PLACE", 2, place_recno_e_f, 0, 0, 0)
			//ACTION("give_team_task", dunois_recno ,  "FOLLOW_UNIT", 5, joan_recno, 0, 0, 0)
			//ACTION("give_team_task", diller_recno ,  "FOLLOW_UNIT", 5, joan_recno, 0, 0, 0)

			if( flag_fierbois_recue_metz )
			{
				FUNC("stop_curr_task", 	cannon_a)
				FUNC("stop_curr_task", 	cannon_b)
				FUNC("stop_curr_task", 	cannon_c)
				FUNC("stop_curr_task", 	cannon_d)
				FUNC("stop_curr_task", 	jean_recno)
				ACTION("give_task", jean_recno , "ATTACK_PLACE", 2, place_recno_e_f, 0, 0, 0)
			}

			FUNC("set_scenario_bit_flag", 31, 1)  
		}
	}
	
	if( flag_all_attack )
	{

		if( FUNC( "get_wall_hp" , abtower_recno ) != 0 && FUNC( "get_place_captured" , place_recno_e_f ) == 0)
		{	
			if( flag_fierbois_recue_metz )
			{
				rotation = FUNC("get_item_rotation" , cannon_a , abtower_recno)
				direction = FUNC("get_unit_dir",  cannon_a )

				if( ( direction - rotation ) > 5 || ( direction - rotation ) < -5 )
				{
					if( FUNC("get_curr_order" , cannon_a ) != 10 )
					{
						ACTION("stop_all_order", cannon_a)
						ACTION("give_order" , cannon_a, "TURN" , 2 , 0 , rotation , 0 , 0 , 0, 2500)
					}
				}
				else
				{
					if( FUNC("get_curr_order" , cannon_a ) != 2 )
					{
						ACTION("stop_all_order" , cannon_a )
						ACTION("give_order", cannon_a, "SHOOT", 2, 0, 2, abtower_recno, 0, 0, 3000)
					}
				}

				rotation = FUNC("get_item_rotation" , cannon_b , abtower_recno)
				direction = FUNC("get_unit_dir",  cannon_b )

				if( ( direction - rotation ) > 5 || ( direction - rotation ) < -5 )
				{
					if( FUNC("get_curr_order" , cannon_b ) != 10 )
					{
						ACTION("stop_all_order" , cannon_b )
						ACTION("give_order" , cannon_b, "TURN" , 2 , 0 , rotation , 0 , 0 , 0, 2500)
					}
				}
				else
				{
					if( FUNC("get_curr_order" , cannon_b ) != 2 )
					{
						ACTION("stop_all_order" , cannon_b )
						ACTION("give_order", cannon_b, "SHOOT", 2, 0, 2, abtower_recno, 0, 0, 3000)
					}
				}

				rotation = FUNC("get_item_rotation" , cannon_c , abtower_recno)
				direction = FUNC("get_unit_dir",  cannon_c )

				if( ( direction - rotation ) > 5 || ( direction - rotation ) < -5 )
				{
					if( FUNC("get_curr_order" , cannon_c ) != 10 )
					{
						ACTION("stop_all_order" , cannon_c )
						ACTION("give_order" , cannon_c, "TURN" , 2 , 0 , rotation , 0 , 0 , 0, 2500)
					}
				}
				else
				{
					if( FUNC("get_curr_order" , cannon_c ) != 2 )
					{
						ACTION("stop_all_order" , cannon_c )
						ACTION("give_order", cannon_c, "SHOOT", 2, 0, 2, abtower_recno, 0, 0, 3000)
					}
				}

				rotation = FUNC("get_item_rotation" , cannon_d , abtower_recno)
				direction = FUNC("get_unit_dir",  cannon_d )

				if( ( direction - rotation ) > 5 || ( direction - rotation ) < -5 )
				{
					if( FUNC("get_curr_order" , cannon_d ) != 10 )
					{
						ACTION("stop_all_order" , cannon_d )
						ACTION("give_order" , cannon_d, "TURN" , 2 , 0 , rotation , 0 , 0 , 0, 2500)
					}
				}
				else
				{	
					if( FUNC("get_curr_order" , cannon_d ) != 2 )
					{
						ACTION("stop_all_order" , cannon_d )
						ACTION("give_order", cannon_d, "SHOOT", 2, 0, 2, abtower_recno, 0, 0, 3000)
					}
				}

				//ACTION("give_task", cannon_a, "RTS_ATTACK_ITEM", 2, abtower_recno , 0, 0 , 0)			
				//ACTION("give_task", cannon_b, "RTS_ATTACK_ITEM", 2, abtower_recno , 0, 0 , 0)			
				//ACTION("give_task", cannon_c, "RTS_ATTACK_ITEM", 2, abtower_recno , 0, 0 , 0)			
				//ACTION("give_task", cannon_d, "RTS_ATTACK_ITEM", 2, abtower_recno , 0, 0 , 0)			
			}			
		}
		else 
		{
			if( flag_abtower_destroy == 0 && FUNC( "get_place_captured" , place_recno_e_f ) == 1 )
			{
				FUNC("stop_curr_task", 	cannon_a)
				FUNC("stop_curr_task", 	cannon_b)
				FUNC("stop_curr_task", 	cannon_c)
				FUNC("stop_curr_task", 	cannon_d)

				FUNC("stop_curr_task", 	alencon_recno )
				FUNC("stop_curr_task", 	lahire_recno )
				FUNC("stop_curr_task", 	jean_recno )
				//FUNC("stop_curr_task", 	dunois_recno )
				//FUNC("stop_curr_task", 	diller_recno )
				
				if( flag_fierbois_recue_metz )
				{
					if( tourelles_gate_recno)
					{
						ACTION("give_task", cannon_a, "RTS_ATTACK_ITEM", 2, tourelles_gate_recno , 0, 0 , 0)			
						ACTION("give_task", cannon_b, "RTS_ATTACK_ITEM", 2, tourelles_gate_recno , 0, 0 , 0)			
						ACTION("give_task", cannon_c, "RTS_ATTACK_ITEM", 2, tourelles_gate_recno , 0, 0 , 0)			
						ACTION("give_task", cannon_d, "RTS_ATTACK_ITEM", 2, tourelles_gate_recno , 0, 0 , 0)			
					}
					
					ACTION("give_team_task", jean_recno , "ATTACK_PLACE", 5, place_recno_e_g_inside, 0, 0, 0)
				}

				ACTION("give_team_task", alencon_recno , "ATTACK_PLACE", 2, place_recno_e_g_inside, 0, 0, 0)
				ACTION("give_team_task", lahire_recno , "ATTACK_PLACE", 2, place_recno_e_g_inside, 0, 0, 0)
				
				//ACTION("give_team_task", dunois_recno ,  "FOLLOW_UNIT", 5, joan_recno, 0, 0, 0)
				//ACTION("give_team_task", diller_recno ,  "FOLLOW_UNIT", 5, joan_recno, 0, 0, 0)

				FUNC("set_scenario_bit_flag", 3, 1)  
			}
		}
	}
	
	if( FUNC( "get_place_captured" , place_recno_e_f ) == 0 )
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_e_f, "ENGLISH" ) == 0 && flag_all_abbow_dead )
		{
			FUNC("change_all_item_in_place", place_recno_e_f, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_recno_e_f, 1)
			FUNC("set_territory_nation", "Saint Augustin", "French")
			FUNC("set_minimap_icon_display_enable" , "tower_s4l3_f" , 1 )
			FUNC("set_minimap_icon_display_enable" , "tower_s4l3_e" , 0 )
			FUNC("set_item_nation", abtower_recno , "French" )
			FUNC("attention_call_message", "[0090N]The automatic weapons tower of Saint Augustin has succumbed under the combined might of the French forces and their battery of siege cannons! Victory is at hand!" )
		}
	}
	
	exit
}
