"S7L1_tactic.sce"
{
	//bit flag  ---- start from 1 ----
	INT flag_gold_captured
	INT flag_gold_captured_2
	INT flag_attackers_start_attack
	INT flag_priest_cut_scene_msg
	INT flag_gate_guard_dead
	INT flag_objective_show

	INT flag_encount_cut_scene
	INT flag_eng_camp_enter
	INT flag_half_gold_triggered

	INT flag_gressart_heavy_troop_spawn
	INT flag_gressart_heavy_troop_in_middle_1
	INT flag_gressart_heavy_troop_in_middle_2
	INT flag_gressart_heavy_troop_reverse
	INT flag_gressart_heavy_troop_moving

	INT flag_collect_food_triggered
	INT flag_collect_food_msg

	INT flag_collect_food_crates_broken
	INT flag_gressart_arrived

	INT flag_st_pierre_captured
	INT flag_la_charite_captured
	INT flag_protect_villagers_triggered
	INT flag_protect_villagers_completed

	INT flag_gressart_is_defeated

	INT flag_init_cut_scene					
	INT flag_cart_cut_scene

	INT flag_english_camp_patrol_path

	INT flag_gold_captured_gressart_cut_scene
	INT flag_gold_captured_gold_cut_scene
	
	INT flag_english_camp_patrol
	INT flag_workshop_cut_scene
	INT flag_workshop_captured

	INT flag_gressart_retreat_cut_scene_1
	INT flag_gressart_retreat_cut_scene_2
	INT flag_burgundians_cut_scene

	INT flag_gressart_retreat_1
	
	INT flag_gressart_retreat_2
	INT flag_gressart_dead

	INT flag_gough_dead

	INT flag_citizen_spawn

	INT flag_general_retreat_1 
	INT flag_general_retreat_2
	INT flag_general_retreat_3
	INT flag_general_retreat_4

	INT flag_first_invasion_st_pierre
	INT flag_first_invasion_la_charite_l
	INT flag_first_invasion_la_charite_r
	INT flag_first_invasion_la_charite_c

	INT flag_enough_bribed

	INT flag_unit_inside_1
	INT flag_unit_inside_2

	INT flag_gate_guard_cut_scene

	INT flag_gate_guard_bribed
	INT flag_bribed_gate_opened	

	INT flag_gate_guard_pee

	INT flag_gate_guard_first_pee
	INT flag_gate_guard_pee_cut_scene

	INT flag_batterram_msg
	INT flag_eng_camp_cut_scene
	
	INT flag_gough_eng_camp_cut_scene

	INT flag_st_pierre_gate_close
	INT flag_gough_dead_cut_scene
	INT flag_st_pierre_mountain_top
	INT flag_la_charite_attacked

	INT flag_la_charite_gate_close
	INT flag_mistrust
	INT flag_priest_cut_scene

	INT flag_food_picked_1
	INT flag_food_picked_2
	INT flag_food_picked_3

	INT flag_food_citizen_all_dead
	INT flag_food_picked_cut_scene
	INT flag_collect_food_finished

	INT flag_eng_camp_2_invasion
	INT flag_food_picked_up_spawn

	INT flag_st_pierre_poleman_spawn
	INT flag_st_pierre_gate_2_triggered

	INT flag_eng_camp_2_captured
	INT flag_gold_returned
	INT flag_100_gold_found
	INT flag_food_middle_msg

	INT flag_invisible_msg
	INT flag_go_on
	INT flag_forest_message

	INT flag_la_charite_cut_scene
	INT flag_bribed_mission_trigger

	INT flag_la_charite_invasion

	INT flag_martin_dead
	INT flag_martin_dead_cut_scene
	INT flag_attacker_dead_message
	INT flag_begley_dead 
	INT flag_hudleg_dead 

	INT flag_letter_returned 
	INT flag_letter_returned_fail
	INT flag_wife_triggered 
	INT flag_citizen_dead_1
	INT flag_citizen_dead_2
	INT flag_citizen_dead_3
	INT flag_citizen_dead_4
	INT flag_citizen_dead_5
	INT flag_citizen_dead_6
	INT flag_citizen_dead_7

	//unit recno 
	INT gressart_recno
	INT gough_recno
	INT martin_recno
	INT begley_recno
	INT hudleg_recno

	//INT burgundian_recno

	INT gate_guard_recno
	INT worker_recno

	INT church_cart_recno
	INT church_cartman_recno

	INT camp_cart_recno
	//INT camp_cartman_recno
	
	INT town_attacker_recno_1
	INT town_attacker_recno_2
	INT town_attacker_recno_3

	//citizens
	INT citizen_recno_1
	INT citizen_recno_2
	INT citizen_recno_3
	INT citizen_recno_4
	INT citizen_recno_5
	INT citizen_recno_6
	INT citizen_recno_7

	INT wife_recno

	//prisoner
	INT prisoner_recno_1
	INT prisoner_recno_2
	INT prisoner_recno_3
	INT prisoner_recno_4
	INT prisoner_recno_5
	INT prisoner_recno_6
	INT prisoner_recno_7
	INT prisoner_recno_8
	INT prisoner_recno_9
	INT prisoner_recno_10
	INT prisoner_recno_11
	INT prisoner_recno_12
	INT prisoner_recno_13
	INT prisoner_recno_14
	INT prisoner_recno_15
	INT prisoner_recno_16
	INT prisoner_recno_17
	INT prisoner_recno_18
	INT prisoner_recno_19
	INT prisoner_recno_20
	INT prisoner_recno_21
	INT prisoner_recno_22
	INT prisoner_recno_23
	INT prisoner_recno_24	

	//la charite
	INT la_charite_army_recno_1
	INT la_charite_army_recno_2
	INT la_charite_army_recno_3
	INT la_charite_army_recno_4
	INT la_charite_army_recno_5
	INT la_charite_army_recno_6
	INT la_charite_army_recno_7
	INT la_charite_army_recno_8
	INT la_charite_army_recno_9
	INT la_charite_army_recno_10
	INT la_charite_army_recno_11
	INT la_charite_army_recno_12
	INT la_charite_army_recno_13
	INT la_charite_army_recno_14
	INT la_charite_army_recno_15
	INT la_charite_army_recno_16
	INT la_charite_army_recno_17
	INT la_charite_army_recno_18
	
	INT cut_scene_cart_force_recno_1
	INT cut_scene_cart_force_recno_2
	INT cut_scene_cart_force_recno_3
	INT cut_scene_cart_force_recno_4
	INT cut_scene_cart_force_recno_5
	INT cut_scene_cart_force_recno_6
	INT cut_scene_cart_force_recno_7
	INT cut_scene_cart_force_recno_8
	INT cut_scene_cart_force_recno_9
	INT cut_scene_cart_force_recno_10
	INT cut_scene_cart_cart_recno
	INT cut_scene_cart_driver_recno

	INT i_cut_scene_cart_force_recno_1
	INT i_cut_scene_cart_force_recno_2
	INT i_cut_scene_cart_force_recno_3
	INT i_cut_scene_cart_force_recno_4
	INT i_cut_scene_cart_force_recno_5
	INT i_cut_scene_cart_force_recno_6
	INT i_cut_scene_cart_force_recno_7
	INT i_cut_scene_cart_force_recno_8
	INT i_cut_scene_cart_force_recno_9
	INT i_cut_scene_cart_force_recno_10
	INT i_cut_scene_cart_cart_recno
	INT i_cut_scene_cart_driver_recno
	INT weapon_seller_st_pierre_recno
	INT weapon_seller_st_thomas_recno
	INT potion_seller_st_pierre_recno

	INT gate_guard_archer_2
	INT gate_guard_archer_3
	INT gate_guard_archer_4
	INT gate_guard_archer_5
	INT gate_guard_archer_6
	INT gate_guard_archer_7
	INT gate_guard_archer_8

	//eng camp 2
	INT eng_camp_2_guard_1
	INT eng_camp_2_guard_2
	INT eng_camp_2_guard_3
	INT eng_camp_2_guard_4
	INT eng_camp_2_guard_5
	INT eng_camp_2_guard_6

	//tower attack archer renco
	INT tower_attack_archer_recno_1
	INT tower_attack_archer_recno_2
	INT tower_attack_archer_recno_3
	INT tower_attack_archer_recno_4
	INT tower_attack_archer_recno_5
	INT tower_attack_archer_recno_6
	INT tower_attack_archer_recno_7
	INT tower_attack_archer_recno_8
	INT tower_attack_archer_recno_9
	INT tower_attack_archer_recno_10
	INT tower_attack_archer_recno_11
	INT tower_attack_archer_recno_12
	INT tower_attack_archer_recno_13
	INT tower_attack_archer_recno_14
	INT tower_attack_archer_recno_15
	INT tower_attack_archer_recno_16
	INT tower_attack_archer_recno_17
	INT tower_attack_archer_recno_18
	INT tower_attack_archer_recno_19
	INT tower_attack_archer_recno_20
	INT tower_attack_archer_recno_21
	INT tower_attack_archer_recno_22
	INT tower_attack_archer_recno_23
	INT tower_attack_archer_recno_24
	INT tower_attack_archer_recno_25
	INT tower_attack_archer_recno_26
	INT tower_attack_archer_recno_27
	INT tower_attack_archer_recno_28
	INT tower_attack_archer_recno_29
	INT tower_attack_archer_recno_30
	INT tower_attack_archer_recno_31
	INT tower_attack_archer_recno_32
	INT tower_attack_archer_recno_33
	INT tower_attack_archer_recno_34
	INT tower_attack_archer_recno_35
	INT tower_attack_archer_recno_36
	INT tower_attack_archer_recno_37
	INT tower_attack_archer_recno_38
	INT tower_attack_archer_recno_39

	INT fire_attack_archer_recno_2
	INT fire_attack_archer_recno_3

	//st pierre
	INT st_cross_1
	INT st_cross_2
	INT st_cross_3
	INT st_cross_4
	INT st_cross_5
	INT st_cross_6
	INT st_cross_7
	INT st_cross_ctrl_1
	INT st_cross_ctrl_2
	INT st_cross_ctrl_3
	INT st_cross_ctrl_4
	INT st_cross_ctrl_5
	INT st_cross_ctrl_6
	INT st_cross_ctrl_7

	//la charite siege
	INT bambard_1
	INT bambard_2
	INT bambard_3
	INT bambard_ctrl_1
	INT bambard_ctrl_2
	INT bambard_ctrl_3
	INT bambard_ctrl_4
	INT bambard_ctrl_5
	INT bambard_ctrl_6
	INT cross_1
	INT cross_2
	INT cross_3
	INT cross_4
	INT cross_5
	INT cross_6
	INT cross_7
	INT cross_8
	INT cross_9
	INT cross_10
	INT cross_11
	INT cross_ctrl_1
	INT cross_ctrl_2
	INT cross_ctrl_3
	INT cross_ctrl_4
	INT cross_ctrl_5
	INT cross_ctrl_6
	INT cross_ctrl_7
	INT cross_ctrl_8
	INT cross_ctrl_9
	INT cross_ctrl_10
	INT cross_ctrl_11

	//french
	INT unit_recno
	INT joan_recno
	INT lahire_recno
	INT	jean_recno
	INT	alencon_recno
	INT	orleans_recno

	//INT batterram_recno

	//english
	INT councillor_recno
	INT priest_recno
	
	//gold guard
	INT gold_guard_light_infant_1
	INT gold_guard_light_infant_2
	INT gold_guard_light_infant_3
	INT gold_guard_light_infant_4
	INT gold_guard_gold
	INT gold_guard_driver

	INT workshop_cannon_1
	INT workshop_cannon_2
	//INT workshop_cannon_3
	//INT workshop_cannon_4
	//INT workshop_cannon_5
	INT workshop_batterram_1
	//INT workshop_batterram_2
	//INT workshop_batterram_3
	INT workshop_fauconneaus_1
	INT workshop_fauconneaus_2
	//INT workshop_fauconneaus_3

	//eng camp
	INT eng_camp_cap_recno
	INT eng_camp_cap_recno_2
	INT eng_camp_archer_recno
	INT eng_camp_hvy_cap_recno
	INT eng_camp_hvy_cap_recno_2

	INT st_pierre_vanguard_infant_1
	INT st_pierre_vanguard_infant_2
	INT st_pierre_vanguard_infant_3
	INT st_pierre_vanguard_infant_4
	INT st_pierre_vanguard_archer_1
	INT st_pierre_vanguard_archer_2

	INT st_pierre_heavy_troop_infant_1
	INT st_pierre_heavy_troop_infant_2
	INT st_pierre_heavy_troop_infant_3
	INT st_pierre_heavy_troop_infant_4
	INT st_pierre_heavy_troop_poleman_1
	INT st_pierre_heavy_troop_poleman_2

	INT english_patrol_troop_1
	INT english_patrol_troop_2
	INT english_patrol_troop_3
	INT english_patrol_troop_4

	INT english_camp_captain
	INT english_camp_guard

	INT food_ambuse_troop_1
	INT food_ambuse_troop_2
	INT food_ambuse_troop_3


	//st pierre
					
	//recruit id
	INT recruit_id_a
	INT recruit_id_b
	INT workshop_recruit_id

	//spawn unit id 
	INT earcher_id
	INT elinfant_id
	INT ehinfant_id
	INT epoleman_id
	INT emaceman_id
	INT ecrossman_id

	INT barcher_id
	INT blinfant_id
	INT mlinfant_id
	INT marcher_id
	INT mexarcher_id
	INT mpoleman_id

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

	INT barchercap_id
	INT blinfantcap_id
	INT mlinfantcap_id
	INT marchercap_id
	INT mexarchercap_id
	INT mpolemancap_id
	INT gold_cart_id

	INT gold_cart_driver_id
	INT gressart_id
	INT gough_id
	INT martin_id

	INT cti1_id
	INT cti2_id
	INT cti3_id
	INT cti4_id
	INT cti5_id
	INT cti6_id
	
	//item id
	INT gold_id
	INT sword_id
	INT dragon_id
	INT dragonB_id
	INT letter_id
	INT pendant_id

	INT english_flag_id 
	INT french_flag_id 

	//gate id
	INT st_pierre_gate_recno 
	INT st_pierre_gate_recno_2 

	INT la_charite_gate_l_recno
	INT la_charite_gate_r_recno

	INT la_charite_wall_1_recno
	INT la_charite_wall_2_recno

	INT st_pierre_wall_1_recno
	INT st_pierre_wall_2_recno

	//inv wall
	INT invisible_wall_recno

	//food recno
	INT food_recno_1
	INT food_recno_2
	INT food_recno_3
	INT food_recno_4
	INT food_recno_5
	INT food_recno_6
	INT food_recno_7
	INT food_recno_8
	INT food_recno_9
	INT food_recno_10

	//init place recno
	INT place_recno_invisible_msg

	INT place_init_cut_scene_app_1
	INT place_init_cut_scene_app_2
	
	//french garrison
	INT place_recno_french_garrison
	INT place_recno_stpierre_barrack
	INT place_recno_attention_msg

	//small camp
	INT place_recno_french_camp_1
	INT place_recno_english_patrol_path
	INT place_recno_protect_trigger
	INT place_recno_councillor_app
	INT place_recno_english_camp_2
	INT place_recno_english_camp_3
	INT place_recno_english_camp_2_trigger

	//workshop
	INT place_recno_workshop1
	INT place_recno_workshop_cut_scene

	//st pierre
	INT place_church_approach
	INT place_church_arrived

	INT place_recno_st_pierre
	INT place_recno_st_pierre_2
	INT place_recno_st_pierre_3
	INT place_recno_st_pierre_radius
	INT place_recno_st_pierre_gold_end

	INT place_recno_st_pierre_outside
	INT place_recno_st_pierre_arrive
	INT place_recno_start_arrive
	INT place_recno_first_invasion
	INT place_recno_first_invasion_2

	INT place_recno_st_pierre_firework
	INT place_recno_st_pierre_firework_app_1
	INT place_recno_st_pierre_firework_app_2
	INT place_recno_st_pierre_firework_app_3
	INT place_recno_st_pierre_firework_app_4
	INT place_recno_st_pierre_firework_app_5
	INT place_recno_st_pierre_firework_app_6
	INT place_recno_st_pierre_firework_app_7
	INT place_recno_st_pierre_firework_app_8
	INT place_recno_st_pierre_firework_app_9

	INT place_recno_st_pierre_halt
	INT place_recno_st_pierre_bribe
	INT place_recno_st_pierre_archer_app

	INT place_recno_st_pierre_guard_pee
	INT place_recno_st_pierre_guard_stand
	INT place_recno_st_pierre_gate_2_triggered
	INT place_recno_st_pierre_cart_scene_trigger
	
	// english camp
	INT place_eng_camp
	INT place_eng_camp_outside
	INT place_eng_camp_3
	INT place_eng_camp_4
	INT place_eng_camp_5
	INT place_eng_camp_6
	INT place_eng_camp_7

	//st la charite
	INT place_recno_st_la_charite
	INT place_recno_gressart_retreat
	INT place_recno_invasion_center
	INT place_recno_invasion_left
	INT place_recno_invasion_right
	INT place_recno_st_la_charite_outside
	INT place_recno_run_up
	INT place_recno_st_la_charite_spawn

	//food place

	INT place_recno_food_1
	INT place_recno_food_2
	INT place_recno_food_3
	INT place_recno_food_msg
	INT place_recno_food_app
	INT place_recno_food_back_app_1
	INT place_recno_food_back_app_2
	INT place_recno_food_back_app_3
	
	INT place_recno_food_picked_up_spawn
	INT place_recno_food_picked_up_ambuse
	
	//gold start place
	INT place_recno_gold_start
	INT place_recno_gold_half_1
	INT place_recno_gold_half_2
	INT place_recno_gold_half_1_app
	INT place_recno_gold_half_2_app

	INT place_recno_priest_cut_scene
	INT place_recno_priest_cut_scene_msg

	INT place_recno_encounter_cut_scene_msg
	INT place_recno_eng_camp_enter_msg

	//french camp
	INT place_recno_priest_stand
	INT place_recno_priest_retreat
	INT place_recno_councillor_stand
	INT place_recno_councillor_retreat

	INT place_forest_recno

	//facility recno
	INT facility_recno_french_barrack
	INT facility_recno_french_recruit

	INT facility_recno_stpierre_barrack
	INT facility_recno_stpierre_recruit

	INT facility_recno_workshop
	INT facility_recno_cartman

	//shop
	INT weapon_shop_st_pierre_recno
	INT weapon_shop_st_thomas_recno
	INT potion_shop_st_pierre_recno

	//spawn barrack
	INT facility_spawn_gressart_retreat
	INT facility_spawn_gressart_retreat_2
	INT facility_spawn_perrinet_troop_1
	INT facility_spawn_perrinet_troop_2
	INT facility_spawn_perrinet_troop_3
	INT facility_spawn_perrinet_troop_4
	INT facility_spawn_perrinet_troop_5
	INT facility_spawn_perrinet_troop_6
	INT facility_spawn_perrinet_troop_7
	INT facility_spawn_perrinet_troop_8
	INT facility_spawn_perrinet_troop_9
	INT facility_spawn_perrinet_troop_10
	INT facility_spawn_perrinet_troop_11
	INT facility_spawn_perrinet_troop_12
	INT facility_spawn_perrinet_troop_13
	INT facility_spawn_perrinet_troop_14
	INT facility_spawn_perrinet_troop_15
	INT facility_spawn_perrinet_troop_16
	INT facility_spawn_perrinet_troop_17
	INT facility_spawn_perrinet_troop_18
	INT facility_spawn_perrinet_troop_19
	INT facility_spawn_perrinet_troop_20
	INT facility_recno_st_pierre_1
	INT facility_recno_st_pierre_2
	INT facility_recno_st_pierre_3
	INT facility_recno_st_pierre_4
	INT facility_recno_st_pierre_5
	INT facility_recno_st_pierre_6
	INT facility_recno_st_pierre_7
	INT facility_recno_st_pierre_8
	INT facility_recno_st_pierre_9
	INT facility_recno_st_pierre_10
	INT facility_recno_st_pierre_11
	INT facility_recno_st_pierre_12
	INT facility_recno_st_pierre_13
	INT facility_recno_st_pierre_14
	INT facility_recno_st_pierre_15
	INT facility_recno_st_pierre_16
	INT facility_recno_st_pierre_17
	INT facility_recno_st_pierre_18
	INT facility_recno_st_pierre_19
	INT facility_recno_st_pierre_20
	INT facility_recno_st_pierre_21
	INT facility_recno_st_pierre_22
	INT facility_recno_st_pierre_23
	INT facility_recno_st_pierre_24
	INT facility_recno_st_pierre_25
	INT facility_recno_st_pierre_26
	INT facility_recno_st_pierre_27
	INT facility_recno_st_pierre_28
	INT facility_recno_st_pierre_29
	INT facility_recno_st_pierre_30
	INT facility_recno_st_pierre_31
	INT facility_recno_st_pierre_32
	INT facility_recno_st_pierre_33
	INT facility_recno_st_pierre_34
	INT facility_recno_st_pierre_35
	INT facility_recno_st_pierre_36
	INT facility_recno_st_pierre_37
	INT facility_recno_st_pierre_38
	INT facility_recno_st_pierre_39
	INT facility_recno_st_pierre_40

	INT facility_recno_st_pierre_archer_1
	INT facility_recno_st_pierre_archer_2
	INT facility_recno_st_pierre_archer_3
	INT facility_recno_st_pierre_archer_4
	INT facility_recno_st_pierre_archer_5
	INT facility_recno_st_pierre_archer_6
	INT facility_recno_st_pierre_archer_7
	INT facility_recno_st_pierre_archer_8
	INT facility_recno_st_pierre_archer_9
	INT facility_recno_st_pierre_archer_10
	INT facility_recno_st_pierre_archer_11
	INT facility_recno_st_pierre_archer_12
	INT facility_recno_st_pierre_archer_13
	INT facility_recno_st_pierre_archer_14
	INT facility_recno_st_pierre_archer_15
	//INT facility_recno_st_pierre_archer_16
	INT facility_recno_st_pierre_archer_17
	INT facility_recno_st_pierre_archer_18
	INT facility_recno_st_pierre_archer_19
	INT facility_recno_st_pierre_archer_20
	INT facility_recno_st_pierre_archer_21
	INT facility_recno_st_pierre_archer_22
	INT facility_recno_st_pierre_archer_23
	//INT facility_recno_st_pierre_archer_24
	INT facility_recno_st_pierre_archer_25
	INT facility_recno_st_pierre_archer_26
	INT facility_recno_st_pierre_archer_27
	INT facility_recno_st_pierre_archer_28
	INT facility_recno_st_pierre_archer_29
	INT facility_recno_st_pierre_archer_30
	INT facility_recno_st_pierre_archer_31
	INT facility_recno_st_pierre_archer_32
	INT facility_recno_st_pierre_archer_33
	INT facility_recno_st_pierre_archer_34
	
	INT facility_recno_st_rierre_gate_2_spawn

	INT facility_recno_spawn_1 
	INT facility_recno_spawn_2 
	INT facility_recno_spawn_3 
	INT facility_recno_spawn_4  
	INT facility_recno_spawn_5 
	INT facility_recno_spawn_6 
	INT facility_recno_spawn_7 
	INT facility_recno_spawn_8  
	INT facility_recno_spawn_9 
	INT facility_recno_spawn_10 
	INT facility_recno_spawn_11 
	INT facility_recno_spawn_12 
	INT facility_recno_spawn_13 
	INT facility_recno_spawn_14 
	INT facility_recno_spawn_15
	INT facility_recno_spawn_16  
	INT facility_recno_spawn_gold  

	INT facility_recno_la_charite_spawn_1  
	INT facility_recno_la_charite_spawn_2 
	INT facility_recno_la_charite_spawn_3  
	INT facility_recno_la_charite_spawn_4  
	INT facility_recno_la_charite_spawn_5  
	INT facility_recno_la_charite_spawn_6  
	INT facility_recno_la_charite_spawn_7  
	INT facility_recno_la_charite_spawn_8  
	INT facility_recno_la_charite_spawn_9  
	INT facility_recno_la_charite_spawn_10  
	INT facility_recno_la_charite_spawn_11  
	INT facility_recno_la_charite_spawn_12  

	//priest spawn
	INT facility_recno_priest_spawn_1  
	INT facility_recno_priest_spawn_2
	INT facility_recno_priest_spawn_3
	INT facility_recno_priest_spawn_4
	INT facility_recno_priest_spawn_5
	INT facility_recno_priest_spawn_6
	INT facility_recno_priest_spawn_7
	INT facility_recno_priest_spawn_8  
	INT facility_recno_priest_spawn_9
	INT facility_recno_priest_spawn_10
	INT facility_recno_priest_spawn_11
	INT facility_recno_priest_spawn_12
	INT facility_recno_priest_spawn_13
	INT facility_recno_priest_spawn_14

	//citizen spawn
	INT facility_recno_citizen_spawn_1  
	INT facility_recno_citizen_spawn_2
	INT facility_recno_citizen_spawn_3
	INT facility_recno_citizen_spawn_4
	INT facility_recno_citizen_spawn_5
	INT facility_recno_citizen_spawn_6
	INT facility_recno_citizen_spawn_7
	INT facility_recno_citizen_spawn_8
	INT facility_recno_citizen_spawn_9
	INT facility_recno_citizen_spawn_10
	INT facility_recno_citizen_spawn_11
	INT facility_recno_citizen_spawn_12
	INT facility_recno_citizen_spawn_13
	INT facility_recno_citizen_spawn_14
	INT facility_recno_citizen_spawn_15
	INT facility_recno_citizen_spawn_16
	INT facility_recno_citizen_spawn_17
	INT facility_recno_citizen_spawn_18
	INT facility_recno_citizen_spawn_19
	INT facility_recno_citizen_spawn_20
	INT facility_recno_citizen_spawn_21
	INT facility_recno_citizen_spawn_22
	INT facility_recno_citizen_spawn_23
	INT facility_recno_citizen_spawn_24
	INT facility_recno_citizen_spawn_25
	INT facility_recno_citizen_spawn_26
	INT facility_recno_citizen_spawn_27
	INT facility_recno_citizen_spawn_28
	INT facility_recno_citizen_spawn_29
	INT facility_recno_citizen_spawn_30
	
	//middle gold spawn facility
	INT facility_recno_middle_spawn_1 
	INT facility_recno_middle_spawn_2 
	INT facility_recno_middle_spawn_3 
	INT facility_recno_middle_spawn_4  
	INT facility_recno_middle_spawn_5 
	INT facility_recno_middle_spawn_6 
	INT facility_recno_middle_spawn_7 
	INT facility_recno_middle_spawn_8  
	INT facility_recno_middle_spawn_9 
	INT facility_recno_middle_spawn_10 
	INT facility_recno_middle_spawn_11 
	INT facility_recno_middle_spawn_12 
	INT facility_recno_middle_spawn_13 
	INT facility_recno_middle_spawn_14 
	INT facility_recno_middle_spawn_15
	INT facility_recno_middle_spawn_16  
	INT facility_recno_middle_spawn_gold

	//la charite spawn
	INT facility_recno_la_charite_spawn_1
	INT facility_recno_la_charite_spawn_2
	INT facility_recno_la_charite_spawn_3
	INT facility_recno_la_charite_spawn_4
	INT facility_recno_la_charite_spawn_5
	INT facility_recno_la_charite_spawn_6
	INT facility_recno_la_charite_spawn_7
	INT facility_recno_la_charite_spawn_8
	INT facility_recno_la_charite_spawn_9
	INT facility_recno_la_charite_spawn_10
	INT facility_recno_la_charite_spawn_11
	INT facility_recno_la_charite_spawn_12
	INT facility_recno_la_charite_spawn_13
	INT facility_recno_la_charite_spawn_14
	INT facility_recno_la_charite_spawn_15
	INT facility_recno_la_charite_spawn_16
	INT facility_recno_la_charite_spawn_17
	INT facility_recno_la_charite_spawn_18
	INT facility_recno_la_charite_spawn_19
	INT facility_recno_la_charite_spawn_20
	INT facility_recno_la_charite_spawn_21
	INT facility_recno_la_charite_spawn_22
	INT facility_recno_la_charite_spawn_23
	INT facility_recno_la_charite_spawn_24
	INT facility_recno_la_charite_spawn_25
	INT facility_recno_la_charite_spawn_26
	INT facility_recno_la_charite_spawn_27
	INT facility_recno_la_charite_spawn_28
	INT facility_recno_la_charite_spawn_29
	INT facility_recno_la_charite_spawn_30
	INT facility_recno_la_charite_spawn_31
	INT facility_recno_la_charite_spawn_32
	INT facility_recno_la_charite_spawn_33
	INT facility_recno_la_charite_spawn_34
	INT facility_recno_la_charite_spawn_35
	INT facility_recno_la_charite_spawn_36
	INT facility_recno_la_charite_spawn_37
	INT facility_recno_la_charite_spawn_38
	INT facility_recno_la_charite_spawn_39
	INT facility_recno_la_charite_spawn_40

	//firework spawn facility
	INT facility_recno_firework_spawn_0 
	INT facility_recno_firework_spawn_1 
	INT facility_recno_firework_spawn_2 
	INT facility_recno_firework_spawn_3 
	INT facility_recno_firework_spawn_4  
	INT facility_recno_firework_spawn_5 
	INT facility_recno_firework_spawn_6 
	INT facility_recno_firework_spawn_7 
	INT facility_recno_firework_spawn_8  
	INT facility_recno_firework_spawn_9 
	INT facility_recno_firework_spawn_10 

	//eng camp 3 spawn
	INT facility_recno_eng_3_spawn_1 
	INT facility_recno_eng_3_spawn_2 
	INT facility_recno_eng_3_spawn_3 
	INT facility_recno_eng_3_spawn_4 
	INT facility_recno_eng_3_spawn_5 
	
	//food picked up spawn
	INT facility_recno_food_picked_spawn_1 
	INT facility_recno_food_picked_spawn_2
	INT facility_recno_food_picked_spawn_3 
	INT facility_recno_food_picked_spawn_4 
	INT facility_recno_food_picked_spawn_5 
	INT facility_recno_food_picked_spawn_6 

	//gold captured spawn
	INT facility_recno_gold_captured_1
	INT facility_recno_gold_captured_2
	INT facility_recno_gold_captured_3
	INT facility_recno_gold_captured_4
	INT facility_recno_gold_captured_5
	INT facility_recno_gold_captured_6
	INT facility_recno_gold_captured_7
	INT facility_recno_gold_captured_8
	INT facility_recno_gold_captured_9
	INT facility_recno_gold_captured_10
	INT facility_recno_gold_captured_11
	INT facility_recno_gold_captured_12
	
	//track id
	INT gold_cut_scene_track_id
	INT gold_track_id_1
	INT gold_track_id_2
	
	INT gold_track_go_vanguard_id_1
	INT gold_track_go_vanguard_id_2

	INT gold_track_gressart_id_1
	INT gold_track_gressart_id_2

	INT gold_track_back_vanguard_id_1
	INT gold_track_back_vanguard_id_2

	INT gold_track_back_gressart_id_1
	INT gold_track_back_gressart_id_2

	//script vars
	INT random_number 
	INT talk_unit_recno	
	INT curr_task
	INT add_gold_amount
	INT bool_var
	INT total_food
	
	INT unit_inside_flag

	INT unit_hp

	INT temp_unit_recno
	INT temp_item_recno

	INT team_member_count
	INT team_member_count_1
	INT team_member_count_2
	INT team_member_count_3

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

	INT jean_arrow_count
	
	init 
	{
		FUNC("set_kill_citizen_limit", 15)
		FUNC("set_kill_citizen_limit_2", 100)
		
		//french
		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")
		orleans_recno = FUNC("search_unit_by_name", "Bastard von Orleans")

		//batterram_recno = FUNC("search_unit_by_name", "Batterram")
		
		councillor_recno = FUNC("search_unit_by_name", "Philippe Barrillier")
		priest_recno = FUNC("search_unit_by_name", "Priest Alenard Goulier")
	
		workshop_cannon_1 = FUNC("search_unit_by_name", "cannon1")
		workshop_cannon_2 = FUNC("search_unit_by_name", "cannon2")
		//workshop_cannon_3 = FUNC("search_unit_by_name", "cannon3")
		//workshop_cannon_4 = FUNC("search_unit_by_name", "cannon4")
		//workshop_cannon_5 = FUNC("search_unit_by_name", "cannon5")
		workshop_batterram_1 = FUNC("search_unit_by_name", "bat1")
		//workshop_batterram_2 = FUNC("search_unit_by_name", "bat2")
		//workshop_batterram_3 = FUNC("search_unit_by_name", "bat3")
		workshop_fauconneaus_1 = FUNC("search_unit_by_name", "fau1")
		workshop_fauconneaus_2 = FUNC("search_unit_by_name", "fau2")
		//workshop_fauconneaus_3 = FUNC("search_unit_by_name", "fau3")

		//english
		//gressart_recno = FUNC("search_unit_by_name", "Perrinet Gressart")
		begley_recno = FUNC("search_unit_by_name", "Donziais Begley")
		hudleg_recno = FUNC("search_unit_by_name", "Vincent Hudleg")


		//gough_recno = FUNC("search_unit_by_name", "Matthew Gough")
		//burgundian_recno = FUNC("search_unit_by_name", "Baldric Keu")
		
		gate_guard_recno = FUNC("search_unit_by_name", "Gate Guard")
		worker_recno = FUNC("search_unit_by_name", "Geffron Kethill")
		eng_camp_cap_recno = FUNC("search_unit_by_name", "Alexander Egleton")
		eng_camp_cap_recno_2 = FUNC("search_unit_by_name", "Boniface Godewyn")
		eng_camp_archer_recno = FUNC("search_unit_by_name", "Johanne Dunnesby")
		eng_camp_hvy_cap_recno = FUNC("search_unit_by_name", "Raulf Gere")
		eng_camp_hvy_cap_recno_2 = FUNC("search_unit_by_name", "Eudo Cissor")

		church_cart_recno = FUNC("search_unit_by_name", "church gold cart")
		church_cartman_recno = FUNC("search_unit_by_name", "church cartman")

		camp_cart_recno = FUNC("search_unit_by_name", "Merchant Cart")
		//camp_cartman_recno = FUNC("search_unit_by_name", "camp cartman")

		la_charite_army_recno_1 = FUNC("search_unit_by_name", "Hamo Oydik")
		la_charite_army_recno_2 = FUNC("search_unit_by_name", "Herman Overton")
		la_charite_army_recno_3 = FUNC("search_unit_by_name", "Gyles Gilberd")
		la_charite_army_recno_4 = FUNC("search_unit_by_name", "Hastulphus One")
		la_charite_army_recno_5 = FUNC("search_unit_by_name", "Guidonis Brysetymbr")
		la_charite_army_recno_6 = FUNC("search_unit_by_name", "Henry Miles")
		la_charite_army_recno_7 = FUNC("search_unit_by_name", "Helmin Parson")
		la_charite_army_recno_8 = FUNC("search_unit_by_name", "Hubert Messager")
		la_charite_army_recno_9 = FUNC("search_unit_by_name", "Hugo Porter")
		la_charite_army_recno_10 = FUNC("search_unit_by_name", "Godhuwe Parco")
		la_charite_army_recno_11 = FUNC("search_unit_by_name", "Humphrey Prepositus")
		la_charite_army_recno_12 = FUNC("search_unit_by_name", "Guy Osberneby")
		la_charite_army_recno_13 = FUNC("search_unit_by_name", "Harvey Maydens")
		la_charite_army_recno_14 = FUNC("search_unit_by_name", "Charles Burgh")
		la_charite_army_recno_15 = FUNC("search_unit_by_name", "Gryffen Mauclerc")
		la_charite_army_recno_16 = FUNC("search_unit_by_name", "Asselin Porcer")
		la_charite_army_recno_17 = FUNC("search_unit_by_name", "Ingelram Molend")
		la_charite_army_recno_18 = FUNC("search_unit_by_name", "Anselm Pratt")

		//town_attacker_recno_1 = FUNC("search_unit_by_name", "Helmin Eng")
		//town_attacker_recno_2 = FUNC("search_unit_by_name", "Degare Multon")
		//town_attacker_recno_3 = FUNC("search_unit_by_name", "Alward Fiskerton")

					
		tower_attack_archer_recno_1 = FUNC("search_unit_by_name", "God'us Bardolf") 		
		tower_attack_archer_recno_2 = FUNC("search_unit_by_name", "Gouen Mylner") 		
		tower_attack_archer_recno_3 = FUNC("search_unit_by_name", "Filbert Nesse") 		
		tower_attack_archer_recno_4 = FUNC("search_unit_by_name", "Hugh Oakham") 		
		tower_attack_archer_recno_5 = FUNC("search_unit_by_name", "Godfridus Hogg") 		
		tower_attack_archer_recno_6 = FUNC("search_unit_by_name", "Henric Payn") 		
		tower_attack_archer_recno_7 = FUNC("search_unit_by_name", "Geoffrey Osbern") 		
		tower_attack_archer_recno_8 = FUNC("search_unit_by_name", "Nigel Morcott") 		
		tower_attack_archer_recno_9 = FUNC("search_unit_by_name", "Gawayn Peniman") 		
		tower_attack_archer_recno_10 = FUNC("search_unit_by_name", "Hereward Petit") 		
		tower_attack_archer_recno_11 = FUNC("search_unit_by_name", "Esmond Henrici") 		
		tower_attack_archer_recno_12 = FUNC("search_unit_by_name", "Godricus More") 		
		tower_attack_archer_recno_13 = FUNC("search_unit_by_name", "Eustace Harby") 		
		tower_attack_archer_recno_14 = FUNC("search_unit_by_name", "Dauit Gregor") 		
		tower_attack_archer_recno_15 = FUNC("search_unit_by_name", "Aslin Grimmescroft") 		

		eng_camp_2_guard_1 = FUNC("search_unit_by_name", "Gernagoun Geruax") 
		eng_camp_2_guard_2 = FUNC("search_unit_by_name", "Brian Euedon") 
		eng_camp_2_guard_3 = FUNC("search_unit_by_name", "Grimbaldus Glaston")
		eng_camp_2_guard_4 = FUNC("search_unit_by_name", "Christopher Gower")  
		eng_camp_2_guard_5 = FUNC("search_unit_by_name", "Bryan Fenton") 
		eng_camp_2_guard_6 = FUNC("search_unit_by_name", "Helmin Farewell") 
	
		//
		//tower_attack_archer_recno_17 = FUNC("search_unit_by_name", "Albin Picok") 		
		tower_attack_archer_recno_18 = FUNC("search_unit_by_name", "Althelard Beck") 		
		//tower_attack_archer_recno_19 = FUNC("search_unit_by_name", "Giles Cottesmore") 		
		tower_attack_archer_recno_20 = FUNC("search_unit_by_name", "Alexandr Gezors") 		
		//tower_attack_archer_recno_21 = FUNC("search_unit_by_name", "Alexandrus Bernard") 		
		//tower_attack_archer_recno_22 = FUNC("search_unit_by_name", "Eliseus Osse") 		
		//tower_attack_archer_recno_23 = FUNC("search_unit_by_name", "Alvered Brauncewell") 		
		tower_attack_archer_recno_24 = FUNC("search_unit_by_name", "Bernard Hutte") 		
		tower_attack_archer_recno_25 = FUNC("search_unit_by_name", "Frederyk Cok") 		
		//tower_attack_archer_recno_26 = FUNC("search_unit_by_name", "Fulk Iclysham") 		
		//tower_attack_archer_recno_27 = FUNC("search_unit_by_name", "Elis Imynghawe") 		
		tower_attack_archer_recno_28 = FUNC("search_unit_by_name", "Conand Holyn") 		
		tower_attack_archer_recno_29 = FUNC("search_unit_by_name", "Firmin Ku") 		
		tower_attack_archer_recno_30 = FUNC("search_unit_by_name", "Denston Halden") 		
		tower_attack_archer_recno_31 = FUNC("search_unit_by_name", "Albredus Pygot") 		
		tower_attack_archer_recno_32 = FUNC("search_unit_by_name", "Ebulus Hambleton") 		
		tower_attack_archer_recno_33 = FUNC("search_unit_by_name", "Echard Hampton") 		
		tower_attack_archer_recno_34 = FUNC("search_unit_by_name", "Dionisi Hill") 		
		tower_attack_archer_recno_35 = FUNC("search_unit_by_name", "Elya Pollard") 		
		tower_attack_archer_recno_36 = FUNC("search_unit_by_name", "Gocelin Clif") 		
		tower_attack_archer_recno_37 = FUNC("search_unit_by_name", "Eudo Honington") 		
		tower_attack_archer_recno_38 = FUNC("search_unit_by_name", "Ascun Hunston")
		tower_attack_archer_recno_39 = FUNC("search_unit_by_name", "Hastulf Palmere")

		//la charite siege
		bambard_1 = FUNC("search_unit_by_name", "bam1") 		
		bambard_2 = FUNC("search_unit_by_name", "bam2")
		bambard_3 = FUNC("search_unit_by_name", "bam3")
		bambard_ctrl_1 = FUNC("search_unit_by_name", "cbam1")
		bambard_ctrl_2 = FUNC("search_unit_by_name", "cbam2")
		bambard_ctrl_3 = FUNC("search_unit_by_name", "cbam3")
		bambard_ctrl_4 = FUNC("search_unit_by_name", "cbam4")
		bambard_ctrl_5 = FUNC("search_unit_by_name", "cbam5")
		bambard_ctrl_6 = FUNC("search_unit_by_name", "cbam6")

		st_cross_1 = FUNC("search_unit_by_name", "spc1")
		st_cross_2 = FUNC("search_unit_by_name", "spc2")
		st_cross_3 = FUNC("search_unit_by_name", "spc3")
		st_cross_4 = FUNC("search_unit_by_name", "spc4")
		st_cross_5 = FUNC("search_unit_by_name", "spc5")
		st_cross_6 = FUNC("search_unit_by_name", "spc6")
		st_cross_7 = FUNC("search_unit_by_name", "spc7")
		st_cross_ctrl_1 = FUNC("search_unit_by_name", "spcc1")
		st_cross_ctrl_2 = FUNC("search_unit_by_name", "spcc2")
		st_cross_ctrl_3 = FUNC("search_unit_by_name", "spcc3")
		st_cross_ctrl_4 = FUNC("search_unit_by_name", "spcc4")
		st_cross_ctrl_5 = FUNC("search_unit_by_name", "spcc5")
		st_cross_ctrl_6 = FUNC("search_unit_by_name", "spcc6")
		st_cross_ctrl_7 = FUNC("search_unit_by_name", "spcc7")

		prisoner_recno_1 = FUNC("search_unit_by_name", "pri1")
		prisoner_recno_2 = FUNC("search_unit_by_name", "pri2")
		prisoner_recno_3 = FUNC("search_unit_by_name", "pri3")
		prisoner_recno_4 = FUNC("search_unit_by_name", "pri4")
		prisoner_recno_5 = FUNC("search_unit_by_name", "pri5")
		prisoner_recno_6 = FUNC("search_unit_by_name", "pri6")
		prisoner_recno_7 = FUNC("search_unit_by_name", "pri7")
		prisoner_recno_8 = FUNC("search_unit_by_name", "pri8")
		prisoner_recno_9 = FUNC("search_unit_by_name", "pri9")
		prisoner_recno_10 = FUNC("search_unit_by_name", "pri10")
		prisoner_recno_11 = FUNC("search_unit_by_name", "pri11")
		prisoner_recno_12 = FUNC("search_unit_by_name", "pri12")
		prisoner_recno_13 = FUNC("search_unit_by_name", "pri13")
		prisoner_recno_14 = FUNC("search_unit_by_name", "pri14")
		prisoner_recno_15 = FUNC("search_unit_by_name", "pri15")
		prisoner_recno_16 = FUNC("search_unit_by_name", "pri16")
		prisoner_recno_17 = FUNC("search_unit_by_name", "pri17")
		prisoner_recno_18 = FUNC("search_unit_by_name", "pri18")
		prisoner_recno_19 = FUNC("search_unit_by_name", "pri19")
		prisoner_recno_20 = FUNC("search_unit_by_name", "pri20")
		prisoner_recno_21 = FUNC("search_unit_by_name", "pri21")
		prisoner_recno_22 = FUNC("search_unit_by_name", "pri22")
		prisoner_recno_23 = FUNC("search_unit_by_name", "pri23")
		prisoner_recno_24 = FUNC("search_unit_by_name", "pri24")

		cross_1 = FUNC("search_unit_by_name", "cross1")
		cross_2 = FUNC("search_unit_by_name", "cross2")
		cross_3 = FUNC("search_unit_by_name", "cross3")
		cross_4 = FUNC("search_unit_by_name", "cross4")
		cross_5 = FUNC("search_unit_by_name", "cross5")
		cross_6 = FUNC("search_unit_by_name", "cross6")
		cross_7 = FUNC("search_unit_by_name", "cross7")
		cross_8 = FUNC("search_unit_by_name", "cross8")
		cross_9 = FUNC("search_unit_by_name", "cross9")
		cross_10 = FUNC("search_unit_by_name", "cross10")
		cross_11 = FUNC("search_unit_by_name", "cross11")
		cross_ctrl_1 = FUNC("search_unit_by_name", "ccross1")
		cross_ctrl_2 = FUNC("search_unit_by_name", "ccross2")
		cross_ctrl_3 = FUNC("search_unit_by_name", "ccross3")
		cross_ctrl_4 = FUNC("search_unit_by_name", "ccross4")
		cross_ctrl_5 = FUNC("search_unit_by_name", "ccross5")
		cross_ctrl_6 = FUNC("search_unit_by_name", "ccross6")
		cross_ctrl_7 = FUNC("search_unit_by_name", "ccross7")
		cross_ctrl_8 = FUNC("search_unit_by_name", "ccross8")
		cross_ctrl_9 = FUNC("search_unit_by_name", "ccross9")
		cross_ctrl_10 = FUNC("search_unit_by_name", "ccross10")
		cross_ctrl_11 = FUNC("search_unit_by_name", "ccross11")
				
		english_patrol_troop_1 = FUNC("search_unit_by_name", "Boneface Hersaud") 
		english_patrol_troop_2 = FUNC("search_unit_by_name", "Edmund Gundy") 
		english_patrol_troop_3 = FUNC("search_unit_by_name", "Elias Benwyk") 
		english_patrol_troop_4 = FUNC("search_unit_by_name", "Andrew Prot") 

		food_ambuse_troop_1 = FUNC("search_unit_by_name", "Aslin Grimmescroft") 
		food_ambuse_troop_2 = FUNC("search_unit_by_name", "Gilbertus Gunyld") 
		food_ambuse_troop_3 = FUNC("search_unit_by_name", "Davy Clere") 

		//english_camp_captain = FUNC("search_unit_by_name", "Helmin Eng")
		english_camp_guard = FUNC("search_unit_by_name", "Grimbaldus Glaston")

		cut_scene_cart_force_recno_1 = FUNC("search_unit_by_name", "Swalle Champeneys")
		cut_scene_cart_force_recno_2 = FUNC("search_unit_by_name", "cs2")
		cut_scene_cart_force_recno_3 = FUNC("search_unit_by_name", "cs3")
		cut_scene_cart_force_recno_4 = FUNC("search_unit_by_name", "cs4")
		cut_scene_cart_force_recno_5 = FUNC("search_unit_by_name", "cs5")
		cut_scene_cart_force_recno_6 = FUNC("search_unit_by_name", "cs6")
		cut_scene_cart_force_recno_7 = FUNC("search_unit_by_name", "cs7")
		cut_scene_cart_force_recno_8 = FUNC("search_unit_by_name", "cs8")
		cut_scene_cart_force_recno_9 = FUNC("search_unit_by_name", "cs9")
		cut_scene_cart_force_recno_10 = FUNC("search_unit_by_name", "cs10")
		cut_scene_cart_cart_recno = FUNC("search_unit_by_name", "csh")
		cut_scene_cart_driver_recno = FUNC("search_unit_by_name", "Cartman")

		i_cut_scene_cart_force_recno_1 = FUNC("search_unit_by_name", "ics1")
		i_cut_scene_cart_force_recno_2 = FUNC("search_unit_by_name", "ics2")
		i_cut_scene_cart_force_recno_3 = FUNC("search_unit_by_name", "ics3")
		i_cut_scene_cart_force_recno_4 = FUNC("search_unit_by_name", "ics4")
		i_cut_scene_cart_force_recno_5 = FUNC("search_unit_by_name", "ics5")
		i_cut_scene_cart_force_recno_6 = FUNC("search_unit_by_name", "ics6")
		i_cut_scene_cart_force_recno_7 = FUNC("search_unit_by_name", "ics7")
		i_cut_scene_cart_force_recno_8 = FUNC("search_unit_by_name", "ics8")
		i_cut_scene_cart_force_recno_9 = FUNC("search_unit_by_name", "ics9")
		i_cut_scene_cart_force_recno_10 = FUNC("search_unit_by_name", "ics10")
		i_cut_scene_cart_cart_recno = FUNC("search_unit_by_name", "icsh")
		i_cut_scene_cart_driver_recno = FUNC("search_unit_by_name", "icsd")

		weapon_shop_st_pierre_recno = FUNC("search_facility_by_name" , "St-Pierre Weapon Shop") 
		weapon_shop_st_thomas_recno = FUNC("search_facility_by_name" , "St-Thomas Weapon Shop") 
		potion_shop_st_pierre_recno = FUNC("search_facility_by_name" , "St-Pierre Potion Shop") 
		weapon_seller_st_pierre_recno = FUNC("search_unit_by_name", "Wardley Orfroisier")
		weapon_seller_st_thomas_recno = FUNC("search_unit_by_name", "Nicolas Sueur")
		potion_seller_st_pierre_recno = FUNC("search_unit_by_name", "Alfonse Potier")
		
		//place recno
		place_recno_french_camp_1 = FUNC("search_place_by_name", "F1")
		place_recno_english_patrol_path = FUNC("search_place_by_name", "english patrol")
		place_recno_protect_trigger = FUNC("search_place_by_name", "protrect trigger place")
		place_recno_councillor_app = FUNC("search_place_by_name", "F1 councillor stand")
		place_recno_english_camp_2 = FUNC("search_place_by_name", "eng camp 2")
		place_recno_english_camp_3 = FUNC("search_place_by_name", "eng camp 3")
		place_recno_english_camp_2_trigger = FUNC("search_place_by_name", "eng 2 trigger")

		place_recno_workshop1 = FUNC("search_place_by_name", "workshop1 place")
		place_recno_workshop_cut_scene = FUNC("search_place_by_name", "workshop cutscene")

		place_recno_invisible_msg = FUNC("search_place_by_name", "inv msg")

		place_init_cut_scene_app_1 = FUNC("search_place_by_name", "ics_app_1")
		place_init_cut_scene_app_2 = FUNC("search_place_by_name", "ics_app_2")

		place_recno_french_garrison = FUNC("search_place_by_name", "french garrison")
		place_recno_stpierre_barrack = FUNC("search_place_by_name", "StPierre barrack")
		place_recno_attention_msg = FUNC("search_place_by_name", "F1 attention msg")

		place_recno_st_pierre = FUNC("search_place_by_name", "St Pierre")
		place_recno_st_pierre_2 = FUNC("search_place_by_name", "St Pierre2")
		place_recno_st_pierre_3 = FUNC("search_place_by_name", "St Pierre3")
		place_recno_st_pierre_radius = FUNC("search_place_by_name", "St Pierre radius")
		place_recno_st_pierre_outside = FUNC("search_place_by_name", "StPierre Outside")
		place_recno_st_pierre_arrive = FUNC("search_place_by_name", "gold arrive")
		place_recno_start_arrive = FUNC("search_place_by_name", "gold start arrive")

		place_recno_st_la_charite = FUNC("search_place_by_name", "St La Charite")
		place_recno_gressart_retreat = FUNC("search_place_by_name", "Gressart retreat")
		place_recno_run_up = FUNC("search_place_by_name", "run up")
		place_recno_st_la_charite_spawn = FUNC("search_place_by_name", "la charite spawn")

		place_recno_food_1 = FUNC("search_place_by_name", "food 1")
		place_recno_food_2 = FUNC("search_place_by_name", "food 2")
		place_recno_food_3 = FUNC("search_place_by_name", "food 3")
		place_recno_food_msg = FUNC("search_place_by_name", "food msg")

		place_recno_food_picked_up_spawn = FUNC("search_place_by_name", "food picked up")
		place_recno_food_picked_up_ambuse = FUNC("search_place_by_name", "picked up ambuse")
		place_recno_food_app = FUNC("search_place_by_name", "food app")
		place_recno_food_back_app_1 = FUNC("search_place_by_name", "food back app 1")
		place_recno_food_back_app_2 = FUNC("search_place_by_name", "food back app 2")
		place_recno_food_back_app_3 = FUNC("search_place_by_name", "food back app 3")

		place_recno_invasion_center = FUNC("search_place_by_name", "invasion center")
		place_recno_invasion_left = FUNC("search_place_by_name", "invasion left")
		place_recno_invasion_right = FUNC("search_place_by_name", "invasion right")
		place_recno_st_la_charite_outside = FUNC("search_place_by_name", "la charite outside")
				
		place_recno_st_pierre_gold_end = FUNC("search_place_by_name", "St Pierre gold end")
		place_recno_first_invasion = FUNC("search_place_by_name", "StPierre invasion")
		place_recno_first_invasion_2 = FUNC("search_place_by_name", "StPierre invasion b")

		place_recno_st_pierre_firework = FUNC("search_place_by_name", "st pierre firework")

		place_recno_st_pierre_firework_app_1 = FUNC("search_place_by_name", "fire app 1")
		place_recno_st_pierre_firework_app_2 = FUNC("search_place_by_name", "fire app 2")
		place_recno_st_pierre_firework_app_3 = FUNC("search_place_by_name", "fire app 3")
		place_recno_st_pierre_firework_app_4 = FUNC("search_place_by_name", "fire app 4")
		place_recno_st_pierre_firework_app_5 = FUNC("search_place_by_name", "fire app 5")
		place_recno_st_pierre_firework_app_6 = FUNC("search_place_by_name", "fire app 6")
		place_recno_st_pierre_firework_app_7 = FUNC("search_place_by_name", "fire app 7")
		place_recno_st_pierre_firework_app_8 = FUNC("search_place_by_name", "fire app 8")
		place_recno_st_pierre_firework_app_9 = FUNC("search_place_by_name", "fire app 9")

		place_recno_st_pierre_halt = FUNC("search_place_by_name", "st_pierre_halt")
		place_recno_st_pierre_bribe = FUNC("search_place_by_name", "st_pierre_bribe")
		place_recno_st_pierre_archer_app = FUNC("search_place_by_name", "st_pierre_archer_approach")

		place_recno_st_pierre_guard_pee = FUNC("search_place_by_name", "st_pierre_guard_pee")
		place_recno_st_pierre_guard_stand = FUNC("search_place_by_name", "st_pierre_guard_stand")
		place_recno_st_pierre_gate_2_triggered = FUNC("search_place_by_name", "gate 2 triggered")
		place_recno_st_pierre_cart_scene_trigger = FUNC("search_place_by_name", "cart scene trigger")

		place_eng_camp = FUNC("search_place_by_name", "eng camp")
		place_eng_camp_outside = FUNC("search_place_by_name", "eng camp outside")

		place_eng_camp_3 = FUNC("search_place_by_name", "eng camp 3")
		place_eng_camp_4 = FUNC("search_place_by_name", "eng camp 4")
		place_eng_camp_5 = FUNC("search_place_by_name", "eng camp 5")
		place_eng_camp_6 = FUNC("search_place_by_name", "eng camp 6")
		place_eng_camp_7 = FUNC("search_place_by_name", "eng camp 7")
			
		place_recno_gold_start = FUNC("search_place_by_name", "gold start spawn")
		place_recno_gold_half_1 = FUNC("search_place_by_name", "gold half way 1")
		place_recno_gold_half_2 = FUNC("search_place_by_name", "gold half way 2")

		place_recno_gold_half_1_app = FUNC("search_place_by_name", "gold half way 1 approach")
		place_recno_gold_half_2_app = FUNC("search_place_by_name", "gold half way 2 approach")

		place_church_approach = FUNC("search_place_by_name", "church_gold_app")
		place_church_arrived = FUNC("search_place_by_name", "church_gold_arrive")

		place_recno_priest_cut_scene = FUNC("search_place_by_name", "priest cut scene")
		place_recno_priest_cut_scene_msg = FUNC("search_place_by_name", "priest att msg")

		place_recno_encounter_cut_scene_msg = FUNC("search_place_by_name", "encounter")
		place_recno_eng_camp_enter_msg = FUNC("search_place_by_name", "eng camp enter")

		place_recno_priest_stand = FUNC("search_place_by_name", "priest stand")
		place_recno_priest_retreat = FUNC("search_place_by_name", "priest retreat")
		place_recno_councillor_stand = FUNC("search_place_by_name", "councillor stand")
		place_recno_councillor_retreat = FUNC("search_place_by_name", "councillor retreat")
		place_forest_recno = FUNC("search_place_by_name", "forest")
		
		//facility recno
		facility_recno_french_barrack = FUNC("search_facility_by_name" , "french barrack") 
		facility_recno_french_recruit = FUNC("search_facility_by_name" , "french recruit") 

		facility_recno_stpierre_barrack = FUNC("search_facility_by_name" , "St Pierre barrack spawn")  
		facility_recno_stpierre_recruit = FUNC("search_facility_by_name" , "StPierre Recruit") 

		facility_recno_workshop = FUNC("search_facility_by_name" , "workshop1") 
		
		//spawn
		facility_recno_spawn_1 = FUNC("search_facility_by_name", "gold start spawn 1")
		facility_recno_spawn_2 = FUNC("search_facility_by_name", "gold start spawn 2")
		facility_recno_spawn_3 = FUNC("search_facility_by_name", "gold start spawn 3")
		facility_recno_spawn_4 = FUNC("search_facility_by_name", "gold start spawn 4")
		facility_recno_spawn_5 = FUNC("search_facility_by_name", "gold start spawn 5")
		facility_recno_spawn_6 = FUNC("search_facility_by_name", "gold start spawn 6")
		facility_recno_spawn_7 = FUNC("search_facility_by_name", "gold start spawn 7")
		facility_recno_spawn_8 = FUNC("search_facility_by_name", "gold start spawn 8")
		facility_recno_spawn_9 = FUNC("search_facility_by_name", "gold start spawn 9")
		facility_recno_spawn_10 = FUNC("search_facility_by_name", "gold start spawn 10")
		facility_recno_spawn_11 = FUNC("search_facility_by_name", "gold start spawn 11")
		facility_recno_spawn_12 = FUNC("search_facility_by_name", "gold start spawn 12")
		facility_recno_spawn_13 = FUNC("search_facility_by_name", "gold start spawn 13")
		facility_recno_spawn_14 = FUNC("search_facility_by_name", "gold start spawn 14")
		facility_recno_spawn_15 = FUNC("search_facility_by_name", "gold start spawn 15")
		facility_recno_spawn_16 = FUNC("search_facility_by_name", "gold start spawn 16")
		facility_recno_spawn_gold = FUNC("search_facility_by_name", "gold start spawn gold")

		facility_recno_la_charite_spawn_1 = FUNC("search_facility_by_name", "la charite spawn 1")
		facility_recno_la_charite_spawn_2 = FUNC("search_facility_by_name", "la charite spawn 2")
		facility_recno_la_charite_spawn_3 = FUNC("search_facility_by_name", "la charite spawn 3")
		facility_recno_la_charite_spawn_4 = FUNC("search_facility_by_name", "la charite spawn 4") 
		facility_recno_la_charite_spawn_5 = FUNC("search_facility_by_name", "la charite spawn 5") 
		facility_recno_la_charite_spawn_6 = FUNC("search_facility_by_name", "la charite spawn 6") 
		facility_recno_la_charite_spawn_7 = FUNC("search_facility_by_name", "la charite spawn 7") 
		facility_recno_la_charite_spawn_8 = FUNC("search_facility_by_name", "la charite spawn 8") 
		facility_recno_la_charite_spawn_9 = FUNC("search_facility_by_name", "la charite spawn 9") 
		facility_recno_la_charite_spawn_10 = FUNC("search_facility_by_name", "la charite spawn 10") 
		facility_recno_la_charite_spawn_11 = FUNC("search_facility_by_name", "la charite spawn 11") 
		facility_recno_la_charite_spawn_12 = FUNC("search_facility_by_name", "la charite spawn 12") 

		//priest spawn
		facility_recno_priest_spawn_1 = FUNC("search_facility_by_name", "priest spawn 1") 
		facility_recno_priest_spawn_2 = FUNC("search_facility_by_name", "priest spawn 2") 
		facility_recno_priest_spawn_3 = FUNC("search_facility_by_name", "priest spawn 3") 
		facility_recno_priest_spawn_4 = FUNC("search_facility_by_name", "priest spawn 4") 
		facility_recno_priest_spawn_5 = FUNC("search_facility_by_name", "priest spawn 5") 
		facility_recno_priest_spawn_6 = FUNC("search_facility_by_name", "priest spawn 6") 
		facility_recno_priest_spawn_7 = FUNC("search_facility_by_name", "priest spawn 7") 
		facility_recno_priest_spawn_8 = FUNC("search_facility_by_name", "priest spawn 8")   
		facility_recno_priest_spawn_9 = FUNC("search_facility_by_name", "priest spawn 9") 
		facility_recno_priest_spawn_10 = FUNC("search_facility_by_name", "priest spawn 10") 
		facility_recno_priest_spawn_11 = FUNC("search_facility_by_name", "priest spawn 11") 
		facility_recno_priest_spawn_12 = FUNC("search_facility_by_name", "priest spawn 12") 
		facility_recno_priest_spawn_13 = FUNC("search_facility_by_name", "priest spawn 13") 
		facility_recno_priest_spawn_14 = FUNC("search_facility_by_name", "priest spawn 14") 

		facility_recno_middle_spawn_1 = FUNC("search_facility_by_name", "gold half way spawn 1")
		facility_recno_middle_spawn_2 = FUNC("search_facility_by_name", "gold half way spawn 2")
		facility_recno_middle_spawn_3 = FUNC("search_facility_by_name", "gold half way spawn 3")
		facility_recno_middle_spawn_4 = FUNC("search_facility_by_name", "gold half way spawn 4")
		facility_recno_middle_spawn_5 = FUNC("search_facility_by_name", "gold half way spawn 5")
		facility_recno_middle_spawn_6 = FUNC("search_facility_by_name", "gold half way spawn 6")
		facility_recno_middle_spawn_7 = FUNC("search_facility_by_name", "gold half way spawn 7")
		facility_recno_middle_spawn_8 = FUNC("search_facility_by_name", "gold half way spawn 8")
		facility_recno_middle_spawn_9 = FUNC("search_facility_by_name", "gold half way spawn 9")
		facility_recno_middle_spawn_10 = FUNC("search_facility_by_name", "gold half way spawn 10")
		facility_recno_middle_spawn_11 = FUNC("search_facility_by_name", "gold half way spawn 11")
		facility_recno_middle_spawn_12 = FUNC("search_facility_by_name", "gold half way spawn 12")
		facility_recno_middle_spawn_13 = FUNC("search_facility_by_name", "gold half way spawn 13")
		facility_recno_middle_spawn_14 = FUNC("search_facility_by_name", "gold half way spawn 14")
		facility_recno_middle_spawn_15 = FUNC("search_facility_by_name", "gold half way spawn 15")
		facility_recno_middle_spawn_16 = FUNC("search_facility_by_name", "gold half way spawn 16")
		facility_recno_middle_spawn_gold = FUNC("search_facility_by_name", "gold half way spawn gold")

		facility_recno_la_charite_spawn_1 = FUNC("search_facility_by_name", "la charite spawn 1")
		facility_recno_la_charite_spawn_2 = FUNC("search_facility_by_name", "la charite spawn 2")
		facility_recno_la_charite_spawn_3 = FUNC("search_facility_by_name", "la charite spawn 3")
		facility_recno_la_charite_spawn_4 = FUNC("search_facility_by_name", "la charite spawn 4")
		facility_recno_la_charite_spawn_5 = FUNC("search_facility_by_name", "la charite spawn 5")
		facility_recno_la_charite_spawn_6 = FUNC("search_facility_by_name", "la charite spawn 6")
		facility_recno_la_charite_spawn_7 = FUNC("search_facility_by_name", "la charite spawn 7")
		facility_recno_la_charite_spawn_8 = FUNC("search_facility_by_name", "la charite spawn 8")
		facility_recno_la_charite_spawn_9 = FUNC("search_facility_by_name", "la charite spawn 9")
		facility_recno_la_charite_spawn_10 = FUNC("search_facility_by_name", "la charite spawn 10")
		facility_recno_la_charite_spawn_11 = FUNC("search_facility_by_name", "la charite spawn 11")
		facility_recno_la_charite_spawn_12 = FUNC("search_facility_by_name", "la charite spawn 12")
		facility_recno_la_charite_spawn_13 = FUNC("search_facility_by_name", "la charite spawn 13")
		facility_recno_la_charite_spawn_14 = FUNC("search_facility_by_name", "la charite spawn 14")
		facility_recno_la_charite_spawn_15 = FUNC("search_facility_by_name", "la charite spawn 15")
		facility_recno_la_charite_spawn_16 = FUNC("search_facility_by_name", "la charite spawn 16")
		facility_recno_la_charite_spawn_17 = FUNC("search_facility_by_name", "la charite spawn 17")
		facility_recno_la_charite_spawn_18 = FUNC("search_facility_by_name", "la charite spawn 18")
		facility_recno_la_charite_spawn_19 = FUNC("search_facility_by_name", "la charite spawn 19")
		facility_recno_la_charite_spawn_20 = FUNC("search_facility_by_name", "la charite spawn 20")
		facility_recno_la_charite_spawn_21 = FUNC("search_facility_by_name", "la charite spawn 21")
		facility_recno_la_charite_spawn_22 = FUNC("search_facility_by_name", "la charite spawn 22")
		facility_recno_la_charite_spawn_23 = FUNC("search_facility_by_name", "la charite spawn 23")
		facility_recno_la_charite_spawn_24 = FUNC("search_facility_by_name", "la charite spawn 24")
		facility_recno_la_charite_spawn_25 = FUNC("search_facility_by_name", "la charite spawn 25")
		facility_recno_la_charite_spawn_26 = FUNC("search_facility_by_name", "la charite spawn 26")
		facility_recno_la_charite_spawn_27 = FUNC("search_facility_by_name", "la charite spawn 27")
		facility_recno_la_charite_spawn_28 = FUNC("search_facility_by_name", "la charite spawn 28")
		facility_recno_la_charite_spawn_29 = FUNC("search_facility_by_name", "la charite spawn 29")
		facility_recno_la_charite_spawn_30 = FUNC("search_facility_by_name", "la charite spawn 30")
		facility_recno_la_charite_spawn_31 = FUNC("search_facility_by_name", "la charite spawn 31")
		facility_recno_la_charite_spawn_32 = FUNC("search_facility_by_name", "la charite spawn 32")
		facility_recno_la_charite_spawn_33 = FUNC("search_facility_by_name", "la charite spawn 33")
		facility_recno_la_charite_spawn_34 = FUNC("search_facility_by_name", "la charite spawn 34")
		facility_recno_la_charite_spawn_35 = FUNC("search_facility_by_name", "la charite spawn 35")
		facility_recno_la_charite_spawn_36 = FUNC("search_facility_by_name", "la charite spawn 36")
		facility_recno_la_charite_spawn_37 = FUNC("search_facility_by_name", "la charite spawn 37")
		facility_recno_la_charite_spawn_38 = FUNC("search_facility_by_name", "la charite spawn 38")
		facility_recno_la_charite_spawn_39 = FUNC("search_facility_by_name", "la charite spawn 39")
		facility_recno_la_charite_spawn_40 = FUNC("search_facility_by_name", "la charite spawn 40")

		//firework spawn facility
		facility_recno_firework_spawn_0 = FUNC("search_facility_by_name", "firework spawn 0") 
		facility_recno_firework_spawn_1 = FUNC("search_facility_by_name", "firework spawn 1") 
		facility_recno_firework_spawn_2 = FUNC("search_facility_by_name", "firework spawn 2") 
		facility_recno_firework_spawn_3 = FUNC("search_facility_by_name", "firework spawn 3") 
		facility_recno_firework_spawn_4 = FUNC("search_facility_by_name", "firework spawn 4")  
		facility_recno_firework_spawn_5 = FUNC("search_facility_by_name", "firework spawn 5") 
		facility_recno_firework_spawn_6 = FUNC("search_facility_by_name", "firework spawn 6") 
		facility_recno_firework_spawn_7 = FUNC("search_facility_by_name", "firework spawn 7") 
		facility_recno_firework_spawn_8 = FUNC("search_facility_by_name", "firework spawn 8") 
		facility_recno_firework_spawn_9 = FUNC("search_facility_by_name", "firework spawn 9") 
		facility_recno_firework_spawn_10 = FUNC("search_facility_by_name", "firework spawn 10") 

		facility_recno_eng_3_spawn_1 = FUNC("search_facility_by_name", "eng 3 spawn 1")
		facility_recno_eng_3_spawn_2 = FUNC("search_facility_by_name", "eng 3 spawn 2")
		facility_recno_eng_3_spawn_3 = FUNC("search_facility_by_name", "eng 3 spawn 3")
		facility_recno_eng_3_spawn_4 = FUNC("search_facility_by_name", "eng 3 spawn 4")
		facility_recno_eng_3_spawn_5 = FUNC("search_facility_by_name", "eng 3 spawn 5")

		facility_recno_food_picked_spawn_1 = FUNC("search_facility_by_name", "picked up spawn 1")
		facility_recno_food_picked_spawn_2 = FUNC("search_facility_by_name", "picked up spawn 2")
		facility_recno_food_picked_spawn_3 = FUNC("search_facility_by_name", "picked up spawn 3")
		facility_recno_food_picked_spawn_4 = FUNC("search_facility_by_name", "picked up spawn 4")
		facility_recno_food_picked_spawn_5 = FUNC("search_facility_by_name", "picked up spawn 5")
		facility_recno_food_picked_spawn_6 = FUNC("search_facility_by_name", "picked up spawn 6")
		 	
		facility_recno_gold_captured_1 = FUNC("search_facility_by_name", "gold captured spawn 1")
		facility_recno_gold_captured_2 = FUNC("search_facility_by_name", "gold captured spawn 2")
		facility_recno_gold_captured_3 = FUNC("search_facility_by_name", "gold captured spawn 3")
		facility_recno_gold_captured_4 = FUNC("search_facility_by_name", "gold captured spawn 4")
		facility_recno_gold_captured_5 = FUNC("search_facility_by_name", "gold captured spawn 5")
		facility_recno_gold_captured_6 = FUNC("search_facility_by_name", "gold captured spawn 6")
		facility_recno_gold_captured_7 = FUNC("search_facility_by_name", "gold captured spawn 7")
		facility_recno_gold_captured_8 = FUNC("search_facility_by_name", "gold captured spawn 8")
		facility_recno_gold_captured_9 = FUNC("search_facility_by_name", "gold captured spawn 9")
		facility_recno_gold_captured_10 = FUNC("search_facility_by_name", "gold captured spawn 10")
		facility_recno_gold_captured_11 = FUNC("search_facility_by_name", "gold captured spawn 11")
		facility_recno_gold_captured_12 = FUNC("search_facility_by_name", "gold captured spawn 12")
		
		facility_recno_st_pierre_1 = FUNC("search_facility_by_name", "St Pierre spawn 1")
		facility_recno_st_pierre_2 = FUNC("search_facility_by_name", "St Pierre spawn 2")
		facility_recno_st_pierre_3 = FUNC("search_facility_by_name", "St Pierre spawn 3")
		facility_recno_st_pierre_4 = FUNC("search_facility_by_name", "St Pierre spawn 4")
		facility_recno_st_pierre_5 = FUNC("search_facility_by_name", "St Pierre spawn 5")
		facility_recno_st_pierre_6 = FUNC("search_facility_by_name", "St Pierre spawn 6")
		facility_recno_st_pierre_7 = FUNC("search_facility_by_name", "St Pierre spawn 7")
		facility_recno_st_pierre_8 = FUNC("search_facility_by_name", "St Pierre spawn 8")
		facility_recno_st_pierre_9 = FUNC("search_facility_by_name", "St Pierre spawn 9")
		facility_recno_st_pierre_10 = FUNC("search_facility_by_name", "St Pierre spawn 10")

		facility_recno_st_pierre_11 = FUNC("search_facility_by_name", "St Pierre spawn 11")
		facility_recno_st_pierre_12 = FUNC("search_facility_by_name", "St Pierre spawn 12")
		facility_recno_st_pierre_13 = FUNC("search_facility_by_name", "St Pierre spawn 13")
		facility_recno_st_pierre_14 = FUNC("search_facility_by_name", "St Pierre spawn 14")
		facility_recno_st_pierre_15 = FUNC("search_facility_by_name", "St Pierre spawn 15")

		facility_recno_st_pierre_16 = FUNC("search_facility_by_name", "St Pierre spawn 16")
		facility_recno_st_pierre_17 = FUNC("search_facility_by_name", "St Pierre spawn 17")
		facility_recno_st_pierre_18 = FUNC("search_facility_by_name", "St Pierre spawn 18")
		facility_recno_st_pierre_19 = FUNC("search_facility_by_name", "St Pierre spawn 19")
		facility_recno_st_pierre_20 = FUNC("search_facility_by_name", "St Pierre spawn 20")

		facility_recno_st_pierre_21 = FUNC("search_facility_by_name", "St Pierre spawn 21")
		facility_recno_st_pierre_22 = FUNC("search_facility_by_name", "St Pierre spawn 22")
		facility_recno_st_pierre_23 = FUNC("search_facility_by_name", "St Pierre spawn 23")
		facility_recno_st_pierre_24 = FUNC("search_facility_by_name", "St Pierre spawn 24")
		facility_recno_st_pierre_25 = FUNC("search_facility_by_name", "St Pierre spawn 25")

		facility_recno_st_pierre_26 = FUNC("search_facility_by_name", "St Pierre spawn 26")
		facility_recno_st_pierre_27 = FUNC("search_facility_by_name", "St Pierre spawn 27")
		facility_recno_st_pierre_28 = FUNC("search_facility_by_name", "St Pierre spawn 28")
		facility_recno_st_pierre_29 = FUNC("search_facility_by_name", "St Pierre spawn 29")
		facility_recno_st_pierre_30 = FUNC("search_facility_by_name", "St Pierre spawn 30")

		facility_recno_st_pierre_31 = FUNC("search_facility_by_name", "St Pierre spawn 31")
		facility_recno_st_pierre_32 = FUNC("search_facility_by_name", "St Pierre spawn 32")
		facility_recno_st_pierre_33 = FUNC("search_facility_by_name", "St Pierre spawn 33")
		facility_recno_st_pierre_34 = FUNC("search_facility_by_name", "St Pierre spawn 34")
		facility_recno_st_pierre_35 = FUNC("search_facility_by_name", "St Pierre spawn 35")

		facility_recno_st_pierre_36 = FUNC("search_facility_by_name", "St Pierre spawn 36")
		facility_recno_st_pierre_37 = FUNC("search_facility_by_name", "St Pierre spawn 37")
		facility_recno_st_pierre_38 = FUNC("search_facility_by_name", "St Pierre spawn 38")
		facility_recno_st_pierre_39 = FUNC("search_facility_by_name", "St Pierre spawn 39")
		facility_recno_st_pierre_40 = FUNC("search_facility_by_name", "St Pierre spawn 40")

		facility_recno_st_pierre_archer_1 = FUNC("search_facility_by_name", "st pierre archer spawn 1")
		facility_recno_st_pierre_archer_2 = FUNC("search_facility_by_name", "st pierre archer spawn 2")
		facility_recno_st_pierre_archer_3 = FUNC("search_facility_by_name", "st pierre archer spawn 3")
		facility_recno_st_pierre_archer_4 = FUNC("search_facility_by_name", "st pierre archer spawn 4")
		facility_recno_st_pierre_archer_5 = FUNC("search_facility_by_name", "st pierre archer spawn 5")
		facility_recno_st_pierre_archer_6 = FUNC("search_facility_by_name", "st pierre archer spawn 6")
		facility_recno_st_pierre_archer_7 = FUNC("search_facility_by_name", "st pierre archer spawn 7")
		facility_recno_st_pierre_archer_8 = FUNC("search_facility_by_name", "st pierre archer spawn 8")
		facility_recno_st_pierre_archer_9 = FUNC("search_facility_by_name", "st pierre archer spawn 9")
		facility_recno_st_pierre_archer_10 = FUNC("search_facility_by_name", "st pierre archer spawn 10")

		facility_recno_st_pierre_archer_11 = FUNC("search_facility_by_name", "st pierre archer spawn 11")
		facility_recno_st_pierre_archer_12 = FUNC("search_facility_by_name", "st pierre archer spawn 12")
		facility_recno_st_pierre_archer_13 = FUNC("search_facility_by_name", "st pierre archer spawn 13")
		facility_recno_st_pierre_archer_14 = FUNC("search_facility_by_name", "st pierre archer spawn 14")
		facility_recno_st_pierre_archer_15 = FUNC("search_facility_by_name", "st pierre archer spawn 15")

		//facility_recno_st_pierre_archer_16 = FUNC("search_facility_by_name", "st pierre archer spawn 16")
		facility_recno_st_pierre_archer_17 = FUNC("search_facility_by_name", "st pierre archer spawn 17")
		facility_recno_st_pierre_archer_18 = FUNC("search_facility_by_name", "st pierre archer spawn 18")
		facility_recno_st_pierre_archer_19 = FUNC("search_facility_by_name", "st pierre archer spawn 19")
		facility_recno_st_pierre_archer_20 = FUNC("search_facility_by_name", "st pierre archer spawn 20")

		facility_recno_st_pierre_archer_21 = FUNC("search_facility_by_name", "st pierre archer spawn 21")
		facility_recno_st_pierre_archer_22 = FUNC("search_facility_by_name", "st pierre archer spawn 22")
		facility_recno_st_pierre_archer_23 = FUNC("search_facility_by_name", "st pierre archer spawn 23")
		//facility_recno_st_pierre_archer_24 = FUNC("search_facility_by_name", "st pierre archer spawn 24")
		facility_recno_st_pierre_archer_25 = FUNC("search_facility_by_name", "st pierre archer spawn 25")

		facility_recno_st_pierre_archer_26 = FUNC("search_facility_by_name", "st pierre archer spawn 26")
		facility_recno_st_pierre_archer_27 = FUNC("search_facility_by_name", "st pierre archer spawn 27")
		facility_recno_st_pierre_archer_28 = FUNC("search_facility_by_name", "st pierre archer spawn 28")
		facility_recno_st_pierre_archer_29 = FUNC("search_facility_by_name", "st pierre archer spawn 29")
		facility_recno_st_pierre_archer_30 = FUNC("search_facility_by_name", "st pierre archer spawn 30")

		facility_recno_st_pierre_archer_31 = FUNC("search_facility_by_name", "st pierre archer spawn 31")
		facility_recno_st_pierre_archer_32 = FUNC("search_facility_by_name", "st pierre archer spawn 32")
		facility_recno_st_pierre_archer_33 = FUNC("search_facility_by_name", "st pierre archer spawn 33")
		facility_recno_st_pierre_archer_34 = FUNC("search_facility_by_name", "st pierre archer spawn 34")
		
		facility_recno_st_rierre_gate_2_spawn = FUNC("search_facility_by_name", "gate 2 spawn")

		facility_recno_citizen_spawn_1 = FUNC("search_facility_by_name", "cti1") 
		facility_recno_citizen_spawn_2 = FUNC("search_facility_by_name", "cti2") 
		facility_recno_citizen_spawn_3 = FUNC("search_facility_by_name", "cti3") 
		facility_recno_citizen_spawn_4 = FUNC("search_facility_by_name", "cti4") 
		facility_recno_citizen_spawn_5 = FUNC("search_facility_by_name", "cti5") 
		facility_recno_citizen_spawn_6 = FUNC("search_facility_by_name", "cti6") 
		facility_recno_citizen_spawn_7 = FUNC("search_facility_by_name", "cti7") 
		facility_recno_citizen_spawn_8 = FUNC("search_facility_by_name", "cti8") 
		facility_recno_citizen_spawn_9 = FUNC("search_facility_by_name", "cti9") 
		facility_recno_citizen_spawn_10 = FUNC("search_facility_by_name", "cti10") 
		facility_recno_citizen_spawn_11 = FUNC("search_facility_by_name", "cti11") 
		facility_recno_citizen_spawn_12 = FUNC("search_facility_by_name", "cti12") 
		facility_recno_citizen_spawn_13 = FUNC("search_facility_by_name", "cti13") 
		facility_recno_citizen_spawn_14 = FUNC("search_facility_by_name", "cti14") 
		facility_recno_citizen_spawn_15 = FUNC("search_facility_by_name", "cti15") 
		facility_recno_citizen_spawn_16 = FUNC("search_facility_by_name", "cti16") 
		facility_recno_citizen_spawn_17 = FUNC("search_facility_by_name", "cti17") 
		facility_recno_citizen_spawn_18 = FUNC("search_facility_by_name", "cti18") 
		facility_recno_citizen_spawn_19 = FUNC("search_facility_by_name", "cti19") 
		facility_recno_citizen_spawn_20 = FUNC("search_facility_by_name", "cti20") 
		facility_recno_citizen_spawn_21 = FUNC("search_facility_by_name", "cti21") 
		facility_recno_citizen_spawn_22 = FUNC("search_facility_by_name", "cti22") 
		facility_recno_citizen_spawn_23 = FUNC("search_facility_by_name", "cti23") 
		facility_recno_citizen_spawn_24 = FUNC("search_facility_by_name", "cti24") 
		facility_recno_citizen_spawn_25 = FUNC("search_facility_by_name", "cti25") 
		facility_recno_citizen_spawn_26 = FUNC("search_facility_by_name", "cti26") 
		facility_recno_citizen_spawn_27 = FUNC("search_facility_by_name", "cti27") 
		facility_recno_citizen_spawn_28 = FUNC("search_facility_by_name", "cti28") 
		facility_recno_citizen_spawn_29 = FUNC("search_facility_by_name", "cti29") 
		facility_recno_citizen_spawn_30 = FUNC("search_facility_by_name", "cti30") 
		

		facility_spawn_gressart_retreat = FUNC("search_facility_by_name", "Gressart retreat spawn")
		facility_spawn_gressart_retreat_2 = FUNC("search_facility_by_name", "gressart retreat 2")
		facility_spawn_perrinet_troop_1 = FUNC("search_facility_by_name", "perrinet troop spawn 1")
		facility_spawn_perrinet_troop_2 = FUNC("search_facility_by_name", "perrinet troop spawn 2")
		facility_spawn_perrinet_troop_3 = FUNC("search_facility_by_name", "perrinet troop spawn 3")
		facility_spawn_perrinet_troop_4 = FUNC("search_facility_by_name", "perrinet troop spawn 4")
		facility_spawn_perrinet_troop_5 = FUNC("search_facility_by_name", "perrinet troop spawn 5")
		facility_spawn_perrinet_troop_6 = FUNC("search_facility_by_name", "perrinet troop spawn 6")
		facility_spawn_perrinet_troop_7 = FUNC("search_facility_by_name", "perrinet troop spawn 7")
		facility_spawn_perrinet_troop_8 = FUNC("search_facility_by_name", "perrinet troop spawn 8")
		facility_spawn_perrinet_troop_9 = FUNC("search_facility_by_name", "perrinet troop spawn 9")
		facility_spawn_perrinet_troop_10 = FUNC("search_facility_by_name", "perrinet troop spawn 10")
		facility_spawn_perrinet_troop_11 = FUNC("search_facility_by_name", "perrinet troop spawn 11")
		facility_spawn_perrinet_troop_12 = FUNC("search_facility_by_name", "perrinet troop spawn 12")
		facility_spawn_perrinet_troop_13 = FUNC("search_facility_by_name", "perrinet troop spawn 13")
		facility_spawn_perrinet_troop_14 = FUNC("search_facility_by_name", "perrinet troop spawn 14")
		facility_spawn_perrinet_troop_15 = FUNC("search_facility_by_name", "perrinet troop spawn 15")
		facility_spawn_perrinet_troop_16 = FUNC("search_facility_by_name", "perrinet troop spawn 16")
		facility_spawn_perrinet_troop_17 = FUNC("search_facility_by_name", "perrinet troop spawn 17")
		facility_spawn_perrinet_troop_18 = FUNC("search_facility_by_name", "perrinet troop spawn 18")
		facility_spawn_perrinet_troop_19 = FUNC("search_facility_by_name", "perrinet troop spawn 19")
		facility_spawn_perrinet_troop_20 = FUNC("search_facility_by_name", "perrinet troop spawn 20")

		//gate id
		st_pierre_gate_recno = FUNC("search_item_by_name", "StPierre gate")
		st_pierre_gate_recno_2 = FUNC("search_item_by_name", "StPierre gate 2") 
		la_charite_gate_l_recno = FUNC("search_item_by_name", "la charite l gate")
		la_charite_gate_r_recno = FUNC("search_item_by_name", "la charite r gate")

		la_charite_wall_1_recno = FUNC("search_item_by_name", "wall")
		la_charite_wall_2_recno = FUNC("search_item_by_name", "wall2")

		st_pierre_wall_1_recno = FUNC("search_item_by_name", "StPierre wall 1")
		st_pierre_wall_2_recno = FUNC("search_item_by_name", "StPierre wall 2")

		invisible_wall_recno = FUNC("search_item_by_name", "inv")
		
		//unit_id
		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") 

		blinfant_id = FUNC("unit_code_to_id", "BUR_LIGHTINFANTRY") 
		FUNC("add_unit_ref", "BUR_LIGHTINFANTRY") 
		mlinfant_id = FUNC("unit_code_to_id", "MER_LIGHT_INFANTRY") 
		FUNC("add_unit_ref", "MER_LIGHT_INFANTRY") 
		marcher_id = FUNC("unit_code_to_id", "MER_ARCHER") 
		FUNC("add_unit_ref", "MER_ARCHER") 
		mexarcher_id = FUNC("unit_code_to_id", "MER_EX_ARCHER") 
		FUNC("add_unit_ref", "MER_EX_ARCHER") 
		mpoleman_id = FUNC("unit_code_to_id", "MER_POLEMAN") 
		FUNC("add_unit_ref", "MER_POLEMAN") 
		barcher_id = FUNC("unit_code_to_id", "BUR_ARCHER") 
		FUNC("add_unit_ref", "BUR_ARCHER") 
		
		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") 

		blinfantcap_id = FUNC("unit_code_to_id", "BUR_LIGHTINFANTRY_CAPTAIN") 
		FUNC("add_unit_ref", "BUR_LIGHTINFANTRY_CAPTAIN") 
		mlinfantcap_id = FUNC("unit_code_to_id", "MER_LIGHT_INFANTRY_CAPTAIN") 
		FUNC("add_unit_ref", "MER_LIGHTINFANTRY_CAPTAIN") 
		marchercap_id = FUNC("unit_code_to_id", "MER_ARCHER_CAPTAIN") 
		FUNC("add_unit_ref", "MER_ARCHER_CAPTAIN") 
		barchercap_id = FUNC("unit_code_to_id", "BUR_ARCHER_CAPTAIN") 
		FUNC("add_unit_ref", "BUR_ARCHER_CAPTAIN") 
		mexarchercap_id = FUNC("unit_code_to_id", "MER_EX_ARCHER_CAPTAIN") 
		FUNC("add_unit_ref", "MER_EX_ARCHER_CAPTAIN") 
		mpolemancap_id = FUNC("unit_code_to_id", "MER_POLEMAN_CAPTAIN") 
		FUNC("add_unit_ref", "MER_POLEMAN_CAPTAIN") 
		gold_cart_id = FUNC("unit_code_to_id", "GOLD_CART") 
		FUNC("add_unit_ref", "GOLD_CART") 
		gold_cart_driver_id = FUNC("unit_code_to_id", "CITIZEN_01_2")
		FUNC("add_unit_ref", "CITIZEN_01_2") 
		gressart_id = FUNC("unit_code_to_id", "Perrinet" )
		FUNC("add_unit_ref", "Perrinet") 
		gough_id = FUNC("unit_code_to_id", "MATTHEWGOUGH" )
		FUNC("add_unit_ref", "MATTHEWGOUGH") 
		martin_id = FUNC("unit_code_to_id", "MARTINGOUGH" )
		FUNC("add_unit_ref", "MARTINGOUGH") 


		cti1_id = FUNC("unit_code_to_id", "CITIZEN_01" )
		FUNC("add_unit_ref", "CITIZEN_01") 
		cti2_id = FUNC("unit_code_to_id", "CITIZEN_02A" )
		FUNC("add_unit_ref", "CITIZEN_02A") 
		cti3_id = FUNC("unit_code_to_id", "CITIZEN_02B" )
		FUNC("add_unit_ref", "CITIZEN_02B") 
		cti4_id = FUNC("unit_code_to_id", "CITIZEN_03" )
		FUNC("add_unit_ref", "CITIZEN_03")
		cti5_id = FUNC("unit_code_to_id", "CITIZEN_04A" )
		FUNC("add_unit_ref", "CITIZEN_04A")
		cti6_id = FUNC("unit_code_to_id", "CITIZEN_04B" )
		FUNC("add_unit_ref", "CITIZEN_04B")

		//item id
		gold_id = FUNC( "item_code_to_id", "S7_GOLDBAR")
	//	sword_id = FUNC( "item_code_to_id", "JOAN_SWORD_LV7")
		sword_id = FUNC( "item_code_to_id", "pa_volgue")
		dragon_id = FUNC( "item_code_to_id", "JOAN_SWORD_LV6")
		dragonB_id = FUNC( "item_code_to_id", "Dragoncbow")
		pendant_id = FUNC( "item_code_to_id", "S7_Livinggod")
		letter_id = FUNC( "item_code_to_id", "flyletter06")


		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" )

		//FUNC("set_can_interact_flag", weapon_seller_st_pierre_recno, 1)
		//FUNC("set_can_interact_flag", potion_seller_st_pierre_recno, 1)
		FUNC("set_can_interact_flag", weapon_seller_st_thomas_recno, 1)

		//track id

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

		flag_cart_cut_scene = FUNC("get_scenario_bit_flag", 18)
		
		if( flag_cart_cut_scene )
		{
			FUNC("set_minimap_display_gold_enable" , 1)
		}

		//set minimap icon

		if( flag_workshop_captured )
		{
			FUNC("set_territory_nation", "de l 'atelier", "French")
		}

		if(FUNC( "get_place_captured" , place_eng_camp) == 1)
		{
			FUNC("set_territory_nation", "Varzy", "French")
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L1_3" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L1_3" , 1 )
		}	
		else 
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L1_3" , 1 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L1_3" , 0 )
		}

		if( FUNC( "get_place_captured" , place_eng_camp_3 ) == 1 )
		{
			FUNC("set_territory_nation", "de Decize", "French")
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L1_1" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L1_1" , 1 )
		}
		else 
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L1_1" , 1 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L1_1" , 0 )
		}

		if( FUNC( "get_place_captured" , place_eng_camp_4 ) == 1 )
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_1" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_1" , 1 )
			FUNC("set_territory_nation", "du Donzy", "French")
		}
		else 
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_1" , 1 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_1" , 0 )
		}

		if( FUNC( "get_place_captured" , place_eng_camp_5 ) == 1 )
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_2" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_2" , 1 )
			FUNC("set_territory_nation", "de Cercy-la-tour", "French")
		}
		else 
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_2" , 1 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_2" , 0 )
		}

		if( FUNC( "get_place_captured" , place_eng_camp_6 ) == 1 )
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_3" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_3" , 1 )
			FUNC("set_territory_nation", "de Pouges-les-Eaux", "French")
		}
		else 
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_3" , 1 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_3" , 0 )
		}

		if( FUNC( "get_place_captured" , place_eng_camp_7 ) == 1 )
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_4" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_4" , 1 )
			FUNC("set_territory_nation", "du Bois", "French")
		}
		else 
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_4" , 1 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_4" , 0 )
		}

		if( FUNC("get_place_captured", place_recno_english_camp_2_trigger) == 1 )
		{
			FUNC("set_territory_nation", "des champs du nord", "french")
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L1_2" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L1_2" , 1 )
		}
		else 
		{
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L1_2" , 1 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L1_2" , 0 )
		}

		if( FUNC("get_place_captured", place_recno_st_pierre) == 1 )
		{
			FUNC("set_territory_nation", "Saint-Pierre-le-Moutier", "French")
			FUNC("set_minimap_icon_display_enable" , "ECASTLE_S7L2" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCASTLE_S7L2" , 1 )
		}
		else
		{
			FUNC("set_minimap_icon_display_enable" , "ECASTLE_S7L2" , 1 )
			FUNC("set_minimap_icon_display_enable" , "FCASTLE_S7L2" , 0 )
		}

		if( FUNC("get_place_captured", place_recno_st_la_charite) == 1 )
		{
			FUNC("set_territory_nation", "La Charité-sur-Loire", "French")
			FUNC("set_minimap_icon_display_enable" , "ECASTLE_S7L5" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCASTLE_S7L5" , 1 )
		}
		else
		{
			FUNC("set_minimap_icon_display_enable" , "ECASTLE_S7L5" , 1 )
			FUNC("set_minimap_icon_display_enable" , "FCASTLE_S7L5" , 0 )
		}

		if( FUNC("get_scenario_stage") == 0)
		{
			//init unit status
	 	
			//FUNC( "give_item_to_unit", "ARROW_EXPLOSIVE", 1, 99, joan_recno )

			recruit_id_a = FUNC("search_recruit_list_by_code", "S7L2_barrack")
			recruit_id_b = FUNC("search_recruit_list_by_code", "S7L2S_barrack")

			//workshop_recruit_id = FUNC("search_recruit_list_by_code", "default_workshop")

			FUNC("barrack_set_recruit_list", facility_recno_french_recruit, facility_recno_french_barrack, recruit_id_b, recruit_id_b) 
			FUNC("barrack_set_recruit_list", facility_recno_stpierre_recruit, facility_recno_stpierre_barrack, recruit_id_a , recruit_id_a ) 

			FUNC("set_recruit_level",  facility_recno_french_recruit , 20)
			FUNC("set_recruit_level",  facility_recno_stpierre_recruit , 20)

			//FUNC("workshop_set_recruit_list", facility_recno_workshop, workshop_recruit_id )

			FUNC( "set_scenario_count_time" )
			FUNC( "set_scenario_count_time_2" )
			FUNC( "set_scenario_count_time_3" )

			FUNC("set_unit_retreat", gressart_recno , 1)
			//FUNC("set_unit_retreat", begley_recno , -2)
			//FUNC("set_unit_retreat", hudleg_recno , -2)
						
			//tower attack task
			ACTION("give_team_task", tower_attack_archer_recno_1, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_2, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_3, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_4, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_5, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_6, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_7, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_8, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_9, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_10, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_11, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_12, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_13, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_14, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_15, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_16, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_17, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_18, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_19, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_20, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_21, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_22, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_23, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_24, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_25, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_26, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			//ACTION("give_team_task", tower_attack_archer_recno_27, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_28, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_29, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_30, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_31, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_32, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_33, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_34, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_35, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_36, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_37, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_38, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 

			//cut scene task idle
			ACTION("give_task", cut_scene_cart_force_recno_1, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_force_recno_2, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_force_recno_3, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_force_recno_4, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_force_recno_5, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_force_recno_6, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_force_recno_7, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_force_recno_8, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_force_recno_9, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_force_recno_10, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", cut_scene_cart_cart_recno, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", gough_recno, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", gressart_recno, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", begley_recno , "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", hudleg_recno , "IDLE", 1, 1, 0, 0, 0) 
			
			ACTION("give_task", gate_guard_recno, "IDLE", 1, 1, 0, 0, 0) 

			ACTION("give_task", camp_cart_recno, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", eng_camp_cap_recno, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", eng_camp_cap_recno_2, "IDLE", 1, 1, 0, 0, 0) 
			
			ACTION("give_task", st_cross_1, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", st_cross_2, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", st_cross_3, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", st_cross_4, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", st_cross_5, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", st_cross_6, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", st_cross_7, "IDLE", 1, 1, 0, 0, 0) 

			ACTION("give_task", la_charite_army_recno_1, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_2, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_3, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_4, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_5, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_6, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_7, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_8, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_9, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_10, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_11, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_12, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_13, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_14, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_15, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_16, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_17, "IDLE", 1, 1, 0, 0, 0) 
			ACTION("give_task", la_charite_army_recno_18, "IDLE", 1, 1, 0, 0, 0) 

			ACTION("give_task", prisoner_recno_1, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_2, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_3, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_4, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_5, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_6, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_7, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_8, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_9, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_10, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_11, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_12, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_13, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_14, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_15, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_16, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_17, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_18, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_19, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_20, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_21, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_22, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_23, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", prisoner_recno_24, "IDLE", 1, 0, 0, 0, 0) 

			//ACTION("give_task", food_ambuse_troop_1, "IDLE", 6, 0, 0, 0, 0) 
			//ACTION("give_task", food_ambuse_troop_2, "IDLE", 6, 0, 0, 0, 0) 
			//ACTION("give_task", food_ambuse_troop_3, "IDLE", 6, 0, 0, 0, 0) 
			
			ACTION("give_team_task", tower_attack_archer_recno_20, "IDLE", 1, 0, 0, 0, 0)
						
			FUNC("set_prisoner", prisoner_recno_1 , 2)
			FUNC("set_prisoner", prisoner_recno_2 , 2)
			FUNC("set_prisoner", prisoner_recno_3 , 2)
			FUNC("set_prisoner", prisoner_recno_4 , 2)
			FUNC("set_prisoner", prisoner_recno_5 , 2)
			FUNC("set_prisoner", prisoner_recno_6 , 2)
			FUNC("set_prisoner", prisoner_recno_7 , 2)
			FUNC("set_prisoner", prisoner_recno_8 , 2)
			FUNC("set_prisoner", prisoner_recno_9 , 2)
			FUNC("set_prisoner", prisoner_recno_10, 2)
			FUNC("set_prisoner", prisoner_recno_11, 2)
			FUNC("set_prisoner", prisoner_recno_12, 2)
			FUNC("set_prisoner", prisoner_recno_13, 2)
			FUNC("set_prisoner", prisoner_recno_14, 2)
			FUNC("set_prisoner", prisoner_recno_15, 2)
			FUNC("set_prisoner", prisoner_recno_16, 2)
			FUNC("set_prisoner", prisoner_recno_17, 2)
			FUNC("set_prisoner", prisoner_recno_18, 2)
			FUNC("set_prisoner", prisoner_recno_19, 2)
			FUNC("set_prisoner", prisoner_recno_20, 2)
			FUNC("set_prisoner", prisoner_recno_21, 2)
			FUNC("set_prisoner", prisoner_recno_22, 2)
			FUNC("set_prisoner", prisoner_recno_23, 2)
			FUNC("set_prisoner", prisoner_recno_24, 2)
			FUNC("set_unit_vision_range" , prisoner_recno_1, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_2, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_3, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_4, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_5, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_6, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_7, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_8, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_9, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_10, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_11, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_12, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_13, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_14, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_15, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_16, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_17, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_18, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_19, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_20, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_21, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_22, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_23, 200 )
			FUNC("set_unit_vision_range" , prisoner_recno_24, 200 )
			
			//ACTION("give_task", town_attacker_recno_1 , "IDLE", 1, 0, 0, 0, 0) 
			//ACTION("give_task", town_attacker_recno_2 , "IDLE", 1, 0, 0, 0, 0) 
			//ACTION("give_task", town_attacker_recno_3 , "IDLE", 1, 0, 0, 0, 0) 

			ACTION("give_task", eng_camp_2_guard_1 , "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", eng_camp_2_guard_2 , "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", eng_camp_2_guard_3 , "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", eng_camp_2_guard_4 , "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", eng_camp_2_guard_5 , "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", eng_camp_2_guard_6 , "IDLE", 1, 0, 0, 0, 0) 

			//ACTION("give_task", tower_attack_archer_recno_38, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", tower_attack_archer_recno_39, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", tower_attack_archer_recno_12, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", tower_attack_archer_recno_5, "IDLE", 1, 0, 0, 0, 0) 
			
												
			FUNC("set_unit_ride_cart", cut_scene_cart_driver_recno, cut_scene_cart_cart_recno)
			FUNC("set_unit_ride_cart", i_cut_scene_cart_driver_recno, i_cut_scene_cart_cart_recno)
			FUNC("set_unit_ride_cart", church_cartman_recno, church_cart_recno)
			//FUNC("set_unit_ride_cart", camp_cartman_recno, camp_cart_recno)

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

			FUNC ("set_end_condition_enabled", 3, 0) 
			FUNC ("set_end_condition_enabled", 4, 0) 
			FUNC ("set_end_condition_enabled", 6, 0) 
			FUNC ("set_end_condition_enabled", 7, 0) 
			FUNC ("set_end_condition_enabled", 8, 0) 
			FUNC ("set_end_condition_enabled", 12, 0) 
			FUNC ("set_end_condition_enabled", 13, 0) 
			FUNC ("set_end_condition_enabled", 14, 0) 
			FUNC ("set_end_condition_enabled", 15, 0) 
			FUNC ("set_end_condition_enabled", 16, 0)						
			FUNC ("set_end_condition_enabled", 17, 0)						
			FUNC ("set_end_condition_enabled", 18, 0)						

			FUNC ("set_end_condition_enabled", 2, 0) 
			FUNC ("set_end_condition_enabled", 5, 0)		
			FUNC ("set_end_condition_enabled", 24, 0) 				
			FUNC ("set_end_condition_enabled", 25, 0) 				
			FUNC ("set_end_condition_enabled", 26, 0) 	
			FUNC ("set_end_condition_enabled", 27, 0) 				

			FUNC("set_unit_retreat", lahire_recno, 1)
			//FUNC("set_unit_retreat", jean_recno, 1)
			FUNC("set_unit_retreat", orleans_recno, 1)
			//FUNC("set_unit_retreat", alencon_recno, 1)

			FUNC("set_units_can_bribe_flag" , mlinfantcap_id, 1)
			FUNC("set_units_can_bribe_flag" , marchercap_id, 1)
			FUNC("set_units_can_bribe_flag" , mexarcher_id, 1)
			FUNC("set_units_can_bribe_flag" , mexarchercap_id, 1)
			FUNC("set_units_can_bribe_flag" , mpolemancap_id, 1)
			FUNC("set_units_can_bribe_flag" , mlinfant_id, 1)
			FUNC("set_units_can_bribe_flag" , marcher_id, 1)
			FUNC("set_units_can_bribe_flag" , mpoleman_id, 1)
			
			FUNC("set_can_bribe_flag" , gressart_recno, 0)
			FUNC("set_can_bribe_flag" , gough_recno, 0)
			FUNC("set_can_bribe_flag" , gate_guard_recno, 1)

			ACTION("give_task", bambard_ctrl_1 , "LARGE_WEAPON_PUSH", 2, bambard_1, 0, 0, 0)
			ACTION("give_task", bambard_ctrl_2 , "LARGE_WEAPON_PUSH", 2, bambard_1, 1, 0, 0)
			ACTION("give_task", bambard_ctrl_3 , "LARGE_WEAPON_PUSH", 2, bambard_2, 0, 0, 0)
			ACTION("give_task", bambard_ctrl_4 , "LARGE_WEAPON_PUSH", 2, bambard_2, 1, 0, 0)
			ACTION("give_task", bambard_ctrl_5 , "LARGE_WEAPON_PUSH", 2, bambard_3, 0, 0, 0)
			ACTION("give_task", bambard_ctrl_6 , "LARGE_WEAPON_PUSH", 2, bambard_3, 1, 0, 0)
			ACTION("give_task", cross_ctrl_1, "LARGE_WEAPON_PUSH", 2, cross_1, 0, 0, 0)
			ACTION("give_task", cross_ctrl_2, "LARGE_WEAPON_PUSH", 2, cross_2, 0, 0, 0)
			ACTION("give_task", cross_ctrl_3, "LARGE_WEAPON_PUSH", 2, cross_3, 0, 0, 0)
			ACTION("give_task", cross_ctrl_4, "LARGE_WEAPON_PUSH", 2, cross_4, 0, 0, 0)
			ACTION("give_task", cross_ctrl_5, "LARGE_WEAPON_PUSH", 2, cross_5, 0, 0, 0)
			ACTION("give_task", cross_ctrl_6, "LARGE_WEAPON_PUSH", 2, cross_6, 0, 0, 0)
			ACTION("give_task", cross_ctrl_7, "LARGE_WEAPON_PUSH", 2, cross_7, 0, 0, 0)
			ACTION("give_task", cross_ctrl_8, "LARGE_WEAPON_PUSH", 2, cross_8, 0, 0, 0)
			ACTION("give_task", cross_ctrl_9, "LARGE_WEAPON_PUSH", 2, cross_9, 0, 0, 0)
			ACTION("give_task", cross_ctrl_10, "LARGE_WEAPON_PUSH", 2, cross_10, 0, 0, 0)
			ACTION("give_task", cross_ctrl_11, "LARGE_WEAPON_PUSH", 2, cross_11, 0, 0, 0)

			ACTION("give_task", st_cross_ctrl_1, "LARGE_WEAPON_PUSH", 2, st_cross_1, 0, 0, 0)
			ACTION("give_task", st_cross_ctrl_2, "LARGE_WEAPON_PUSH", 2, st_cross_2, 0, 0, 0)
			ACTION("give_task", st_cross_ctrl_3, "LARGE_WEAPON_PUSH", 2, st_cross_3, 0, 0, 0)
			ACTION("give_task", st_cross_ctrl_4, "LARGE_WEAPON_PUSH", 2, st_cross_4, 0, 0, 0)
			ACTION("give_task", st_cross_ctrl_5, "LARGE_WEAPON_PUSH", 2, st_cross_5, 0, 0, 0)
			ACTION("give_task", st_cross_ctrl_6, "LARGE_WEAPON_PUSH", 2, st_cross_6, 0, 0, 0)
			ACTION("give_task", st_cross_ctrl_7, "LARGE_WEAPON_PUSH", 2, st_cross_7, 0, 0, 0)

			if( st_pierre_gate_recno_2 )
			{
				if ( FUNC( "get_gate_state" ,  st_pierre_gate_recno_2 ) == 0 ) 
				{
					FUNC("add_gate_trigger", st_pierre_gate_recno_2, 1)
				}
			}

			FUNC("set_total_food" , 10 )
						
			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_fish", 1, 3, gough_recno)
			FUNC("give_item_to_unit", "fd_meat", 1, 2, begley_recno )
			FUNC("give_item_to_unit", "fd_meat", 1, 2, hudleg_recno )
			//FUNC("give_item_to_unit", "fd_meat", 1, 6, gressart_recno )

		}
	}

	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)

	//get bit flag status
	flag_gold_captured = FUNC("get_scenario_bit_flag", 1)
	flag_attackers_start_attack = FUNC("get_scenario_bit_flag", 2)
	flag_priest_cut_scene_msg = FUNC("get_scenario_bit_flag", 3)
	flag_gate_guard_dead = FUNC("get_scenario_bit_flag", 4)

	flag_encount_cut_scene = FUNC("get_scenario_bit_flag", 5)
	flag_eng_camp_enter = FUNC("get_scenario_bit_flag", 6)
	flag_half_gold_triggered = FUNC("get_scenario_bit_flag", 7)

	flag_gressart_heavy_troop_spawn = FUNC("get_scenario_bit_flag", 8)
	flag_gressart_heavy_troop_in_middle_1 = FUNC("get_scenario_bit_flag", 9) 
	flag_gressart_heavy_troop_in_middle_2 = FUNC("get_scenario_bit_flag", 10) 

	flag_collect_food_triggered = FUNC("get_scenario_bit_flag", 11)

	flag_collect_food_msg = FUNC("get_scenario_bit_flag", 12)
	flag_collect_food_crates_broken = FUNC("get_scenario_bit_flag", 13)
	flag_gressart_arrived = FUNC("get_scenario_bit_flag", 14)

	//castle capture
	flag_st_pierre_captured = FUNC("get_scenario_bit_flag", 14)
	flag_la_charite_captured = FUNC("get_scenario_bit_flag", 15)
	
	flag_gressart_is_defeated = FUNC("get_scenario_bit_flag", 16)

	flag_init_cut_scene = FUNC("get_scenario_bit_flag", 17)
	flag_cart_cut_scene = FUNC("get_scenario_bit_flag", 18)

	flag_objective_show = FUNC("get_scenario_bit_flag", 19)

	flag_protect_villagers_triggered = FUNC("get_scenario_bit_flag", 20)
	flag_protect_villagers_completed = FUNC("get_scenario_bit_flag", 21)

	flag_english_camp_patrol_path = FUNC("get_scenario_bit_flag", 22)

	flag_gold_captured_gressart_cut_scene = FUNC("get_scenario_bit_flag", 23)

	flag_gressart_retreat_cut_scene_1 = FUNC("get_scenario_bit_flag", 24)
	flag_gressart_retreat_cut_scene_2 = FUNC("get_scenario_bit_flag", 25)

	flag_gressart_retreat_1 = FUNC("get_scenario_bit_flag", 26)
	flag_gressart_retreat_2 = FUNC("get_scenario_bit_flag", 27)

	flag_gold_captured_gold_cut_scene = FUNC("get_scenario_bit_flag", 28)

	flag_burgundians_cut_scene = FUNC("get_scenario_bit_flag", 29)

	flag_workshop_cut_scene = FUNC("get_scenario_bit_flag", 30)
	flag_workshop_captured = FUNC("get_scenario_bit_flag", 31)

	flag_gressart_heavy_troop_reverse = FUNC("get_scenario_bit_flag", 32)
	flag_gressart_heavy_troop_moving = FUNC("get_scenario_event_bit_flag", 1)

	flag_citizen_spawn = FUNC("get_scenario_event_bit_flag", 2)

	flag_gressart_dead = FUNC("get_scenario_event_bit_flag", 3)

	flag_general_retreat_1 = FUNC("get_scenario_event_bit_flag", 4)
	flag_general_retreat_2 = FUNC("get_scenario_event_bit_flag", 5)
	flag_general_retreat_3 = FUNC("get_scenario_event_bit_flag", 6)
	flag_general_retreat_4 = FUNC("get_scenario_event_bit_flag", 7)

	flag_first_invasion_st_pierre = FUNC("get_scenario_event_bit_flag", 8)
	flag_gold_captured_2 = FUNC("get_scenario_event_bit_flag", 9)

	flag_enough_bribed = FUNC("get_scenario_event_bit_flag", 10)

	flag_unit_inside_1 = FUNC("get_scenario_event_bit_flag", 11)
	flag_unit_inside_2 = FUNC("get_scenario_event_bit_flag", 12)

	flag_gate_guard_cut_scene = FUNC("get_scenario_event_bit_flag", 13)

	flag_gate_guard_bribed = FUNC("get_scenario_event_bit_flag", 14)	
	flag_bribed_gate_opened = FUNC("get_scenario_event_bit_flag", 15)	

	flag_gate_guard_pee = FUNC("get_scenario_event_bit_flag", 16)	

	flag_gate_guard_first_pee = FUNC("get_scenario_event_bit_flag", 17)
	flag_gate_guard_pee_cut_scene = FUNC("get_scenario_event_bit_flag", 18)
	flag_batterram_msg = FUNC("get_scenario_event_bit_flag", 19)
	flag_eng_camp_cut_scene = FUNC("get_scenario_event_bit_flag", 20)

	flag_gough_dead = FUNC("get_scenario_event_bit_flag", 21)
	flag_gough_eng_camp_cut_scene = FUNC("get_scenario_event_bit_flag", 22)
	flag_st_pierre_gate_close = FUNC("get_scenario_event_bit_flag", 23)
	
	flag_gough_dead_cut_scene = FUNC("get_scenario_event_bit_flag", 24 )
	flag_st_pierre_mountain_top = FUNC("get_scenario_event_bit_flag", 25 )

	flag_la_charite_attacked = FUNC("get_scenario_event_bit_flag", 26 )

	flag_first_invasion_la_charite_l = FUNC("get_scenario_event_bit_flag", 27 )
	flag_first_invasion_la_charite_r = FUNC("get_scenario_event_bit_flag", 28 )
	flag_first_invasion_la_charite_c = FUNC("get_scenario_event_bit_flag", 29 )

	flag_la_charite_gate_close = FUNC("get_scenario_event_bit_flag", 30)
	flag_mistrust = FUNC("get_scenario_event_bit_flag", 31)
	flag_priest_cut_scene = FUNC("get_scenario_event_bit_flag", 32)

	flag_food_picked_1 = FUNC("get_scenario_event_bit_flag_2", 1)
	flag_food_picked_2 = FUNC("get_scenario_event_bit_flag_2", 2)
	flag_food_picked_3 = FUNC("get_scenario_event_bit_flag_2", 3)

	flag_food_citizen_all_dead = FUNC("get_scenario_event_bit_flag_2", 4)
	flag_food_picked_cut_scene = FUNC("get_scenario_event_bit_flag_2", 5)
	flag_collect_food_finished = FUNC("get_scenario_event_bit_flag_2", 6)

	flag_eng_camp_2_invasion = FUNC("get_scenario_event_bit_flag_2", 7)
	flag_food_picked_up_spawn = FUNC("get_scenario_event_bit_flag_2", 8)

	flag_st_pierre_poleman_spawn = FUNC("get_scenario_event_bit_flag_2", 9)
	flag_st_pierre_gate_2_triggered = FUNC("get_scenario_event_bit_flag_2", 10)

	flag_eng_camp_2_captured = FUNC("get_scenario_event_bit_flag_2", 11)
	flag_gold_returned = FUNC("get_scenario_event_bit_flag_2", 12)
	flag_100_gold_found = FUNC("get_scenario_event_bit_flag_2", 13)
	flag_food_middle_msg = FUNC("get_scenario_event_bit_flag_2", 14)
	flag_invisible_msg = FUNC("get_scenario_event_bit_flag_2", 15)
	flag_go_on = FUNC("get_scenario_event_bit_flag_2", 16)
	flag_forest_message = FUNC("get_scenario_event_bit_flag_2", 17)
	flag_la_charite_cut_scene = FUNC("get_scenario_event_bit_flag_2", 18)
	flag_bribed_mission_trigger = FUNC("get_scenario_event_bit_flag_2", 19)
	flag_la_charite_invasion = FUNC("get_scenario_event_bit_flag_2", 20)
	flag_martin_dead = FUNC("get_scenario_event_bit_flag_2", 21)
	flag_martin_dead_cut_scene = FUNC("get_scenario_event_bit_flag_2", 22)
	flag_attacker_dead_message = FUNC("get_scenario_event_bit_flag_2", 23)
	flag_begley_dead = FUNC("get_scenario_event_bit_flag_2", 24)
	flag_hudleg_dead = FUNC("get_scenario_event_bit_flag_2", 25)

	flag_letter_returned = FUNC("get_scenario_event_bit_flag_2", 26) 
	flag_letter_returned_fail = FUNC("get_scenario_event_bit_flag_2", 27)
	flag_wife_triggered = FUNC("get_scenario_event_bit_flag_2", 28) 
	flag_citizen_dead_1 = FUNC("get_scenario_event_bit_flag_3", 1) 
	flag_citizen_dead_2 = FUNC("get_scenario_event_bit_flag_3", 2) 
	flag_citizen_dead_3 = FUNC("get_scenario_event_bit_flag_3", 3) 
	flag_citizen_dead_4 = FUNC("get_scenario_event_bit_flag_3", 4) 
	flag_citizen_dead_5 = FUNC("get_scenario_event_bit_flag_3", 5) 
	flag_citizen_dead_6 = FUNC("get_scenario_event_bit_flag_3", 6) 
	flag_citizen_dead_7 = FUNC("get_scenario_event_bit_flag_3", 7) 


	if( FUNC("get_scenario_stage") == 1 )
	{
		//init cut_scene dialog
		if( flag_init_cut_scene == 0 )
		{

			WAIT
			{
				FUNC("start_cut_scene", 0, 0, 36736, 29157, 1102, 187, 137, 20)
				FUNC("set_end_cut_scene_type", 1)
			}

			// 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", i_cut_scene_cart_force_recno_1, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_force_recno_2, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_force_recno_3, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_force_recno_4, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_force_recno_5, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_force_recno_6, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_force_recno_7, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_force_recno_8, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_force_recno_9, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_force_recno_10, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_cart_recno, 1)
			FUNC("set_unit_can_process_in_cut_scene", i_cut_scene_cart_driver_recno, 1)
				
			WAIT { DIALOG("add_dialog", orleans_recno, "[0001N]Guerriers de camarade, we are at the edge of Burgundian territory. It is to my understanding the English and Burgundian forces have hired a band of mercenaries, led by Perrinet Gressart to halt our approach towards Reims.") }
				
			if( i_cut_scene_cart_cart_recno )
			{
				FUNC("set_unit_track" , i_cut_scene_cart_cart_recno, "GoldTrk2")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_1, "ics2")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_2, "ics2")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_3, "ics2")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_4, "ics2")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_5, "ics2")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_6, "ics1")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_7, "ics1")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_8, "ics1")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_9, "ics1")
				FUNC("set_unit_track" , i_cut_scene_cart_force_recno_10, "ics1")
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_1, 0)
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_2, 0)
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_3, 0)
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_4, 0)
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_5, 0)
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_6, 0)
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_7, 0)
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_8, 0)
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_9, 0)
				FUNC("enable_unit_bounding_volume", i_cut_scene_cart_force_recno_10, 0)
			}

			ACTION("give_task", i_cut_scene_cart_force_recno_1, "APPROACH_PLACE", 2, place_init_cut_scene_app_2, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_force_recno_2, "APPROACH_PLACE", 2, place_init_cut_scene_app_2, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_force_recno_3, "APPROACH_PLACE", 2, place_init_cut_scene_app_2, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_force_recno_4, "APPROACH_PLACE", 2, place_init_cut_scene_app_2, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_force_recno_5, "APPROACH_PLACE", 2, place_init_cut_scene_app_2, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_force_recno_6, "APPROACH_PLACE", 2, place_init_cut_scene_app_1, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_force_recno_7, "APPROACH_PLACE", 2, place_init_cut_scene_app_1, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_force_recno_8, "APPROACH_PLACE", 2, place_init_cut_scene_app_1, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_force_recno_9, "APPROACH_PLACE", 2, place_init_cut_scene_app_1, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_force_recno_10, "APPROACH_PLACE", 2, place_init_cut_scene_app_1, 0, 0 , 0)					 
			ACTION("give_task", i_cut_scene_cart_cart_recno, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 

			FUNC("change_camera_in_cut_scene" , 0, 34449 , 22222, 1024, 187, -89, 9 )
			
			WAIT { DIALOG("add_dialog", alencon_recno, "[0002N]Gressart receives regular payments from the English and Burgundians in exchange for their services. The payments are made in gold and riches misappropriated through their incessant sacking and looting.") }		

			FUNC("change_camera_in_cut_scene" , 0, 36376 , 20791, 1127, 187, 177, -2 )
						
			WAIT { DIALOG("add_dialog", lahire_recno, "[0003N]In exchange, he patrols the region, ransacking the villages of our fellow compatriots and attacking any and all of our units that dare pass this region.")}

			FUNC("change_camera_in_cut_scene" , 0, 36156 , 29819, 1224, 187, -48, 23 )

			FUNC("del_unit" , i_cut_scene_cart_force_recno_1)
			FUNC("del_unit" , i_cut_scene_cart_force_recno_2)
			FUNC("del_unit" , i_cut_scene_cart_force_recno_3)
			FUNC("del_unit" , i_cut_scene_cart_force_recno_4)
			FUNC("del_unit" , i_cut_scene_cart_force_recno_5)
			FUNC("del_unit" , i_cut_scene_cart_force_recno_6)
			FUNC("del_unit" , i_cut_scene_cart_force_recno_7)
			FUNC("del_unit" , i_cut_scene_cart_force_recno_8)
			FUNC("del_unit" , i_cut_scene_cart_force_recno_9)
			FUNC("del_unit" , i_cut_scene_cart_force_recno_10)
			FUNC("del_unit" , i_cut_scene_cart_cart_recno)
			FUNC("del_unit" , i_cut_scene_cart_driver_recno)

			FUNC("del_unit", tower_attack_archer_recno_18 )

			FUNC("set_unit_can_process_in_cut_scene", jean_recno , 1)	// all unit can't process
			FUNC("set_unit_degree" , jean_recno , FUNC("get_rotation" , jean_recno, joan_recno))
			
			WAIT { DIALOG("add_dialog", jean_recno, "[0004N]We must immediately cease their reckless destruction of our lands and riches, for without gold, France will be a poor kingdom indeed. If we wish to advance to Reims, we must eliminate these mercenaries, who have no allegiance to man, but to gold!")}
			
			// leave cut scene
			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_unit_can_process_in_cut_scene", 0, 1)	// all unit can't process

			FUNC("set_scenario_bit_flag", 17, 1)
		}

		FUNC("set_scenario_stage", 2)
		exit
	}


	//shop
	//process weapon shop
	if( talk_unit_recno != 0 && talk_unit_recno == weapon_seller_st_pierre_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_st_pierre_recno, 1)

		// set weapon seller to idle and rotate him
		ACTION("stop_all_order", unit_recno ) 
		ACTION("stop_all_order", weapon_seller_st_pierre_recno ) 

		ACTION("give_order" , weapon_seller_st_pierre_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , weapon_seller_st_pierre_recno , unit_recno) , 0 , 0 , 0, 2500)

		WAIT { DIALOG("add_dialog", weapon_seller_st_pierre_recno, "[0005N]I hope you find the selection here in my humble workshop suitable for your needs!") }

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

		WAIT { DIALOG("add_dialog", weapon_seller_st_pierre_recno, "[0006N]Thanks for stopping by!") }

		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 weapon shop
	if( talk_unit_recno != 0 && talk_unit_recno == weapon_seller_st_thomas_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_st_thomas_recno, 1)

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

		WAIT { DIALOG("add_dialog", weapon_seller_st_thomas_recno, "[0007N]Nothing but the very best in French weaponry to satisfy even the most bloodthirsty warmonger! Please have a look!") }

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

		WAIT { DIALOG("add_dialog", weapon_seller_st_thomas_recno, "[0008N]Do drop by again!") }

		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 potion shop
	if( talk_unit_recno != 0 && talk_unit_recno == potion_seller_st_pierre_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_st_pierre_recno, 1)
		FUNC("set_idle", unit_recno) 

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

		WAIT { DIALOG("add_dialog", potion_seller_st_pierre_recno, "[0009N]Hello there! Have your tried our produce? All fertilized with the finest of French livestock, I tell you!") }

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

		WAIT { DIALOG("add_dialog", potion_seller_st_pierre_recno, "[0010N]Don't ever shy from us if you need anything else!") }

		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
	}


	//gressart
	if( gressart_recno == 0 && flag_gressart_dead == 0)
	{
		gressart_recno = FUNC("search_unit_by_name", "Perrinet Gressart")

		if( flag_gressart_retreat_1 == 0 && gressart_recno )
		{
			//FUNC( "set_unit_drop_item_id" , gressart_recno, sword_id ) 
			//FUNC( "set_unit_drop_item_level", gressart_recno, 1)
			FUNC( "set_unit_retreat", gressart_recno , 1)
			//FUNC("give_item_to_unit", "fd_meat", 1, 6, gressart_recno)
		}
		else if ( gressart_recno )
		{
			FUNC("set_unit_retreat" , gressart_recno, -2 )
			FUNC("set_unit_drop_item_id" , gressart_recno, sword_id ) 
			FUNC("set_unit_drop_item_level", gressart_recno, 1)
			//FUNC("give_item_to_unit", "fd_meat", 1, 6, gressart_recno)
		}
	}


	if( gough_recno == 0 && flag_gough_dead == 0 )
	{
		gough_recno = FUNC("search_unit_by_name", "Matthew Gough")
		
		if(gough_recno && flag_st_pierre_mountain_top )
		{
			FUNC("set_can_bribe_flag" , gough_recno, 0)
			FUNC("set_unit_retreat" , gough_recno, -2)		
		//	FUNC("give_item_to_unit", "fd_fish", 1, 3, gough_recno)
		}
		else if ( gough_recno )
		{
			FUNC("set_can_bribe_flag" , gough_recno, 0)
			FUNC("set_unit_retreat" , gough_recno, 1)		
		//	FUNC("give_item_to_unit", "fd_fish", 1, 3, gough_recno)
		}
	}
	else if( gough_recno && FUNC( "get_unit_retreat" , gough_recno) == -2 )
	{ 
		if( FUNC("is_unit_dead", gough_recno ) )
		{
			FUNC("set_scenario_event_bit_flag", 1, 0)
			FUNC("set_scenario_event_bit_flag", 21, 1)
			FUNC("set_scenario_bit_flag", 32 , 0)
												
			gold_track_gressart_id_1 = 0
			gold_track_gressart_id_2 = 0

			flag_gough_dead = 1

			FUNC("set_scenario_count_time")
		}
	}

	if( martin_recno && FUNC( "get_unit_retreat" , martin_recno) == -2 )
	{ 
		if( FUNC("is_unit_dead", martin_recno ) )
		{
			FUNC("set_scenario_event_bit_flag_2", 21, 1)
						
			flag_martin_dead = 1
			FUNC("set_scenario_count_time")
		}
	}
	else if ( martin_recno == 0 && flag_martin_dead == 0 && flag_st_pierre_mountain_top )
	{
		martin_recno = FUNC("search_unit_by_name", "Martin Gough")

		if( martin_recno && flag_st_pierre_mountain_top )
		{
			FUNC("set_can_bribe_flag" , martin_recno, 0)
			FUNC("set_unit_retreat" , martin_recno, -2)
		//	FUNC("give_item_to_unit", "fd_fish", 1, 3, martin_recno)
		}
		else if ( martin_recno )
		{
			FUNC("set_can_bribe_flag" , martin_recno, 0)
			FUNC("set_unit_retreat" , martin_recno, 1)
		//	FUNC("give_item_to_unit", "fd_fish", 1, 3, martin_recno)
		}
	}


	//french general retreat
	if(	FUNC("get_unit_retreat", lahire_recno) == -1 )
	{
		if( flag_general_retreat_1 == 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, "[0011N]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)

				if( FUNC("is_cut_scene_finished" ) == 0 )
				{
					WAIT{ ACTION("give_order", lahire_recno, "APPROACH_PLACE", 99, 1, place_recno_gressart_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" , lahire_recno)
				WAIT { FUNC("is_cut_scene_finished" ) }
			
				FUNC( "set_scenario_event_bit_flag", 4, 1)  			
			}
			else
			{
				FUNC("attention_call_message_2", "[0012N]The enemy has inflicted on me grave damage! I'm afraid I can battle no longer!", lahire_recno )
				FUNC( "set_scenario_event_bit_flag", 4, 1)  			
				FUNC( "del_unit" , lahire_recno)
			}
		}
	}
	

	if( FUNC("get_unit_retreat", orleans_recno) == -1 )
	{
		if( flag_general_retreat_4 == 0 )
		{
			if(FUNC("get_unit_dist", orleans_recno, unit_recno) < 2000 ) 
			{
				FUNC("start_cut_scene_2", 1, 0, orleans_recno, 200, ( 180 - FUNC("get_unit_dir", orleans_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", orleans_recno, 1)

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

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, orleans_recno, 200, ( 180 - FUNC("get_unit_dir", orleans_recno) ), 10)
				
				WAIT{ DIALOG("add_dialog", orleans_recno, "[0013N]Joan, you shall have to carry on without me, for my wounds allow me to fight no more!") }

				FUNC("enable_unit_bounding_volume", orleans_recno, 0)

				if( FUNC("is_cut_scene_finished" ) == 0 )
				{
					WAIT{ ACTION("give_order", orleans_recno, "APPROACH_PLACE", 99, 1, place_recno_gressart_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", orleans_recno)
				WAIT { FUNC("is_cut_scene_finished" ) }

				FUNC( "set_scenario_event_bit_flag", 7, 1)  			
			}
			else
			{
				FUNC( "attention_call_message_2", "[0013N]Joan, you shall have to carry on without me, for my wounds allow me to fight no more!", orleans_recno )
				FUNC( "del_unit" , orleans_recno)
				FUNC( "set_scenario_event_bit_flag", 7, 1)  			
			}
		}
	}

	//invisible_wall

	if( flag_go_on == 0 )
	{
		if( FUNC( "general_by_nation_exist_in_place" , place_recno_invisible_msg, "FRENCH" ) )
		{
			if( flag_invisible_msg  == 0 )
			{
				FUNC("attention_call_message", "[0014N]You cannot go beyond the battlefield - your duties beckon." )
				FUNC("set_scenario_event_bit_flag_2", 15, 1 )
			}
		}
		else
		{
			FUNC("set_scenario_event_bit_flag_2", 15, 0 )
		}
	}
	else
	{
		if( flag_forest_message == 0 )
		{
			if( FUNC( "people_by_nation_exist_in_place" , place_recno_invisible_msg, "FRENCH" ) )
			{
					FUNC("attention_call_message_2", "[0015N]Methinks the forest is a perilous place to enter - we shall be best on guard, gents.", jean_recno )
					FUNC("set_scenario_event_bit_flag_2", 17, 1 )
			}
		}
	}



	//eng camp 2
	if( FUNC("get_place_captured", place_recno_english_camp_2_trigger) == 0 )
	{
		if( FUNC("fightable_enemy_exist_in_place", place_recno_english_camp_2_trigger, unit_recno) == 0)
		{
			FUNC("change_all_item_in_place", place_recno_english_camp_2_trigger, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_recno_english_camp_2_trigger, 1)
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L1_2" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L1_2" , 1 )
			FUNC("set_territory_nation", "des champs du nord", "french")

			FUNC("set_scenario_event_bit_flag_2", 11, 1)
		}
	}

	if( flag_eng_camp_2_invasion == 0) 
	{
		if( FUNC("people_by_nation_exist_in_place", place_recno_english_camp_2_trigger, "FRENCH") )
		{
			FUNC( "attention_call_message_2", "[0016N]Listen here French scum! We have taken control of the township of des champs du nord - unfortunately, your weak citizens all perished under our might! If you do not wish to suffer a similar fate, I suggest that you approach no more!", eng_camp_2_guard_1 )
			FUNC( "attention_call_message_2", "[0017N]Do not enter and we will not attack you! You have been warned!", eng_camp_2_guard_1 )

			FUNC( "attention_call_message_2", "[0018N]It appears that the small town of des champs du nord has been completely overrun by enemies - let us assure that they all perish for their transgressions!", jean_recno )
			FUNC( "attention_call_message_2", "[0019N]The French - they must be here for our gold! We must protect our valuables!", eng_camp_2_guard_1 )
			
			ACTION("give_team_task", eng_camp_2_guard_1 , "DEFEND_PLACE", 99, place_recno_english_camp_2, 0, 0, 0)
			ACTION("give_team_task", eng_camp_2_guard_2 , "DEFEND_PLACE", 99, place_recno_english_camp_2, 0, 0, 0)
			ACTION("give_team_task", eng_camp_2_guard_3 , "DEFEND_PLACE", 99, place_recno_english_camp_2, 0, 0, 0)
			ACTION("give_team_task", eng_camp_2_guard_4 , "DEFEND_PLACE", 99, place_recno_english_camp_2, 0, 0, 0)
			ACTION("give_team_task", eng_camp_2_guard_5 , "DEFEND_PLACE", 99, place_recno_english_camp_2, 0, 0, 0)
			ACTION("give_team_task", eng_camp_2_guard_6 , "DEFEND_PLACE", 99, place_recno_english_camp_2, 0, 0, 0)

			FUNC ("set_end_condition_enabled", 14, 1) 
			FUNC( "set_scenario_event_bit_flag_2", 7, 1)  			
		}
	}

	if( flag_bribed_mission_trigger == 0 )
	{
		if( FUNC("people_by_nation_exist_in_place", place_recno_english_camp_2, "FRENCH") )
		{
			FUNC( "attention_call_message_2", "[0020N]If we bribe the mercenaries, they will surely serve our banner and in turn attack the English and Burgundians! Once the mercenaries kill enough enemies, I am sure both Burgundians and English will cease to trust the mercenaries!", jean_recno )
			FUNC( "attention_call_message", "[0021N]Bribe enough mercenaries to kill 20 Burgundian and English troops to sow the seeds of mistrust among them all." )
			
			FUNC ("set_end_condition_enabled", 18, 1) 
			FUNC( "set_scenario_event_bit_flag_2", 19, 1)  			
		}
	}

	//looted gold found
	if( flag_100_gold_found == 0 )
	{
		if( FUNC("get_gold_crates_get") >= 100 )
		{
			FUNC("set_scenario_event_bit_flag_2", 13, 1)
			FUNC( "attention_call_message_2", "[0022N]We have collected enough gold. We should now return this gold to the rightful owners and liberate any French towns occupied by the enemy.", alencon_recno )
		}
	}

	//bribe unit
	if( flag_enough_bribed == 0 )
	{
		if( FUNC("get_enemy_bribed_count") > 5 )
		{
			FUNC( "set_scenario_event_bit_flag", 10, 1)
		}
	}

	//st pierre gate
	//chke item	
	if( FUNC( "is_item_deleted_by_name", st_pierre_gate_recno, "StPierre gate") == 1 )
	{
		st_pierre_gate_recno = 0
	} 

	if( FUNC( "is_item_deleted_by_name", st_pierre_gate_recno_2, "StPierre gate 2") == 1 )
	{
		st_pierre_gate_recno_2 = 0
	} 

	if( flag_gate_guard_bribed )
	{
		if( flag_bribed_gate_opened == 0 )
		{
			if( st_pierre_gate_recno )
			{
				if ( FUNC( "get_gate_state" ,  st_pierre_gate_recno ) == 1 ) 
				{
					if( flag_gate_guard_dead == 0 )
					{
						FUNC("attention_call_message_2", "[0023N]So you seek entry, eh? Much obliged! But hurry, for if the other mercenaries see me they may wonder why I’ve let the enemy in!", gate_guard_recno )
					}

					FUNC("set_scenario_event_bit_flag", 15, 1)
					FUNC( "set_scenario_event_bit_flag", 23, 1)
					FUNC("set_scenario_count_time_3")

					flag_bribed_gate_opened = 1
				}
			}
		}
	}

	if( flag_st_pierre_gate_close && flag_st_pierre_captured == 0)
	{
		if( st_pierre_gate_recno )
		{
			if( FUNC("get_scenario_count_time_3") > 45000 )
			{
				
				if ( FUNC( "get_gate_state" ,  st_pierre_gate_recno ) == 1 ) 
				{
					if ( flag_gressart_heavy_troop_moving && ( FUNC("is_unit_inside_place", place_recno_st_pierre, gough_recno) || FUNC("is_unit_inside_place", place_recno_st_pierre_2 , gough_recno) || FUNC("is_unit_inside_place", place_recno_st_pierre_3, gough_recno) || FUNC("is_unit_inside_place", place_recno_st_pierre_bribe , gough_recno) ) )
					{
						if ( FUNC( "get_gate_state" ,  st_pierre_gate_recno ) == 0 ) 
						{
							FUNC("add_gate_trigger", st_pierre_gate_recno, 1)
						}
						else
						{
							FUNC("set_scenario_count_time_3")
							FUNC("set_scenario_event_bit_flag", 23, 1)
						}
					}
					else if ( FUNC( "get_gate_state" ,  st_pierre_gate_recno ) == 1 ) 
					{
						FUNC("add_gate_trigger", st_pierre_gate_recno, 1)
						FUNC("set_scenario_event_bit_flag", 23, 0)
					}
				}
			}
		}	
	}

	if( flag_gough_dead == 0 && flag_st_pierre_mountain_top == 0 && flag_gressart_heavy_troop_moving == 0 && flag_st_pierre_gate_2_triggered == 0 && flag_st_pierre_captured == 0 ) 
	{
		if( FUNC("people_by_nation_exist_in_place", place_recno_st_pierre_gate_2_triggered, "FRENCH") )
		{
			FUNC("start_cut_scene_2", 1, 0, 40803, 23249, 1030, 350, 0, 0, 1 )

			FUNC("set_idle", unit_recno) 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			
			WAIT{ FUNC("is_cut_scene_status_black_screen") }

			//unit_hp = FUNC("get_unit_hp", gough_recno)
				
			FUNC("del_unit" , gough_recno ) 
			FUNC("facility_barrack_add_leader", facility_recno_st_rierre_gate_2_spawn , gough_id, 20, 25, "Matthew Gough", "Gough" )

			FUNC("change_camera_in_cut_scene", 0, 40803, 23249, 1030, 350, 0, 0)

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				WAIT{ FUNC("pause_script", 2000) }
			}
			else
			{
				WAIT{ FUNC("pause_script", 1 ) }
			}

			gough_recno = FUNC("search_unit_by_name", "Matthew Gough")
					
			if(gough_recno)
			{
				FUNC("set_can_bribe_flag" , gough_recno, 0)
				//FUNC("set_unit_hp", gough_recno, unit_hp )
				FUNC("set_unit_retreat", gough_recno , 1)
				FUNC("give_item_to_unit", "fd_fish", 1, 3, gough_recno)
			}

			WAIT { DIALOG("add_dialog", gough_recno, "[0024N]Let's see what you do now, stupid peasants! Men, do not allow them to pass this gate! We must protect our gold at all costs!") }

			FUNC("set_unit_can_process_in_cut_scene", gough_recno , 1)	

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				FUNC("set_unit_track" , gough_recno, "goldtrk2" )
			
				WAIT{ ACTION("give_order", gough_recno, "APPROACH_PLACE", 99, 1, place_church_approach, 0, 0, 0, 4000) }
			}

			ACTION("give_order", gough_recno, "APPROACH_PLACE", 100, 1, place_church_approach, 0, 0, 0, 0)
						
			if( st_pierre_gate_recno_2 )
			{
				if ( FUNC( "get_gate_state" ,  st_pierre_gate_recno_2 ) == 1 ) 
				{
					FUNC("add_gate_trigger", st_pierre_gate_recno_2, 1)
				}
			}

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
					WAIT{ FUNC("pause_script", 2000) }
			}
			else
			{
					WAIT{ FUNC("pause_script", 1) }
			}
							
			// leave cut scene
			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene_2", 0, 1 )

			WAIT{ FUNC("is_cut_scene_status_black_screen") }

			FUNC("del_unit" , gough_recno ) 
			FUNC("facility_barrack_add_leader", facility_recno_firework_spawn_3 , gough_id, 20, 25, "Matthew Gough", "Gough" )

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				WAIT{ FUNC("pause_script", 2000) }
			}
			else
			{
				WAIT{ FUNC("pause_script", 1 ) }
			}

			gough_recno = FUNC("search_unit_by_name", "Matthew Gough")
			
			
			if(gough_recno)
			{
				FUNC("give_item_to_unit", "fd_fish", 1, 3, gough_recno)
				FUNC("set_can_bribe_flag" , gough_recno, 0)
				//FUNC("set_unit_hp", gough_recno, unit_hp )
				FUNC("set_unit_retreat", gough_recno , 1)
				ACTION("give_task", gough_recno, "IDLE", 99, 1, 0, 0, 0) 
			}
	
			WAIT { FUNC("is_cut_scene_finished" ) }
			FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can't process

			FUNC( "set_scenario_event_bit_flag_2", 10, 1)
		}
	}


	
	// la chrite gate
	if( FUNC( "is_item_deleted_by_name", la_charite_gate_l_recno , "la charite l gate") == 1 )
	{
		la_charite_gate_l_recno = 0 
	}

	if( FUNC( "is_item_deleted_by_name", la_charite_gate_r_recno , "la charite r gate") == 1 )
	{
		la_charite_gate_r_recno = 0 
	}

	if( flag_la_charite_gate_close )
	{
		if( FUNC("get_scenario_count_time_3") > 60000 )
		{
			if( la_charite_gate_l_recno )
			{
				if ( FUNC( "get_gate_state" , la_charite_gate_l_recno ) == 1 ) 
				{
					FUNC("add_gate_trigger", la_charite_gate_l_recno, 1)
				}
			}

			if( la_charite_gate_r_recno )
			{
				if ( FUNC( "get_gate_state" , la_charite_gate_r_recno ) == 1 ) 
				{
					FUNC("add_gate_trigger", la_charite_gate_r_recno, 1)
				}
			}
					
			FUNC( "set_scenario_event_bit_flag", 30, 0)
		}	
	}


	
	//batterram_msg 
//	if ( flag_batterram_msg == 0 )
//	{
//		if( FUNC("people_by_nation_exist_in_place", place_recno_attention_msg, "FRENCH") )
//		{
//			FUNC("attention_call_message", "[0001N]There is a battering ram ready for use to the right of the camp.")
//			FUNC("set_scenario_event_bit_flag", 19, 1)
//		}
//	}
	
	//encounter msg
	if ( flag_encount_cut_scene == 0 && flag_first_invasion_st_pierre == 0)
	{
		if( FUNC("people_by_nation_exist_in_place", place_recno_encounter_cut_scene_msg, "FRENCH") )
		{
			FUNC("start_cut_scene", 0, 0, 37843, 27798, 1119, 187, -50, 15)

			// 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
												
			WAIT { DIALOG("add_dialog", jean_recno, "[0025N]There lies the mercenary stronghold of Saint-Pierre-le-Moutier. Though the walls are of wood, the sheer size suggests we should expect to encounter mercenaries by the droves.") }

			FUNC("change_camera_in_cut_scene", 0, 37508, 27396, 1214, 187, 1, 16)

			WAIT { DIALOG("add_dialog", jean_recno, "[0026N]The path to the left must lead around to the back side of the castle, but I would not be suprise if enemy units were patroling the region.") }
											
			// leave cut scene
			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)	// all unit can't process

			FUNC("set_scenario_bit_flag", 5, 1)
		}
	}

	//st pierre
	if( flag_first_invasion_st_pierre == 0  )
	{
		if( FUNC("people_by_nation_exist_in_place", place_recno_first_invasion, "FRENCH") || FUNC("people_by_nation_exist_in_place", place_recno_first_invasion_2, "FRENCH") )
		{
			if( flag_gate_guard_bribed == 0 && flag_gough_dead == 0 && flag_gressart_heavy_troop_moving == 0 )
			{
				FUNC("start_cut_scene_2", 1, 0, 37699, 22344, 1187, 95, 145, 24, 1)

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

				WAIT{ FUNC("is_cut_scene_status_black_screen") }

				//unit_hp = FUNC("get_unit_hp", gough_recno)
				
				FUNC("del_unit" , gough_recno ) 
				FUNC("facility_barrack_add_leader", facility_recno_st_pierre_13 , gough_id, 20, 25, "Matthew Gough", "Gough" )

				FUNC("facility_barrack_add_member", facility_recno_st_pierre_15 , mlinfant_id, 20, 1, 21)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_22 , mlinfant_id, 20, 1, 21)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_11 , mlinfant_id, 20, 1, 21)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_38 , mlinfant_id, 20, 1, 21)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_33 , mlinfant_id, 20, 1, 21)

				if( flag_st_pierre_poleman_spawn == 0 )
				{

					FUNC("facility_barrack_add_leader", facility_recno_st_pierre_23 , mpolemancap_id, 947, 21, "Ranulph Erward", "Erward" )
					FUNC("facility_barrack_add_member", facility_recno_st_pierre_21 , mpoleman_id, 20, 1, 21)
					FUNC("facility_barrack_add_member", facility_recno_st_pierre_25 , mpoleman_id, 20, 1, 21)
					FUNC("facility_barrack_add_member", facility_recno_st_pierre_20 , mpoleman_id, 20, 1, 21)
					FUNC("facility_barrack_add_member", facility_recno_st_pierre_18 , mpoleman_id, 20, 1, 21)
					FUNC("facility_barrack_add_member", facility_recno_st_pierre_16 , mpoleman_id, 20, 1, 21)

					FUNC("set_scenario_event_bit_flag_2", 9 , 1 )
				}

				FUNC("change_camera_in_cut_scene", 0, 37086, 22680, 787, 187, 138, 25 )
				//FUNC("change_camera_in_cut_scene", 0, 37699, 22344, 1187, 95, 145, 24)

				if( FUNC("is_cut_scene_finished" ) == 0 )
				{
					WAIT{ FUNC("pause_script", 2000) }
				}
				else
				{
					WAIT{ FUNC("pause_script", 1 ) }
				}

				gough_recno = FUNC("search_unit_by_name", "Matthew Gough")
				
				
				if(gough_recno)
				{
					FUNC("set_can_bribe_flag" , gough_recno, 0)
					//FUNC("set_unit_hp", gough_recno, unit_hp )
					FUNC("set_unit_retreat", gough_recno , 1)
					FUNC("give_item_to_unit", "fd_fish", 1, 3, gough_recno)
						
				}
																	
				WAIT { DIALOG("add_dialog", gough_recno, "[0027N]So the French have made it this far. Ha! They will make it no further!") }
							
				// 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)	// all unit can't process

				FUNC("set_units_can_bribe_flag" , mlinfantcap_id, 1 )
				FUNC("set_units_can_bribe_flag" , marchercap_id, 1 )
				FUNC("set_units_can_bribe_flag" , mexarcher_id, 1)
				FUNC("set_units_can_bribe_flag" , mexarchercap_id, 1)
				FUNC("set_units_can_bribe_flag" , mpolemancap_id, 1 )
				FUNC("set_units_can_bribe_flag" , mlinfant_id, 1 )
				FUNC("set_units_can_bribe_flag" , marcher_id, 1 )
				FUNC("set_units_can_bribe_flag" , mpoleman_id, 1 )

				FUNC ("set_end_condition_enabled", 4, 1) 
			}

			FUNC( "set_scenario_event_bit_flag", 8, 1)  			

			FUNC ("stop_curr_task", st_cross_1 ) 
			FUNC ("stop_curr_task", st_cross_2 ) 
			FUNC ("stop_curr_task", st_cross_3 ) 
			FUNC ("stop_curr_task", st_cross_4 ) 
			FUNC ("stop_curr_task", st_cross_5 ) 
			FUNC ("stop_curr_task", st_cross_6 ) 
			FUNC ("stop_curr_task", st_cross_7 ) 
		}
	}

	if( flag_gressart_heavy_troop_moving == 0 && flag_st_pierre_mountain_top == 0 && flag_gough_dead == 0 )
	{
		if( FUNC("people_by_nation_exist_in_place", place_recno_st_pierre_firework, "FRENCH" ) )
		{
			FUNC("start_cut_scene_2", 1, 0, 45906, 23333,  2536, 95, 162, 28 , 1)

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

			WAIT{ FUNC("is_cut_scene_status_black_screen") }

			//unit_hp = FUNC("get_unit_hp", gough_recno)

			FUNC( "set_unit_drop_item_id" , gough_recno, 0 ) 

			FUNC("del_unit" , gough_recno )

			FUNC("facility_barrack_add_leader", facility_recno_firework_spawn_3 , gough_id, 1020, 25, "Matthew Gough", "Gough" )
			FUNC("facility_barrack_add_leader", facility_recno_firework_spawn_0 , martin_id, 1021, 25, "Martin Gough", "Gough" )

			FUNC("facility_barrack_add_leader", facility_recno_firework_spawn_9 , mexarchercap_id, 460, 21, "Giles Cottesmore", "Cottesmore" )
			FUNC("facility_barrack_add_member", facility_recno_firework_spawn_1 , mexarcher_id, 460, 1, 21)
			FUNC("facility_barrack_add_member", facility_recno_firework_spawn_10 , mexarcher_id, 460, 1, 21)

			FUNC("facility_barrack_add_leader", facility_recno_firework_spawn_6 , mexarchercap_id, 1322, 21, "Magnus Brid", "Brid" )
			FUNC("facility_barrack_add_member", facility_recno_firework_spawn_2 , mexarcher_id, 1322, 1, 21)
			FUNC("facility_barrack_add_member", facility_recno_firework_spawn_7 , mexarcher_id, 1322, 1, 21)

			FUNC("facility_barrack_add_leader", facility_recno_firework_spawn_4 , mexarchercap_id, 1323, 21, "Roland Fryuell", "Fryuell" )
			FUNC("facility_barrack_add_member", facility_recno_firework_spawn_5 , mexarcher_id, 1323, 1, 21)
			FUNC("facility_barrack_add_member", facility_recno_firework_spawn_8 , mexarcher_id, 1323, 1, 21)

			FUNC("change_camera_in_cut_scene" , 0, 45906 , 23333, 2536, 95, 162, 28 )
			
			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				WAIT{ FUNC("pause_script", 3000) }
			}
			else
			{
				WAIT{ FUNC("pause_script", 2000 ) }
			}

			gough_recno = FUNC("search_unit_by_name", "Matthew Gough")
			
			if(gough_recno)
			{
				FUNC("set_can_bribe_flag" , gough_recno, 0)
				//FUNC("set_unit_hp", gough_recno, unit_hp )
				FUNC("set_unit_retreat" , gough_recno, -2)
				FUNC("give_item_to_unit", "fd_fish", 1, 3, gough_recno)
			}

			martin_recno = FUNC("search_unit_by_name", "Martin Gough")
			
			if(martin_recno)
			{
				FUNC("set_can_bribe_flag" , martin_recno, 0)
				FUNC("set_unit_retreat" , martin_recno, -2)
				FUNC("give_item_to_unit", "fd_fish", 1, 3, martin_recno)
			}

			tower_attack_archer_recno_19 = FUNC("search_unit_by_name", "Giles Cottesmore") 		
			fire_attack_archer_recno_2 = FUNC("search_unit_by_name", "Magnus Brid") 		
			fire_attack_archer_recno_3 = FUNC("search_unit_by_name", "Roland Fryuell") 		
							
			WAIT { DIALOG("add_dialog", gough_recno, "[0028N]You think that you can just stroll in here and claim for yourself what we have worked hard to keep?") }

			FUNC("change_camera_in_cut_scene", 0, 45687, 24256, 3178, 95, -159, 56 )

			if( tower_attack_archer_recno_19 )
			{
//				FUNC("set_unit_team_can_process_in_cut_scene", tower_attack_archer_recno_19 , 1)	// all unit can't process
			}

			if( fire_attack_archer_recno_3 )
			{
//				FUNC("set_unit_team_can_process_in_cut_scene", fire_attack_archer_recno_3 , 1)	// all unit can't process
			}

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				ACTION("give_task", tower_attack_archer_recno_19 , "APPROACH_PLACE", 95, place_recno_st_pierre_firework_app_7, 0, 0, 0)
				ACTION("give_task", fire_attack_archer_recno_3 , "APPROACH_PLACE", 95, place_recno_st_pierre_firework_app_2, 0, 0, 0)
			}
			
			WAIT { DIALOG("add_dialog", gough_recno, "[0029N]You can come out now, men! Let’s greet our visitors with a flashy display of fireworks?") }

			FUNC("change_camera_in_cut_scene", 0, 45507, 23727, 2365, 204, -23, 5 )

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				FUNC("set_unit_team_can_process_in_cut_scene", tower_attack_archer_recno_19 , 0)	// all unit can't process
				FUNC("set_unit_team_can_process_in_cut_scene", fire_attack_archer_recno_3 , 0)	// all unit can't process
			}

			FUNC("stop_curr_task", fire_attack_archer_recno_3  )
			FUNC("stop_curr_task", tower_attack_archer_recno_19 )

			WAIT { DIALOG("add_dialog", martin_recno, "[0030N]Brother, are these meddling peasants giving you trouble? Worry not, together we shall vanquish any enemy. Together we can stand up against any inferior Frenchman!") }

			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)	// all unit can't process
			
			FUNC("set_scenario_event_bit_flag", 25, 1)

			FUNC("set_units_can_bribe_flag" , mlinfantcap_id, 1 )
			FUNC("set_units_can_bribe_flag" , marchercap_id, 1 )
			FUNC("set_units_can_bribe_flag" , mpolemancap_id, 1 )
			FUNC("set_units_can_bribe_flag" , mlinfant_id, 1 )
			FUNC("set_units_can_bribe_flag" , marcher_id, 1 )
			FUNC("set_units_can_bribe_flag" , mpoleman_id, 1 )
			FUNC("set_units_can_bribe_flag" , mexarcher_id, 1 )
			FUNC("set_units_can_bribe_flag" , mexarchercap_id, 1 )
	
			FUNC("set_can_bribe_flag" , gressart_recno, 0)
			FUNC("set_can_bribe_flag" , gough_recno, 0)
			FUNC("set_can_bribe_flag" , martin_recno, 0)

			if( FUNC ("get_end_condition_enabled", 4 ) == 0 )
			{
				FUNC ("set_end_condition_enabled", 4, 1) 
			}

			if( FUNC ("get_end_condition_enabled", 24 ) == 0 )
			{
				FUNC ("set_end_condition_enabled", 24, 1) 
			}
		}
	}

	if( FUNC("get_place_captured", place_recno_st_pierre) == 0 && ( flag_gressart_heavy_troop_moving || flag_gough_dead ) )
	{
		if( FUNC("fightable_enemy_exist_in_place", place_recno_st_pierre, unit_recno) == 0 && FUNC("fightable_enemy_exist_in_place", place_recno_st_pierre_2 , unit_recno) == 0 && FUNC("fightable_enemy_exist_in_place", place_recno_st_pierre_3, unit_recno) == 0)
		{
			if( st_pierre_gate_recno )
			{
				FUNC( "set_item_nation" , st_pierre_gate_recno , "French" )
			}

			//FUNC("set_place_nation_by_code", place_recno_stpierre_barrack, "FRENCH" ) 
			FUNC("set_barrack_captured", facility_recno_stpierre_recruit, 1)
			FUNC("change_all_item_in_place", place_recno_st_pierre, english_flag_id, french_flag_id )
			FUNC("change_all_item_in_place", place_recno_st_pierre_2, english_flag_id, french_flag_id )
			FUNC("change_all_item_in_place", place_recno_st_pierre_3, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_recno_st_pierre, 1)
			FUNC( "set_place_captured" , place_recno_st_pierre_2, 1)
			FUNC( "set_place_captured" , place_recno_st_pierre_3, 1)
			FUNC("set_item_nation", st_pierre_wall_1_recno , "French" )
			FUNC("set_item_nation", st_pierre_wall_2_recno , "French" )
			FUNC("set_minimap_icon_display_enable" , "ECASTLE_S7L2" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCASTLE_S7L2" , 1 )
			FUNC("set_territory_nation", "Saint-Pierre-le-Moutier", "French")

			FUNC("set_can_interact_flag", weapon_seller_st_pierre_recno, 1)
			FUNC("set_can_interact_flag", potion_seller_st_pierre_recno, 1)

			FUNC("set_scenario_bit_flag", 14, 1)

			if( flag_gressart_heavy_troop_moving && gough_recno ) 
			{
				FUNC("set_unit_retreat", gough_recno, -2)
			}
		}
	}

	//la charite
	if( FUNC( "is_item_deleted_by_name", la_charite_wall_1_recno, "wall") == 1 )
	{
		la_charite_wall_1_recno = 0
	} 

	if( FUNC( "is_item_deleted_by_name", la_charite_wall_2_recno, "wall2") == 1 )
	{
		la_charite_wall_2_recno = 0
	} 

	if( FUNC( "is_item_deleted_by_name", st_pierre_wall_1_recno , "StPierre wall 1") == 1 )
	{
		st_pierre_wall_1_recno = 0
	} 

	if( FUNC( "is_item_deleted_by_name", st_pierre_wall_2_recno , "StPierre wall 2") == 1 )
	{
		st_pierre_wall_2_recno = 0
	} 
			
	if( tower_attack_archer_recno_20 && flag_la_charite_attacked && flag_first_invasion_la_charite_l == 0 && flag_first_invasion_la_charite_r == 0 && flag_first_invasion_la_charite_c == 0 )
	{
		if( FUNC("is_unit_dead" , tower_attack_archer_recno_20 ) || FUNC("is_unit_bribed", tower_attack_archer_recno_20 ) )
		{
			tower_attack_archer_recno_20 = 0
		}
		else
		{
			team_member_count = FUNC("get_unit_team_size", tower_attack_archer_recno_20)

			if( team_member_count <= 6 )
			{
				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_1 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_1 , marcher_id, 489, 1, 25)
				}

				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_2 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_2 , marcher_id, 489, 1, 25)
				}

				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_3 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_3 , mlinfant_id, 489, 1, 25)
				}
		
				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_4 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_4 , mlinfant_id, 489, 1, 25)
				}

				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_5 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_5 , mlinfant_id, 489, 1, 25)
				}

				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_6 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_6 , mlinfant_id, 489, 1, 25)
				}

				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_7 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_7 , marcher_id, 489, 1, 25)
				}
				
				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_8 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_8 , marcher_id, 489, 1, 25)
				}

				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_9 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_9 , mlinfant_id, 489, 1, 25)
				}

				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_10 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_10 , mlinfant_id, 489, 1, 25)
				}

				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_11 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_11 , mlinfant_id, 489, 1, 25)
				}

				if( FUNC("is_unit_inside_facility", facility_recno_la_charite_spawn_12 ) == 0 )
				{
					FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_12 , mlinfant_id, 489, 1, 25)
				}

				ACTION("give_task", tower_attack_archer_recno_20 , "DEFEND_PLACE", 99, place_recno_st_la_charite_outside, 0, 0, 0)
				
				if( la_charite_gate_l_recno )
				{
					if ( FUNC( "get_gate_state" , la_charite_gate_l_recno ) == 0 ) 
					{
						FUNC("add_gate_trigger", la_charite_gate_l_recno, 1)
						FUNC( "set_scenario_event_bit_flag", 30, 1)
						FUNC( "set_scenario_count_time_3" )		
					}
				}

				if( la_charite_gate_r_recno )
				{
					if ( FUNC( "get_gate_state" , la_charite_gate_r_recno ) == 0 ) 
					{
						FUNC("add_gate_trigger", la_charite_gate_r_recno, 1)
						FUNC( "set_scenario_event_bit_flag", 30, 1)		
						FUNC( "set_scenario_count_time_3" )		
					}
				}

				FUNC("set_units_can_bribe_flag" , mlinfantcap_id, 1 )
				FUNC("set_units_can_bribe_flag" , marchercap_id, 1 )
				FUNC("set_units_can_bribe_flag" , mpolemancap_id, 1 )
				FUNC("set_units_can_bribe_flag" , mlinfant_id, 1 )
				FUNC("set_units_can_bribe_flag" , marcher_id, 1 )
				FUNC("set_units_can_bribe_flag" , mpoleman_id, 1 )

				FUNC("set_units_can_bribe_flag" , mexarcher_id, 1 )
				FUNC("set_units_can_bribe_flag" , mexarchercap_id, 1 )
	
				FUNC("set_can_bribe_flag" , gressart_recno, 0)
				FUNC("set_can_bribe_flag" , gough_recno, 0)
			}
		}
	}
	else if ( flag_la_charite_attacked == 0 )
	{
		if( la_charite_wall_1_recno == 0 || la_charite_wall_2_recno == 0)
		{
			ACTION("give_team_task", tower_attack_archer_recno_20 , "DEFEND_PLACE", 99, place_recno_st_la_charite_outside, 0, 0, 0)
		
			if( la_charite_gate_l_recno )
			{
				if ( FUNC( "get_gate_state" , la_charite_gate_l_recno ) == 0 ) 
				{
					FUNC("add_gate_trigger", la_charite_gate_l_recno, 1)
					FUNC( "set_scenario_event_bit_flag", 30, 1)
					FUNC( "set_scenario_count_time_3" )		
				}
			}

			if( la_charite_gate_r_recno )
			{
				if ( FUNC( "get_gate_state" , la_charite_gate_r_recno ) == 0 ) 
				{
					FUNC("add_gate_trigger", la_charite_gate_r_recno, 1)
					FUNC( "set_scenario_event_bit_flag", 30, 1)		
					FUNC( "set_scenario_count_time_3" )		
				}
			}

			FUNC("set_scenario_event_bit_flag", 26, 1)
		}
		else if( ( FUNC( "get_wall_hp" , la_charite_wall_1_recno ) < FUNC( "get_wall_max_hp" , la_charite_wall_1_recno ) ) ||  ( FUNC( "get_wall_hp" , la_charite_wall_2_recno ) < FUNC( "get_wall_max_hp" , la_charite_wall_2_recno ) ) )
		{
			ACTION("give_team_task", tower_attack_archer_recno_20 , "DEFEND_PLACE", 99, place_recno_st_la_charite_outside, 0, 0, 0)
		
			if( la_charite_gate_l_recno )
			{
				if ( FUNC( "get_gate_state" , la_charite_gate_l_recno ) == 0 ) 
				{
					FUNC("add_gate_trigger", la_charite_gate_l_recno, 1)
					FUNC( "set_scenario_event_bit_flag", 30, 1)
					FUNC( "set_scenario_count_time_3" )		
				}
			}

			if( la_charite_gate_r_recno )
			{
				if ( FUNC( "get_gate_state" , la_charite_gate_r_recno ) == 0 ) 
				{
					FUNC("add_gate_trigger", la_charite_gate_r_recno, 1)
					FUNC( "set_scenario_event_bit_flag", 30, 1)		
					FUNC( "set_scenario_count_time_3" )		
				}
			}

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

	if( flag_first_invasion_la_charite_l == 0 && flag_first_invasion_la_charite_r == 0 && flag_first_invasion_la_charite_c == 0 )
	{
		if( FUNC("people_by_nation_exist_in_place", place_recno_invasion_left, "FRENCH") )
		{
//			FUNC("start_cut_scene", 0, 0, 16330, 5015, 1819, 150, 176, 30)

//			FUNC("set_idle", unit_recno) 
//			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
										
//			WAIT { DIALOG("add_dialog", gressart_recno, "[0004N]The royal pain in the arse finally makes the grand entrance. You may not know this, but for us, gold is as precious as life, and you have taken it from us. Now you shall pay in kind!") }
						
			// leave cut scene
//			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)	// all unit can't process
//
			FUNC( "set_scenario_event_bit_flag", 27, 1)  	
//			
//			FUNC("stop_curr_task", gressart_recno	)
//			FUNC("stop_curr_task", la_charite_army_recno_1	)
//			FUNC("stop_curr_task", la_charite_army_recno_2	)
//			FUNC("stop_curr_task", la_charite_army_recno_3	)
//			FUNC("stop_curr_task", la_charite_army_recno_4	)
//			FUNC("stop_curr_task", la_charite_army_recno_5	)
//			FUNC("stop_curr_task", la_charite_army_recno_6	)
//			FUNC("stop_curr_task", la_charite_army_recno_7	)
//			FUNC("stop_curr_task", la_charite_army_recno_8	)
//			FUNC("stop_curr_task", la_charite_army_recno_9	)
//			FUNC("stop_curr_task", la_charite_army_recno_10	)
//			FUNC("stop_curr_task", la_charite_army_recno_11	)
//			FUNC("stop_curr_task", la_charite_army_recno_12	)
//			FUNC("stop_curr_task", la_charite_army_recno_13	)
//			FUNC("stop_curr_task", la_charite_army_recno_14	)
//			FUNC("stop_curr_task", la_charite_army_recno_15	)
//			FUNC("stop_curr_task", la_charite_army_recno_16	)
//			FUNC("stop_curr_task", la_charite_army_recno_17	)
//			FUNC("stop_curr_task", la_charite_army_recno_18	)
		}
		else if( FUNC("people_by_nation_exist_in_place", place_recno_invasion_right, "FRENCH") )
		{
//			FUNC("start_cut_scene", 0, 0, 16419, 11143, 1762, 150, -180, 30)
//
//			FUNC("set_idle", unit_recno) 
//			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//										
//			WAIT { DIALOG("add_dialog", gressart_recno, "[0004N]The royal pain in the arse finally makes the grand entrance. You may not know this, but for us, gold is as precious as life, and you have taken it from us. Now you shall pay in kind!") }
//						
//			// leave cut scene
//			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)	// all unit can't process
			FUNC( "set_scenario_event_bit_flag", 28, 1)  			

//			FUNC("stop_curr_task", gressart_recno	)
//			FUNC("stop_curr_task", la_charite_army_recno_1	)
//			FUNC("stop_curr_task", la_charite_army_recno_2	)
//			FUNC("stop_curr_task", la_charite_army_recno_3	)
//			FUNC("stop_curr_task", la_charite_army_recno_4	)
//			FUNC("stop_curr_task", la_charite_army_recno_5	)
//			FUNC("stop_curr_task", la_charite_army_recno_6	)
//			FUNC("stop_curr_task", la_charite_army_recno_7	)
//			FUNC("stop_curr_task", la_charite_army_recno_8	)
//			FUNC("stop_curr_task", la_charite_army_recno_9	)
//			FUNC("stop_curr_task", la_charite_army_recno_10	)
//			FUNC("stop_curr_task", la_charite_army_recno_11	)
//			FUNC("stop_curr_task", la_charite_army_recno_12	)
//			FUNC("stop_curr_task", la_charite_army_recno_13	)
//			FUNC("stop_curr_task", la_charite_army_recno_14	)
//			FUNC("stop_curr_task", la_charite_army_recno_15	)
//			FUNC("stop_curr_task", la_charite_army_recno_16	)
//			FUNC("stop_curr_task", la_charite_army_recno_17	)
//			FUNC("stop_curr_task", la_charite_army_recno_18	)
		}
		else if( FUNC("people_by_nation_exist_in_place", place_recno_invasion_center, "FRENCH") )
		{
//			FUNC("start_cut_scene", 0, 0, 16936, 8349, 1081, 150, 178, 22)
//
//			FUNC("set_idle", unit_recno) 
//			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
//										
//			WAIT { DIALOG("add_dialog", gressart_recno, "[0004N]The royal pain in the arse finally makes the grand entrance. You may not know this, but for us, gold is as precious as life, and you have taken it from us. Now you shall pay in kind!") }
//						
//			// leave cut scene
//			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)	// all unit can't process
			FUNC( "set_scenario_event_bit_flag", 29, 1)  
//			
//			FUNC("stop_curr_task", gressart_recno	)
//			FUNC("stop_curr_task", la_charite_army_recno_1	)
//			FUNC("stop_curr_task", la_charite_army_recno_2	)
//			FUNC("stop_curr_task", la_charite_army_recno_3	)
//			FUNC("stop_curr_task", la_charite_army_recno_4	)
//			FUNC("stop_curr_task", la_charite_army_recno_5	)
//			FUNC("stop_curr_task", la_charite_army_recno_6	)
//			FUNC("stop_curr_task", la_charite_army_recno_7	)
//			FUNC("stop_curr_task", la_charite_army_recno_8	)
//			FUNC("stop_curr_task", la_charite_army_recno_9	)
//			FUNC("stop_curr_task", la_charite_army_recno_10	)
//			FUNC("stop_curr_task", la_charite_army_recno_11	)
//			FUNC("stop_curr_task", la_charite_army_recno_12	)
//			FUNC("stop_curr_task", la_charite_army_recno_13	)
//			FUNC("stop_curr_task", la_charite_army_recno_14	)
//			FUNC("stop_curr_task", la_charite_army_recno_15	)
//			FUNC("stop_curr_task", la_charite_army_recno_16	)
//			FUNC("stop_curr_task", la_charite_army_recno_17	)
//			FUNC("stop_curr_task", la_charite_army_recno_18	)			
		}
	}
	else if ( flag_la_charite_invasion == 0 )
	{
		FUNC("start_cut_scene_2", 1, 0, 12980, 7932, 128, 350, 1, 2, 1)

		FUNC("set_idle", unit_recno) 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
					
		WAIT{ FUNC("is_cut_scene_status_black_screen") }
		FUNC("change_camera_in_cut_scene", 0, 12980, 7932, 128, 350, 1, 2)

		// set main character to idle
		if( FUNC("get_bribed_enemy_kill_count") >= 20 )
		{
			WAIT { DIALOG("add_dialog", gressart_recno, "[0031N]Well, have our reinforcements arrived?") }
			WAIT { DIALOG("add_dialog", la_charite_army_recno_1, "[0032N]I'm afraid not, sire! It seems the French have stolen our gold and bribed some of our less loyal subjects. They might come, milord, but not to assist - to attack!") }
			WAIT { DIALOG("add_dialog", gressart_recno, "[0033N]Blast these French miscreants! Blast you all! I want their heads on a platter! Nobody parts me from my gold!") }
			
		}
		else
		{
			WAIT { DIALOG("add_dialog", gressart_recno, "[0031N]Well, have our reinforcements arrived?") }
			WAIT { DIALOG("add_dialog", la_charite_army_recno_1, "[0034N]Indeed, milord, they are manning the towers as we speak!") }
			WAIT { DIALOG("add_dialog", gressart_recno, "[0035N]Good, good. With additional support, the French have a sliver of a chance to breach these formidable walls of my mighty fortress. All units, ready for battle! Let's attack!") }
		}

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

		FUNC( "attention_call_message_2", "[0036N]We have breached the walls, men! Let us storm the castle and rid France of mercenaries forever!" , alencon_recno )
		FUNC( "attention_call_message_2", "[0037N]You French! We would wipe you out in a heartbeat if it weren't for the mercenary traitors! Gressart - Hear this! For killing our men after the way we entrusted you, we shall tear you limb from limb!" , la_charite_army_recno_1 )

		FUNC("facility_barrack_add_leader", facility_recno_la_charite_spawn_1, barchercap_id, 961, 24, "Piers Glaston", "Glaston" )
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_2, barcher_id, 961, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_3, barcher_id, 961, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_4, barcher_id, 961, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_5, barcher_id, 961, 1, 24)
		FUNC("facility_barrack_add_leader", facility_recno_la_charite_spawn_6, barchercap_id, 962, 24, "Brice Drumbyl", "Drumbyl" )
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_7, barcher_id, 962, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_8, barcher_id, 962, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_9, barcher_id, 962, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_10, barcher_id, 962, 1, 24)
		FUNC("facility_barrack_add_leader", facility_recno_la_charite_spawn_11, barchercap_id, 963, 24, "Everard Campo", "Campo" )
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_12, barcher_id, 963, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_13, barcher_id, 963, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_14, barcher_id, 963, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_15, barcher_id, 963, 1, 24)
		FUNC("facility_barrack_add_leader", facility_recno_la_charite_spawn_16, barchercap_id, 964, 24, "Hugone Belton", "Belton" )
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_17, barcher_id, 964, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_18, barcher_id, 964, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_19, barcher_id, 964, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_20, barcher_id, 964, 1, 24)
		FUNC("facility_barrack_add_leader", facility_recno_la_charite_spawn_21, elinfantcap_id, 965, 24, "Philip Astan", "Astan" )
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_22, elinfant_id, 965, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_23, elinfant_id, 965, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_24, elinfant_id, 965, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_25, elinfant_id, 965, 1, 24)
		FUNC("facility_barrack_add_leader", facility_recno_la_charite_spawn_26, ehinfantcap_id, 966, 24, "Lucas Harby", "Harby" )
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_27, ehinfant_id, 966, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_28, ehinfant_id, 966, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_29, ehinfant_id, 966, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_30, ehinfant_id, 966, 1, 24)
		FUNC("facility_barrack_add_leader", facility_recno_la_charite_spawn_31, epolemancap_id, 967, 24, "Osbertus Kok", "Kok" )
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_32, epoleman_id, 967, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_33, epoleman_id, 967, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_34, epoleman_id, 967, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_35, epoleman_id, 967, 1, 24)
		FUNC("facility_barrack_add_leader", facility_recno_la_charite_spawn_31, emacemancap_id, 968, 24, "Richard Lewyn", "Lewyn" )
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_32, emaceman_id, 968, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_33, emaceman_id, 968, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_34, emaceman_id, 968, 1, 24)
		FUNC("facility_barrack_add_member", facility_recno_la_charite_spawn_35, emaceman_id, 968, 1, 24)
		
		WAIT { FUNC("is_cut_scene_finished" ) }
		FUNC("set_scenario_event_bit_flag_2", 20, 1)

		FUNC("stop_curr_task", gressart_recno	)
		FUNC("stop_curr_task", la_charite_army_recno_1	)
		FUNC("stop_curr_task", la_charite_army_recno_2	)
		FUNC("stop_curr_task", la_charite_army_recno_3	)
		FUNC("stop_curr_task", la_charite_army_recno_4	)
		FUNC("stop_curr_task", la_charite_army_recno_5	)
		FUNC("stop_curr_task", la_charite_army_recno_6	)
		FUNC("stop_curr_task", la_charite_army_recno_7	)
		FUNC("stop_curr_task", la_charite_army_recno_8	)
		FUNC("stop_curr_task", la_charite_army_recno_9	)
		FUNC("stop_curr_task", la_charite_army_recno_10	)
		FUNC("stop_curr_task", la_charite_army_recno_11	)
		FUNC("stop_curr_task", la_charite_army_recno_12	)
		FUNC("stop_curr_task", la_charite_army_recno_13	)
		FUNC("stop_curr_task", la_charite_army_recno_14	)
		FUNC("stop_curr_task", la_charite_army_recno_15	)
		FUNC("stop_curr_task", la_charite_army_recno_16	)
		FUNC("stop_curr_task", la_charite_army_recno_17	)
		FUNC("stop_curr_task", la_charite_army_recno_18	)		
	}

	if( FUNC("get_place_captured", place_recno_st_la_charite) == 0 )
	{
		if( FUNC("fightable_enemy_exist_in_place", place_recno_st_la_charite, unit_recno) == 0)
		{
			FUNC("change_all_item_in_place", place_recno_st_la_charite, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_recno_st_la_charite, 1)
			FUNC("set_item_nation", la_charite_wall_1_recno , "French" )
			FUNC("set_item_nation", la_charite_wall_2_recno , "French" )
			FUNC("set_minimap_icon_display_enable" , "ECASTLE_S7L5" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCASTLE_S7L5" , 1 )
			FUNC("set_territory_nation", "La Charité-sur-Loire", "French")
			FUNC("set_scenario_bit_flag", 15, 1)
		}
	}

	
	//FUNC("set_unit_track" , batterram_recno, "BAT_TRK")

	//gold cart scene
	if( flag_cart_cut_scene == 0) 
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_st_pierre_radius, "FRENCH" ) || FUNC( "people_by_nation_exist_in_place" , place_recno_st_pierre_cart_scene_trigger, "FRENCH" ) )
		{
			FUNC("start_cut_scene", 0, 0, 35261, 23216, 1923, 251, 0, 47)

			FUNC("set_idle", unit_recno) 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_1, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_2, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_3, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_4, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_5, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_6, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_7, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_8, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_9, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_force_recno_10, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_cart_recno, 1)
			FUNC("set_unit_can_process_in_cut_scene", cut_scene_cart_driver_recno, 1)
			FUNC("set_unit_can_process_in_cut_scene", gate_guard_recno, 1)

			FUNC("set_unit_can_process_in_cut_scene", church_cart_recno, 1)
			FUNC("set_unit_can_process_in_cut_scene", church_cartman_recno, 1)
			FUNC("set_unit_can_process_in_cut_scene", gough_recno, 1)
			
			WAIT{ DIALOG("add_dialog", cut_scene_cart_driver_recno, "[0038N]Oy! Raise the gate! Our weekly payment has arrived!") }
			WAIT{ DIALOG("add_dialog", cut_scene_cart_driver_recno, "[0039N]That makes just a bit over 100 barrels of gold we have wrangled from the hands of those ridiculous, defenseless peasants!") }
	
			if( cut_scene_cart_cart_recno && gold_cut_scene_track_id == 0)
			{
				gold_cut_scene_track_id = FUNC("unit_track_to_id", cut_scene_cart_cart_recno, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_cart_recno, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_1, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_2, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_3, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_4, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_5, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_6, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_7, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_8, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_9, "GoldTrk2")
				FUNC("set_unit_track" , cut_scene_cart_force_recno_10, "GoldTrk2")
				FUNC("set_unit_track" , church_cart_recno, "GoldTrk2")
			}

			if( church_cart_recno && gold_cut_scene_track_id == 0)
			{
				FUNC("set_unit_track" , church_cart_recno, "GoldTrk2")
			}
			
			FUNC("change_camera_in_cut_scene" , 0, 35868, 23107, 735, 350, 29 , 14 )

			WAIT{ DIALOG("add_dialog", gate_guard_recno , "[0040N]Excellent. Place it at the usual location. I will let Sir Matthew Gough know immediately. I'm sure he will enjoy counting the gold ingots before our overseer, Lord Perrinet Gressart, distributes the wealth!") }
			
			//FUNC("stop_curr_task" , gate_guard_recno )
			//ACTION("give_order" , gate_guard_recno, "TURN" , 3 , 0 , 340 , 0 , 0 , 0, 2500)

			FUNC("set_unit_degree" , gate_guard_recno , 340)
		
			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				if( st_pierre_gate_recno )
				{
					if ( FUNC( "get_gate_state" ,  st_pierre_gate_recno ) == 0 ) 
					{
						FUNC("add_gate_trigger", st_pierre_gate_recno, 1)
						FUNC( "set_scenario_event_bit_flag", 23, 1)
						FUNC( "set_scenario_count_time_3" )
					}
				}
			}

			WAIT{ DIALOG("add_dialog", gate_guard_recno , "[0041N]Raise the gate!") }
			
			
			FUNC("set_unit_degree" , gate_guard_recno , 200)

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				WAIT{ FUNC("pause_script", 1500) }
			}

			//ACTION("give_order" , gate_guard_recno, "TURN" , 4 , 0 , 200 , 0 , 0 , 0, 2500)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_1)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_2)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_3)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_4)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_5)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_6)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_7)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_8)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_9)
			FUNC("stop_curr_task" , cut_scene_cart_force_recno_10)
			FUNC("stop_curr_task" , cut_scene_cart_cart_recno)

			ACTION("give_task", cut_scene_cart_force_recno_1, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			ACTION("give_task", cut_scene_cart_force_recno_2, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			ACTION("give_task", cut_scene_cart_force_recno_3, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			ACTION("give_task", cut_scene_cart_force_recno_4, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			ACTION("give_task", cut_scene_cart_force_recno_5, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			ACTION("give_task", cut_scene_cart_force_recno_6, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			ACTION("give_task", cut_scene_cart_force_recno_7, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			ACTION("give_task", cut_scene_cart_force_recno_8, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			ACTION("give_task", cut_scene_cart_force_recno_9, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			ACTION("give_task", cut_scene_cart_force_recno_10, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 

			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_1, 0)
			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_2, 0)
			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_3, 0)
			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_4, 0)
			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_5, 0)
			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_6, 0)
			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_7, 0)
			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_8, 0)
			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_9, 0)
			FUNC("enable_unit_bounding_volume", cut_scene_cart_force_recno_10, 0)

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				WAIT{ FUNC("pause_script", 2500) }
			}

			FUNC("stop_curr_task" , gate_guard_recno)
			ACTION("give_task", gate_guard_recno, "IDLE", 1, 1, 0, 0, 0) 

			ACTION("give_task", cut_scene_cart_cart_recno, "APPROACH_PLACE", 2, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
			WAIT{ FUNC("pause_script", 2500) }
	
			FUNC("change_camera_in_cut_scene" , 0, orleans_recno, 200, ( 90 - FUNC("get_unit_dir", orleans_recno) ), 10 )

			FUNC("del_unit_team" , 901)
			FUNC("del_unit_team" , 902)
			FUNC("del_unit" , cut_scene_cart_cart_recno)
			FUNC("del_unit" , cut_scene_cart_driver_recno)
			
			if( st_pierre_gate_recno )
			{
				if ( FUNC( "get_gate_state" ,  st_pierre_gate_recno ) == 1 ) 
				{
					FUNC("add_gate_trigger", st_pierre_gate_recno, 1)
				}
			}
			
			WAIT{ DIALOG("add_dialog", orleans_recno, "[0042N]Those English bastards've been making payments to the mercenaries with gold forged from the toil and sweat of our people!We must put an end to their incessant looting and recover the gold taken from our people and return it to its rightful owners!") }
			
			FUNC("change_camera_in_cut_scene", 0, 47599, 22191, 2672, 159, 107, 1 )

			ACTION("give_task", church_cart_recno, "APPROACH_PLACE", 2, place_church_approach, 0, 0 , 0)					 
			
			WAIT{ DIALOG("add_dialog", gough_recno, "[0043N]Ah, payment as usual. What would this world be like without the captivating luster of Gold to add its sparkle?") }
			
			FUNC("change_camera_in_cut_scene", 0, 47857, 23094, 2522, 159, 179, 2 )			
			WAIT{ DIALOG("add_dialog", gough_recno, "[0044N]Just set the cargo next to the other barrels. We shall divide the bounty later.") }

			FUNC("change_camera_in_cut_scene", 0, 47388, 22832, 2383, 187, -65, -1 )			

			WAIT{ DIALOG("add_dialog", gough_recno, "[0045N]I shall await the next delivery. The other cartman had better not dally! You know how our men are loyal only to this precious metal - if they don’t receive payment there’s no telling how Lord Gressart's men will react!") }
		
			//FUNC("change_camera_in_cut_scene" , 0 , orleans_recno, 200, ( 90 - FUNC("get_unit_dir", orleans_recno) ), 10 )
		
			//FUNC("change_camera_in_cut_scene", 0, 46876, 25000, 2452, 159, -88, -3 )	
			
			FUNC("change_camera_in_cut_scene" , 0 , orleans_recno, 200, ( 90 - FUNC("get_unit_dir", orleans_recno) ), 10 )
			
			WAIT{ DIALOG("add_dialog", orleans_recno, "[0046N]Formidable as they are we must find a way to enter the wall of his stronghold. Yet risking a frontal attack would prove suicide! Surely there must be another way inside?") }

			FUNC("change_camera_in_cut_scene" , 0 , jean_recno, 200, ( 90 - FUNC("get_unit_dir", jean_recno) ), 10 )

			WAIT{ DIALOG("add_dialog", jean_recno, "[0047N]The cart must come from an enemy camp, if we can locate the camp and sabotage their delivery, then I am sure that Gressart will be upset once his gold payments fail to arrive!") }

			FUNC("change_camera_in_cut_scene" , 0 , lahire_recno, 200, ( 90 - FUNC("get_unit_dir", lahire_recno) ), 10 )

			WAIT{ DIALOG("add_dialog", lahire_recno, "[0048N]Or why not bribe the gate guard? Provided we can match his price in gold ingots, I am sure he will find a way to allow us entrance!") }
			
			FUNC("change_camera_in_cut_scene" , 0 , alencon_recno, 200, ( 90 - FUNC("get_unit_dir", alencon_recno) ), 10 )
			
			WAIT{ DIALOG("add_dialog", alencon_recno, "[0049N]It seems that our mercenary 'friends' are none too loyal to their lord. Every man has his price. I believe that if we possess enough gold, then perhaps we can even bribe mercenary units to support our king!") }
						
			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" , church_cart_recno)
			ACTION("give_task", church_cart_recno, "IDLE", 1, 1, 0, 0, 0) 
			FUNC("set_unit_ride_off_cart", church_cartman_recno )
			FUNC("del_unit", church_cartman_recno )
			FUNC("del_unit", church_cart_recno )

			FUNC("attention_call_message", "[0050N]There are over 100 barrels containing gold scattered all over the lands. They appear as yellow dots on the minimap." )
			FUNC("set_minimap_display_gold_enable" , 1)
						
			FUNC ("set_end_condition_enabled", 3, 1)		
			//FUNC ("set_end_condition_enabled", 4, 1) 
			FUNC ("set_end_condition_enabled", 6, 1)							

			FUNC("start_kill_interface_2" , 5)
			
			FUNC("set_scenario_bit_flag", 18, 1 )
		}
	}

	//fog
	if( FUNC("is_unit_inside_place", place_forest_recno , unit_recno) )
	{
		FUNC("set_music_side_environment_enable" , 1 )
		FUNC("set_fog_distance", 2048)
	}
	else
	{
		FUNC("set_music_side_environment_enable" , 0 )
		FUNC("set_fog_distance", 4096)
	}


	//gate_guard
	if( flag_gate_guard_dead == 0 && st_pierre_gate_recno )
	{
		if( FUNC( "is_unit_dead" , gate_guard_recno ) )
		{
			FUNC("set_scenario_bit_flag", 4, 1 )
			flag_gate_guard_dead = 1
		}

		if( flag_gate_guard_cut_scene == 0 && flag_gate_guard_dead == 0 )
		{
			FUNC("set_can_bribe_flag" , gate_guard_recno, 1 )
		}
		else
		{
			FUNC("set_can_bribe_flag" , gate_guard_recno, 0 )
		}


		if( flag_cart_cut_scene && flag_gate_guard_bribed == 0 && flag_gate_guard_pee == 0 )
		{
			if( flag_gate_guard_cut_scene == 0 )
			{
				if( flag_gate_guard_bribed == 0 )
				{
					if( FUNC("is_unit_bribed", gate_guard_recno) )
					{
						FUNC("start_cut_scene", 0, 0, 36009, 23102, 753, 221, 30, 12)

						// 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
															
						WAIT { DIALOG("add_dialog", gate_guard_recno, "[0051N]Ah, gold. Very well, this is more than enough to keep my mouth shut - I hate waiting for those blasted Burgundian and English to arrive with our payment!") }

						FUNC("stop_curr_task" , gate_guard_recno)
						ACTION("give_task", gate_guard_recno, "IDLE", 1, 1, 0, 0, 0) 
														
						// leave cut scene
						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)	// all unit can't process
										
						if( st_pierre_gate_recno )
						{
							FUNC( "set_item_nation" , st_pierre_gate_recno , "French" )
						}

						FUNC("set_scenario_event_bit_flag", 14, 1 )

						flag_gate_guard_bribed = 1
					}
				}

				if( FUNC( "people_by_nation_exist_in_place" , place_recno_st_pierre_halt, "FRENCH" ) )
				{
					if( flag_unit_inside_1 == 0 )
					{
						FUNC("attention_call_message_2", "[0052N]Halt! Who goes there?" , gate_guard_recno )
						FUNC("set_scenario_event_bit_flag", 11, 1 )
					}
				}
				else
				{
					FUNC("set_scenario_event_bit_flag", 11, 0 )
				}

				if( FUNC( "people_by_nation_exist_in_place" , place_recno_st_pierre_bribe, "FRENCH" ) )
				{
					if( flag_unit_inside_2 == 0 )
					{
						FUNC("attention_call_message_2", "[0053N]Come no nearer or I shall call for help!", gate_guard_recno )
						FUNC("set_scenario_count_time")				
						FUNC("set_scenario_event_bit_flag", 12, 1 )
					}
				}
				else
				{
					FUNC("set_scenario_event_bit_flag", 12, 0 )
				}

				if( FUNC("get_can_bribe_flag", gate_guard_recno ) && flag_unit_inside_2 || FUNC("get_gate_hp", st_pierre_gate_recno ) < FUNC("get_gate_max_hp", st_pierre_gate_recno ) || ( FUNC( "get_wall_hp" , st_pierre_wall_1_recno ) < FUNC( "get_wall_max_hp" , st_pierre_wall_1_recno ) ) ||  ( FUNC( "get_wall_hp" , st_pierre_wall_2_recno ) < FUNC( "get_wall_max_hp" , st_pierre_wall_2_recno ) ) || FUNC( "get_unit_hp_percentage", gate_guard_recno) < 100 )
				{
					if ( FUNC("get_scenario_count_time") > 6000 || FUNC( "get_unit_hp_percentage", gate_guard_recno) < 100 || FUNC("get_gate_hp", st_pierre_gate_recno ) < FUNC("get_gate_max_hp", st_pierre_gate_recno ) ||  FUNC( "get_wall_hp" , st_pierre_wall_1_recno ) < FUNC( "get_wall_max_hp" , st_pierre_wall_1_recno )  ||  FUNC( "get_wall_hp" , st_pierre_wall_2_recno ) < FUNC( "get_wall_max_hp" , st_pierre_wall_2_recno )  ) 
					{
						FUNC("facility_barrack_add_leader", facility_recno_st_pierre_40 , marchercap_id, 921, 25 , "David Pye", "Pye" )

						FUNC("facility_barrack_add_leader", facility_recno_st_pierre_12 , marchercap_id, 922, 25 , "ggA2", "ggA2" )
						FUNC("facility_barrack_add_leader", facility_recno_st_pierre_34 , marchercap_id, 923, 25 , "ggA3", "ggA3" )
						FUNC("facility_barrack_add_leader", facility_recno_st_pierre_14 , marchercap_id, 924, 25 , "ggA4", "ggA4" )
						FUNC("facility_barrack_add_leader", facility_recno_st_pierre_24 , marchercap_id, 925, 25 , "ggA5", "ggA5" )
						FUNC("facility_barrack_add_leader", facility_recno_st_pierre_17 , marchercap_id, 926, 25 , "ggA6", "ggA6" )
						FUNC("facility_barrack_add_leader", facility_recno_st_pierre_29 , marchercap_id, 927, 25 , "ggA7", "ggA7" )
						FUNC("facility_barrack_add_leader", facility_recno_st_pierre_19 , marchercap_id, 928, 25 , "ggA8", "ggA8" )

						if( flag_st_pierre_poleman_spawn == 0 )
						{
							FUNC("facility_barrack_add_leader", facility_recno_st_pierre_23 , mpolemancap_id, 947, 21, "Ranulph Erward", "Erward" )
							FUNC("facility_barrack_add_member", facility_recno_st_pierre_21 , mpoleman_id, 947, 1, 21)
							FUNC("facility_barrack_add_member", facility_recno_st_pierre_25 , mpoleman_id, 947, 1, 21)
							FUNC("facility_barrack_add_member", facility_recno_st_pierre_20 , mpoleman_id, 947, 1, 21)
							FUNC("facility_barrack_add_member", facility_recno_st_pierre_18 , mpoleman_id, 947, 1, 21)
							FUNC("facility_barrack_add_member", facility_recno_st_pierre_16 , mpoleman_id, 947, 1, 21)

							FUNC("set_scenario_event_bit_flag_2", 9 , 1 )
						}
						
						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 1000) }
						}
						else
						{
							WAIT{ FUNC("pause_script", 1) }
						}

						tower_attack_archer_recno_16 = FUNC("search_unit_by_name", "David Pye") 
						FUNC("set_unit_track" , tower_attack_archer_recno_16, "GoldTrk2")		

						gate_guard_archer_2 = FUNC("search_unit_by_name", "ggA2") 
						gate_guard_archer_3 = FUNC("search_unit_by_name", "ggA3") 
						gate_guard_archer_4 = FUNC("search_unit_by_name", "ggA4") 
						gate_guard_archer_5 = FUNC("search_unit_by_name", "ggA5") 
						gate_guard_archer_6 = FUNC("search_unit_by_name", "ggA6") 
						gate_guard_archer_7 = FUNC("search_unit_by_name", "ggA7") 
						gate_guard_archer_8 = FUNC("search_unit_by_name", "ggA8") 
						
						FUNC("set_unit_track" , gate_guard_archer_2 , "GoldTrk2")		
						FUNC("set_unit_track" , gate_guard_archer_3 , "GoldTrk2")		
						FUNC("set_unit_track" , gate_guard_archer_4 , "GoldTrk2")		
						FUNC("set_unit_track" , gate_guard_archer_5 , "GoldTrk2")		
						FUNC("set_unit_track" , gate_guard_archer_6 , "GoldTrk2")		
						FUNC("set_unit_track" , gate_guard_archer_7 , "GoldTrk2")		
						FUNC("set_unit_track" , gate_guard_archer_8 , "GoldTrk2")
						
						FUNC("enable_unit_bounding_volume", tower_attack_archer_recno_16, 0)
						FUNC("enable_unit_bounding_volume", gate_guard_archer_2, 0)
						FUNC("enable_unit_bounding_volume", gate_guard_archer_3, 0)
						FUNC("enable_unit_bounding_volume", gate_guard_archer_4, 0)
						FUNC("enable_unit_bounding_volume", gate_guard_archer_5, 0)
						FUNC("enable_unit_bounding_volume", gate_guard_archer_6, 0)
						FUNC("enable_unit_bounding_volume", gate_guard_archer_7, 0)
						FUNC("enable_unit_bounding_volume", gate_guard_archer_8, 0)
												
						FUNC("start_cut_scene_2", 1, 0, 37499, 22759, 1151, 61, 142, 14, 1)

						// 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
						
						WAIT{ FUNC("is_cut_scene_status_black_screen") }
						//FUNC("change_camera_in_cut_scene", 0, 37499, 22759, 1151, 61, 142, 14 )
											
						
						if( FUNC("get_gate_hp", st_pierre_gate_recno ) < FUNC("get_gate_max_hp", st_pierre_gate_recno ) )
						{
							FUNC("change_camera_in_cut_scene", 0, 36533, 23274, 690, 187, -174, -2 )
	
							FUNC("set_unit_can_process_in_cut_scene", gate_guard_recno, 1)	
							
							FUNC("set_unit_degree" , gate_guard_recno , 340)

							WAIT { DIALOG("add_dialog", gate_guard_recno, "[0054N]We are being attacked!") }
							
							FUNC("change_camera_in_cut_scene", 0, 37499, 22759, 1151, 61, 142, 14 )
		
						}
						else
						{
							FUNC("change_camera_in_cut_scene", 0, 37499, 22759, 1151, 61, 142, 14 )
	
							FUNC("set_unit_can_process_in_cut_scene", gate_guard_recno, 1)	
							//FUNC("set_unit_degree" , gate_guard_recno , 200)
						}

						WAIT { DIALOG("add_dialog", gate_guard_recno, "[0055N]Men! The enemy is at our gates! We need archers to man the walls and polemen to guard the gates!") }
																
						FUNC("set_unit_can_process_in_cut_scene", tower_attack_archer_recno_16, 1)	
						ACTION("give_task", tower_attack_archer_recno_16, "APPROACH_PLACE", 2, place_recno_st_pierre_archer_app, 0, 0 , 0)					 

						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 1000) }
						}
						
						FUNC("set_unit_can_process_in_cut_scene", gate_guard_archer_2, 1)	
						ACTION("give_task", gate_guard_archer_2, "APPROACH_PLACE", 2, place_recno_st_pierre_archer_app, 0, 0 , 0)					 
						
						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 1000) }
						}
						

						FUNC("set_unit_can_process_in_cut_scene", gate_guard_archer_3, 1)	
						ACTION("give_task", gate_guard_archer_3, "APPROACH_PLACE", 2, place_recno_st_pierre_archer_app, 0, 0 , 0)					 
						
						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 1000) }
						}
						
						FUNC("set_unit_can_process_in_cut_scene", gate_guard_archer_4, 1)	
						ACTION("give_task", gate_guard_archer_4, "APPROACH_PLACE", 2, place_recno_st_pierre_archer_app, 0, 0 , 0)					 
						
						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 1000) }
						}
						
						FUNC("set_unit_can_process_in_cut_scene", gate_guard_archer_5, 1)	
						ACTION("give_task", gate_guard_archer_5, "APPROACH_PLACE", 2, place_recno_st_pierre_archer_app, 0, 0 , 0)					 
						
						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 1000) }
						}
						
						FUNC("set_unit_can_process_in_cut_scene", gate_guard_archer_6, 1)	
						ACTION("give_task", gate_guard_archer_6, "APPROACH_PLACE", 2, place_recno_st_pierre_archer_app, 0, 0 , 0)					 
						
						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 1000) }
						}
						
						FUNC("set_unit_can_process_in_cut_scene", gate_guard_archer_7, 1)	
						ACTION("give_task", gate_guard_archer_7, "APPROACH_PLACE", 2, place_recno_st_pierre_archer_app, 0, 0 , 0)					 
						
						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 1000) }
						}
						
						FUNC("set_unit_can_process_in_cut_scene", gate_guard_archer_8, 1)	
						ACTION("give_task", gate_guard_archer_8, "APPROACH_PLACE", 2, place_recno_st_pierre_archer_app, 0, 0 , 0)					 
													
						// leave cut scene
						DIALOG("del_all_dialog") 
						FUNC("end_cut_scene_2", 0, 1 )
						WAIT{ FUNC("is_cut_scene_status_black_screen") }
						
						FUNC("del_unit_team", 921 )
						FUNC("del_unit_team", 922 )
						FUNC("del_unit_team", 923 )
						FUNC("del_unit_team", 924 )
						FUNC("del_unit_team", 925 )
						FUNC("del_unit_team", 926 )
						FUNC("del_unit_team", 927 )
						FUNC("del_unit_team", 928 )

						//spawn
						FUNC("facility_barrack_add_leader", facility_recno_st_pierre_1 , marchercap_id, 920, 21, "Fulk Iclysham", "Iclysham" )
						
						//FUNC("facility_barrack_add_member", facility_recno_st_pierre_1 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_2 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_3 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_4 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_5 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_6 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_7 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_8 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_9 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_10 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_37 , marcher_id, 920, 1, 21)
					//	FUNC("facility_barrack_add_member", facility_recno_st_pierre_27 , earcher_id, 920, 1, 21)
					//	FUNC("facility_barrack_add_member", facility_recno_st_pierre_28 , earcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_32 , marcher_id, 920, 1, 21)

						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_1 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_2 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_3 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_4 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_5 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_6 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_7 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_8 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_9 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_10 , marcher_id, 920, 1, 21)

						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_11 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_12 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_13 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_14 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_15 , marcher_id, 920, 1, 21)
						//FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_16 , earcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_17 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_18 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_19 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_20 , marcher_id, 920, 1, 21)

						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_21 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_22 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_23 , marcher_id, 920, 1, 21)
						//FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_24 , earcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_25 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_26 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_27 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_28 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_29 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_30 , marcher_id, 920, 1, 21)

						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_31 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_32 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_33 , marcher_id, 920, 1, 21)
						FUNC("facility_barrack_add_member", facility_recno_st_pierre_archer_34 , marcher_id, 920, 1, 21)

						FUNC ("stop_curr_task", st_cross_1 ) 
						FUNC ("stop_curr_task", st_cross_2 ) 
						FUNC ("stop_curr_task", st_cross_3 ) 
						FUNC ("stop_curr_task", st_cross_4 ) 
						FUNC ("stop_curr_task", st_cross_5 ) 
						FUNC ("stop_curr_task", st_cross_6 ) 
						FUNC ("stop_curr_task", st_cross_7 ) 
												
						WAIT { FUNC("is_cut_scene_finished" ) }
						FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can't processo

						FUNC("set_scenario_event_bit_flag", 13, 1 )

						WAIT{ FUNC("pause_script", 1) }

						ACTION("give_team_task", FUNC("search_unit_by_name", "Fulk Iclysham") , "TOWER_ATTACK", 99, 3000, 0, 0, 0)
						
						FUNC("set_units_can_bribe_flag" , mlinfantcap_id, 1 )
						FUNC("set_units_can_bribe_flag" , marchercap_id, 1 )
						FUNC("set_units_can_bribe_flag" , mpolemancap_id, 1 )
						FUNC("set_units_can_bribe_flag" , mlinfant_id, 1 )
						FUNC("set_units_can_bribe_flag" , marcher_id, 1 )
						FUNC("set_units_can_bribe_flag" , mpoleman_id, 1 )
						FUNC("set_units_can_bribe_flag" , mexarcher_id, 1 )
						FUNC("set_units_can_bribe_flag" , mexarchercap_id, 1 )

						FUNC("set_can_bribe_flag" , gate_guard_recno, 0 )

						FUNC("set_unit_degree" , gate_guard_recno , 200)
	
					}
				}				
			}

			
		}
	
		if( flag_cart_cut_scene && flag_first_invasion_st_pierre == 0 )
		{ 
			if( flag_gate_guard_pee == 0 )
			{
				if( FUNC("is_unit_inside_place", place_recno_st_pierre_guard_stand, gate_guard_recno) == 0 )
				{
					ACTION("give_task", gate_guard_recno, "APPROACH_PLACE", 99, place_recno_st_pierre_guard_stand , 0, 0 , 0)					 
				}
				else
				{
					FUNC("stop_curr_task" , gate_guard_recno )
					ACTION("give_task", gate_guard_recno, "IDLE", 1, 1, 0, 0, 0) 
					
					FUNC("set_unit_degree" , gate_guard_recno , 200)
				}

//				if( FUNC("get_scenario_count_time_2") > 600000 )
//				{
//					FUNC("stop_curr_task" , gate_guard_recno )
//					FUNC("set_scenario_event_bit_flag", 16, 1 )
//					FUNC("set_scenario_count_time_2" )

//					if( flag_gate_guard_first_pee == 0 )
//					{
//						FUNC("attention_call_message_2", "[0001N]Mmm... When neccessity calls, not even gold can deter me from going to the loo!", gate_guard_recno )
//					}
//					else
//					{
//						FUNC("attention_call_message", "[0001N]The gate guard is temporarily 'relieving' himself...")
//					}
//				}

			}
			else
			{
				if( FUNC("is_unit_inside_place", place_recno_st_pierre_guard_pee, gate_guard_recno) == 0 )
				{
					ACTION("give_task", gate_guard_recno, "APPROACH_PLACE", 99, place_recno_st_pierre_guard_pee , 0, 0 , 0)

//					if( flag_gate_guard_pee_cut_scene == 0 )
//					{
//						FUNC("start_cut_scene", 0, 0, 35718, 26251, 1526, 89, -53, 27)
//
//						// 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
//
//						WAIT{ FUNC("pause_script", 3000) }
//
//						FUNC("change_camera_in_cut_scene", 0, 35709 , 18971, 1526, 89, 46, 27 )
//															
//						WAIT { DIALOG("add_dialog", alencon_recno, "[0004N]The gate guard is attending to his needs. We can take this opportunity to hide among the bushes while he has his back to us. Then when anyone enters or leaves, we can sneak in!") }
//											
//						// leave cut scene
//						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)	// all unit can't process
//										
//						FUNC("set_scenario_event_bit_flag", 18, 1 )
//					}
				}
				else
				{
					FUNC("stop_curr_task" , gate_guard_recno)
					ACTION("give_task", gate_guard_recno, "IDLE", 1, 1, 0, 0, 0 ) 
					FUNC("set_unit_degree" , gate_guard_recno , -180 )
				}	

				if( FUNC("get_scenario_count_time_2") > 180000 )
				{
					FUNC("stop_curr_task" , gate_guard_recno )
					FUNC("set_scenario_event_bit_flag", 16, 0 )
					FUNC("set_scenario_count_time_2")

					if( flag_gate_guard_first_pee == 0 )
					{
			//			FUNC("attention_call_message_2", "[0001N]Ah... refreshing! Now, back to my duty...", gate_guard_recno )
						FUNC("set_scenario_event_bit_flag", 17, 1 )
					}
					else
					{
			//			FUNC("attention_call_message", "[0001N]The gate guard is back on duty...")
					}
				}
			}
		}
	}
	else if ( flag_gate_guard_dead == 0 )
	{
		if( FUNC( "is_unit_dead" , gate_guard_recno ) )
		{
			FUNC("set_scenario_bit_flag", 4, 1 )
			flag_gate_guard_dead = 1
		}
		
		FUNC("set_can_bribe_flag" , gate_guard_recno, 0 )
	}

	//eng camp
	if( flag_eng_camp_cut_scene == 0) 
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_eng_camp_outside, "FRENCH" ) )
		{
			FUNC("start_cut_scene", 0, 0 , 50876, 20910, 642, 187, 132, 7)
			
			// 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", camp_cart_recno, 1)	// all unit can't process
			//FUNC("set_unit_can_process_in_cut_scene", camp_cartman_recno, 1)	// all unit can't process

			FUNC("set_unit_can_process_in_cut_scene", eng_camp_cap_recno_2, 1)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", eng_camp_cap_recno, 1)	// all unit can't process

			FUNC("set_unit_degree" , eng_camp_cap_recno_2, FUNC("get_rotation" , eng_camp_cap_recno_2, eng_camp_cap_recno))
			FUNC("set_unit_degree" , eng_camp_cap_recno, FUNC("get_rotation" , eng_camp_cap_recno, eng_camp_cap_recno_2))

			
			WAIT { DIALOG("add_dialog", eng_camp_cap_recno, "[0056N]We must deliver these barrels of gold to those damn mercenaries again! Come on now, let's stack up the gold - we haven't got all day, lads!") }
			
			FUNC("change_camera_in_cut_scene", 0, 50572, 19585, 576, 350, 73, 21)
						
			WAIT { DIALOG("add_dialog", eng_camp_archer_recno , "[0057N]... wait! I sense French troops approaching!") }

			FUNC("change_camera_in_cut_scene", 0, 50560, 20293, 462, 187, 114, 4)

			WAIT { DIALOG("add_dialog", eng_camp_hvy_cap_recno , "[0058N]Quick - protect the gold! Range units, guard our coffers! Infantry, assist me at the gate!") }

			if( flag_first_invasion_st_pierre == 0 ) 
			{
				WAIT { DIALOG("add_dialog", jean_recno , "[0059N]There’s the merchant cart they use to pay off the mercenaries! Let's destroy it so the mercenaries receive no more payments!") }	
				FUNC ("set_end_condition_enabled", 15, 1)							
			}
								
			// leave cut scene
			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)	// all unit can't process
			
			FUNC("stop_curr_task" , eng_camp_cap_recno )				
			FUNC("set_scenario_event_bit_flag", 20, 1 )

			ACTION("give_team_task", eng_camp_cap_recno_2, "DEFEND_PLACE", 99, place_eng_camp, 0, 0, 0)
			ACTION("give_team_task", eng_camp_hvy_cap_recno_2, "DEFEND_PLACE", 99, place_eng_camp, 0, 0, 0)
			
			if( flag_cart_cut_scene == 0 )
			{
				FUNC ("set_end_condition_enabled", 3, 1)							
				FUNC ("set_end_condition_enabled", 6, 1)							
			}
		}
	}

	//flag_eng_camp_enter
	if( flag_eng_camp_enter == 0 )
	{
		if( FUNC("people_by_nation_exist_in_place", place_recno_eng_camp_enter_msg, "FRENCH") )
		{
			FUNC("attention_call_message_2", "[0060N]Guard the cart! We must not allow the enemy to destroy it and take our gold!", eng_camp_cap_recno )
			FUNC("set_scenario_bit_flag", 6, 1)
		}
	}

	if( flag_gold_captured == 0)
	{
		if(FUNC("is_unit_dead", camp_cart_recno ) )
		{
			FUNC("set_scenario_bit_flag", 1 , 1)		
			FUNC("set_scenario_count_time" )
		}
	}
	
	if( flag_gold_captured_2 == 0)
	{
		if(FUNC("is_unit_dead", church_cart_recno ) )
		{
			FUNC("set_scenario_event_bit_flag", 9 , 1)		
		}
	}
	
	//place captured
	if( FUNC( "get_place_captured" , place_eng_camp ) == 0 )
	{
		if ( FUNC( "fightable_enemy_exist_in_place" , place_eng_camp, unit_recno ) == 0 )
		{
			FUNC("change_all_item_in_place", place_eng_camp, english_flag_id, french_flag_id )
			FUNC("set_place_captured" , place_eng_camp, 1)
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L1_3" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L1_3" , 1 )
			FUNC("set_territory_nation", "Varzy", "French")
		}
	}

	if( FUNC( "get_place_captured" , place_eng_camp_3 ) == 0 )
	{
		if ( FUNC( "fightable_enemy_exist_in_place" , place_eng_camp_3, unit_recno ) == 0 )
		{
			FUNC("change_all_item_in_place", place_eng_camp_3, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_eng_camp_3, 1)
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L1_1" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L1_1" , 1 )
			FUNC("set_territory_nation", "de Decize", "French")
		}
	}

	if( FUNC( "get_place_captured" , place_eng_camp_4 ) == 0 )
	{
		if ( FUNC( "fightable_enemy_exist_in_place" , place_eng_camp_4, unit_recno ) == 0 )
		{
			FUNC("change_all_item_in_place", place_eng_camp_4, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_eng_camp_4, 1)
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_1" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_1" , 1 )
			FUNC("set_territory_nation", "du Donzy", "French")
		}
	}

	if( FUNC( "get_place_captured" , place_eng_camp_5 ) == 0 )
	{
		if ( FUNC( "fightable_enemy_exist_in_place" , place_eng_camp_5, unit_recno ) == 0 )
		{
			FUNC("change_all_item_in_place", place_eng_camp_5, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_eng_camp_5, 1)
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_2" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_2" , 1 )
			FUNC("set_territory_nation", "de Cercy-la-tour", "French")
		}
	}

	if( FUNC( "get_place_captured" , place_eng_camp_6 ) == 0 )
	{
		if ( FUNC( "fightable_enemy_exist_in_place" , place_eng_camp_6, unit_recno ) == 0 )
		{
			FUNC("change_all_item_in_place", place_eng_camp_6, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_eng_camp_6, 1)
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_3" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_3" , 1 )
			FUNC("set_territory_nation", "de Pouges-les-Eaux", "French")
		}
	}

	if( FUNC( "get_place_captured" , place_eng_camp_7 ) == 0 )
	{
		if ( FUNC( "fightable_enemy_exist_in_place" , place_eng_camp_7, unit_recno ) == 0 )
		{
			FUNC("change_all_item_in_place", place_eng_camp_7, english_flag_id, french_flag_id )
			FUNC( "set_place_captured" , place_eng_camp_7, 1)
			FUNC("set_minimap_icon_display_enable" , "ECAMP_S7L3_4" , 0 )
			FUNC("set_minimap_icon_display_enable" , "FCAMP_S7L3_4" , 1 )
			FUNC("set_territory_nation", "du Bois", "French")
		}
	}

	//french camp
	if( flag_protect_villagers_triggered && flag_priest_cut_scene == 0 && flag_attackers_start_attack == 0 )
	{
		if( flag_priest_cut_scene_msg == 0 ) 
		{
			if( FUNC( "people_by_nation_exist_in_place" , place_recno_priest_cut_scene_msg , "FRENCH" ) )
			{
				//FUNC("attention_call_message", "[0001N]Mercenary units returning from their expedition are in the vicinity of the townships! You must protect the innocents!")
				FUNC("set_scenario_bit_flag", 3, 1 )
			}
		}

		if( FUNC( "people_by_nation_exist_in_place" , place_recno_priest_cut_scene , "FRENCH" ) )
		{
			FUNC("start_cut_scene_2", 1, 0, 59301, 26010, 692, 257, -1, 22, 1)
			
			FUNC("set_idle", unit_recno) 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

			WAIT{ FUNC("is_cut_scene_status_black_screen") }

			FUNC("facility_barrack_add_leader", facility_recno_priest_spawn_1 , mlinfantcap_id, 35, 22, "Degare Multon", "Multon" )
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_2 , mlinfant_id, 35, 1, 22)
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_3 , mlinfant_id, 35, 1, 22)
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_4 , mlinfant_id, 35, 1, 22)
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_5 , mlinfant_id, 35, 1, 22)

			FUNC("facility_barrack_add_leader", facility_recno_priest_spawn_6 , mlinfantcap_id, 41, 22, "Helmin Eng", "Eng" )
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_7 , mlinfant_id, 41, 1, 22)
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_8 , mlinfant_id, 41, 1, 22)
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_9 , mlinfant_id, 41, 1, 22)
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_10 , mlinfant_id, 41, 1, 22)
			
			FUNC("facility_barrack_add_leader", facility_recno_priest_spawn_11 , mpolemancap_id, 37, 22, "Alward Fiskerton", "Fiskerton" )
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_12 , mpoleman_id, 37, 1, 22)
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_13 , mpoleman_id, 37, 1, 22)
			FUNC("facility_barrack_add_member", facility_recno_priest_spawn_14 , mpoleman_id, 37, 1, 22)
		
			FUNC("change_camera_in_cut_scene", 0, 59301, 26010, 692, 257, -1, 22)

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
					WAIT{ FUNC("pause_script", 1000) }
			}
			else
			{
					WAIT{ FUNC("pause_script", 1) }
			}
						
			town_attacker_recno_1 = FUNC("search_unit_by_name", "Helmin Eng")
			town_attacker_recno_2 = FUNC("search_unit_by_name", "Degare Multon")
			town_attacker_recno_3 = FUNC("search_unit_by_name", "Alward Fiskerton")
							
			// set main character to idle
			WAIT { DIALOG("add_dialog", alencon_recno, "[0061N]As the villagers warned, these mercenaries must be returning from their looting spree, and are most likely heading for Saint-Thomas-sur-le-pont to raid the village! We must protect them!") }

			//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_1, 1)	// all unit can't process
			//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_2, 1)	// all unit can't process
			//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_3, 1)	// all unit can't process

			//ACTION("give_team_task", town_attacker_recno_1, "APPROACH_PLACE", 95, place_recno_french_camp_1, 0, 0, 10000)
			//ACTION("give_team_task", town_attacker_recno_2, "APPROACH_PLACE", 95, place_recno_french_camp_1, 0, 0, 10000)
			//ACTION("give_team_task", town_attacker_recno_3, "APPROACH_PLACE", 95, place_recno_french_camp_1, 0, 0, 10000)

			//if( FUNC("is_cut_scene_finished" ) == 0 )
			//{
			//	WAIT{ FUNC("pause_script", 8000) }
			//}

			//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_1, 0)	// all unit can't process
			//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_2, 0)	// all unit can't process
			//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_3, 0)	// all unit can't process

			WAIT { DIALOG("add_dialog", alencon_recno, "[0062N]Enemies around Saint-Thomas-sur-le-pont are too close for comfort! We must protect our citizens!") }
						
			// leave cut scene
			DIALOG("del_all_dialog") 
		
			FUNC("end_cut_scene_2" , 0, 1)	// leave cut scene!
			
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
						
			if( flag_citizen_spawn == 0 )
			{
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_1, cti1_id, 453, 1, "Dreuz Forcetier", "Forcetier" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_2, cti2_id, 454, 1, "Alenard Poraier", "Poraier" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_3, cti4_id, 455, 1, "Ferry Marcheant", "Marcheant" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_4, cti5_id, 456, 1, "Carola Hostellier", "Hostellier" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_5, cti1_id, 457, 1, "Jacques Galochier", "Galochier" )

				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_6 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_7 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_8 , cti2_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_9 , cti3_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_10 , cti4_id, 452, 1, 1)
				//FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_11 , cti5_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_12 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_13 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_14 , cti2_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_15 , cti3_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_16 , cti4_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_17 , cti5_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_18 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_19 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_20 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_21 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_22 , cti2_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_23 , cti3_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_24 , cti4_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_25 , cti5_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_26 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_27 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_28 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_29 , cti4_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_30 , cti6_id, 452, 1, 1)

				WAIT{ FUNC("pause_script", 1) }

				FUNC("start_kill_interface")
				FUNC("set_end_condition_enabled", 7, 1) 
				//FUNC("set_end_condition_finish" , 7, "WIN")	

				FUNC("set_scenario_event_bit_flag", 2, 1)
			}

			//attack the town
			ACTION("give_team_task", town_attacker_recno_1, "ATTACK_PLACE", 99, place_recno_french_camp_1, 0, 0, 0)
			ACTION("give_team_task", town_attacker_recno_2, "ATTACK_PLACE", 99, place_recno_french_camp_1, 0, 0, 0)
			ACTION("give_team_task", town_attacker_recno_3, "ATTACK_PLACE", 99, place_recno_french_camp_1, 0, 0, 0)

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

			//FUNC("attention_call_message", "[0001N]It is highly advisable that one of the generals stay at St-Thomas-sur-le-pont to protect the citizens in case enemies approach.")

			FUNC("set_scenario_event_bit_flag", 32, 1)

			FUNC("set_units_can_bribe_flag" , mlinfantcap_id, 1 )
			FUNC("set_units_can_bribe_flag" , marchercap_id, 1 )
			FUNC("set_units_can_bribe_flag" , mpolemancap_id, 1 )
			FUNC("set_units_can_bribe_flag" , mlinfant_id, 1 )
			FUNC("set_units_can_bribe_flag" , marcher_id, 1 )
			FUNC("set_units_can_bribe_flag" , mpoleman_id, 1 )
			FUNC("set_units_can_bribe_flag" , mexarcher_id, 1 )
			FUNC("set_units_can_bribe_flag" , mexarchercap_id, 1 )
				
		}
	}
	
	if( flag_protect_villagers_triggered == 0 )
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_protect_trigger, "FRENCH" ) )
		{
			FUNC("start_cut_scene_2", 1, 0, 58781, 19007, 628, 197, 110, 8, 1)

			FUNC("set_idle", unit_recno) 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
						
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, 58781, 19007, 628, 197, 110, 8 )
				
			// set main character to idle
			//FUNC("set_unit_can_process_in_cut_scene", councillor_recno, 1)	// councillor can process

			//FUNC("stop_curr_task", councillor_recno ) 

		//	if( FUNC("unit_track_to_id", councillor_recno, "GoldTrk1") )
		//	{
		//		FUNC("set_unit_track" , councillor_recno, "GoldTrk1") 
		//	}
						
			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				//WAIT{ ACTION("give_order", councillor_recno, "APPROACH_PLACE", 99, 1, place_recno_councillor_app, 0, 0, 0, 2000) }
			}

			//FUNC("set_unit_track" , councillor_recno, "DUMMY") 

			//ACTION("give_task", councillor_recno , "IDLE", 100, 0, 0, 0, 0) 
			//FUNC("set_unit_degree" , councillor_recno , -145)
			
			WAIT { DIALOG("add_dialog", councillor_recno, FUNC("format_string", DIALOG("dialog_text", "[0063N]Bonjour, fellow Frenchmen! I am Philippe Barrillier, councillor of the poor town of Saint-Thomas-sur-le-pont."), FUNC("get_unit_name", councillor_recno))) }

			FUNC("change_camera_in_cut_scene", 0, councillor_recno, 200, ( 270 - FUNC("get_unit_dir", councillor_recno) ), 10)
			//FUNC("change_camera_in_cut_scene", 0, 58489, 19668, 514, 257, 28, 2)

			WAIT { DIALOG("add_dialog", councillor_recno, "[0064N]Alors - We are most unfortunate to have suffered the constant attacks of Burgundians, English and mercenaries ever since they established a foothold in this region.") }
		
			FUNC("change_camera_in_cut_scene", 0, 57920 , 19338, 935, 197, 30, 40 )

			WAIT { DIALOG("add_dialog", councillor_recno, "[0065N]They always return and take what little we manage to collect. As such we are nearing destitution. We cannot survive another raid. I only pray that you can help us if they attack again!") }
	
			// leave cut scene
			DIALOG("del_all_dialog") 
		
			FUNC("end_cut_scene_2" , 0, 1)	// leave cut scene!
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
		
			FUNC("set_scenario_bit_flag", 20, 1)

			if( flag_citizen_spawn == 0 )
			{
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_1, cti1_id, 453, 1, "Dreuz Forcetier", "Forcetier" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_2, cti2_id, 454, 1, "Alenard Poraier", "Poraier" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_3, cti4_id, 455, 1, "Ferry Marcheant", "Marcheant" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_4, cti5_id, 456, 1, "Carola Hostellier", "Hostellier" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_5, cti1_id, 457, 1, "Jacques Galochier", "Galochier" )

				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_6 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_7 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_8 , cti2_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_9 , cti3_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_10 , cti4_id, 452, 1, 1)
				//FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_11 , cti5_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_12 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_13 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_14 , cti2_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_15 , cti3_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_16 , cti4_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_17 , cti5_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_18 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_19 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_20 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_21 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_22 , cti2_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_23 , cti3_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_24 , cti4_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_25 , cti5_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_26 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_27 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_28 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_29 , cti4_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_30 , cti6_id, 452, 1, 1)

				WAIT{ FUNC("pause_script", 1) }

				FUNC("start_kill_interface")
				FUNC("set_end_condition_enabled", 7, 1) 
				//FUNC("set_end_condition_finish" , 7, "WIN")	

				FUNC("set_scenario_event_bit_flag", 2, 1)
			}

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

			FUNC("attention_call_message_2", "[0066N]These poor villagers are weak and will not be able to resist another attack. It would be wise for one of our commanders to stay behind to protect the innocents should the enemy decide to raid this poor town again!", jean_recno )
			FUNC("set_scenario_count_time")
		}
	}
	
	if( flag_attackers_start_attack	== 0 )
	{
		if( flag_protect_villagers_triggered )
		{
			if( FUNC("get_scenario_count_time" ) > 300000 )
			{
				FUNC("start_cut_scene_2", 1, 0, 59301, 26010, 692, 257, -1, 22, 1)

				FUNC("set_idle", unit_recno) 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
				
				WAIT{ FUNC("is_cut_scene_status_black_screen") }

				FUNC("facility_barrack_add_leader", facility_recno_priest_spawn_1 , mlinfantcap_id, 35, 22, "Degare Multon", "Multon" )
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_2 , mlinfant_id, 35, 1, 22)
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_3 , mlinfant_id, 35, 1, 22)
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_4 , mlinfant_id, 35, 1, 22)
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_5 , mlinfant_id, 35, 1, 22)

				FUNC("facility_barrack_add_leader", facility_recno_priest_spawn_6 , mlinfantcap_id, 41, 22, "Helmin Eng", "Eng" )
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_7 , mlinfant_id, 41, 1, 22)
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_8 , mlinfant_id, 41, 1, 22)
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_9 , mlinfant_id, 41, 1, 22)
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_10 , mlinfant_id, 41, 1, 22)
				
				FUNC("facility_barrack_add_leader", facility_recno_priest_spawn_11 , mpolemancap_id, 37, 22, "Alward Fiskerton", "Fiskerton" )
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_12 , mpoleman_id, 37, 1, 22)
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_13 , mpoleman_id, 37, 1, 22)
				FUNC("facility_barrack_add_member", facility_recno_priest_spawn_14 , mpoleman_id, 37, 1, 22)
			
				FUNC("change_camera_in_cut_scene", 0, 59301, 26010, 692, 257, -1, 22)

				if( FUNC("is_cut_scene_finished" ) == 0 )
				{
						WAIT{ FUNC("pause_script", 1000) }
				}
				else
				{
						WAIT{ FUNC("pause_script", 1) }
				}

				town_attacker_recno_1 = FUNC("search_unit_by_name", "Helmin Eng")
				town_attacker_recno_2 = FUNC("search_unit_by_name", "Degare Multon")
				town_attacker_recno_3 = FUNC("search_unit_by_name", "Alward Fiskerton")
							
				// set main character to idle
				WAIT { DIALOG("add_dialog", alencon_recno, "[0067N]Enemies around St-Thomas-sur-le-pont are too close for comfort! We must protect our citizens!") }

				//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_1, 1)	// all unit can't process
				//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_2, 1)	// all unit can't process
				//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_3, 1)	// all unit can't process
	
				//ACTION("give_team_task", town_attacker_recno_1, "APPROACH_PLACE", 95, place_recno_french_camp_1, 0, 0, 10000)
				//ACTION("give_team_task", town_attacker_recno_2, "APPROACH_PLACE", 95, place_recno_french_camp_1, 0, 0, 10000)
				//ACTION("give_team_task", town_attacker_recno_3, "APPROACH_PLACE", 95, place_recno_french_camp_1, 0, 0, 10000)

				//if( FUNC("is_cut_scene_finished" ) == 0 )
				//{
				//	WAIT{ FUNC("pause_script", 8000) }
				//}

				//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_1, 0)	// all unit can't process
				//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_2, 0)	// all unit can't process
				//FUNC("set_unit_team_can_process_in_cut_scene", town_attacker_recno_3, 0)	// all unit can't process
			
				// leave cut scene
				DIALOG("del_all_dialog") 
		
				FUNC("end_cut_scene_2" , 0, 1)	// leave cut scene!
				WAIT{ FUNC("is_cut_scene_status_black_screen") }

				WAIT { FUNC("is_cut_scene_finished" ) }
				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
			
				ACTION("give_team_task", town_attacker_recno_1, "ATTACK_PLACE", 99, place_recno_french_camp_1, 0, 0, 0)
				ACTION("give_team_task", town_attacker_recno_2, "ATTACK_PLACE", 99, place_recno_french_camp_1, 0, 0, 0)
				ACTION("give_team_task", town_attacker_recno_3, "ATTACK_PLACE", 99, place_recno_french_camp_1, 0, 0, 0)

				FUNC("set_scenario_bit_flag", 2, 1)

				FUNC("attention_call_message", "[0068N]You must protect the innocents in the town of Saint-Thomas-sur-le-pont!")

				FUNC("set_units_can_bribe_flag" , mlinfantcap_id, 1 )
				FUNC("set_units_can_bribe_flag" , marchercap_id, 1 )
				FUNC("set_units_can_bribe_flag" , mpolemancap_id, 1 )
				FUNC("set_units_can_bribe_flag" , mlinfant_id, 1 )
				FUNC("set_units_can_bribe_flag" , marcher_id, 1 )
				FUNC("set_units_can_bribe_flag" , mpoleman_id, 1 )
				FUNC("set_units_can_bribe_flag" , mexarcher_id, 1 )
				FUNC("set_units_can_bribe_flag" , mexarchercap_id, 1 )
	
			}
		}
	}
	else
	{
		if( flag_attacker_dead_message == 0)
		{
			if( FUNC("contain_team_member", 35 ) == 0 && FUNC("contain_team_member", 37 ) == 0 && FUNC("contain_team_member", 41 ) == 0 ) 
			{
				FUNC( "attention_call_message_2", "[0069N]By defeating the mercenaries, we have put a stop to their merciless looting and pillaging! Let us return to Saint-Thomas-sur-le-pont to inform the priest and councillor of the good news!", jean_recno )
				FUNC("set_scenario_event_bit_flag_2", 23, 1)
			}
		}	

		if( flag_half_gold_triggered == 0 )
		{
			FUNC("start_kill_interface")

			if( FUNC( "general_by_nation_exist_in_place" , place_recno_protect_trigger , "FRENCH" ) )	
			{
				if( FUNC("is_unit_inside_place", place_recno_priest_stand , priest_recno) && FUNC("is_unit_inside_place", place_recno_councillor_stand , councillor_recno) )
				{
					if( FUNC("contain_team_member", 35 ) == 0 && FUNC("contain_team_member", 37 ) == 0 && FUNC("contain_team_member", 41 ) == 0 ) 
					{
						FUNC("set_unit_degree", priest_recno, 235 )
						FUNC("start_cut_scene_2", 1, 0, 58756, 19890, 471, 257, 51, 20, 1)

						FUNC("set_idle", unit_recno) 
						FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
									
						WAIT{ FUNC("is_cut_scene_status_black_screen") }
						FUNC("change_camera_in_cut_scene", 0, 58756, 19890, 471, 257, 51, 20)

						WAIT { DIALOG("add_dialog", councillor_recno, "[0070N]Nous sommes reconnaissants - We are grateful for the protection offered us. This desolate region has been torn apart by war for far too long, and bandits in the guise of mercenaries abound.") }

						FUNC("change_camera_in_cut_scene", 0, 59111, 20033, 655, 187, -150, 26)

						WAIT { DIALOG("add_dialog", councillor_recno, "[0071N]We only hope that one day the gold they have taken from us may be returned.") }

						FUNC("change_camera_in_cut_scene", 0, 58157, 19617, 486, 187, 10, 14)

						WAIT { DIALOG("add_dialog", priest_recno, "[0072N]These bandits only swear allegiance to material gains. If you could help us recover all our gold, we shall be glad to share half of the bounty with you and your troops.") }

						FUNC("change_camera_in_cut_scene", 0, 58794, 19176, 596, 187, 117, 11)

						WAIT { DIALOG("add_dialog", councillor_recno, "[0073N]We are well aware that you need all the resources you can get - your troops must be paid as well as fed. I bid thee Godspeed." ) }

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

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

						FUNC ("set_end_condition_enabled", 16, 1)
						FUNC("set_can_interact_flag", councillor_recno , 1)
						
						FUNC("set_scenario_bit_flag", 7, 1)
						FUNC("set_end_condition_finish", 7, "WIN") 

						FUNC("end_kill_interface" )
					}
				}
			}
		}
	}

	if( flag_protect_villagers_triggered )
	{
		if( FUNC( "fightable_enemy_exist_in_place" , place_recno_french_camp_1, unit_recno ) )
		{
			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_stand , priest_recno) )
		{
			if( curr_task == 14 )
			{
				FUNC("stop_curr_task" , priest_recno )
			}

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

			ACTION("give_task", priest_recno , "APPROACH_PLACE", 2, place_recno_priest_stand , 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_stand , councillor_recno) )
		{
			if( curr_task == 14 )
			{
				FUNC("stop_curr_task" , councillor_recno )
			}

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

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

	//half gold
	if( flag_gold_returned == 0 && flag_cart_cut_scene )
	{
		FUNC("start_kill_interface_2" , 5)	
	}

	if( flag_half_gold_triggered && flag_gold_returned == 0 )
	{
		if( talk_unit_recno > 0 && talk_unit_recno == councillor_recno )	
		{
			if( flag_100_gold_found == 0 ) 
			{
				FUNC("start_cut_scene_2", 1, 0, councillor_recno, 200, ( 180 - FUNC("get_unit_dir", councillor_recno) ), 10, 1)
						
				// 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)
				FUNC("set_unit_can_process_in_cut_scene", priest_Recno, 1)

				FUNC("stop_curr_task", councillor_recno)
				ACTION("give_task", councillor_recno, "IDLE", 1, 1, 0, 0, 0)

				FUNC("stop_curr_task", priest_recno )
				ACTION("give_task", priest_recno, "IDLE", 1, 1, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", councillor_recno, "[0074N]I hope you succeed in returning our gold to us!") }

				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)

				WAIT { DIALOG("add_dialog", councillor_recno , "[0075N]Have you returned with our gold yet?") }
								
				// leave cut scene
				DIALOG("del_all_dialog") 

				FUNC("end_cut_scene_2" , 0, 1)	// leave cut scene!
				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				
				WAIT { FUNC("is_cut_scene_finished" ) }
				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process

				FUNC("stop_curr_task", councillor_recno )
				FUNC("stop_curr_task", priest_recno )
			}
			else
			{
				FUNC("start_cut_scene_2", 1, 0, councillor_recno, 200, ( 180 - FUNC("get_unit_dir", councillor_recno) ), 10, 1)
						
				// 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)
				FUNC("set_unit_can_process_in_cut_scene", priest_Recno, 1)

				FUNC("stop_curr_task", councillor_recno)
				ACTION("give_task", councillor_recno, "IDLE", 1, 1, 0, 0, 0)

				FUNC("stop_curr_task", priest_recno )
				ACTION("give_task", priest_recno, "IDLE", 1, 1, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", priest_recno, "[0076N]I see you have returned with the gold! This is a glorious moment in our history! Without enemies to worry about, we can commence a new chapter in our lives!") }

				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)

				WAIT { DIALOG("add_dialog", councillor_recno , "[0077N]Merci tellement - Thank you so much. We can never repay you in kind, but we are men of our word and, as promised, please - accept half the gold. Your troops need to be fed as well as paid. This shall at least help you in the latter!") }
								
				// leave cut scene
				DIALOG("del_all_dialog") 

				FUNC("end_cut_scene_2" , 0, 1)	// leave cut scene!
				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				
				WAIT { FUNC("is_cut_scene_finished" ) }
				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process

				FUNC("stop_curr_task", councillor_recno )
				FUNC("stop_curr_task", priest_recno )

				FUNC("attention_call_message", "[0078N]You have returned enough gold to the villagers of Saint-Thomas-sur-le-pont so that their hard-earned riches are once again theirs! In reward, you now have half of their gold, generously donated to bolster your own coffers!")					

				add_gold_amount = ( FUNC("get_gold_crates_get") * 250 )

				FUNC("add_gold" , add_gold_amount ) 
				FUNC("end_kill_interface_2")

				FUNC("set_can_interact_flag", councillor_recno , 0)

				FUNC("set_scenario_event_bit_flag_2", 12, 1 )
			}
		}
	}

	//food mission
	if( flag_collect_food_triggered && flag_collect_food_finished == 0 )
	{
		if( citizen_recno_6 == 0 )
		{
			citizen_recno_6 = FUNC("search_unit_by_name", "Charles Treffilier")
			
			if( citizen_recno_6 )
			{
				FUNC("set_unit_hide_hit_point_bar_flag", citizen_recno_6 , 0 )
			}
			else if ( flag_citizen_dead_6 )
			{
				citizen_recno_6 = -1
			}
		}
		else if ( citizen_recno_6 > 0 )
		{
			if( FUNC( "is_unit_dead", citizen_recno_6 ) ) 
			{
				citizen_recno_6 = -1 
				
				FUNC("set_scenario_event_bit_flag_3", 6, 1 )
				flag_citizen_dead_6 = 1
			}

			if( flag_collect_food_crates_broken == 0 )
			{
				if(	FUNC("unit_track_to_id", citizen_recno_6, "GoldTrk1") )
				{
					FUNC("set_unit_track" , citizen_recno_6, "GoldTrk1") 
				}
				else
				{
					FUNC("set_unit_track" , citizen_recno_6, "DUMMY")
				}
			}
			else 
			{
				FUNC("set_unit_track" , citizen_recno_6, "DUMMY")
			}
		}

		if( citizen_recno_7 == 0 )
		{
			citizen_recno_7 = FUNC("search_unit_by_name", "Geoffroy Ouvrier")

			if( citizen_recno_7 )
			{
				FUNC("set_unit_hide_hit_point_bar_flag", citizen_recno_7 , 0 )
			}
			else if ( flag_citizen_dead_7 )
			{
				citizen_recno_7 = -1
			}
		}
		else if ( citizen_recno_7 > 0 )
		{
			if( FUNC( "is_unit_dead", citizen_recno_7 ) ) 
			{
				citizen_recno_7 = -1 

				FUNC("set_scenario_event_bit_flag_3", 7, 1 )
				flag_citizen_dead_7 = 1
			}

			if( flag_collect_food_crates_broken == 0 )
			{
				if(	FUNC("unit_track_to_id", citizen_recno_7, "GoldTrk1") )
				{
					FUNC("set_unit_track" , citizen_recno_7, "GoldTrk1") 
				}
				else 
				{
					FUNC("set_unit_track" , citizen_recno_7, "DUMMY")
				}
			}
			else 
			{
				FUNC("set_unit_track" , citizen_recno_7, "DUMMY")
			}
		}

		if ( citizen_recno_1 > 0 )
		{
			
			if( flag_collect_food_crates_broken == 0 )
			{
				if(	FUNC("unit_track_to_id", citizen_recno_1, "GoldTrk1") )
				{
					FUNC("set_unit_track" , citizen_recno_1, "GoldTrk1") 
				}
				else
				{
					FUNC("set_unit_track" , citizen_recno_1, "DUMMY")
				}
			}
			else 
			{
				FUNC("set_unit_track" , citizen_recno_1, "DUMMY")
			}
		}

		if( flag_food_citizen_all_dead == 0 )
		{
			if( citizen_recno_1 == -1 && citizen_recno_6 == -1 && citizen_recno_7 == -1 )
			{
				FUNC("set_scenario_event_bit_flag_2", 4, 1)
			}
		}

		if( flag_collect_food_crates_broken == 0 )
		{
			if( FUNC("get_food_crates_get") == 10 )
			{
				food_recno_1 = FUNC("search_item_by_code", "S7_food1")
				food_recno_2 = FUNC("search_item_by_code", "S7_food2")
				food_recno_3 = FUNC("search_item_by_code", "S7_food3")
				food_recno_4 = FUNC("search_item_by_code", "S7_food4")
				food_recno_5 = FUNC("search_item_by_code", "S7_food5")
				food_recno_6 = FUNC("search_item_by_code", "S7_food6")
				food_recno_7 = FUNC("search_item_by_code", "S7_food7")
				food_recno_8 = FUNC("search_item_by_code", "S7_food8")
				food_recno_9 = FUNC("search_item_by_code", "S7_food9")
				food_recno_10 = FUNC("search_item_by_code", "S7_food0")

				FUNC("stop_curr_task", citizen_recno_1 )
				FUNC("stop_curr_task", citizen_recno_6 )
				FUNC("stop_curr_task", citizen_recno_7 )

				if( citizen_recno_1 > 0 )
				{
					FUNC("attention_call_message_2", "[0079N]Thank you for breaking the barrels - we shall now proceed to retrieve the items.", citizen_recno_1 )
				}
				else if ( citizen_recno_6 > 0 )
				{
					FUNC("attention_call_message_2", "[0079N]Thank you for breaking the barrels - we shall now proceed to retrieve the items.", citizen_recno_6 )
				}
				else if ( citizen_recno_7 > 0 )
				{
					FUNC("attention_call_message_2", "[0079N]Thank you for breaking the barrels - we shall now proceed to retrieve the items.", citizen_recno_7 )
				}

				FUNC("set_scenario_bit_flag", 13, 1)
			}

			if( citizen_recno_1 > 0 )
			{
				if( FUNC("is_unit_inside_place", place_recno_food_app , citizen_recno_1 ) )
				{
					ACTION("give_task", citizen_recno_1 , "IDLE", 3, 1, 0, 0, 0)
				}
				else
				{
					ACTION("give_task", citizen_recno_1 , "APPROACH_PLACE", 2, place_recno_food_app , 0, 0 , 0)		
				}
			}

			if( citizen_recno_6 > 0 )
			{
				if( FUNC("is_unit_inside_place", place_recno_food_app , citizen_recno_6 ) )
				{
					ACTION("give_task", citizen_recno_6 , "IDLE", 3, 1, 0, 0, 0)
				}
				else
				{
					ACTION("give_task", citizen_recno_6 , "APPROACH_PLACE", 2, place_recno_food_app , 0, 0 , 0)		
				}
			}

			if( citizen_recno_7 > 0 )
			{
				if( FUNC("is_unit_inside_place", place_recno_food_app , citizen_recno_7 ) )
				{
					ACTION("give_task", citizen_recno_7 , "IDLE", 3, 1, 0, 0, 0)
				}
				else
				{
					ACTION("give_task", citizen_recno_7 , "APPROACH_PLACE", 2, place_recno_food_app , 0, 0 , 0)		
				}
			}

			if( flag_food_middle_msg == 0 )
			{
				if( FUNC("is_unit_inside_place", place_recno_food_picked_up_spawn , citizen_recno_1 ) )
				{
					FUNC("attention_call_message_2", "[0080N]Our farmland is just above this small incline...", citizen_recno_1 )

					FUNC("set_scenario_event_bit_flag_2", 14, 1)
				}
				else if( FUNC("is_unit_inside_place", place_recno_food_picked_up_spawn , citizen_recno_6 ) )
				{
					FUNC("attention_call_message_2", "[0080N]Our farmland is just above this small incline...", citizen_recno_6 )

					FUNC("set_scenario_event_bit_flag_2", 14, 1)
				}
				else if( FUNC("is_unit_inside_place", place_recno_food_picked_up_spawn , citizen_recno_7 ) )
				{
					FUNC("attention_call_message_2", "[0080N]Our farmland is just above this small incline...", citizen_recno_7 )

					FUNC("set_scenario_event_bit_flag_2", 14, 1)
				}
			}
		}
		else
		{	

			if( citizen_recno_1 > 0 )
			{
				if( flag_food_picked_1 == 0 ) 
				{
					ACTION("give_task", citizen_recno_1, "APPROACH_PLACE", 90, place_recno_food_1, 0, 0 , 0)					 	

					if( FUNC("is_unit_inside_place", place_recno_food_1 , citizen_recno_1) )
					{
						total_food = FUNC("get_total_food")
						total_food = ( total_food - 4 )
						FUNC("set_total_food", total_food )

						FUNC("del_item", food_recno_1 )
						FUNC("del_item", food_recno_2 )
						FUNC("del_item", food_recno_3 )
						FUNC("del_item", food_recno_4 )

						FUNC("stop_curr_task", citizen_recno_1 )

						FUNC("set_scenario_event_bit_flag_2", 1, 1)
						flag_food_picked_1 = 1
					}
				}
				else if( flag_food_picked_2 == 0 ) 
				{
					ACTION("give_task", citizen_recno_1, "APPROACH_PLACE", 91, place_recno_food_2, 0, 0 , 0)					 	

					if( FUNC("is_unit_inside_place", place_recno_food_2 , citizen_recno_1) )
					{
						total_food = FUNC("get_total_food")
						total_food = ( total_food - 3 )
						FUNC("set_total_food", total_food )

						FUNC("del_item", food_recno_5 )
						FUNC("del_item", food_recno_6 )
						FUNC("del_item", food_recno_7 )
						
						FUNC("stop_curr_task", citizen_recno_1 )

						FUNC("set_scenario_event_bit_flag_2", 2, 1)
						flag_food_picked_2 = 1
					}
				}
				else if( flag_food_picked_3 == 0 ) 
				{
					ACTION("give_task", citizen_recno_1, "APPROACH_PLACE", 92, place_recno_food_3, 0, 0 , 0)					 	

					if( FUNC("is_unit_inside_place", place_recno_food_3 , citizen_recno_1) )
					{
						total_food = FUNC("get_total_food")
						total_food = ( total_food - 3 )
						FUNC("set_total_food", total_food )

						FUNC("del_item", food_recno_8 )
						FUNC("del_item", food_recno_9 )
						FUNC("del_item", food_recno_10 )
						
						FUNC("stop_curr_task", citizen_recno_1 )

						FUNC("set_scenario_event_bit_flag_2", 3, 1)
						flag_food_picked_3 = 1
					}
				}
			}

			if( citizen_recno_6 > 0 )
			{
				if( flag_food_picked_3 == 0 ) 
				{
					ACTION("give_task", citizen_recno_6, "APPROACH_PLACE", 90, place_recno_food_3, 0, 0 , 0)					 	

					if( FUNC("is_unit_inside_place", place_recno_food_3 , citizen_recno_6) )
					{

						total_food = FUNC("get_total_food")
						total_food = ( total_food - 3 )
						FUNC("set_total_food", total_food )

						FUNC("del_item", food_recno_8 )
						FUNC("del_item", food_recno_9 )
						FUNC("del_item", food_recno_10 )
						
						FUNC("stop_curr_task", citizen_recno_6 )

						FUNC("set_scenario_event_bit_flag_2", 3, 1)
						flag_food_picked_3 = 1
					}
				}
				else if( flag_food_picked_2 == 0 ) 
				{
					ACTION("give_task", citizen_recno_6, "APPROACH_PLACE", 91, place_recno_food_2, 0, 0 , 0)					 	

					if( FUNC("is_unit_inside_place", place_recno_food_2 , citizen_recno_6) )
					{

						total_food = FUNC("get_total_food")
						total_food = ( total_food - 3 )
						FUNC("set_total_food", total_food )

						FUNC("del_item", food_recno_5 )
						FUNC("del_item", food_recno_6 )
						FUNC("del_item", food_recno_7 )
						
						FUNC("stop_curr_task", citizen_recno_6 )

						FUNC("set_scenario_event_bit_flag_2", 2, 1)
						flag_food_picked_2 = 1
					}
				}
				else if( flag_food_picked_1 == 0 ) 
				{
					ACTION("give_task", citizen_recno_6, "APPROACH_PLACE", 92, place_recno_food_1, 0, 0 , 0)					 	

					if( FUNC("is_unit_inside_place", place_recno_food_1 , citizen_recno_6) )
					{

						total_food = FUNC("get_total_food")
						total_food = ( total_food - 4 )
						FUNC("set_total_food", total_food )

						FUNC("del_item", food_recno_1 )
						FUNC("del_item", food_recno_2 )
						FUNC("del_item", food_recno_3 )
						FUNC("del_item", food_recno_4 )

						FUNC("stop_curr_task", citizen_recno_6 )

						FUNC("set_scenario_event_bit_flag_2", 1, 1)
						flag_food_picked_1 = 1
					}
				}
			}

			if( citizen_recno_7 > 0 )
			{
				if( flag_food_picked_2 == 0 ) 
				{
					ACTION("give_task", citizen_recno_7, "APPROACH_PLACE", 90, place_recno_food_2, 0, 0 , 0)					 	

					if( FUNC("is_unit_inside_place", place_recno_food_2 , citizen_recno_7) )
					{

						total_food = FUNC("get_total_food")
						total_food = ( total_food - 3 )
						FUNC("set_total_food", total_food )

						FUNC("del_item", food_recno_5 )
						FUNC("del_item", food_recno_6 )
						FUNC("del_item", food_recno_7 )
						
						FUNC("stop_curr_task", citizen_recno_7 )

						FUNC("set_scenario_event_bit_flag_2", 2, 1)
						flag_food_picked_2 = 1
					}
				}
				else if( flag_food_picked_1 == 0 ) 
				{
					ACTION("give_task", citizen_recno_7, "APPROACH_PLACE", 91, place_recno_food_1, 0, 0 , 0)					 	

					if( FUNC("is_unit_inside_place", place_recno_food_1 , citizen_recno_7) )
					{

						total_food = FUNC("get_total_food")
						total_food = ( total_food - 4 )
						FUNC("set_total_food", total_food )

						FUNC("del_item", food_recno_1 )
						FUNC("del_item", food_recno_2 )
						FUNC("del_item", food_recno_3 )
						FUNC("del_item", food_recno_4 )

						FUNC("stop_curr_task", citizen_recno_7 )

						FUNC("set_scenario_event_bit_flag_2", 1, 1)
						flag_food_picked_1 = 1
					}
				}
				else if( flag_food_picked_3 == 0 ) 
				{
					ACTION("give_task", citizen_recno_7, "APPROACH_PLACE", 92, place_recno_food_3, 0, 0 , 0)					 	

					if( FUNC("is_unit_inside_place", place_recno_food_3 , citizen_recno_7) )
					{
						total_food = FUNC("get_total_food")
						total_food = ( total_food - 3 )
						FUNC("set_total_food", total_food )

						FUNC("del_item", food_recno_8 )
						FUNC("del_item", food_recno_9 )
						FUNC("del_item", food_recno_10 )
						
						FUNC("stop_curr_task", citizen_recno_7 )

						FUNC("set_scenario_event_bit_flag_2", 3, 1)
						flag_food_picked_3 = 1
					}
				}
				
			}

			if( flag_food_citizen_all_dead )
			{
				if( flag_food_picked_cut_scene == 0  )
				{
					FUNC("attention_call_message_2", "[0081N]We have lost the villagers, for they have been slain! The least we can do is to return the goods within the barrels back to the village and deliver them to the councillor!", lahire_recno )					
					FUNC("set_food_can_be_picked", 1 )
					FUNC("set_scenario_event_bit_flag_2", 5, 1)	
				}

				if( FUNC("get_food_picked_up") >= FUNC("get_total_food") )
				{
					FUNC("set_scenario_event_bit_flag_2", 3, 1)
					FUNC("set_scenario_event_bit_flag_2", 2, 1)
					FUNC("set_scenario_event_bit_flag_2", 1, 1)
				}
			}

			if( flag_food_picked_1 && flag_food_picked_2 && flag_food_picked_3 )
			{
				if( flag_food_picked_up_spawn == 0 )
				{
					if( FUNC( "people_by_nation_exist_in_place" , place_recno_food_picked_up_spawn , "FRENCH" ) || FUNC("is_unit_inside_place", place_recno_food_picked_up_spawn, citizen_recno_7) || FUNC("is_unit_inside_place", place_recno_food_picked_up_spawn, citizen_recno_6) || FUNC("is_unit_inside_place", place_recno_food_picked_up_spawn, citizen_recno_1))
					{
						FUNC("start_cut_scene_2", 1, 0, 57274, 27997, 955, 169, -91, 13, 1)
							
						// 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

						WAIT{ FUNC("is_cut_scene_status_black_screen") }
						
						FUNC("facility_barrack_add_leader", facility_recno_food_picked_spawn_1 , mlinfantcap_id, 968, 22, "Iuo Fogge", "Fogge" )
						FUNC("facility_barrack_add_member", facility_recno_food_picked_spawn_2 , mlinfant_id, 968, 1, 22)
						FUNC("facility_barrack_add_member", facility_recno_food_picked_spawn_3 , mlinfant_id, 968, 1, 22)
						FUNC("facility_barrack_add_member", facility_recno_food_picked_spawn_4 , mlinfant_id, 968, 1, 22)
						FUNC("facility_barrack_add_member", facility_recno_food_picked_spawn_5 , mlinfant_id, 968, 1, 22)
						FUNC("facility_barrack_add_member", facility_recno_food_picked_spawn_6 , mlinfant_id, 968, 1, 22)
						
						FUNC("change_camera_in_cut_scene", 0, 57274, 27997, 955, 169, -91, 13 )
						
						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 1000) }
						}
						else
						{
							WAIT{ FUNC("pause_script", 1) }
						}

						temp_unit_recno = FUNC("search_unit_by_name", "Iuo Fogge" ) 

						WAIT { DIALOG("add_dialog", temp_unit_recno, "[0082N]Hey! The French are taking our provisions! After them, lads!") }

						if( citizen_recno_1 > 0 )
						{
							WAIT { DIALOG("add_dialog", citizen_recno_1, "[0083N]Mon dieu, the enemy is here! Please protect us!") }
						}
						else if ( citizen_recno_6 > 0 )
						{
							WAIT { DIALOG("add_dialog", citizen_recno_6, "[0083N]Mon dieu, the enemy is here! Please protect us!") }
						}
						else 
						{
							WAIT { DIALOG("add_dialog", citizen_recno_7, "[0083N]Mon dieu, the enemy is here! Please protect us!") }
						}

						// leave cut scene
						DIALOG("del_all_dialog") 

						FUNC("end_cut_scene_2" , 0, 1)	// leave cut scene!
						WAIT{ FUNC("is_cut_scene_status_black_screen") }
						
						WAIT { FUNC("is_cut_scene_finished" ) }
						FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process

						ACTION("give_team_task", food_ambuse_troop_1, "DEFEND_PLACE", 99, place_recno_food_picked_up_ambuse, 0, 0, 0)
						ACTION("give_team_task", food_ambuse_troop_2, "DEFEND_PLACE", 99, place_recno_food_picked_up_ambuse, 0, 0, 0)
						ACTION("give_team_task", food_ambuse_troop_3, "DEFEND_PLACE", 99, place_recno_food_picked_up_ambuse, 0, 0, 0)

						FUNC("set_scenario_event_bit_flag_2", 8, 1)

						FUNC("set_units_can_bribe_flag" , mlinfantcap_id, 1 )
						FUNC("set_units_can_bribe_flag" , mlinfant_id, 1 )
					}
				}


				if( flag_food_picked_cut_scene == 0 )
				{
					if( flag_food_citizen_all_dead == 0 )
					{
						FUNC("start_cut_scene_2", 1, 0, 56515, 28147, 1848, 152, -130, 36, 1)
							
						// 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

						WAIT{ FUNC("is_cut_scene_status_black_screen") }

						FUNC("facility_barrack_add_leader", facility_recno_eng_3_spawn_1 , marchercap_id, 967, 22, "Denston Barfot", "Barfot" )
						//FUNC("facility_barrack_add_leader", facility_recno_eng_3_spawn_1 , marchercap_id, 967, 1, 22)
						FUNC("facility_barrack_add_member", facility_recno_eng_3_spawn_2 , marcher_id, 967, 1, 22)
						FUNC("facility_barrack_add_member", facility_recno_eng_3_spawn_3 , marcher_id, 967, 1, 22)
						FUNC("facility_barrack_add_member", facility_recno_eng_3_spawn_4 , marcher_id, 967, 1, 22)
						FUNC("facility_barrack_add_member", facility_recno_eng_3_spawn_5 , marcher_id, 967, 1, 22)

						FUNC("change_camera_in_cut_scene", 0, 56515, 28147, 1848, 152, -130, 36 )

						if( FUNC("is_cut_scene_finished" ) == 0 )
						{
							WAIT{ FUNC("pause_script", 3000) }
						}
						else
						{
							WAIT{ FUNC("pause_script", 1) }
						}
						
						FUNC("change_camera_in_cut_scene", 0, 57711, 28076, 1895, 187, -1, 26 )

						if( citizen_recno_1 > 0 )
						{
							WAIT { DIALOG("add_dialog", citizen_recno_1, "[0084N]Those are all the goods - I believe we can return to our town again to share the food among our town's constituents.") }

							FUNC("change_camera_in_cut_scene", 0, 58599, 28411, 1515, 187, 116, 18 )

							WAIT { DIALOG("add_dialog", citizen_recno_1, "[0085N]We are surrounded by enemies! Please - protect us!") }
						}
						else if ( citizen_recno_6 > 0 )
						{
							WAIT { DIALOG("add_dialog", citizen_recno_6, "[0084N]Those are all the goods - I believe we can return to our town again to share the food among our town's constituents.") }
							
							FUNC("change_camera_in_cut_scene", 0, 58599, 28411, 1515, 187, 116, 18 )
							
							WAIT { DIALOG("add_dialog", citizen_recno_6, "[0085N]We are surrounded by enemies! Please - protect us!") }
						}
						else 
						{
							WAIT { DIALOG("add_dialog", citizen_recno_7, "[0084N]Those are all the goods - I believe we can return to our town again to share the food among our town's constituents.") }
							
							FUNC("change_camera_in_cut_scene", 0, 58599, 28411, 1515, 187, 116, 18 )
							
							WAIT { DIALOG("add_dialog", citizen_recno_7, "[0085N]We are surrounded by enemies! Please - protect us!") }
						}

						FUNC("set_units_can_bribe_flag" , marchercap_id, 1 )
						FUNC("set_units_can_bribe_flag" , marcher_id, 1 )
						FUNC("set_units_can_bribe_flag" , mexarcher_id, 1 )
						FUNC("set_units_can_bribe_flag" , mexarchercap_id, 1 )

						// leave cut scene
						DIALOG("del_all_dialog") 

						FUNC("end_cut_scene_2" , 0, 1)	// leave cut scene!
						WAIT{ FUNC("is_cut_scene_status_black_screen") }
						
						WAIT { FUNC("is_cut_scene_finished" ) }
						FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
					
						FUNC("set_scenario_event_bit_flag_2", 5, 1)	

						if( citizen_recno_1 > 0 )
						{
							if(	FUNC("unit_track_to_id", citizen_recno_1, "GoldTrk1") )
							{
								FUNC("set_unit_track" , citizen_recno_1, "GoldTrk1") 
							}

							FUNC("stop_curr_task", citizen_recno_1 ) 
							ACTION("give_task", citizen_recno_1, "APPROACH_PLACE", 100, place_recno_food_back_app_1, 0, 0 , 0)					 	
						}
						
						if( citizen_recno_6 > 0 )
						{
							if(	FUNC("unit_track_to_id", citizen_recno_6, "GoldTrk1") )
							{
								FUNC("set_unit_track" , citizen_recno_6, "GoldTrk1") 
							}

							FUNC("stop_curr_task", citizen_recno_6 ) 
							ACTION("give_task", citizen_recno_6, "APPROACH_PLACE", 100, place_recno_food_back_app_2, 0, 0 , 0)					 	
						}

						if( citizen_recno_7 > 0 )
						{
							if(	FUNC("unit_track_to_id", citizen_recno_7, "GoldTrk1") )
							{
								FUNC("set_unit_track" , citizen_recno_7, "GoldTrk1") 
							}

							FUNC("stop_curr_task", citizen_recno_7 ) 
							ACTION("give_task", citizen_recno_7, "APPROACH_PLACE", 100, place_recno_food_back_app_3, 0, 0 , 0)					 	
						}
												
						if( citizen_recno_1 > 0 )
						{
							//FUNC("attention_call_message_2", "[0001N]Thank you for the escort - now we shall return to St-Thomas-sur-le-pont. Please escort us back.", citizen_recno_1 )

							FUNC("set_end_condition_des_2", 13, "[0086N]Safely escort the villagers back to St-Thomas-sur-le-pont") 	
							FUNC("set_end_condition_territory_link", 13, "St-Thomas-sur-le-pont")
						}
						else if ( citizen_recno_6 > 0 )
						{
							//FUNC("attention_call_message_2", "[0001N]Thank you for the escort - now we shall return to St-Thomas-sur-le-pont. Please escort us back.", citizen_recno_6 ) 

							FUNC("set_end_condition_des_2", 13, "[0086N]Safely escort the villagers back to St-Thomas-sur-le-pont") 	
							FUNC("set_end_condition_territory_link", 13, "St-Thomas-sur-le-pont")
						}
						else if ( citizen_recno_7 > 0 )
						{
							//FUNC("attention_call_message_2", "[0001N]Thank you for the escort - now we shall return to St-Thomas-sur-le-pont. Please escort us back.", citizen_recno_7 )

							FUNC("set_end_condition_des_2", 13, "[0086N]Safely escort the villagers back to St-Thomas-sur-le-pont") 	
							FUNC("set_end_condition_territory_link", 13, "St-Thomas-sur-le-pont")
						}

						temp_unit_recno = FUNC("search_unit_by_name", "Denston Barfot" ) 

						if( temp_unit_recno )
						{
							ACTION("give_team_task", temp_unit_recno, "TOWER_ATTACK", 15, 3000, 0, 0, 0) 
						}
					}
				}
				else
				{
					if( citizen_recno_1 > 0 )
					{
						if( FUNC("is_unit_inside_place", place_recno_food_back_app_1 , citizen_recno_1 ) )
						{
							FUNC("stop_curr_task", citizen_recno_1 ) 
							ACTION("give_task", citizen_recno_1 , "IDLE", 101, 1, 0, 0, 0)
							FUNC("set_unit_degree" , citizen_recno_1 , 235)
						}
					}
					
					if( citizen_recno_6 > 0 )
					{
						if( FUNC("is_unit_inside_place", place_recno_food_back_app_2 , citizen_recno_6 ) )
						{
							FUNC("stop_curr_task", citizen_recno_6 ) 
							ACTION("give_task", citizen_recno_6 , "IDLE", 101, 1, 0, 0, 0)
							FUNC("set_unit_degree" ,  citizen_recno_6 , 235)
						}
					}

					if( citizen_recno_7 > 0 )
					{
						if( FUNC("is_unit_inside_place", place_recno_food_back_app_3 , citizen_recno_7 ) )
						{
							FUNC("stop_curr_task", citizen_recno_7 ) 
							ACTION("give_task", citizen_recno_7 , "IDLE", 101, 1, 0, 0, 0)
							FUNC("set_unit_degree" , citizen_recno_7 ,  235)
						}
					}
				}

				if( flag_collect_food_finished == 0)
				{
					bool_var = 0

					if( FUNC("is_unit_inside_place", place_recno_priest_stand , priest_recno) )
					{
						bool_var = 1
					}

					if( bool_var )
					{
						if( FUNC("is_unit_inside_place", place_recno_councillor_stand , councillor_recno) == 0 )
						{
							bool_var = 0			
						}

						if( bool_var )
						{
							if( citizen_recno_1 > 0 )
							{
								if( FUNC("is_unit_inside_place", place_recno_food_back_app_1 , citizen_recno_1 ) == 0 )
								{
									if( FUNC("is_unit_inside_place", place_recno_french_camp_1 , citizen_recno_1 ) )
									{
										FUNC("set_unit_track" , citizen_recno_1, "DUMMY")
										ACTION("give_task", citizen_recno_1, "APPROACH_PLACE", 110, place_recno_food_back_app_1, 0, 0 , 0)					 	
									}
									bool_var = 0
								}
							}

							if( bool_var )
							{
								if( citizen_recno_6 > 0 )
								{
									if( FUNC("is_unit_inside_place", place_recno_food_back_app_2 , citizen_recno_6 ) == 0 )
									{
										if( FUNC("is_unit_inside_place", place_recno_french_camp_1 , citizen_recno_6 ) )
										{
											FUNC("set_unit_track" , citizen_recno_6, "DUMMY")
											ACTION("give_task", citizen_recno_6, "APPROACH_PLACE", 110, place_recno_food_back_app_2, 0, 0 , 0)					 	
										}

										bool_var = 0
									}
								}

								if( bool_var )
								{
									if( citizen_recno_7 > 0 )
									{
										if( FUNC("is_unit_inside_place", place_recno_food_back_app_3 , citizen_recno_7 ) == 0 )
										{
											if( FUNC("is_unit_inside_place", place_recno_french_camp_1 , citizen_recno_7 ) )
											{
												FUNC("set_unit_track" , citizen_recno_7, "DUMMY")
												ACTION("give_task", citizen_recno_7, "APPROACH_PLACE", 110, place_recno_food_back_app_3, 0, 0 , 0)					 	
											}
											bool_var = 0
										}
									}
								}
							}
						}
					}

					if( bool_var == 1 )
					{
						if( FUNC( "general_by_nation_exist_in_place" , place_recno_protect_trigger , "FRENCH" ) )	
						{
							FUNC("start_cut_scene_2", 1, 0, 58756, 19890, 471, 257, 51, 20, 1)

							FUNC("set_unit_degree" , priest_recno , 235)
							FUNC("set_unit_degree" , councillor_recno , 235)

							FUNC("set_idle", unit_recno) 
							FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
										
							WAIT{ FUNC("is_cut_scene_status_black_screen") }
							FUNC("change_camera_in_cut_scene", 0, 58756, 19890, 471, 257, 51, 20)

							if( flag_food_citizen_all_dead )
							{
								WAIT { DIALOG("add_dialog", councillor_recno, "[0087N]I see you have returned with some food! That is wonderful, now we can eat!") }
								WAIT { DIALOG("add_dialog", councillor_recno, "[0088N]It is most unfortunate that our villagers braved their souls in order for us to eat. But at least without the enemy in the vicinity we are assured food for the short term. Thank you.") }
							}
							else if( citizen_recno_1 == -1 || citizen_recno_6 == -1 || citizen_recno_7 == -1 )
							{
								WAIT { DIALOG("add_dialog", councillor_recno, "[0087N]I see you have returned with some food! That is wonderful, now we can eat!") }
								WAIT { DIALOG("add_dialog", councillor_recno, "[0089N]It is most unfortunate that some of our villagers braved their souls in order for us to eat. But at least without the enemy in the vicinity we are assured food for the short term. Thank you.") }

								FUNC("set_end_condition_finish", 13, "WIN") 
							}
							else 
							{
							
								FUNC("set_unit_degree" , citizen_recno_1 , 235)
								FUNC("set_unit_degree" , citizen_recno_6 , 235)
								FUNC("set_unit_degree" , citizen_recno_7 , 235)

								//WAIT { DIALOG("add_dialog", citizen_recno_1, "[0004N]That's it! We have gathered as much food as we possibly can. Now please, escort us back to St-Thomas-sur-le-pont.") }
								WAIT { DIALOG("add_dialog", councillor_recno, "[0090N]You have returned!") }
								WAIT { DIALOG("add_dialog", priest_recno, "[0091N]Alors - our villagers are back! Thank you ever so much for returning with our men!") }
								WAIT { DIALOG("add_dialog", councillor_recno, "[0092N]On behalf of everyone here merci, merci. Their wives were worried sick!") }
								WAIT { DIALOG("add_dialog", priest_recno, "[0093N]Indeed, my congregation made many a confession while these gents were away! Please - take this cross for your protection.") }
								WAIT { DIALOG("add_dialog", priest_recno, "[0094N]Our Lord works in mysterious ways, and although we have suffered, we also have finally regained our freedom! Merci beaucoup!")}
						
								FUNC("set_end_condition_finish", 13, "WIN") 

								FUNC( "give_item_to_unit", "CROSS_D", 0, 1, unit_recno )

								//FUNC("attention_call_message", "[0001N]You have been given the ")
							}
							
							DIALOG("del_all_dialog") 
					
							FUNC("end_cut_scene_2" , 0, 1)	// leave cut scene!
							WAIT{ FUNC("is_cut_scene_status_black_screen") }

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

							FUNC("set_can_interact_flag", citizen_recno_2, 0)
							FUNC("set_can_interact_flag", citizen_recno_3, 0)
							FUNC("set_can_interact_flag", citizen_recno_4, 0)
							FUNC("set_can_interact_flag", citizen_recno_5, 0)

							if( citizen_recno_1 > 0 && flag_half_gold_triggered )
							{
								FUNC("set_unit_hide_hit_point_bar_flag", citizen_recno_1 , 1 )
							}

							if( citizen_recno_6 > 0 && flag_half_gold_triggered )
							{
								FUNC("set_unit_hide_hit_point_bar_flag", citizen_recno_6 , 1 )
							}

							if( citizen_recno_7 > 0 && flag_half_gold_triggered )
							{
								FUNC("set_unit_hide_hit_point_bar_flag", citizen_recno_7 , 1 )
							}
						}
					}
				}
			}

		}

		if( flag_collect_food_msg == 0 )
		{
			if( FUNC("is_unit_inside_place", place_recno_food_msg , citizen_recno_1 ) || FUNC("is_unit_inside_place", place_recno_food_msg , citizen_recno_6 ) || FUNC("is_unit_inside_place", place_recno_food_msg , citizen_recno_7 ) ) 
			{
				if( citizen_recno_1 > 0 )
				{
					FUNC("attention_call_message_2", "[0095N]Alors, those are mercenary barrels - I suspect they have been packing our produce in barrels to ease their transport. Can you please break all the barrels so we may salvage our goods?", citizen_recno_1 )
				}
				else if ( citizen_recno_6 > 0 )
				{
					FUNC("attention_call_message_2", "[0095N]Alors, those are mercenary barrels - I suspect they have been packing our produce in barrels to ease their transport. Can you please break all the barrels so we may salvage our goods?", citizen_recno_6 )
				}
				else 
				{
					FUNC("attention_call_message_2", "[0095N]Alors, those are mercenary barrels - I suspect they have been packing our produce in barrels to ease their transport. Can you please break all the barrels so we may salvage our goods?", citizen_recno_7 )
				}
			
				FUNC("set_scenario_bit_flag", 12, 1)
			}
		}
	}


	if( flag_citizen_spawn )
	{
		if( citizen_recno_1 == 0 )
		{
			citizen_recno_1 = FUNC("search_unit_by_name", "Dreuz Forcetier")

			if( citizen_recno_1 && flag_collect_food_triggered == 0 )
			{
				FUNC("set_can_interact_flag", citizen_recno_1 , 1)
				ACTION("give_task", citizen_recno_1, "IDLE", 100, 1, 0, 0, 0)
			}
			else if ( flag_citizen_dead_1 )
			{
				citizen_recno_1 = -1
			}
		}
		else if ( citizen_recno_1 > 0 )
		{
			if( FUNC( "is_unit_dead", citizen_recno_1 ) ) 
			{
				citizen_recno_1 = -1
				
				FUNC("set_scenario_event_bit_flag_3", 1, 1 )
				flag_citizen_dead_1 = 1 

				if( flag_collect_food_triggered == 0 )
				{
				 	FUNC("set_can_interact_flag", citizen_recno_2, 0)
					FUNC("set_can_interact_flag", citizen_recno_3, 0)
					FUNC("set_can_interact_flag", citizen_recno_4, 0)
					FUNC("set_can_interact_flag", citizen_recno_5, 0)
				}
				 
			}

			if( talk_unit_recno > 0 && talk_unit_recno == citizen_recno_1 )	
			{
				FUNC("start_cut_scene_2", 1, 0, citizen_recno_1, 200, ( 180 - FUNC("get_unit_dir", citizen_recno_1) ), 10, 1)
						
				// 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", citizen_recno_1, 1)
				
				FUNC("stop_curr_task", citizen_recno_1 )
				ACTION("give_task", citizen_recno_1, "IDLE", 1, 1, 0, 0, 0)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 57721.17, 30191.65, 1022.28, 0 , "s7_food1" )
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 57708.17, 30230.65, 1021.00, 0 , "s7_food2" )
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 57672.17, 30198.65, 1022.00, 0 , "s7_food3" )
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 57679.17, 30163.65, 1023.00, 0 , "s7_food4" )
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 58718.00, 29690.00, 1026.00, 0 , "s7_food5" )
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 58745.00, 29649.00, 1023.00, 0 , "s7_food6" )
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 58772.00, 29682.00, 1026.43, 0 , "s7_food7" )
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 58676.42, 29917.45, 1026.00, 0 , "s7_food8" )
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 58661.42, 29877.45, 1026.40, 0 , "s7_food9" )
				FUNC("add_item_box" , "Object\Models_Items\Accessories\CylinderBoxDestructable\Cylinder", "s7_food", 58704.42, 29882.45, 1026.29, 0 , "s7_food0" )

				FUNC("change_camera_in_cut_scene", 0, citizen_recno_1, 200, ( 180 - FUNC("get_unit_dir", citizen_recno_1) ), 10 )
				
				// set weapon seller to idle and rotate him
				ACTION("stop_all_order", citizen_recno_1 ) 
				ACTION("give_order" , citizen_recno_1, "TURN" , 3 , 0 , FUNC("get_rotation" , citizen_recno_1, unit_recno) , 0 , 0 , 0, 2500)

				WAIT { DIALOG("add_dialog", citizen_recno_1, "[0096N]If we are to survive much longer we need food. Please, guerrier aimable de vertu, prove yourself worthy of your knighthood by accompanying us to the farm.") }

				FUNC("change_camera_in_cut_scene", 0, 57048, 28924, 1868, 350, 42, 37 )

				WAIT { DIALOG("add_dialog", citizen_recno_1, "[0097N]Our farm is close by. There lay our crops, but as the enemy patrol the area, we cannot be sure we can reach our farm without risk of death.") }

				FUNC("change_camera_in_cut_scene", 0, citizen_recno_1, 200, ( 180 - FUNC("get_unit_dir", citizen_recno_1) ), 10 )

				WAIT { DIALOG("add_dialog", citizen_recno_1, "[0098N]But if you accompany us, then at least we are granted a modicum of safety. Please, escort us whist we collect our food. Follow me, please, and I shall lead you there.") }
				
				// leave cut scene
				DIALOG("del_all_dialog") 

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

				FUNC("facility_barrack_add_leader", facility_recno_spawn_9  , cti1_id, 458, 1, "Charles Treffilier", "Treffilier" )
				FUNC("facility_barrack_add_leader", facility_recno_spawn_16 , cti1_id, 459, 1, "Geoffroy Ouvrier", "Ouvrier" )
				
				WAIT { FUNC("is_cut_scene_finished" ) }
				FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process

				FUNC("stop_curr_task", citizen_recno_1 )

				//ACTION("give_task", citizen_recno_1 ,  "FOLLOW_UNIT", 1, unit_recno, 0, 0, 0)
				
				FUNC("set_end_condition_enabled", 12, 1) 
				FUNC("set_end_condition_enabled", 13, 1) 
				//FUNC("set_end_condition_finish", 13, "WIN") 

				FUNC("set_scenario_bit_flag", 11, 1)

				FUNC("set_can_interact_flag", citizen_recno_1 , 0)
				FUNC("set_unit_hide_hit_point_bar_flag", citizen_recno_1 , 0 )
			}
		}

		if( citizen_recno_2 == 0 )
		{
			citizen_recno_2 = FUNC("search_unit_by_name", "Alenard Poraier")

			if( citizen_recno_2 && flag_collect_food_finished == 0 )
			{
				FUNC("set_can_interact_flag", citizen_recno_2 , 1)
			}
			else if ( flag_citizen_dead_2 )
			{
				citizen_recno_2 = -1
			}
		}
		else if ( citizen_recno_2 > 0 )
		{
			if( FUNC( "is_unit_dead", citizen_recno_2 ) ) 
			{
				citizen_recno_2 = -1 

				FUNC("set_scenario_event_bit_flag_3", 2, 1 )
				flag_citizen_dead_2 = 1
			}

			if( talk_unit_recno > 0 && talk_unit_recno == citizen_recno_2 )	
			{
				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", citizen_recno_2, 1)

				FUNC("stop_curr_task", citizen_recno_2 )
				ACTION("give_task", citizen_recno_2, "IDLE", 1, 1, 0, 0, 0)

				ACTION("stop_all_order", citizen_recno_2 ) 
				ACTION("give_order" , citizen_recno_2, "TURN" , 3 , 0 , FUNC("get_rotation" , citizen_recno_2, unit_recno) , 0 , 0 , 0, 2500)

				//WAIT { DIALOG("add_dialog", citizen_recno_2, "[0004N]I am frail and my body feeble, and I have not had a decent square for days! How is an old man like me expected to continue living on like this?") }
				WAIT { DIALOG("add_dialog", citizen_recno_2, "[0099N]I am frail and my body feeble, I have not eaten a square meal for days! How is an old man like me expected to continue living on like this? Please meet with Dreuz Forcetier, our farmhand, and bring us some food!") }

				// leave cut scene
				DIALOG("del_all_dialog") 

				FUNC("stop_curr_task", citizen_recno_2 )
								
				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( citizen_recno_3 == 0 )
		{
			citizen_recno_3 = FUNC("search_unit_by_name", "Ferry Marcheant")

			if( citizen_recno_3 && flag_collect_food_finished == 0 )
			{
				FUNC("set_can_interact_flag", citizen_recno_3 , 1)
			}
			else if ( flag_citizen_dead_3 )
			{
				citizen_recno_3 = -1
			}
		}
		else if ( citizen_recno_3 > 0 )
		{
			if( FUNC( "is_unit_dead", citizen_recno_3 ) ) 
			{
				citizen_recno_3 = -1 

				FUNC("set_scenario_event_bit_flag_3", 3, 1 )
				flag_citizen_dead_3 = 1

			}

			if( talk_unit_recno > 0 && talk_unit_recno == citizen_recno_3 )	
			{
				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", citizen_recno_3, 1)

				FUNC("stop_curr_task", citizen_recno_3 )
				ACTION("give_task", citizen_recno_3, "IDLE", 1, 1, 0, 0, 0)

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

				//WAIT { DIALOG("add_dialog", citizen_recno_3, "[0004N]I am hungry! I want to eat...") }
				WAIT { DIALOG("add_dialog", citizen_recno_3, "[0100N]Monsieur I am hungry! I want to eat... Monsieur Forcetier would always would bring us apples. He is to be found near the bridge when he's not at the farm. Could you talk with him? Maybe he has some apples for me!") }

				// leave cut scene
				DIALOG("del_all_dialog") 

				FUNC("stop_curr_task", citizen_recno_3 )
								
				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( citizen_recno_4 == 0 )
		{
			citizen_recno_4 = FUNC("search_unit_by_name", "Carola Hostellier")

			if( citizen_recno_4 && flag_collect_food_finished == 0 )
			{
				FUNC("set_can_interact_flag", citizen_recno_4 , 1)
			}
			else if ( flag_citizen_dead_4 )
			{
				citizen_recno_4 = -1
			}
		}
		else if ( citizen_recno_4 > 0 )
		{
			if( FUNC( "is_unit_dead", citizen_recno_4 ) ) 
			{
				citizen_recno_4 = -1
				
				FUNC("set_scenario_event_bit_flag_3", 4, 1 )
				flag_citizen_dead_4 = 1 
			}
			
			if( talk_unit_recno > 0 && talk_unit_recno == citizen_recno_4 )	
			{
				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", citizen_recno_4, 1)

				FUNC("stop_curr_task", citizen_recno_4 )
				ACTION("give_task", citizen_recno_4, "IDLE", 1, 1, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", citizen_recno_4, "[0101N]It is unfortunate that the animals in the enemy army hound us so! I scarcely have enough energy for myself, let alone for my unfortunate child, who needs to be nurtured properly!") }
				WAIT { DIALOG("add_dialog", citizen_recno_4, "[0102N]I implore you, please talk with Monsieur Forcetier, our farmhand, who is near the bridge. He can take you to the farmland so that food may be brought back to this starving village!") }

				// leave cut scene
				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

				FUNC("stop_curr_task", citizen_recno_4 )
			}
		}

		if( citizen_recno_5 == 0 )
		{
			citizen_recno_5 = FUNC("search_unit_by_name", "Jacques Galochier")

			if( citizen_recno_5 && flag_collect_food_finished == 0 )
			{
				FUNC("set_can_interact_flag", citizen_recno_5 , 1)
			}
			else if ( flag_citizen_dead_5 )
			{
				citizen_recno_5 = -1
			}
		}
		else if ( citizen_recno_5 > 0 )
		{
			if( FUNC( "is_unit_dead", citizen_recno_5 ) ) 
			{
				citizen_recno_5 = -1 

				FUNC("set_scenario_event_bit_flag_3", 5, 1 )
				flag_citizen_dead_5 = 1
			}

			if( talk_unit_recno > 0 && talk_unit_recno == citizen_recno_5 )	
			{
				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", citizen_recno_5, 1)

				FUNC("stop_curr_task", citizen_recno_5 )
				ACTION("give_task", citizen_recno_5, "IDLE", 1, 1, 0, 0, 0)

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

				//WAIT { DIALOG("add_dialog", citizen_recno_5, "[0004N]Our crops do not yield, and the path to Reims is far away. The enemy is everywhere! Our rations are dwindling, and we need food to survive! Can you help us?") }
				WAIT { DIALOG("add_dialog", citizen_recno_5, "[0103N]Our crops do not yield, and the path to Reims is far away. The enemy is everywhere! Our rations are dwindling, we need food to survive! Can you escort Monsieur Forcetier on an errand to bring some food into the village? He is near the bridge.") }

				// leave cut scene
				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

				FUNC("stop_curr_task", citizen_recno_5 )
			}

		}
	}


	//gough attack
	if( FUNC( "people_by_nation_exist_in_place" , place_recno_st_pierre, "FRENCH" )	== 0 )
	{
		if( flag_gold_captured  && flag_gold_captured_gressart_cut_scene == 0 && flag_gough_dead == 0 && FUNC("get_scenario_count_time") > 120000 )
		{
			FUNC("start_cut_scene_2", 1, 0, 37040, 22827, 742, 187, 149, 14, 1)

			FUNC("set_idle", unit_recno) 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			
			WAIT{ FUNC("is_cut_scene_status_black_screen") }

			if( gough_recno )
			{
				//unit_hp = FUNC("get_unit_hp", gough_recno)
				FUNC("del_unit" , gough_recno ) 
			}

			FUNC("facility_barrack_add_leader", facility_recno_st_pierre_13 , gough_id, 20, 25, "Matthew Gough", "Gough" )
			
			FUNC("change_camera_in_cut_scene", 0, 37040, 22827, 742, 187, 149, 14 )
			
			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				WAIT{ FUNC("pause_script", 3000) }
			}
			else
			{
				WAIT{ FUNC("pause_script", 1) }
			}
			
			gough_recno = FUNC("search_unit_by_name", "Matthew Gough")
			
			if(gough_recno)
			{
				FUNC("set_can_bribe_flag" , gough_recno, 0)
				
				//if( unit_hp > 0 )
				//{
					//FUNC("set_unit_hp" , gough_recno, unit_hp )
				//}

				FUNC("set_unit_retreat", gough_recno , 1)
				FUNC("give_item_to_unit", "fd_fish", 1, 3, gough_recno)
			
			}
					
			// set main character to idle
			FUNC("set_unit_can_process_in_cut_scene", gate_guard_recno, 1)	// councillor can process
			//FUNC("set_unit_can_process_in_cut_scene", gough_recno, 1)	// councillor can process
				
			WAIT { DIALOG("add_dialog", gate_guard_recno, "[0104N]Sire, the gold has not arrived as of yet.") }
			WAIT { DIALOG("add_dialog", gough_recno, "[0105N]What? Those English are never late on their payments. I wonder if something untoward has happened? Troops, stay behind and fend our stronghold. I shall part with some men and visit Varzy... Something's not right.") }
		
			// leave cut scene
			DIALOG("del_all_dialog") 
			
			FUNC("end_cut_scene_2" , 0, 1)	// leave cut scene!
			WAIT{ FUNC("is_cut_scene_status_black_screen") }

			//spawn gressart's troops
			if( flag_gressart_heavy_troop_spawn == 0 )
			{
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_39 , mlinfant_id, 20, 1, 25)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_35 , mlinfant_id, 20, 1, 25)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_30 , mlinfant_id, 20, 1, 25)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_25 , mlinfant_id, 20, 1, 25)
				
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_36 , marcher_id, 20, 1, 25)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_31 , marcher_id, 20, 1, 25)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_26 , marcher_id, 20, 1, 25)
				FUNC("facility_barrack_add_member", facility_recno_st_pierre_21 , marcher_id, 20, 1, 25)
					
				FUNC("stop_curr_task", gough_recno)
				//gough_recno = 0 

				FUNC("set_scenario_bit_flag", 8, 1)

				FUNC("set_scenario_event_bit_flag", 1, 1)
				FUNC("set_scenario_bit_flag", 9, 0)
				FUNC("set_scenario_bit_flag", 10, 0)
				FUNC("set_scenario_bit_flag", 32, 0)

				st_pierre_heavy_troop_infant_1 = 0
				st_pierre_heavy_troop_infant_2 = 0
				gold_track_gressart_id_1 = 0
				gold_track_gressart_id_2 = 0

				if( st_pierre_gate_recno )
				{
					if( FUNC("get_gate_state" ,  st_pierre_gate_recno ) == 0 ) 
					{
						FUNC("add_gate_trigger", st_pierre_gate_recno, 1)		
						FUNC( "set_scenario_event_bit_flag", 23, 1)
						FUNC( "set_scenario_count_time_3" )
					}
				}
			}

			FUNC("set_scenario_bit_flag", 20, 1)
			FUNC("set_scenario_bit_flag", 23, 1)

			//spawn citizens
			if(flag_citizen_spawn == 0)
			{
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_1, cti1_id, 453, 1, "Dreuz Forcetier", "Forcetier" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_2, cti2_id, 454, 1, "Alenard Poraier", "Poraier" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_3, cti4_id, 455, 1, "Ferry Marcheant", "Marcheant" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_4, cti5_id, 456, 1, "Carola Hostellier", "Hostellier" )
				FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_5, cti1_id, 457, 1, "Jacques Galochier", "Galochier" )
								
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_6 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_7 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_8 , cti2_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_9 , cti3_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_10 , cti4_id, 452, 1, 1)
				//FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_11 , cti5_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_12 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_13 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_14 , cti2_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_15 , cti3_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_16 , cti4_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_17 , cti5_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_18 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_19 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_20 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_21 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_22 , cti2_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_23 , cti3_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_24 , cti4_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_25 , cti5_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_26 , cti6_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_27 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_28 , cti1_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_29 , cti4_id, 452, 1, 1)
				FUNC("facility_barrack_add_member", facility_recno_citizen_spawn_30 , cti6_id, 452, 1, 1)

				WAIT{ FUNC("pause_script", 1) }

				FUNC("start_kill_interface")
				FUNC("set_end_condition_enabled", 7, 1) 
				FUNC ("set_end_condition_enabled", 4, 1) 
			//	FUNC("set_end_condition_finish", 7, "WIN") 

				FUNC("set_scenario_event_bit_flag", 2, 1)
			}

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

			FUNC("set_units_can_bribe_flag" , mlinfantcap_id, 1 )
			FUNC("set_units_can_bribe_flag" , marchercap_id, 1 )
			FUNC("set_units_can_bribe_flag" , mpolemancap_id, 1 )
			FUNC("set_units_can_bribe_flag" , mlinfant_id, 1 )
			FUNC("set_units_can_bribe_flag" , marcher_id, 1 )
			FUNC("set_units_can_bribe_flag" , mpoleman_id, 1 )
			FUNC("set_units_can_bribe_flag" , mexarcher_id, 1 )
			FUNC("set_units_can_bribe_flag" , mexarchercap_id, 1 )
	
			FUNC("set_can_bribe_flag" , gressart_recno, 0)
			FUNC("set_can_bribe_flag" , gough_recno, 0)
			
		}
	}

	if( FUNC( "get_unit_retreat" , gough_recno) == -1 )
	{ 
		//retreat to mountain_top
		FUNC("start_cut_scene_2", 1, 0, gough_recno, 200, ( 180 - FUNC("get_unit_dir", gough_recno) ), 10, 1)

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

		WAIT{ FUNC("is_cut_scene_status_black_screen") }
		FUNC("set_unit_can_process_in_cut_scene", gough_recno, 1)

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

		WAIT{ FUNC("is_cut_scene_status_black_screen") }
		FUNC("change_camera_in_cut_scene", 0, gough_recno, 200, ( 180 - FUNC("get_unit_dir", gough_recno) ), 10)
		
		WAIT { DIALOG("add_dialog", gough_recno, "[0106N]You have proved tougher than I expected, but you shall never reclaim the gold we took from your ill-mannered peasants! Men! Follow me to the church! We must protect our gold!") }
		WAIT { DIALOG("add_dialog", gough_recno, "[0107N]You French are most resilient, like cockroaches. But the gold is ours to keep! To the monastery, men! The loot is ours to keep, and we must protect it!") }

		FUNC("enable_unit_bounding_volume", gough_recno, 0)

		if( FUNC("is_cut_scene_finished" ) == 0 )
		{
			WAIT{ ACTION("give_order", gough_recno, "APPROACH_PLACE", 99, 1, place_recno_st_pierre_firework, 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" , gough_recno)
		FUNC("facility_barrack_add_leader", facility_recno_firework_spawn_3 , gough_id, 20, 25, "Matthew Gough", "Gough" )
		
		gough_recno = 0

		WAIT{ FUNC("pause_script", 1 ) }
	
		gough_recno = FUNC("search_unit_by_name", "Matthew Gough")
	
		if(gough_recno)
		{
			FUNC("give_item_to_unit", "fd_fish", 1, 3, gough_recno)
			FUNC("set_can_bribe_flag" , gough_recno, 0)
			//FUNC("set_unit_hp", gough_recno, unit_hp )
			FUNC("set_unit_retreat", gough_recno , 1)
			ACTION("give_task", gough_recno, "IDLE", 99, 1, 0, 0, 0) 
		}

		flag_gressart_heavy_troop_moving = 0

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

	

	//gough moving && kill innocent.	
	if( flag_gressart_heavy_troop_moving && gough_recno )
	{
		if( flag_gough_eng_camp_cut_scene == 0 )
		{
			if( FUNC("is_unit_inside_place", place_eng_camp_outside, gough_recno ) )
			{
				FUNC("start_cut_scene", 0, 0, 50192, 18062, 530, 125, 74, 1)
				
				// 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
					
				if( FUNC("people_by_nation_exist_in_place" , place_eng_camp , "FRENCH" ) )
				{
					WAIT { DIALOG("add_dialog", gough_recno, "[0108N]Hmm... this camp is occupied by the accursed French!") }
				}
				else
				{
					WAIT { DIALOG("add_dialog", gough_recno, "[0109N]Hmm... this camp is deserted. I knew that something was wrong - the French must have sabotaged their camp!") }
				}
				
				FUNC("change_camera_in_cut_scene", 0, 49528 , 18249, 530, 125, 32, -1 )

				WAIT { DIALOG("add_dialog", gough_recno, "[0110N]I shall head to French towns to loot their valuables - my men will not accept excuses if I do not pay on time.") }
				
				// 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("set_scenario_event_bit_flag", 22, 1)
			}
		}

		if( FUNC("is_enemy_exist_for_unit_team" , gough_recno, 500) == 1 )
		{
			if( FUNC("is_unit_dead", gough_recno ) )
			{
				FUNC("set_scenario_event_bit_flag", 1, 0)
				FUNC("set_scenario_event_bit_flag", 21, 1)
													
				gold_track_gressart_id_1 = 0
				gold_track_gressart_id_2 = 0
			}
			else
			{
				FUNC("stop_curr_task", gough_recno)
				FUNC("set_unit_track" , gough_recno, "DUMMY")
			}
		}
		else
		{
			//set track for gressart
			if( FUNC("is_unit_track_exist", "GoldTrk1" ) && FUNC("unit_track_to_id", gough_recno, "GoldTrk1") )
			{
				gold_track_gressart_id_1 = FUNC("unit_track_to_id", gough_recno, "GoldTrk1")
				FUNC("set_unit_track" , gough_recno, "GoldTrk1")
			}
			else
			{
				gold_track_gressart_id_1 = 0
			}
			
			if ( FUNC("is_unit_track_exist", "GoldTrk2" ) && FUNC("unit_track_to_id", gough_recno, "GoldTrk2") )
			{
				gold_track_gressart_id_2 = FUNC("unit_track_to_id", gough_recno, "GoldTrk2")
				FUNC("set_unit_track" , gough_recno, "GoldTrk2")
			}
			else
			{
				gold_track_gressart_id_2 = 0
			}

			if( gold_track_gressart_id_2 == 0 && gold_track_gressart_id_1 == 0 )
			{
				FUNC("set_unit_track" , gough_recno, "DUMMY")
			}
			
			if( flag_gressart_heavy_troop_reverse == 0 )
			{
				if( gough_recno != 0 )
				{
					if(FUNC("is_unit_dead", gough_recno ) )
					{
						FUNC("set_scenario_event_bit_flag", 1, 0)
						FUNC("set_scenario_event_bit_flag", 21 , 1)
						FUNC("set_scenario_bit_flag", 32 , 0)
										
						gold_track_gressart_id_1 = 0
						gold_track_gressart_id_2 = 0
					}
					else
					{
						FUNC("stop_curr_task", gough_recno)

						if( gold_track_id_2 )
						{
							if ( FUNC("is_unit_track_exist", "GoldTrk1" ) )
							{
								ACTION("give_task", gough_recno, "APPROACH_PLACE", 99, place_recno_gold_start, 0, 0 , 0)					 	
							}
							else
							{
								ACTION("give_task", gough_recno, "APPROACH_PLACE", 99, place_recno_gold_half_2_app , 0, 0 , 0)					 
							}
						}
						else
						{
							ACTION("give_task", gough_recno, "APPROACH_PLACE", 99, place_recno_gold_start, 0, 0 , 0)					 
						}
											
						if( FUNC("is_unit_inside_place", place_recno_start_arrive, gough_recno) )
						{
							FUNC("set_scenario_bit_flag", 32 , 1)
						}
					}
				}
			}
			else
			{
				if( gough_recno != 0 )
				{
					if( FUNC("is_unit_dead", gough_recno ) )
					{
						FUNC("set_scenario_event_bit_flag", 1, 0)
						FUNC("set_scenario_event_bit_flag", 21 , 1)
						FUNC("set_scenario_bit_flag", 32 , 0)
										
						gold_track_gressart_id_1 = 0
						gold_track_gressart_id_2 = 0
					}
					else
					{
						FUNC("stop_curr_task", gough_recno)

						if( gold_track_id_2 )
						{
							ACTION("give_task", gough_recno, "APPROACH_PLACE", 99, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
						}
						else if ( gold_track_id_1 )
						{
							if ( FUNC("is_unit_track_exist", "GoldTrk2" ) )
							{
								ACTION("give_task", gough_recno, "APPROACH_PLACE", 99, place_recno_st_pierre_gold_end, 0, 0 , 0)					 	 
							}
							else
							{
								ACTION("give_task", gough_recno, "APPROACH_PLACE", 99, place_recno_gold_half_1_app, 0, 0 , 0)					
							}
						}
						else
						{
							ACTION("give_task", gough_recno, "APPROACH_PLACE", 99, place_recno_st_pierre_gold_end, 0, 0 , 0)					 
						}
											
						if( FUNC("is_unit_inside_place", place_recno_st_pierre_outside, gough_recno) )
						{
							if( flag_st_pierre_captured )
							{
						
								
							}
							else if( st_pierre_gate_recno )
							{
								if( FUNC("get_gate_state" ,  st_pierre_gate_recno ) == 0 ) 
								{
									FUNC("add_gate_trigger", st_pierre_gate_recno, 1)		

									FUNC( "set_scenario_event_bit_flag", 23, 1)
									FUNC( "set_scenario_count_time_3" )
								}
							}
						}
						
						if( FUNC("is_unit_inside_place", place_recno_st_pierre_arrive, gough_recno) )
						{
							FUNC("stop_curr_task", gough_recno)
							FUNC("set_unit_track" , gough_recno, "DUMMY")

							FUNC("set_scenario_bit_flag", 14 , 1)
							
							FUNC("set_scenario_bit_flag", 32 , 1)
							FUNC("set_scenario_event_bit_flag", 1 , 0)
										
							FUNC("set_can_bribe_flag" , gressart_recno, 0)
							FUNC("set_can_bribe_flag" , gough_recno, 0)
						}
					}
				}
			}
		}
	}

	if( flag_gough_dead && flag_gough_dead_cut_scene == 0 )
	{
		FUNC("start_cut_scene_2", 1, 0, gough_recno, 200, ( 180 - FUNC("get_unit_dir", gough_recno) ), 10, 1)

		FUNC("set_idle", unit_recno) 
		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, gough_recno, 200, ( 180 - FUNC("get_unit_dir", gough_recno) ), 10)
		
		WAIT { DIALOG("add_dialog", alencon_recno, "[0111N]Matthew Gough, the mercenary leader of Saint-Pierre-le-Moutier, is no more! Now let us kill off the rest of the mercenaries to lay claim to this great fortress!") }

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

		FUNC( "set_unit_drop_item_id" , gough_recno, dragon_id ) 
		FUNC( "set_unit_drop_item_level", gough_recno, 1)

		FUNC( "del_unit" , gough_recno)
		gough_recno = 0
	
		WAIT { FUNC("is_cut_scene_finished" ) }
		FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
		
		FUNC("attention_call_message", "[0112N]You have slain Matthew Gough!")
			
		FUNC("set_scenario_event_bit_flag", 24, 1)
	}

	if( flag_martin_dead && flag_martin_dead_cut_scene == 0 )
	{
		FUNC("start_cut_scene_2", 1, 0, martin_recno, 200, ( 180 - FUNC("get_unit_dir", martin_recno) ), 10, 1)

		FUNC("set_idle", unit_recno) 
		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, martin_recno, 200, ( 180 - FUNC("get_unit_dir", martin_recno) ), 10)
		
		WAIT { DIALOG("add_dialog", martin_recno, "[0113N]Brother... I've... failed you...") }

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

		FUNC( "set_unit_drop_item_id" , martin_recno, dragonB_id ) 
		FUNC( "set_unit_drop_item_level", martin_recno, 1)

		FUNC( "del_unit" , martin_recno)
		martin_recno = 0
	
		WAIT { FUNC("is_cut_scene_finished" ) }
		FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
		
		FUNC("attention_call_message", "[0114N]You have slain Martin Gough!")
			
		FUNC("set_scenario_event_bit_flag_2", 22, 1)
	}

//	if( flag_english_camp_patrol_path && flag_gough_dead && flag_gressart_retreat_1 == 0 && flag_burgundians_cut_scene == 0 )
//	{
//		team_member_count = FUNC("get_unit_team_size", english_patrol_troop_1)

//		team_member_count_1 = FUNC("get_unit_team_size", english_patrol_troop_2)

//		team_member_count = ( team_member_count + team_member_count_1 )

//		team_member_count_2 = FUNC("get_unit_team_size", english_patrol_troop_3)

//		team_member_count = ( team_member_count + team_member_count_2 )

//		team_member_count_3 = FUNC("get_unit_team_size", english_patrol_troop_4)

//		team_member_count = ( team_member_count + team_member_count_3 )

//		if ( team_member_count < 10 )
//		{
//			FUNC("start_cut_scene", 0, 0, 13950, 7911, 163, 187, 179, 7)
				
			// 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
			
//			WAIT { DIALOG("add_dialog", burgundian_recno, "[0004N]Perrinet Gressart, we have just come from Tourcoing and Lille to the northeast. Tell us, how is the situation here like?") }		
//			WAIT { DIALOG("add_dialog", gressart_recno, "[0004N]Not well, I'm afraid - the deceiving French have made a mess of our alliance. They sabotaged our payment in gold, and have used it to bribe some of my less loyal units.") }
//			WAIT { DIALOG("add_dialog", burgundian_recno, "[0004N]That is unfortunate indeed. We must stop the French from passing La Charité-sur-Loire. It is our last line of defense before they get a clear path to Reims!") }

			// 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)	
					
//			FUNC("set_scenario_bit_flag", 29, 1)
//		}
//	}

//	if( flag_first_invasion_la_charite_l == 0 && flag_first_invasion_la_charite_r == 0 && flag_first_invasion_la_charite_c == 0 )
//	{
		if( flag_gough_dead && flag_english_camp_patrol_path == 0 && flag_gressart_retreat_1 == 0 )
		{
			if ( FUNC("get_scenario_count_time") > 120000 )
			{
				FUNC("start_cut_scene", 0, 0, 13950, 7911, 163, 187, 179, 7)
								
				// 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
				
			
				WAIT { DIALOG("add_dialog", la_charite_army_recno_2, "[0115N]Milord, we have not received word from Sir Gough. If I might add, our men are in quite a stir, for they have yet to receive their regular payments...") }		

				FUNC("change_camera_in_cut_scene", 0, 12758, 7930, 294, 237, 1, 20 )

				WAIT { DIALOG("add_dialog", gressart_recno, "[0116N]Blast it! Very well, I shall have to pay their dues from my own pocket until we receive our payment.") }

				FUNC("change_camera_in_cut_scene", 0, 13210, 7953, 55, 264, 177, 2 )

				WAIT { DIALOG("add_dialog", gressart_recno, "[0117N]I don't like this - at all. The English are well known for their punctuality. Captain!") }

				FUNC("change_camera_in_cut_scene", 0, 13950, 7911, 163, 187, 179, 7)

				FUNC("stop_curr_task", la_charite_army_recno_1)			
				FUNC("set_unit_can_process_in_cut_scene", la_charite_army_recno_1, 1)	

				FUNC("stop_curr_task", gressart_recno)			
				FUNC("set_unit_can_process_in_cut_scene", gressart_recno, 1)

				ACTION("give_order", la_charite_army_recno_1, "APPROACH_PLACE", 99, 1, place_recno_run_up, 0, 0, 0, 1100) 
				ACTION("give_order" , gressart_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , gressart_recno, la_charite_army_recno_1 ), 0 , 0 , 0, 2500)
								
				WAIT { DIALOG("add_dialog", la_charite_army_recno_1, "[0118N]Yes, milord!") }
				
				WAIT { DIALOG("add_dialog", gressart_recno, "[0119N]Send some units to patrol the forest! I think we are about to receive some unwelcome guests... Perhaps we should call on our Burgundian friends to aid us. Send word to them that we could use some reinforcements!") }

				if( FUNC("is_cut_scene_finished" ) == 0 )
				{
					FUNC("set_unit_track", la_charite_army_recno_1, "BAT_TRK" )
					WAIT { ACTION("give_order", la_charite_army_recno_1, "APPROACH_PLACE", 100, 1, place_recno_st_la_charite_outside, 0, 0, 0, 3000) }
					FUNC("set_unit_track", la_charite_army_recno_1, "DUMMY" )
				}

				// 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

				ACTION("give_team_task", english_patrol_troop_1, "DEFEND_PLACE", 99, place_recno_english_patrol_path, 0, 0, 0)
				ACTION("give_team_task", english_patrol_troop_2, "DEFEND_PLACE", 99, place_recno_english_patrol_path, 0, 0, 0)
				ACTION("give_team_task", english_patrol_troop_3, "DEFEND_PLACE", 99, place_recno_english_patrol_path, 0, 0, 0)
				ACTION("give_team_task", english_patrol_troop_4, "DEFEND_PLACE", 99, place_recno_english_patrol_path, 0, 0, 0)

				FUNC("stop_curr_task", la_charite_army_recno_1 )			
				ACTION("give_task", la_charite_army_recno_1, "IDLE", 1, 1, 0, 0, 0) 
				FUNC("stop_curr_task", gressart_recno)			
				ACTION("give_task", gressart_recno, "IDLE", 1, 1, 0, 0, 0) 
			
				FUNC("set_scenario_bit_flag", 22, 1)
			}
		}
//	}

	//castle 2
	
	if( FUNC( "get_unit_retreat" , gressart_recno) == -1 )
	{ 
		//retreat to la charite
		if( flag_gressart_retreat_1 == 0)
		{
			FUNC("start_cut_scene_2", 1, 0, gressart_recno, 200, ( 180 - FUNC("get_unit_dir", gressart_recno) ), 10, 1)

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

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("set_unit_can_process_in_cut_scene", gressart_recno, 1)

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

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, gressart_recno, 200, ( 180 - FUNC("get_unit_dir", gressart_recno) ), 10)
			
			WAIT { DIALOG("add_dialog", gressart_recno, "[0120N]I've been wounded! I must retreat! Hold back their advance while I escape and recover!") }

			FUNC("enable_unit_bounding_volume", gressart_recno, 0)

			if( FUNC("is_cut_scene_finished" ) == 0 )
			{
				WAIT{ ACTION("give_order", gressart_recno, "APPROACH_PLACE", 99, 1, place_recno_gressart_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" , gressart_recno)
			FUNC("facility_barrack_add_leader", facility_spawn_gressart_retreat_2 , gressart_id, 20, 28, "Perrinet Gressart", "Gressart")		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_1, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_2, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_3, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_4, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_5, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_6, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_7, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_8, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_9, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_10, mlinfant_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_11, mpoleman_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_12, mpoleman_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_13, mpoleman_id, 20, 1, 24 ) 		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_14, mpoleman_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_15, mpoleman_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_16, mpoleman_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_17, mpoleman_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_18, mpoleman_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_19, mpoleman_id, 20, 1, 24 )		
			FUNC("facility_barrack_add_member", facility_spawn_perrinet_troop_20, mpoleman_id, 20, 1, 24 )		
			
			gressart_recno = 0

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

			flag_gressart_retreat_1 = 1

			WAIT{ FUNC("pause_script", 1000) }

			gressart_recno = FUNC("search_unit_by_name", "Perrinet Gressart")

			if ( gressart_recno )
			{
				FUNC("set_unit_retreat" , gressart_recno, -2 )
				FUNC("set_unit_drop_item_id" , gressart_recno, sword_id ) 
				FUNC("set_unit_drop_item_level", gressart_recno, 1)
				FUNC("give_item_to_unit", "fd_meat", 1, 6, gressart_recno)
			}

		}
	}
	else if ( flag_gressart_retreat_1 && gressart_recno )
	{
		if( FUNC("is_unit_dead" , gressart_recno) )
		{
			FUNC("start_cut_scene_2", 1, 0, gressart_recno, 200, ( 180 - FUNC("get_unit_dir", gressart_recno) ), 10, 1)
			FUNC("set_idle", unit_recno) 
			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, gressart_recno, 200, ( 180 - FUNC("get_unit_dir", gressart_recno) ), 10)
			
			WAIT { DIALOG("add_dialog", gressart_recno, "[0121N]You... swine... my... gold...") }

			FUNC("attention_call_message", "[0122N]You have killed Perrinet Gressart!")
			FUNC("attention_call_message", "[0123N]Now you must defeat all the enemies inside the castle of La Charité-sur-Loire to assume control and ensure no more mercenary uprisings in the area!")

			FUNC("enable_unit_bounding_volume", gressart_recno, 0)

			DIALOG("del_all_dialog") 
			FUNC("end_cut_scene_2", 0, 1)
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("del_unit" , gressart_recno )
			WAIT { FUNC("is_cut_scene_finished" ) }
			FUNC("set_unit_can_process_in_cut_scene", 0, 1)	// all unit can process
		
			FUNC("set_scenario_event_bit_flag", 3, 1)
		}
	}

	if ( flag_begley_dead == 0 )
	{
		if( FUNC("is_unit_dead" , begley_recno) )
		{
			FUNC( "attention_call_message" , "[0124N]The mighty axe of Donziais Begley shall be feared no more, as he enjoys life no longer!") 
			FUNC("set_scenario_event_bit_flag_2", 24, 1)
		}
	}	

	if ( flag_hudleg_dead == 0)
	{
		if( FUNC("is_unit_dead" , hudleg_recno) )
		{
			FUNC( "attention_call_message" , "[0125N]General Vincent Hudleg has fallen victim to the superior military acumen of the French! His sword has been swung for the last time!") 
			FUNC("set_scenario_event_bit_flag_2", 25, 1)
		}
	}	

	//workshop
	if( flag_workshop_cut_scene == 0 )
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_workshop_cut_scene, "FRENCH" ) )
		{
			FUNC("start_cut_scene", 0, 0, 18586, 8655, 154, 187, -48, 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", worker_recno, 1)	// councillor can process
			
			WAIT { DIALOG("add_dialog", worker_recno, "[0126N]Men, we must hurry with the production of the siege machine! Our English counterparts require them immediately!") }
			WAIT { DIALOG("add_dialog", alencon_recno, "[0127N]The fiends plan to deliver the siege engines to the English! We must put a stop to their actions!") }
			WAIT { DIALOG("add_dialog", jean_recno, "[0128N]This is an incredible stroke of luck, gentlemen! If we gain control of the siege machines here, we may use them against La Charité-sur-Loire!") }
			
			// 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("attention_call_message", "[0129N]You must prevent the mercenaries from transporting the siege units!")

			ACTION("give_team_task", worker_recno , "DEFEND_PLACE", 99, place_recno_workshop1, 0, 0, 0)

			FUNC("set_scenario_bit_flag", 30, 1)
		}
	}
	else if ( flag_workshop_captured == 0 )
	{
		//if( FUNC("contain_team_member", 720) == 0 )
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_workshop1, "Mercen" ) == 0 )
		{
			FUNC("set_unit_nation" , workshop_cannon_1, "French")
			FUNC("set_unit_nation" , workshop_cannon_2, "French")
			//FUNC("set_unit_nation" , workshop_cannon_3, "French")
			//FUNC("set_unit_nation" , workshop_cannon_4, "French")
			//FUNC("set_unit_nation" , workshop_cannon_5, "French")
			FUNC("set_unit_nation" , workshop_batterram_1 , "French")
			//FUNC("set_unit_nation" , workshop_batterram_2 , "French")
			//FUNC("set_unit_nation" , workshop_batterram_3 , "French")
			FUNC("set_unit_nation" , workshop_fauconneaus_1 , "French")
			FUNC("set_unit_nation" , workshop_fauconneaus_2 , "French")
			//FUNC("set_unit_nation" , workshop_fauconneaus_3 , "French")
		
			FUNC("set_place_nation_by_code" , place_recno_workshop1 , "French")
			FUNC("attention_call_message", "[0130N]You have killed off all the mercenary units working in the siege house - now you can assume control of all the siege weapons found here!")

			FUNC("set_territory_nation", "de l 'atelier", "French")

			FUNC("set_scenario_bit_flag", 31, 1)
		}
	}
	else if( flag_workshop_captured )
	{
		//if ( FUNC("unit_track_to_id", workshop_batterram_1, "bamTrk" ) )
		//{
		//	FUNC( "set_unit_track" , workshop_batterram_1, "bamTrk")
		//}
		//else
		//{
		//	FUNC( "set_unit_track" , workshop_batterram_1, "dummy")
		//}
	
//		if ( FUNC("unit_track_to_id", workshop_batterram_2, "bamTrk" ) )
//		{
//			FUNC( "set_unit_track" , workshop_batterram_2, "bamTrk")
//		}
//		else
//		{
//			FUNC( "set_unit_track" , workshop_batterram_2, "dummy")
//		}

//		if ( FUNC("unit_track_to_id", workshop_batterram_3, "bamTrk" ) )
//		{
//			FUNC( "set_unit_track" , workshop_batterram_3, "bamTrk")
//		}
//		else
//		{
//			FUNC( "set_unit_track" , workshop_batterram_3, "dummy")
//		}
	}
	
	//mistrust
	if( flag_mistrust == 0 )
	{
		if( FUNC("get_bribed_enemy_kill_count") >= 20 )
		{
			FUNC("set_nation_friendship", "ENGLISH", "MERCEN", -77 )
			FUNC("set_nation_friendship", "MERCEN", "ENGLISH", -77 )
			FUNC("set_relation_status", "ENGLISH", "MERCEN", 0 )

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

	if( flag_la_charite_cut_scene == 0 ) 
	{
		if( FUNC( "people_by_nation_exist_in_place" , place_recno_st_la_charite_outside, "FRENCH" ) || flag_la_charite_attacked )
		{
			FUNC("start_cut_scene_2", 1, 0, 12980, 7932, 128, 350, 1, 2, 1)

			FUNC("set_idle", unit_recno) 
			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, 13256, 7954, 71, 187, 0, 7)

			FUNC("set_unit_can_process_in_cut_scene", gressart_recno, 1)

			FUNC("set_unit_degree" , gressart_recno, 180)
			
			WAIT { DIALOG("add_dialog", gressart_recno, "[0131N]The royal pain in the behind finally decides to show her ugly face. You may not appreciate this, but to us, gold is as precious as life, and you have taken it from us. Now you shall pay in kind!") }

			FUNC("set_unit_degree" , gressart_recno, 0)

			//FUNC("change_camera_in_cut_scene", 0, 13962, 13196, 1529, 350, -49, 24)

			//FUNC("change_camera_in_cut_scene", 0, 14441, 13041, 1361, 350, 86, -1)
			FUNC("change_camera_in_cut_scene", 0, 14273, 13362, 1339, 350, 118, -2)


			WAIT { DIALOG("add_dialog", gressart_recno, "[0132N]General Hudleg! Tell me, are we prepared to destroy the French? ") }

			FUNC("change_camera_in_cut_scene", 0, 14273, 13362, 1339, 350, 118, -2)

			WAIT { DIALOG("add_dialog", hudleg_recno, "[0133N]Aye, my general! I for one am ready to dispense with the life of any fool who dares part us from our gold! My massive sword will be testament to that!") }

			FUNC("change_camera_in_cut_scene", 0, 11739, 7875, 1583, 350, -1, 55)

			WAIT { DIALOG("add_dialog", begley_recno, "[0134N]... but do not count me out, generals Gressart and Hudleg!") }

			FUNC("change_camera_in_cut_scene", 0, 12151, 7963, 1103, 187, -144, 1)

			FUNC("set_unit_degree" , gressart_recno, 180)
		
			WAIT { DIALOG("add_dialog", begley_recno, "[0135N]My trusty axe is most eager to disembowel any son of a whore that claims our gold! I shall never allow French scum to take what is ours!") }

			FUNC("change_camera_in_cut_scene", 0, 13289, 7950, 29, 187, 1, -4)
			
			WAIT { DIALOG("add_dialog", gressart_recno, "[0136N]Do you not yet see you are simply no match for the combined might of me and my fine generals? If you are indeed so foolhardy to attempt to enter, I have other news for you:") }
			
			FUNC("set_unit_degree" , gressart_recno, 0)

			FUNC("change_camera_in_cut_scene", 0, 13764, 6882, 1527, 187, -33, 38 )
			
			WAIT { DIALOG("add_dialog", gressart_recno, "[0137N]Our walls are also manned with range units able to strike you down like a scythe cuts down weeds! Even if you manage to enter, I have scores of your fellow soldiers held hostage.") }

			FUNC("change_camera_in_cut_scene", 0, 12980, 7932, 128, 350, 1, 2)

			WAIT { DIALOG("add_dialog", gressart_recno, "[0138N]If you value the lives of your comrades, I urge you to do what's best for them, leave this god-forsaken place! Here nothing awaits you except your utter destruction!") }

			FUNC("change_camera_in_cut_scene", 0, 15692, 7441, 229, 187, -148, -25)

			WAIT { DIALOG("add_dialog", jean_recno, "[0139N]We must enter and save our fellow warriors from their impending doom! Who's with me?") }
			WAIT { DIALOG("add_dialog", alencon_recno, "[0140N]We all are! Let's destroy these mercenaries, who have brought nothing except suffering to us all!") }
			
			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)	// all unit can process			

			ACTION("give_team_task", tower_attack_archer_recno_12, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_39, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 
			ACTION("give_team_task", tower_attack_archer_recno_5, "TOWER_ATTACK", 2, 3000, 0, 0, 0) 

			FUNC ("set_end_condition_enabled", 17, 1)	
			FUNC ("set_end_condition_enabled", 25, 1) 				
			FUNC ("set_end_condition_enabled", 26, 1) 
			
			FUNC ("stop_curr_task", begley_recno)								
			FUNC ("stop_curr_task", hudleg_recno)	
										
			FUNC ("set_citizen_saved")
			
			FUNC("set_scenario_event_bit_flag_2", 18, 1 )
			FUNC("give_item_to_unit", "fd_meat", 1, 6, gressart_recno )
		}
	}

	//wife side goal
	if( flag_wife_triggered == 0 )
	{
		if(  FUNC("get_read_letter_once" ) )
		{
			FUNC("facility_barrack_add_leader", facility_recno_citizen_spawn_11, cti5_id, 1800, 1, "Patrice", "Patrice" )		
			FUNC("attention_call_message_2", "[0141N]It seems that the fate of the poor captain has already been sealed. It is unfortunate that such fine men should perish for the name of freedom." , alencon_recno )
			FUNC("attention_call_message_2", "[0142N]I think that we would do good in returning this pendant and letter to this lady. This will surely break her heart, but it is better than her waiting forever for someone who will never return." , jean_recno )

			FUNC("set_scenario_event_bit_flag_2", 28, 1) 
			FUNC ("set_end_condition_enabled", 27, 1 ) 
		}
	}
	else if( flag_letter_returned == 0 )
	{
		if( wife_recno == 0 )
		{
			wife_recno = FUNC("search_unit_by_name", "Patrice")

			if( wife_recno )
			{
				FUNC("set_can_interact_flag", wife_recno, 1)
				ACTION("give_task", wife_recno, "IDLE", 1, 0, 0, 0, 0)

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

		}
		else
		{
			FUNC("minimap_set_way_point", 1, 12364.0, 13759.0, 109.484, 1, 0)
			FUNC("minimap_set_way_point_follow_unit", 1, wife_recno, 0)

			if( talk_unit_recno > 0 && talk_unit_recno == wife_recno )	
			{
				FUNC("start_cut_scene_2", 1, 0, wife_recno, 200, ( 180 - FUNC("get_unit_dir", wife_recno) ), 10, 1)
						
				// 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", wife_recno, 1)	// joan can process

				FUNC("stop_curr_task", wife_recno )
				ACTION("give_task", wife_recno, "IDLE", 1, 1, 0, 0, 0)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
								
				// set weapon seller to idle and rotate him
				ACTION("stop_all_order", wife_recno) 
				ACTION("give_order" , wife_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , wife_recno, unit_recno) , 0 , 0 , 0, 2500)
				
				if ( FUNC("get_item_quantity_in_unit_inventory", letter_id, unit_recno) > 0 )
				{			
					WAIT { DIALOG("add_dialog", wife_recno, "[0143N]A French general in my presence? Tell me, kind general, what brings you here?") }
					WAIT { DIALOG("add_dialog", wife_recno, "[0144N]Your silence is discomforting. Has something happened to my dear Milon? Do tell me! What has happened to my dear husband?") }
									
					if ( FUNC("get_item_quantity_in_unit_inventory", pendant_id, unit_recno) > 0 )
					{
						WAIT { DIALOG("add_dialog", wife_recno, "[0145N]You - you are giving me the letter and pendant that my dear husband held in his hands? That can only mean...") }
					}
					else
					{
						WAIT { DIALOG("add_dialog", wife_recno, "[0146N]You - you are giving me the letter that I personally penned for my dear husband? That can only mean...") }
					}

					WAIT { DIALOG("add_dialog", wife_recno, "[0147N]No! No! My dear Milon has perished in battle! How can I bring forth this news to my children? I - am... devastated... please - go now - leave me alone in my sorrow!") }

					FUNC("set_idle", wife_recno)
					FUNC("stop_curr_task", wife_recno)
					ACTION("give_task", wife_recno, "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", wife_recno)
					
					WAIT{ FUNC("pause_script", 1) }
					ACTION("give_task", wife_recno, "IDLE", 1, 1, 0, 0, 0)
					ACTION("stop_all_order", wife_recno)
					FUNC("set_idle", wife_recno)
						
					FUNC("enable_unit_bounding_volume", wife_recno, 0)
					
					if( FUNC("is_cut_scene_finished" ) == 0 )
					{
						WAIT{ ACTION("give_order", wife_recno, "APPROACH_PLACE", 99, 1, place_recno_gressart_retreat, 0, 0, 0, 3000) }
					}

					FUNC("attention_call_message_2", "[0148N]I hate to see our countryfolk suffer like this in this senseless war. This has infuriated me so! Come, fine men, let us rid France of our enemies!", jean_recno )
					FUNC("attention_call_message_2", "[0149N]Yes, they have brought nothing but sorrow to us all! We must not allow such senseless deaths go to waste!", alencon_recno )
					FUNC("set_scenario_event_bit_flag_2", 26, 1) 
					
					FUNC("minimap_set_way_point", 1, 12364.0, 13759.0, 109.484, 0, 0)
				}
				else
				{
					WAIT { DIALOG("add_dialog", wife_recno, "[0150N]Bonjour, mon general. The war is long and arduous - I know this because my beloved husband is fighting alongside you for the same cause. Perhaps you have seen him in action?") }
					WAIT { DIALOG("add_dialog", wife_recno, "[0151N]His name is Milon Segier. If you do see him, please send him my love and tell him his faithful wife and loving children are awaiting him at home.") }
				}
							
				// leave cut scene
				DIALOG("del_all_dialog") 

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

				if ( FUNC("get_item_quantity_in_unit_inventory", pendant_id, unit_recno) > 0 )
				{
					FUNC("remove_item_from_unit_inventory", pendant_id, unit_recno)
				}

				if ( FUNC("get_item_quantity_in_unit_inventory", letter_id, unit_recno) > 0 )
				{
					FUNC("remove_item_from_unit_inventory", letter_id, unit_recno)
					FUNC( "del_unit", wife_recno )
				}

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


		
		
	
	


	exit
}


