"S9L1_tactic.sce"
{
	//unit
	INT main_recno
	INT joan_recno 
	INT alencon_recno
	INT la_hire_recno
	INT jean_recno
	INT dlllier_recno
	INT dunois_recno
	INT orlean_recno

	INT child_recno
	INT mother_recno
	INT father_recno

	INT capture_settle_montargis_unit_recno

	INT cart_recno
	INT cart_driver_recno

	INT cart_recno_two
	INT cart_driver_recno_two

	INT english_spy_recno

	// ai unit
	INT boss_two_recno
	INT boss_HI_oeight
	INT boss_SI_oone
	INT boss_HI_ofive
	INT boss_HI_othree
	INT boss_HI_ofour
	INT boss_HI_ten_two
	INT boss_ten_recno
	INT boss_ten_three_recno
	INT boss_ten_four_recno
	INT boss_ten_five_recno
	INT boss_ten_six_recno

	INT william_recno
	INT talbot_recno
	INT richemont_recno

	INT lux_recno
	INT glasdale_recno
	INT alexander_recno

	INT bedford_recno
	INT scales_recno
	INT fastolf_recno

	INT l_six_prisoner

	INT fcannon_recno_a
	INT fcannon_recno_a_one
	INT fcannon_recno_a_two

	INT fcannon_recno_b
	INT fcannon_recno_b_one
	INT fcannon_recno_b_two

	INT fcannon_recno_c
	INT fcannon_recno_c_one
	INT fcannon_recno_c_two

	INT fcannon_recno_d
	INT fcannon_recno_d_one
	INT fcannon_recno_d_two

	INT cannon_recno_a
	INT cannon_controller_recno_a

	INT bombard_recno_a
	INT bombard_recno_b
	INT bombard_recno_c

	INT bombard_recno_a_one
	INT bombard_recno_b_one
	INT bombard_recno_c_one

	INT bombard_recno_a_two
	INT bombard_recno_b_two
	INT bombard_recno_c_two

	INT ebombard_recno_six_one
	INT ebombard_recno_six_one_a
	INT ebombard_recno_six_one_b

	INT ebombard_recno_six_two
	INT ebombard_recno_six_two_a
	INT ebombard_recno_six_two_b

	INT crossbow_recno_a
	INT crossbow_recno_b
	INT crossbow_recno_c
	INT crossbow_recno_d

	INT crossbow_recno_a_one
	INT crossbow_recno_b_one
	INT crossbow_recno_c_one
	INT crossbow_recno_d_one

	INT cannon_recno_b
	INT cannon_recno_b_one
	INT cannon_recno_b_two

	INT cannon_one
	INT cannon_one_a
	INT cannon_one_b

	INT cannon_two
	INT cannon_two_a
	INT cannon_two_b

	INT cannon_three
	INT cannon_three_a
	INT cannon_three_b

	INT cannon_four
	INT cannon_four_a
	INT cannon_four_b

	INT cannon_five
	INT cannon_five_a
	INT cannon_five_b

	INT cannon_six
	INT cannon_six_a
	INT cannon_six_b

	INT cannon_seven
	INT cannon_seven_a
	INT cannon_seven_b

	INT cannon_eight
	INT cannon_eight_a
	INT cannon_eight_b

	INT jcannon_one
	INT jcannon_one_a
	INT jcannon_one_b

	INT jcannon_two
	INT jcannon_two_a
	INT jcannon_two_b

	INT jbombard_one
	INT jbombard_one_a
	INT jbombard_one_b

	INT jbombard_two
	INT jbombard_two_a
	INT jbombard_two_b

	// citizens
	INT orlean_weapon_seller_recno 
	INT orlean_potion_seller_recno
	INT jargeau_weapon_seller_recno
	INT jargeau_potion_seller_recno
	INT meung_weapon_seller_recno 
	INT meung_potion_seller_recno
	INT beaugency_weapon_seller_recno 
	INT beaugency_potion_seller_recno
	INT patay_weapon_seller_recno 
	INT tour_potion_seller_recno

	INT priest_recno
	INT st_citizen_recno
	INT st_citizen_recno_two
	INT bourges_citizen_recno
	INT blois_citizen_recno
	INT blois_citizen_recno_two
	INT chateaudun_citizen_recno_a
	INT chateaudun_citizen_recno_b
	INT chateaudun_citizen_recno_c
	INT chateaudun_citizen_recno_d
	INT chateaudun_citizen_recno_e
	INT chateaudun_citizen_recno_f
	INT chateauneut_citizen_a
	INT chateauneut_citizen_b
	INT chateauneut_citizen_c
	INT one_man_citizen_recno

	INT montargis_citizen_recno_a
	INT montargis_citizen_recno_b

	// cannon
	INT cannon_recno
	INT cannon_controller_recno
	INT cannon_attach_index
	INT cannon_attach_x
	INT cannon_attach_y
	INT cannon_attach_z
	INT cannon_distance

	INT cannon_recno_one
	INT cannon_recno_two
	INT cannon_controller_recno_one
	INT cannon_controller_recno_two

	// place
	INT meet_spy_recno
	INT near_prison_a
	INT near_prison_b
	INT near_prison_c
	INT meet_orlean_recno
	INT reach_loches_recno
	INT reach_loches_recno_b
	INT reach_lord_recno
	INT spy_target_recno
	INT meet_prison_a
	INT meet_prison_b
	INT meet_prison_c
	INT meet_bedford_recno
	INT town_checy_recno
	INT town_rouvray_recno
	INT settle_fountainbleu_recno
	INT town_st_aignar_recno
	INT town_saint_florent
	INT town_chateauneut_recno_one
	INT town_chateauneut_recno_two
	INT town_chateaudun_recno
	INT castle_jargeau_recno
	INT castle_jargeau_recno_two
	INT xpoint_recno
	INT town_loches_recno
	INT castle_meung_recno
	INT settlement_bourges_recno
	INT settlement_blois_recno
	INT settlement_montargis_recno
	INT town_janville_recno
	INT town_patay_recno
	INT town_tours_recno
	INT castle_beaugency_recno
	INT barrack_beaugency
	INT barrack_jargeau
	INT barrack_meung

	INT has_french_recno
	INT attack_meung_recno

	INT l_six_prison

	INT side_quest_two_recno
	INT arrive_orlean_recno

	INT william_retreat_recno

	INT reach_rouvray_recno

	INT move_cart_recno

	INT cart_target_recno

	INT goto_wall_recno

	INT rouvray_area_recno
	INT rouvray_area_recno_two
	INT see_rouvray_recno

	INT meet_dunois_recno
	INT meet_dillier_recno

	INT cross_bridge_recno
	INT cross_bridge_recno_two

	INT have_archer_recno
	INT have_poleman_recno

	INT burn_town_recno
	INT meet_alexander_recno

	INT meung_cart_target_recno

	INT meet_talbot_recno

	INT prison_one
	INT prison_two
	INT prison_three
	INT prison_four
	INT prison_five

	INT meet_bbridge

	INT reach_north_gate_recno

	INT get_reinforcement_recno
	INT final_camp_recno

	INT reach_jargeau_recno
	INT reach_jargeau_recno_two

	// Place for Spawn
	INT spawn_h_one
	INT spawn_h_two
	INT spawn_h_four
	INT spawn_h_five
	INT spawn_h_six
	INT spawn_h_seven
	INT spawn_h_eight
	INT spawn_h_nine
	INT spawn_h_ten
	INT spawn_h_ten_four
	INT spawn_h_ten_five
	INT spawn_h_ten_six

	INT spawn_h_ten_one
	INT	spawn_talbot
	INT spawn_richemont
	INT spawn_suffolk

	INT spawn_side_quest_one

	INT jargeau_west_tower_right
	INT jargeau_west_tower_right_ground

	INT	jargeau_north_tower_left
	INT jargeau_north_tower_right

	INT g_one_barrack_place_recno
	INT jargeau_barrack_place_recno
	
	INT beyond_five
	INT beyond_six

	INT mountain_start_recno
	INT mountain_top_recno
	INT check_enemy_alive_recno

	// facility
	INT facility_h_one_recno_a
	INT facility_h_one_recno_b
	INT facility_h_one_recno_c
	INT facility_h_one_recno_d
	INT facility_h_one_recno_e
	INT facility_h_one_recno_f

	INT facility_h_two_recno_a
	INT facility_h_two_recno_b
	INT facility_h_two_recno_c
	INT facility_h_two_recno_d
	INT facility_h_two_recno_e
	INT facility_h_two_recno_f

	INT facility_h_three_recno
	INT facility_h_three_recno_b
	INT facility_h_three_recno_c
	INT facility_h_four_recno
	INT facility_h_five_recno
	INT facility_h_six_recno
	INT facility_h_seven_recno

	INT facility_saint_one
	INT facility_saint_two
	INT facility_saint_three
	INT facility_saint_four
	INT facility_saint_five
	INT facility_saint_six

	INT saint_villager_a
	INT saint_villager_b
	INT saint_villager_c
	INT saint_villager_d
	INT saint_villager_e
	INT saint_villager_f

	INT facility_h_eight_recno_a
	INT facility_h_eight_recno_b
	INT facility_h_eight_recno_c
	INT facility_h_eight_recno_d
	INT facility_h_eight_recno_e
	INT facility_h_eight_recno_f

	INT facility_h_nine_recno_a
	INT facility_h_nine_recno_b
	INT facility_h_nine_recno_c
	INT facility_h_nine_recno_d
	INT facility_h_nine_recno_e
	INT facility_h_nine_recno_f

	INT facility_h_ten_recno
	INT facility_h_ten_four_recno
	INT facility_h_ten_four_recno_two
	
	INT facility_h_ten_five_recno_a
	INT facility_h_ten_five_recno_b
	INT facility_h_ten_five_recno_c
	INT facility_h_ten_five_recno_d
	INT facility_h_ten_five_recno_e

	INT facility_h_ten_six_recno_a
	INT facility_h_ten_six_recno_b
	INT facility_h_ten_six_recno_c
	INT facility_h_ten_six_recno_d
	INT facility_h_ten_six_recno_e
	INT facility_h_ten_six_recno_f
	INT facility_h_ten_six_recno_g
	INT facility_h_ten_six_recno_h
	INT facility_h_ten_six_recno_i
	INT facility_h_ten_six_recno_j
	INT facility_h_ten_six_recno_k

	INT facility_s_two_one
	INT facility_s_two_two
	INT facility_s_two_three

	INT facility_s_four_one
	INT facility_s_four_two
	INT facility_s_four_three
	INT facility_s_four_four
	INT facility_s_four_five
	
	INT facility_h_ten_one_recno	

	INT spawn_for_child_a
	INT spawn_for_child_b
	INT spawn_for_child_c
	INT spawn_for_child_d
	INT spawn_for_child_e
	INT spawn_for_child_f
	INT spawn_for_child_g
	INT spawn_for_child_h
	INT spawn_for_child_i
	INT spawn_for_child_j
	INT spawn_for_child_k
	INT spawn_for_child_l
	INT spawn_for_child_m
	INT spawn_for_child_n
	INT spawn_for_child_o
	INT spawn_for_child_p
	INT spawn_for_child_q
	INT spawn_for_child_r
	INT spawn_for_child_aa
	INT spawn_for_child_ab
	INT spawn_for_child_ac
	INT spawn_for_child_ad
	INT spawn_for_child_ae
	INT spawn_for_child_af
	INT spawn_for_child_ba
	INT spawn_for_child_bb
	INT spawn_for_child_bc
	INT spawn_for_child_bd
	INT spawn_for_child_be
	INT spawn_for_child_bf
	INT spawn_for_child_ca
	INT spawn_for_child_cb
	INT spawn_for_child_cc
	INT spawn_for_child_cd
	INT spawn_for_child_ce
	INT spawn_for_child_cf
	INT spawn_for_child_da
	INT spawn_for_child_db
	INT spawn_for_child_dc
	INT spawn_for_child_dd
	INT spawn_for_child_de
	INT spawn_for_child_df
	INT spawn_for_child_ea
	INT spawn_for_child_eb
	INT spawn_for_child_ec
	INT spawn_for_child_ed
	INT spawn_for_child_ee
	INT spawn_for_child_ef
	INT spawn_for_child_fa
	INT spawn_for_child_fb
	INT spawn_for_child_fc
	INT spawn_for_child_fd
	INT spawn_for_child_fe
	INT spawn_for_child_ff
	INT spawn_for_child_ga
	INT spawn_for_child_gb
	INT spawn_for_child_gc
	INT spawn_for_child_gd
	INT spawn_for_child_ge
	INT spawn_for_child_gf

	INT spawn_loches_a
	INT spawn_loches_b
	INT spawn_loches_c
	INT spawn_loches_d

	INT facility_talbot_a
	INT facility_talbot_b
	INT facility_talbot_c
	INT facility_talbot_d
	INT facility_talbot_e
	INT facility_talbot_f
	INT facility_talbot_g
	INT facility_talbot_h
	INT facility_talbot_i
	INT facility_talbot_j

	INT facility_scales_a
	INT facility_scales_b
	INT facility_scales_c
	INT facility_scales_d
	INT facility_scales_e
	INT facility_scales_f
	INT facility_scales_g
	INT facility_scales_h
	INT facility_scales_i
	INT facility_scales_j

	INT facility_richemont_a
	INT facility_richemont_b
	INT facility_richemont_c
	INT facility_richemont_d
	INT facility_richemont_e
	INT facility_richemont_f
	INT facility_richemont_g
	INT facility_richemont_h
	INT facility_richemont_i
	INT facility_richemont_j
	INT facility_richemont_aa
	INT facility_richemont_ab
	INT facility_richemont_ac
	INT facility_richemont_ad
	INT facility_richemont_ae
	INT facility_richemont_af
	INT facility_richemont_ag
	INT facility_richemont_ah
	INT facility_richemont_ai
	INT facility_richemont_aj

	INT facility_suffolk_a
	INT facility_suffolk_b
	INT facility_suffolk_c
	INT facility_suffolk_d
	INT facility_suffolk_e
	INT facility_suffolk_f
	INT facility_suffolk_g
	INT facility_suffolk_h
	INT facility_suffolk_i
	INT facility_suffolk_j
	INT facility_suffolk_k
	INT facility_suffolk_l
	INT facility_suffolk_m
	INT facility_suffolk_n
	INT facility_suffolk_o
	INT facility_suffolk_p
	INT facility_suffolk_q
	INT facility_suffolk_r
	INT facility_suffolk_s
	

	INT spawn_javille_a
	INT spawn_javille_b
	INT spawn_javille_c
	INT spawn_javille_d
	INT spawn_javille_e
	INT spawn_javille_f
	INT spawn_javille_g
	INT spawn_javille_h
	INT spawn_javille_i
	INT spawn_javille_j
	INT spawn_javille_k
	INT spawn_javille_l
	INT spawn_javille_m
	INT spawn_javille_n
	INT spawn_javille_o
	INT spawn_javille_p
	INT spawn_javille_q
	INT spawn_javille_r
	INT spawn_javille_s
	INT spawn_javille_t
	INT spawn_javille_u
	INT spawn_javille_v
	INT spawn_javille_w
	INT spawn_javille_x
	INT spawn_javille_y
	INT spawn_javille_z
	INT spawn_javille_aa
	INT spawn_javille_ab
	INT spawn_javille_ac
	INT spawn_javille_ad

	INT side_quest_one_a
	INT side_quest_one_b
	INT side_quest_one_c
	INT side_quest_one_d
	INT side_quest_one_e
	INT side_quest_one_f
	INT side_quest_one_g
	INT side_quest_one_h
	INT side_quest_one_i
	INT side_quest_one_j
	INT side_quest_one_k
	INT side_quest_one_l

	INT side_quest_a_one
	INT side_quest_a_two
	INT side_quest_a_three
	INT side_quest_a_four
	INT side_quest_a_five
	INT side_quest_a_six
	INT side_quest_a_seven
	INT side_quest_a_eight
	INT side_quest_a_nine
	INT side_quest_a_ten
	INT side_quest_a_ten_one
	INT side_quest_a_ten_two
	INT side_quest_a_ten_three
	INT side_quest_a_ten_four
	INT side_quest_a_two_zero

	INT town_rouvray_one
	INT town_rouvray_two
	INT town_rouvray_three
	INT town_rouvray_four
	INT town_rouvray_five

	INT spawn_father_recno
	INT spawn_mother_recno

	INT spawn_blois_a
	INT spawn_blois_b

	INT spawn_chateaudun_a
	INT spawn_chateaudun_b
	INT spawn_chateaudun_c
	INT spawn_chateaudun_d
	INT spawn_chateaudun_e
	INT spawn_chateaudun_f

	INT facility_jargeau_barrack
	INT facility_meung_barrack
	INT facility_beaugency_barrack
	INT facility_g_one_barrack

	INT spawn_chateauneut_a
	INT spawn_chateauneut_b
	INT spawn_chateauneut_c

	// facility for Jargeau
	INT facility_jargeau_west_tower_right
	INT facility_jargeau_west_tower_right_ground

	INT facility_jargeau_north_tower_right_ground
	INT facility_jargeau_north_tower_left_ground

	INT orlean_weapon_shop_recno
	INT orlean_potion_shop_recno
	INT jargeau_weapon_shop_recno
	INT jargeau_potion_shop_recno
	INT meung_weapon_shop_recno
	INT meung_potion_shop_recno
	INT beaugency_weapon_shop_recno
	INT beaugency_potion_shop_recno
	INT patay_weapon_shop_recno
	INT tour_potion_shop_recno



	// event
	INT	one_event_zero_place_recno
	INT	one_event_one_place_recno
	INT	one_event_four_place_recno
	INT	one_event_five_place_recno
	INT	one_event_seven_place_recno
	INT	one_event_eight_place_recno
	INT	one_event_ten_two_place_recno

	INT	two_event_two_one_place_recno
	INT two_event_two_two_place_recno
	INT	two_event_three_place_recno
	INT	two_event_four_place_recno
	INT	two_event_six_place_recno
	INT	two_event_seven_place_recno

	INT	three_event_zero_place_recno
	INT	three_event_one_place_recno
	INT	three_event_two_place_recno
	INT	three_event_three_place_recno
	
	INT	three_event_five_place_recno
	INT	three_event_eight_place_recno
	INT	three_event_nine_place_recno	
	INT	three_event_ten_place_recno
	INT	three_event_ten_one_place_recno
	INT	three_event_ten_two_place_recno


	INT arrive_orlean_one_recno
	INT arrive_orlean_two_recno


	// event item
	INT one_event_nine_item_recno
	INT one_event_ten_item_recno
	INT jargeau_north_gate_recno
	INT jargeau_south_gate_recno

	INT meung_south_gate_recno
	INT meung_north_gate_recno

//	INT meung_bridge

	INT meung_left_tower
	INT meung_right_tower

	INT beaugency_south_gate_recno
	INT beaugency_north_gate_recno
	INT beaugency_middle_gate_recno_one
	INT beaugency_middle_gate_recno_two
	INT beaugency_south_wall_recno

	INT janville_gate_a
	INT janville_gate_b
	INT janville_gate_c

	INT lord_door_recno

	INT gold_box_a
	INT gold_box_b
	INT gold_box_c
	INT gold_box_d
	INT gold_box_e
	INT gold_box_f

	INT s_five_l_seven_prison_gate_recno
	INT s_five_l_seven_prison_gate_recno_two

	INT s_five_l_six_prison_gate_a
	INT s_five_l_six_prison_gate_b
	INT s_five_l_six_prison_gate_c

	INT l_nine_prison_gate_a
	INT l_nine_prison_gate_b
	INT l_nine_prison_gate_c
	INT l_nine_prison_gate_d

	INT jargeau_north_right
	INT jargeau_north_left
	INT jargeau_west_right
	INT jargeau_west_left

	INT prison_gate_one
	INT prison_gate_two
	INT prison_gate_three

	INT meung_prison_gate_one
	INT meung_prison_gate_two
	INT meung_prison_gate_three
	INT meung_prison_gate_four
	INT meung_prison_gate_five

	// unit id
	INT ehinfcap_id
	INT ehinfant_id
	INT ecrosscap_id
	INT ecrossbow_id
	INT earcher_id
	INT	earchcap_id
	INT elinfcap_id
	INT elinfant_id
	INT epolecap_id
	INT epoleman_id
	INT emaceman_id
	INT emacecap_id
	INT eexarcherc_id
	INT eexarcher_id
	INT cart_id
	INT bur_linf_id

	INT spy_id

	INT flinfant_id
	INT flinfcap_id
	INT fhinfcap_id
	INT fhinfant_id
	INT farcher_id
	INT	farccap_id
	INT fmaceman_id
	INT fmacecap_id
	INT fcrossbow_id

	INT richemont_id
	INT suffolk_id
	INT scales_id
	INT fastolf_id
	INT glasdale_id
	INT bedford_id

	INT orlean_id

	INT citizen_one_id
	INT citizen_two_id
	INT citizen_three_id
	INT citizen_four_id

	INT hurt_citizen_one_id
	INT hurt_citizen_two_id
	INT hurt_citizen_three_id
	INT hurt_citizen_four_id

	INT mother_id
	INT priest_id
	
	INT child_id

	// team leader recno
	INT team_four_leader
	INT team_five_leader
	INT team_eight_leader
	INT team_nine_leader
	INT team_ten_leader
	INT team_ten_four_leader
	INT team_three_two_leader
	INT team_four_nine_leader
	INT team_five_two_leader
	INT team_five_six_leader
	INT team_five_seven_leader
	INT team_five_eight_leader
	INT team_five_nine_leader
	INT team_six_one_leader
	INT team_six_six_leader
	INT team_six_nine_leader
	INT team_seven_zero_leader
	INT team_seven_one_leader
	INT team_seven_two_leader
	INT team_seven_three_leader
	INT team_seven_four_leader
	INT team_eight_zero_leader
	INT team_eight_four_leader
	INT team_eight_five_leader
	INT team_eight_six_leader
	INT team_eight_nine_leader
	INT team_nine_three_leader
	INT team_nine_seven_leader

	INT team_nine_eight_leader
	INT team_one_zero_three_leader
	INT team_one_zero_four_leader
	INT team_one_zero_five_leader
	INT team_one_zero_eight_leader
	INT team_one_one_zero_leader
	INT team_one_one_two_leader
	INT team_one_one_three_leader
	INT team_one_one_four_leader
	INT team_one_one_five_leader
	INT team_one_two_three_leader

	INT team_one_five_zero_leader
	INT team_one_five_eight_leader
	INT team_one_two_zero_leader
	INT team_one_two_one_leader
	INT team_one_two_two_leader
	INT team_one_two_four_leader
	INT team_one_two_five_leader
	INT team_one_two_six_leader
	INT team_one_three_nine_leader
	INT team_one_four_zero_leader
	INT team_one_five_seven_leader
	INT team_one_six_one_leader
	INT team_one_six_two_leader
	INT team_one_six_three_leader
	INT team_one_six_four_leader
	INT team_one_six_five_leader
	INT team_one_six_six_leader
	INT team_one_six_eight_leader
	INT team_one_seven_zero_leader
	INT team_one_seven_one_leader
	INT team_one_seven_nine_leader
	INT team_one_eight_zero_leader
	INT team_one_eight_one_leader
	INT team_one_nine_nine_leader
	INT team_two_zero_one
	INT team_two_zero_five
	INT team_three_zero_zero_leader
	INT team_three_zero_one_leader
	INT team_three_zero_two_leader
	INT team_three_zero_three_leader
	INT team_three_zero_four_leader

	INT team_five_eight_one_leader
	INT team_five_eight_two_leader
	INT team_five_eight_three_leader

	INT team_five_eight_five_recno
	INT team_five_eight_six_recno
	INT team_five_eight_seven_recno
	INT team_five_eight_eight_recno

	INT team_five_nine_seven_recno
	INT team_five_nine_eight_recno
	INT team_five_nine_nine_recno
	INT team_six_zero_zero_recno
	INT team_six_zero_one_recno

	INT team_six_six_six_leader
	INT team_six_six_seven_leader
	INT team_six_six_eight_leader

	INT team_eight_eight_eight_leader
	
	INT team_nine_zero_zero_leader
	INT team_nine_one_one_leader
	INT team_nine_one_two_leader
	INT team_nine_one_three_leader
	INT team_nine_one_four_leader
	INT team_nine_one_five_leader

	INT team_one_zero_one_zero_leader
	INT team_one_zero_one_one_leader

	// item id
	INT imperial_scroll_id
	INT letter_three_id
	INT key_l_six_id
	INT key_l_seven_id
	INT key_l_nine_id
	INT key_l_ten_id
	INT gold_key_id
	INT silver_key_id
	
	// unit in place
	INT joan_in_place_recno
	INT alencon_in_place_recno
	INT dunois_in_place_recno

	INT num_of_enemy

	INT talk_unit_recno
	INT side_quest_c_unit_recno

	INT door_opened

	INT jean_arrow_count

	init 
	{
		// get unit recno
		joan_recno = FUNC("search_unit_by_code" , "Joan_of_Arc") 
		alencon_recno = FUNC("search_unit_by_code" , "Alencon") 
		la_hire_recno = FUNC("search_unit_by_code" , "LaHire") 
		jean_recno = FUNC("search_unit_by_code" , "Jean_de_metz") 
		dlllier_recno = FUNC("search_unit_by_code", "DLLLIER")
		dunois_recno  = FUNC("search_unit_by_code", "DUNOIS")
		orlean_recno = FUNC("search_unit_by_code", "ORLEAN")

		alexander_recno = FUNC("search_unit_by_code", "ALEXANDER")
		talbot_recno = FUNC("search_unit_by_code" , "LORD_TALBOT")
		bedford_recno  = FUNC("search_unit_by_code" , "Bedford")
		lux_recno  = FUNC("search_unit_by_code" , "Luxembourg")

		richemont_recno = FUNC("search_unit_by_code", "arthur_de_richemont")

		FUNC("set_unit_hide_in_command_interface", alexander_recno, 0)
		FUNC("set_unit_hide_in_command_interface", talbot_recno, 0)
		FUNC("set_unit_hide_in_command_interface", lux_recno, 0)

		l_six_prisoner = FUNC("search_unit_by_name" , "Ogier Foulon")
		english_spy_recno = FUNC("search_unit_by_name", "Elya Tinchor")

		child_recno = FUNC("search_unit_by_name", "Lucien Escuier")

		priest_recno = 0
		st_citizen_recno = 0
		st_citizen_recno_two = 0

		team_five_eight_five_recno = FUNC("get_unit_team_leader_by_team_id", 585)
		team_five_eight_six_recno = FUNC("get_unit_team_leader_by_team_id", 586)
		team_five_eight_seven_recno = FUNC("get_unit_team_leader_by_team_id", 587)
		team_five_eight_eight_recno = FUNC("get_unit_team_leader_by_team_id", 588)

		team_one_zero_one_zero_leader = FUNC("search_unit_by_name", "Milon Crieur")
		team_one_zero_one_one_leader = FUNC("search_unit_by_name", "Simon Ferron")

		door_opened = 0

		imperial_scroll_id = FUNC("item_code_to_id", "flyletter02")
		letter_three_id = FUNC("item_code_to_id", "flyletter03")
		key_l_six_id = FUNC("item_code_to_id", "keyS5_04")
		key_l_seven_id = FUNC("item_code_to_id", "keyS5_03")
		key_l_nine_id = FUNC("item_code_to_id", "keyS5_02")
		key_l_ten_id = FUNC("item_code_to_id", "keyS5_01")
		gold_key_id = FUNC("item_code_to_id", "keyS5_Goldkey")
		silver_key_id = FUNC("item_code_to_id", "keyS5_SilverKey")

		// get team leader

		team_four_leader = FUNC("get_unit_team_leader_by_team_id", 4)
		team_five_leader = FUNC("get_unit_team_leader_by_team_id", 5)
		team_eight_leader = FUNC("get_unit_team_leader_by_team_id", 8)
		team_nine_leader = FUNC("get_unit_team_leader_by_team_id", 9)
		team_ten_four_leader = FUNC("get_unit_team_leader_by_team_id", 14)
		FUNC("set_unit_drop_item_id", team_ten_four_leader, key_l_nine_id)
//		ACTION("give_task", team_ten_four_leader, "IDLE", 1, 0, 0, 0, 0)
		team_three_two_leader = FUNC("get_unit_team_leader_by_team_id", 32)
		team_four_nine_leader = FUNC("get_unit_team_leader_by_team_id", 49)
		team_five_two_leader = FUNC("get_unit_team_leader_by_team_id", 52)
		team_five_six_leader = FUNC("get_unit_team_leader_by_team_id", 56)
		team_five_seven_leader = FUNC("get_unit_team_leader_by_team_id", 57)
		team_five_eight_leader = FUNC("get_unit_team_leader_by_team_id", 58)
		team_five_nine_leader = FUNC("get_unit_team_leader_by_team_id", 59)
		team_six_one_leader = FUNC("get_unit_team_leader_by_team_id", 61)
		team_six_six_leader = FUNC("get_unit_team_leader_by_team_id", 66)
		team_six_nine_leader = FUNC("get_unit_team_leader_by_team_id", 69)
		team_seven_zero_leader = FUNC("get_unit_team_leader_by_team_id", 70)
		team_seven_one_leader = FUNC("get_unit_team_leader_by_team_id", 71)
		team_seven_two_leader = FUNC("get_unit_team_leader_by_team_id", 72)
		team_seven_three_leader = FUNC("get_unit_team_leader_by_team_id", 73)
		team_seven_four_leader = FUNC("get_unit_team_leader_by_team_id", 74)
		team_eight_zero_leader = FUNC("get_unit_team_leader_by_team_id", 80)
		team_eight_four_leader = FUNC("get_unit_team_leader_by_team_id", 84)
		team_eight_five_leader = FUNC("get_unit_team_leader_by_team_id", 85)
		FUNC("set_unit_drop_item_id", team_eight_five_leader, letter_three_id)
		team_eight_six_leader = FUNC("get_unit_team_leader_by_team_id", 86)
		team_eight_nine_leader = FUNC("get_unit_team_leader_by_team_id", 89)
		FUNC("set_unit_drop_item_id", team_eight_nine_leader, key_l_seven_id)
//		ACTION("give_task", team_eight_nine_leader, "IDLE", 1, 0, 0, 0, 0)
		team_nine_three_leader = FUNC("get_unit_team_leader_by_team_id", 93)
		FUNC("set_unit_drop_item_id", team_nine_three_leader, key_l_six_id)
		team_nine_seven_leader = FUNC("get_unit_team_leader_by_team_id", 97)

		team_nine_eight_leader = FUNC("get_unit_team_leader_by_team_id", 98)
		FUNC("set_unit_drop_item_id", team_nine_eight_leader, gold_key_id)
		team_one_zero_three_leader = FUNC("get_unit_team_leader_by_team_id", 103)
		FUNC("set_unit_drop_item_id", team_one_zero_three_leader, gold_key_id)
		team_one_zero_four_leader = FUNC("get_unit_team_leader_by_team_id", 104)
		FUNC("set_unit_drop_item_id", team_one_zero_four_leader, silver_key_id)
		team_one_zero_five_leader = FUNC("get_unit_team_leader_by_team_id", 105)
		FUNC("set_unit_drop_item_id", team_one_zero_five_leader, silver_key_id)
		team_one_zero_eight_leader = FUNC("get_unit_team_leader_by_team_id", 108)
		FUNC("set_unit_drop_item_id", team_one_zero_eight_leader, gold_key_id)
		team_one_one_zero_leader = FUNC("get_unit_team_leader_by_team_id", 110)
		FUNC("set_unit_drop_item_id", team_one_one_zero_leader, gold_key_id)
		team_one_one_two_leader = FUNC("get_unit_team_leader_by_team_id", 112)
		FUNC("set_unit_drop_item_id", team_one_one_two_leader, silver_key_id)
		team_one_one_three_leader = FUNC("get_unit_team_leader_by_team_id", 113)
		FUNC("set_unit_drop_item_id", team_one_one_three_leader, silver_key_id)
		team_one_one_four_leader = FUNC("get_unit_team_leader_by_team_id", 114)
		FUNC("set_unit_drop_item_id", team_one_one_four_leader, silver_key_id)
		team_one_one_five_leader = FUNC("get_unit_team_leader_by_team_id", 115)
		FUNC("set_unit_drop_item_id", team_one_one_five_leader, gold_key_id)

		team_one_five_zero_leader = FUNC("get_unit_team_leader_by_team_id", 150)
		team_one_five_eight_leader = FUNC("get_unit_team_leader_by_team_id", 158)
		team_one_nine_nine_leader = FUNC("get_unit_team_leader_by_team_id", 199)

		team_one_two_zero_leader = FUNC("get_unit_team_leader_by_team_id", 120)
		team_one_two_one_leader = FUNC("get_unit_team_leader_by_team_id", 121)
		team_one_two_two_leader = FUNC("get_unit_team_leader_by_team_id", 122)
		team_one_two_three_leader = FUNC("get_unit_team_leader_by_team_id", 123)
		FUNC("set_unit_drop_item_id", team_one_two_three_leader, gold_key_id)
		team_one_two_four_leader = FUNC("get_unit_team_leader_by_team_id", 124)
		team_one_two_five_leader = FUNC("get_unit_team_leader_by_team_id", 125)
		team_one_two_six_leader = FUNC("get_unit_team_leader_by_team_id", 126)

		team_one_three_nine_leader = FUNC("get_unit_team_leader_by_team_id", 139)
		team_one_four_zero_leader = FUNC("get_unit_team_leader_by_team_id", 140)

		team_one_five_seven_leader = FUNC("get_unit_team_leader_by_team_id", 157)
		team_one_six_five_leader = FUNC("get_unit_team_leader_by_team_id", 165)
		FUNC("set_unit_drop_item_id", team_one_six_five_leader, key_l_ten_id)
//		ACTION("give_task", team_one_six_five_leader, "IDLE", 1, 0, 0, 0, 0)
		team_one_six_eight_leader = FUNC("get_unit_team_leader_by_team_id", 168)
		
		team_one_seven_zero_leader = FUNC("get_unit_team_leader_by_team_id", 170)
		team_one_seven_one_leader = FUNC("get_unit_team_leader_by_team_id", 171)
		team_one_seven_nine_leader = FUNC("get_unit_team_leader_by_team_id", 179)
		team_one_eight_zero_leader = FUNC("get_unit_team_leader_by_team_id", 180)
		team_one_eight_one_leader = FUNC("get_unit_team_leader_by_team_id", 181)

		team_five_eight_one_leader = FUNC("get_unit_team_leader_by_team_id", 581)
		team_five_eight_two_leader = FUNC("get_unit_team_leader_by_team_id", 582)
		team_five_eight_three_leader = FUNC("get_unit_team_leader_by_team_id", 583)

		team_five_nine_seven_recno = FUNC("get_unit_team_leader_by_team_id", 597)
		team_five_nine_eight_recno = FUNC("get_unit_team_leader_by_team_id", 598)
		team_five_nine_nine_recno = FUNC("get_unit_team_leader_by_team_id", 599)
		team_six_zero_zero_recno = FUNC("get_unit_team_leader_by_team_id", 600)
		team_six_zero_one_recno = FUNC("get_unit_team_leader_by_team_id", 601)

		priest_recno = FUNC("search_unit_by_name", "Priest")
		st_citizen_recno = FUNC("search_unit_by_name", "Garnier Autelleur")
		st_citizen_recno_two = FUNC("search_unit_by_name", "Vilain Braelier")
		bourges_citizen_recno = FUNC("search_unit_by_name", "Raymond Fritier")
		blois_citizen_recno = FUNC("search_unit_by_name", "Olivier Gruier")
		blois_citizen_recno_two = FUNC("search_unit_by_name", "Josserand Boiselier")
		chateaudun_citizen_recno_a = FUNC("search_unit_by_name", "Anseau Paucier")
		chateaudun_citizen_recno_b = FUNC("search_unit_by_name", "Apollina Chaenier")
		chateaudun_citizen_recno_c = FUNC("search_unit_by_name", "Conon Harier")
		chateaudun_citizen_recno_d = FUNC("search_unit_by_name", "Damien Tartier")
		chateaudun_citizen_recno_e = FUNC("search_unit_by_name", "Ponce Mercier")
		chateaudun_citizen_recno_f = FUNC("search_unit_by_name", "Eudes Barrillier")
		chateauneut_citizen_a = FUNC("search_unit_by_name", "Rosemaria Cheville")
		chateauneut_citizen_b = FUNC("search_unit_by_name", "Macaire Florier")
		chateauneut_citizen_c = FUNC("search_unit_by_name", "Baudouin Hostellier")
		one_man_citizen_recno = FUNC("search_unit_by_name", "Dragonet Tartier")

		montargis_citizen_recno_a = FUNC("search_unit_by_name", "Simon Mercier")
		montargis_citizen_recno_b = FUNC("search_unit_by_name", "Amite Filandrier")

		ACTION("give_task", montargis_citizen_recno_a, "IDLE", 1, 0, 0, 0, 0) 
		ACTION("give_task", montargis_citizen_recno_b, "IDLE", 1, 0, 0, 0, 0) 

		cart_recno = FUNC("search_unit_by_name", "Cart")
		cart_driver_recno = FUNC("search_unit_by_name", "Cart Driver")
		ACTION("give_task", cart_recno, "IDLE", 1, 0, 0, 0, 0) 

		FUNC("set_unit_ride_cart", cart_driver_recno, cart_recno)

		// get place recno
		town_checy_recno = FUNC("search_place_by_name", "Town_Checy")
		town_rouvray_recno = FUNC("search_place_by_name", "Town_Rouvray")
		settle_fountainbleu_recno = FUNC("search_place_by_name", "Settle_Fountainbleu")
		town_st_aignar_recno = FUNC("search_place_by_name", "Town_St_Aignar")
		town_saint_florent = FUNC("search_place_by_name", "Town_Saint")
		town_chateauneut_recno_one = FUNC("search_place_by_name", "Town_Chateauneut9")
		town_chateauneut_recno_two = FUNC("search_place_by_name", "Town_Chateauneut8")
		town_chateaudun_recno = FUNC("search_place_by_name", "Town_Chateaudun")
		castle_jargeau_recno = FUNC("search_place_by_name", "Castle_Jargeau")
		castle_jargeau_recno_two = FUNC("search_place_by_name", "castleJargeau2")
		xpoint_recno = FUNC("search_place_by_name", "xPoint")

		mountain_start_recno = FUNC("search_place_by_name", "mountain_start")
		mountain_top_recno = FUNC("search_place_by_name", "mountain_top")

		g_one_barrack_place_recno = FUNC("search_place_by_name", "G1Barrack")
		jargeau_barrack_place_recno = FUNC("search_place_by_name", "JargeauBarrack")

		side_quest_two_recno = FUNC("search_place_by_name", "SideQuest2")
		arrive_orlean_recno = FUNC("search_place_by_name", "arriveOrlean")

		meet_spy_recno = FUNC("search_place_by_name", "meetSpy")

		near_prison_a = FUNC("search_place_by_name", "nearPrisonA")
		near_prison_b = FUNC("search_place_by_name", "nearPrisonB")
		near_prison_c = FUNC("search_place_by_name", "nearPrisonC")

		meet_orlean_recno = FUNC("search_place_by_name", "meetOrlean")
		reach_loches_recno = FUNC("search_place_by_name", "reachLoches")
		reach_loches_recno_b = FUNC("search_place_by_name", "reachLochesB")
		reach_lord_recno = FUNC("search_place_by_name", "reachLord")
		spy_target_recno = FUNC("search_place_by_name", "spyTarget")

		meet_prison_a = FUNC("search_place_by_name", "meetPrisonA")
		meet_prison_b = FUNC("search_place_by_name", "meetPrisonB")
		meet_prison_c = FUNC("search_place_by_name", "meetPrisonC")

		meet_bedford_recno = FUNC("search_place_by_name", "meetBedford")

		town_loches_recno = FUNC("search_place_by_name", "Town_Loches")
		castle_meung_recno = FUNC("search_place_by_name", "Castle_Meung")
		settlement_bourges_recno = FUNC("search_place_by_name", "Settlement_Bourges")
		settlement_blois_recno = FUNC("search_place_by_name", "Town_Blois")
		settlement_montargis_recno = FUNC("search_place_by_name", "Settle_Montargis")

		town_janville_recno = FUNC("search_place_by_name", "Town_Javille")
		town_patay_recno = FUNC("search_place_by_name", "Town_Patay")
		town_tours_recno = FUNC("search_place_by_name", "Town_Tours")
		castle_beaugency_recno = FUNC("search_place_by_name", "Castle_Beaugency")

		barrack_meung = FUNC("search_place_by_name", "MeungBarrack")
		barrack_beaugency = FUNC("search_place_by_name", "BeaugencyBarrack")

		has_french_recno = FUNC("search_place_by_name", "hasFrench")
		attack_meung_recno = FUNC("search_place_by_name", "attackMeung")

		l_six_prison = FUNC("search_place_by_name", "S5L6Prison")

		william_retreat_recno = FUNC("search_place_by_name", "William_Retreat")

		reach_rouvray_recno = FUNC("search_place_by_name", "ReachRouvray")

		move_cart_recno = FUNC("search_place_by_name", "moveCart")

		cart_target_recno = FUNC("search_place_by_name", "CartTarget")

		goto_wall_recno = FUNC("search_place_by_name", "gotoWall")

		rouvray_area_recno = FUNC("search_place_by_name", "RouvrayArea")
		rouvray_area_recno_two = FUNC("search_place_by_name", "RouvrayArea2")
		see_rouvray_recno = FUNC("search_place_by_name", "SeeRouvray")		

		meet_dunois_recno = FUNC("search_place_by_name", "meetDunois")
		meet_dillier_recno = FUNC("search_place_by_name", "meetDillier")

		cross_bridge_recno = FUNC("search_place_by_name", "crossBridge")
		cross_bridge_recno_two = FUNC("search_place_by_name", "crossBridge2")

		have_archer_recno = FUNC("search_place_by_name", "haveArcher")
		have_poleman_recno = FUNC("search_place_by_name", "havePoleman")
		burn_town_recno = FUNC("search_place_by_name", "burnTown")
		meet_alexander_recno = FUNC("search_place_by_name", "meetAlexander")
		meung_cart_target_recno = FUNC("search_place_by_name", "meungCartTarget")

		meet_talbot_recno = FUNC("search_place_by_name", "meetTalbot")

		prison_one = FUNC("search_place_by_name", "Prison1")
		prison_two = FUNC("search_place_by_name", "Prison2")
		prison_three = FUNC("search_place_by_name", "Prison3")
		prison_four = FUNC("search_place_by_name", "Prison4")
		prison_five = FUNC("search_place_by_name", "Prison5")

		meet_bbridge = FUNC("search_place_by_name", "meetBBridge")
		reach_north_gate_recno = FUNC("search_place_by_name", "reachNorthGate")
		get_reinforcement_recno = FUNC("search_place_by_name", "getReinforcement")
		final_camp_recno = FUNC("search_place_by_name", "finalCamp")

		reach_jargeau_recno = FUNC("search_place_by_name", "reachJargeauGate")
		reach_jargeau_recno_two = FUNC("search_place_by_name", "reachJargeauGate2")

		// Jargeau Tower
		jargeau_west_tower_right = FUNC("search_place_by_name", "JargeauWestTowerRight")
		jargeau_west_tower_right_ground = FUNC("search_place_by_name", "JargeauWestTowerRightGround")
		jargeau_north_tower_right = FUNC("search_place_by_name", "JargeauNorthTowerRight")
		jargeau_north_tower_left = FUNC("search_place_by_name", "JargeauNorthTowerLeft")
		
		check_enemy_alive_recno = FUNC("search_place_by_name", "check67alive")
		
		spawn_h_one = FUNC("search_place_by_name", "Spawn_H1")
		spawn_h_two = FUNC("search_place_by_name", "Spawn_H2")
		spawn_h_four = FUNC("search_place_by_name", "Spawn_H4")
		spawn_h_five = FUNC("search_place_by_name", "Spawn_H5")
		spawn_h_six = FUNC("search_place_by_name", "Spawn_H6")
		spawn_h_seven = FUNC("search_place_by_name", "Spawn_H7")

		spawn_side_quest_one = FUNC("search_place_by_name", "SpawnSideQuest1")

		spawn_h_eight = FUNC("search_place_by_name", "Spawn_H8")
		spawn_h_nine = FUNC("search_place_by_name", "Spawn_H9")
		spawn_h_ten = FUNC("search_place_by_name", "Spawn_H10")
		spawn_h_ten_four = FUNC("search_place_by_name", "Spawn_H14")
		spawn_h_ten_five = FUNC("search_place_by_name", "Spawn_H15")
		spawn_h_ten_six = FUNC("search_place_by_name", "Spawn_H16")

		spawn_h_ten_one = FUNC("search_place_by_name", "Spawn_H11")
		spawn_talbot = FUNC("search_place_by_name", "Spawn_Talbot")
		spawn_richemont = FUNC("search_place_by_name", "Spawn_Richemont")
		spawn_suffolk = FUNC("search_place_by_name", "Spawn_Suffolk")

		beyond_five = FUNC("search_place_by_name", "beyond5")
		beyond_six = FUNC("search_place_by_name", "beyond6")

		// get facility recno
		facility_h_one_recno_a = FUNC("search_facility_by_name", "Facility_H1a")
		facility_h_one_recno_b = FUNC("search_facility_by_name", "Facility_H1b")
		facility_h_one_recno_c = FUNC("search_facility_by_name", "Facility_H1c")
		facility_h_one_recno_d = FUNC("search_facility_by_name", "Facility_H1d")
		facility_h_one_recno_e = FUNC("search_facility_by_name", "Facility_H1e")
		facility_h_one_recno_f = FUNC("search_facility_by_name", "Facility_H1f")

		facility_h_three_recno = FUNC("search_facility_by_name", "Facility_H3")
		facility_h_three_recno_b = FUNC("search_facility_by_name", "Facility_H3b")
		facility_h_three_recno_c = FUNC("search_facility_by_name", "Facility_H3c")

		facility_h_two_recno_a = FUNC("search_facility_by_name", "Facility_H2a")
		facility_h_two_recno_b = FUNC("search_facility_by_name", "Facility_H2b")
		facility_h_two_recno_c = FUNC("search_facility_by_name", "Facility_H2c")
		facility_h_two_recno_d = FUNC("search_facility_by_name", "Facility_H2d")
		facility_h_two_recno_e = FUNC("search_facility_by_name", "Facility_H2e")
		facility_h_two_recno_f = FUNC("search_facility_by_name", "Facility_H2f")

		facility_h_four_recno = FUNC("search_facility_by_name", "Facility_H4")
		facility_h_five_recno = FUNC("search_facility_by_name", "Facility_H5")
		facility_h_six_recno = FUNC("search_facility_by_name", "Facility_H6")
		facility_h_seven_recno = FUNC("search_facility_by_name", "Facility_H7")

		facility_saint_one = FUNC("search_facility_by_name", "Facility_Saint_1")
		facility_saint_two = FUNC("search_facility_by_name", "Facility_Saint_2")
		facility_saint_three = FUNC("search_facility_by_name", "Facility_Saint_3")
		facility_saint_four = FUNC("search_facility_by_name", "Facility_Saint_4")
		facility_saint_five = FUNC("search_facility_by_name", "Facility_Saint_5")
		facility_saint_six = FUNC("search_facility_by_name", "Facility_Saint_6")

		saint_villager_a = FUNC("search_facility_by_name", "SaintVillagerA")
		saint_villager_b = FUNC("search_facility_by_name", "SaintVillagerB")
		saint_villager_c = FUNC("search_facility_by_name", "SaintVillagerC")
		saint_villager_d = FUNC("search_facility_by_name", "SaintVillagerD")
		saint_villager_e = FUNC("search_facility_by_name", "SaintVillagerE")
		saint_villager_f = FUNC("search_facility_by_name", "SaintVillagerF")

		facility_h_eight_recno_a = FUNC("search_facility_by_name", "Facility_H8a")
		facility_h_eight_recno_b = FUNC("search_facility_by_name", "Facility_H8b")
		facility_h_eight_recno_c = FUNC("search_facility_by_name", "Facility_H8c")
		facility_h_eight_recno_d = FUNC("search_facility_by_name", "Facility_H8d")
		facility_h_eight_recno_e = FUNC("search_facility_by_name", "Facility_H8e")
		facility_h_eight_recno_f = FUNC("search_facility_by_name", "Facility_H8f")

		facility_h_nine_recno_a = FUNC("search_facility_by_name", "Facility_H9a")
		facility_h_nine_recno_b = FUNC("search_facility_by_name", "Facility_H9b")
		facility_h_nine_recno_c = FUNC("search_facility_by_name", "Facility_H9c")
		facility_h_nine_recno_d = FUNC("search_facility_by_name", "Facility_H9d")
		facility_h_nine_recno_e = FUNC("search_facility_by_name", "Facility_H9e")
		facility_h_nine_recno_f = FUNC("search_facility_by_name", "Facility_H9f")

		facility_h_ten_recno = FUNC("search_facility_by_name", "Facility_H10")
		facility_h_ten_four_recno = FUNC("search_facility_by_name", "Facility_H14")
		facility_h_ten_four_recno_two = FUNC("search_facility_by_name", "Facility_H14_2")

		facility_h_ten_five_recno_a = FUNC("search_facility_by_name", "Facility_H15a")
		facility_h_ten_five_recno_b = FUNC("search_facility_by_name", "Facility_H15b")
		facility_h_ten_five_recno_c = FUNC("search_facility_by_name", "Facility_H15c")
		facility_h_ten_five_recno_d = FUNC("search_facility_by_name", "Facility_H15d")
		facility_h_ten_five_recno_e = FUNC("search_facility_by_name", "Facility_H15e")

		facility_h_ten_six_recno_a = FUNC("search_facility_by_name", "Facility_H16a")
		facility_h_ten_six_recno_b = FUNC("search_facility_by_name", "Facility_H16b")
		facility_h_ten_six_recno_c = FUNC("search_facility_by_name", "Facility_H16c")
		facility_h_ten_six_recno_d = FUNC("search_facility_by_name", "Facility_H16d")
		facility_h_ten_six_recno_e = FUNC("search_facility_by_name", "Facility_H16e")
		facility_h_ten_six_recno_f = FUNC("search_facility_by_name", "Facility_H16f")
		facility_h_ten_six_recno_g = FUNC("search_facility_by_name", "Facility_H16g")
		facility_h_ten_six_recno_h = FUNC("search_facility_by_name", "Facility_H16h")
		facility_h_ten_six_recno_i = FUNC("search_facility_by_name", "Facility_H16i")
		facility_h_ten_six_recno_j = FUNC("search_facility_by_name", "Facility_H16j")
		facility_h_ten_six_recno_k = FUNC("search_facility_by_name", "Facility_H16k")

		facility_s_two_one = FUNC("search_facility_by_name", "Facility_S2_1")
		facility_s_two_two = FUNC("search_facility_by_name", "Facility_S2_2")
		facility_s_two_three = FUNC("search_facility_by_name", "Facility_S2_3")

		facility_s_four_one = FUNC("search_facility_by_name", "Facility_S4_1")
		facility_s_four_two = FUNC("search_facility_by_name", "Facility_S4_2")
		facility_s_four_three = FUNC("search_facility_by_name", "Facility_S4_3")
		facility_s_four_four = FUNC("search_facility_by_name", "Facility_S4_4")
		facility_s_four_five = FUNC("search_facility_by_name", "Facility_S4_5")

		facility_h_ten_one_recno = FUNC("search_facility_by_name", "Facility_H11")

		spawn_for_child_a = FUNC("search_facility_by_name", "spawnForChildA")
		spawn_for_child_b = FUNC("search_facility_by_name", "spawnForChildB")
		spawn_for_child_c = FUNC("search_facility_by_name", "spawnForChildC")
		spawn_for_child_d = FUNC("search_facility_by_name", "spawnForChildD")
		spawn_for_child_e = FUNC("search_facility_by_name", "spawnForChildE")
		spawn_for_child_f = FUNC("search_facility_by_name", "spawnForChildF")
		spawn_for_child_g = FUNC("search_facility_by_name", "spawnForChildG")
		spawn_for_child_h = FUNC("search_facility_by_name", "spawnForChildH")
		spawn_for_child_i = FUNC("search_facility_by_name", "spawnForChildI")
		spawn_for_child_j = FUNC("search_facility_by_name", "spawnForChildJ")
		spawn_for_child_k = FUNC("search_facility_by_name", "spawnForChildK")
		spawn_for_child_l = FUNC("search_facility_by_name", "spawnForChildL")
		spawn_for_child_m = FUNC("search_facility_by_name", "spawnForChildM")
		spawn_for_child_n = FUNC("search_facility_by_name", "spawnForChildN")
		spawn_for_child_o = FUNC("search_facility_by_name", "spawnForChildO")
		spawn_for_child_p = FUNC("search_facility_by_name", "spawnForChildP")
		spawn_for_child_q = FUNC("search_facility_by_name", "spawnForChildQ")
		spawn_for_child_r = FUNC("search_facility_by_name", "spawnForChildR")
		spawn_for_child_aa = FUNC("search_facility_by_name", "spawnForChildAA")
		spawn_for_child_ab = FUNC("search_facility_by_name", "spawnForChildAB")
		spawn_for_child_ac = FUNC("search_facility_by_name", "spawnForChildAC")
		spawn_for_child_ad = FUNC("search_facility_by_name", "spawnForChildAD")
		spawn_for_child_ae = FUNC("search_facility_by_name", "spawnForChildAE")
		spawn_for_child_af = FUNC("search_facility_by_name", "spawnForChildAF")
		spawn_for_child_ba = FUNC("search_facility_by_name", "spawnForChildBA")
		spawn_for_child_bb = FUNC("search_facility_by_name", "spawnForChildBB")
		spawn_for_child_bc = FUNC("search_facility_by_name", "spawnForChildBC")
		spawn_for_child_bd = FUNC("search_facility_by_name", "spawnForChildBD")
		spawn_for_child_be = FUNC("search_facility_by_name", "spawnForChildBE")
		spawn_for_child_bf = FUNC("search_facility_by_name", "spawnForChildBF")
		spawn_for_child_ca = FUNC("search_facility_by_name", "spawnForChildCA")
		spawn_for_child_cb = FUNC("search_facility_by_name", "spawnForChildCB")
		spawn_for_child_cc = FUNC("search_facility_by_name", "spawnForChildCC")
		spawn_for_child_cd = FUNC("search_facility_by_name", "spawnForChildCD")
		spawn_for_child_ce = FUNC("search_facility_by_name", "spawnForChildCE")
		spawn_for_child_cf = FUNC("search_facility_by_name", "spawnForChildCF")
		spawn_for_child_da = FUNC("search_facility_by_name", "spawnForChildDA")
		spawn_for_child_db = FUNC("search_facility_by_name", "spawnForChildDB")
		spawn_for_child_dc = FUNC("search_facility_by_name", "spawnForChildDC")
		spawn_for_child_dd = FUNC("search_facility_by_name", "spawnForChildDD")
		spawn_for_child_de = FUNC("search_facility_by_name", "spawnForChildDE")
		spawn_for_child_df = FUNC("search_facility_by_name", "spawnForChildDF")
		spawn_for_child_ea = FUNC("search_facility_by_name", "spawnForChildEA")
		spawn_for_child_eb = FUNC("search_facility_by_name", "spawnForChildEB")
		spawn_for_child_ec = FUNC("search_facility_by_name", "spawnForChildEC")
		spawn_for_child_ed = FUNC("search_facility_by_name", "spawnForChildED")
		spawn_for_child_ee = FUNC("search_facility_by_name", "spawnForChildEE")
		spawn_for_child_ef = FUNC("search_facility_by_name", "spawnForChildEF")
		spawn_for_child_fa = FUNC("search_facility_by_name", "spawnForChildFA")
		spawn_for_child_fb = FUNC("search_facility_by_name", "spawnForChildFB")
		spawn_for_child_fc = FUNC("search_facility_by_name", "spawnForChildFC")
		spawn_for_child_fd = FUNC("search_facility_by_name", "spawnForChildFD")
		spawn_for_child_fe = FUNC("search_facility_by_name", "spawnForChildFE")
		spawn_for_child_ff = FUNC("search_facility_by_name", "spawnForChildFF")
		spawn_for_child_ga = FUNC("search_facility_by_name", "spawnForChildGA")
		spawn_for_child_gb = FUNC("search_facility_by_name", "spawnForChildGB")
		spawn_for_child_gc = FUNC("search_facility_by_name", "spawnForChildGC")
		spawn_for_child_gd = FUNC("search_facility_by_name", "spawnForChildGD")
		spawn_for_child_ge = FUNC("search_facility_by_name", "spawnForChildGE")
		spawn_for_child_gf = FUNC("search_facility_by_name", "spawnForChildGF")

		spawn_loches_a = FUNC("search_facility_by_name", "spaweLochesA")
		spawn_loches_b = FUNC("search_facility_by_name", "spaweLochesB")
		spawn_loches_c = FUNC("search_facility_by_name", "spaweLochesC")
		spawn_loches_d = FUNC("search_facility_by_name", "spaweLochesD")

		facility_talbot_a = FUNC("search_facility_by_name", "Facility_Talbot_a")
		facility_talbot_b = FUNC("search_facility_by_name", "Facility_Talbot_b")
		facility_talbot_c = FUNC("search_facility_by_name", "Facility_Talbot_c")
		facility_talbot_d = FUNC("search_facility_by_name", "Facility_Talbot_d")
		facility_talbot_e = FUNC("search_facility_by_name", "Facility_Talbot_e")
		facility_talbot_f = FUNC("search_facility_by_name", "Facility_Talbot_f")
		facility_talbot_g = FUNC("search_facility_by_name", "Facility_Talbot_g")
		facility_talbot_h = FUNC("search_facility_by_name", "Facility_Talbot_h")
		facility_talbot_i = FUNC("search_facility_by_name", "Facility_Talbot_i")
		facility_talbot_j = FUNC("search_facility_by_name", "Facility_Talbot_j")

		facility_scales_a = FUNC("search_facility_by_name", "SpawnScalesA")
		facility_scales_b = FUNC("search_facility_by_name", "SpawnScalesB")
		facility_scales_c = FUNC("search_facility_by_name", "SpawnScalesC")
		facility_scales_d = FUNC("search_facility_by_name", "SpawnScalesD")
		facility_scales_e = FUNC("search_facility_by_name", "SpawnScalesE")
		facility_scales_f = FUNC("search_facility_by_name", "SpawnScalesF")
		facility_scales_g = FUNC("search_facility_by_name", "SpawnScalesG")
		facility_scales_h = FUNC("search_facility_by_name", "SpawnScalesH")
		facility_scales_i = FUNC("search_facility_by_name", "SpawnScalesI")
		facility_scales_j = FUNC("search_facility_by_name", "SpawnScalesJ")

		facility_richemont_a = FUNC("search_facility_by_name", "Facility_Richemont_a")
		facility_richemont_b = FUNC("search_facility_by_name", "Facility_Richemont_b")
		facility_richemont_c = FUNC("search_facility_by_name", "Facility_Richemont_c")
		facility_richemont_d = FUNC("search_facility_by_name", "Facility_Richemont_d")
		facility_richemont_e = FUNC("search_facility_by_name", "Facility_Richemont_e")
		facility_richemont_f = FUNC("search_facility_by_name", "Facility_Richemont_f")
		facility_richemont_g = FUNC("search_facility_by_name", "Facility_Richemont_g")
		facility_richemont_h = FUNC("search_facility_by_name", "Facility_Richemont_h")
		facility_richemont_i = FUNC("search_facility_by_name", "Facility_Richemont_i")
		facility_richemont_j = FUNC("search_facility_by_name", "Facility_Richemont_j")
		facility_richemont_aa = FUNC("search_facility_by_name", "Spawn_Richemont_aa")
		facility_richemont_ab = FUNC("search_facility_by_name", "Spawn_Richemont_ab")
		facility_richemont_ac = FUNC("search_facility_by_name", "Spawn_Richemont_ac")
		facility_richemont_ad = FUNC("search_facility_by_name", "Spawn_Richemont_ad")
		facility_richemont_ae = FUNC("search_facility_by_name", "Spawn_Richemont_ae")
		facility_richemont_af = FUNC("search_facility_by_name", "Spawn_Richemont_af")
		facility_richemont_ag = FUNC("search_facility_by_name", "Spawn_Richemont_ag")
		facility_richemont_ah = FUNC("search_facility_by_name", "Spawn_Richemont_ah")
		facility_richemont_ai = FUNC("search_facility_by_name", "Spawn_Richemont_ai")
		facility_richemont_aj = FUNC("search_facility_by_name", "Spawn_Richemont_aj")

		facility_suffolk_a = FUNC("search_facility_by_name", "Facility_Suffolk_a")
		facility_suffolk_b = FUNC("search_facility_by_name", "Facility_Suffolk_b")
		facility_suffolk_c = FUNC("search_facility_by_name", "Facility_Suffolk_c")
		facility_suffolk_d = FUNC("search_facility_by_name", "Facility_Suffolk_d")
		facility_suffolk_e = FUNC("search_facility_by_name", "Facility_Suffolk_e")
		facility_suffolk_f = FUNC("search_facility_by_name", "Facility_Suffolk_f")
		facility_suffolk_g = FUNC("search_facility_by_name", "Facility_Suffolk_g")
		facility_suffolk_h = FUNC("search_facility_by_name", "Facility_Suffolk_h")
		facility_suffolk_i = FUNC("search_facility_by_name", "Facility_Suffolk_i")
		facility_suffolk_j = FUNC("search_facility_by_name", "Facility_Suffolk_j")
		facility_suffolk_k = FUNC("search_facility_by_name", "Facility_Suffolk_k")
		facility_suffolk_l = FUNC("search_facility_by_name", "Facility_Suffolk_l")
		facility_suffolk_m = FUNC("search_facility_by_name", "Facility_Suffolk_m")
		facility_suffolk_n = FUNC("search_facility_by_name", "Facility_Suffolk_n")
		facility_suffolk_o = FUNC("search_facility_by_name", "Facility_Suffolk_o")
		facility_suffolk_p = FUNC("search_facility_by_name", "Facility_Suffolk_p")
		facility_suffolk_q = FUNC("search_facility_by_name", "Facility_Suffolk_q")
		facility_suffolk_r = FUNC("search_facility_by_name", "Facility_Suffolk_r")
		facility_suffolk_s = FUNC("search_facility_by_name", "Facility_Suffolk_s")

		spawn_javille_a = FUNC("search_facility_by_name", "SpawnJavilleA")
		spawn_javille_b = FUNC("search_facility_by_name", "SpawnJavilleB")
		spawn_javille_c = FUNC("search_facility_by_name", "SpawnJavilleC")
		spawn_javille_d = FUNC("search_facility_by_name", "SpawnJavilleD")
		spawn_javille_e = FUNC("search_facility_by_name", "SpawnJavilleE")
		spawn_javille_f = FUNC("search_facility_by_name", "SpawnJavilleF")
		spawn_javille_g = FUNC("search_facility_by_name", "SpawnJavilleG")
		spawn_javille_h = FUNC("search_facility_by_name", "SpawnJavilleH")
		spawn_javille_i = FUNC("search_facility_by_name", "SpawnJavilleI")
		spawn_javille_j = FUNC("search_facility_by_name", "SpawnJavilleJ")
		spawn_javille_k = FUNC("search_facility_by_name", "SpawnJavilleK")
		spawn_javille_l = FUNC("search_facility_by_name", "SpawnJavilleL")
		spawn_javille_m = FUNC("search_facility_by_name", "SpawnJavilleM")
		spawn_javille_n = FUNC("search_facility_by_name", "SpawnJavilleN")
		spawn_javille_o = FUNC("search_facility_by_name", "SpawnJavilleO")
		spawn_javille_p = FUNC("search_facility_by_name", "SpawnJavilleP")
		spawn_javille_q = FUNC("search_facility_by_name", "SpawnJavilleQ")
		spawn_javille_r = FUNC("search_facility_by_name", "SpawnJavilleR")
		spawn_javille_s = FUNC("search_facility_by_name", "SpawnJavilleS")
		spawn_javille_t = FUNC("search_facility_by_name", "SpawnJavilleT")
		spawn_javille_u = FUNC("search_facility_by_name", "SpawnJavilleU")
		spawn_javille_v = FUNC("search_facility_by_name", "SpawnJavilleV")
		spawn_javille_w = FUNC("search_facility_by_name", "SpawnJavilleW")
		spawn_javille_x = FUNC("search_facility_by_name", "SpawnJavilleX")
		spawn_javille_y = FUNC("search_facility_by_name", "SpawnJavilleY")
		spawn_javille_z = FUNC("search_facility_by_name", "SpawnJavilleZ")
		spawn_javille_aa = FUNC("search_facility_by_name", "SpawnJavilleAA")
		spawn_javille_ab = FUNC("search_facility_by_name", "SpawnJavilleAB")
		spawn_javille_ac = FUNC("search_facility_by_name", "SpawnJavilleAC")
		spawn_javille_ad = FUNC("search_facility_by_name", "SpawnJavilleAD")

		side_quest_one_a = FUNC("search_facility_by_name", "SideQuest1a")
		side_quest_one_b = FUNC("search_facility_by_name", "SideQuest1b")
		side_quest_one_c = FUNC("search_facility_by_name", "SideQuest1c")
		side_quest_one_d = FUNC("search_facility_by_name", "SideQuest1d")
		side_quest_one_e = FUNC("search_facility_by_name", "SideQuest1e")
		side_quest_one_f = FUNC("search_facility_by_name", "SideQuest1f")
		side_quest_one_g = FUNC("search_facility_by_name", "SideQuest1g")
		side_quest_one_h = FUNC("search_facility_by_name", "SideQuest1h")
		side_quest_one_i = FUNC("search_facility_by_name", "SideQuest1i")
		side_quest_one_j = FUNC("search_facility_by_name", "SideQuest1j")
		side_quest_one_k = FUNC("search_facility_by_name", "SideQuest1k")
		side_quest_one_l = FUNC("search_facility_by_name", "SideQuest1l")

		side_quest_a_one = FUNC("search_facility_by_name", "SideQuestA1")
		side_quest_a_two = FUNC("search_facility_by_name", "SideQuestA2")
		side_quest_a_three = FUNC("search_facility_by_name", "SideQuestA3")
		side_quest_a_four = FUNC("search_facility_by_name", "SideQuestA4")
		side_quest_a_five = FUNC("search_facility_by_name", "SideQuestA5")
		side_quest_a_six = FUNC("search_facility_by_name", "SideQuestA6")
		side_quest_a_seven = FUNC("search_facility_by_name", "SideQuestA7")
		side_quest_a_eight = FUNC("search_facility_by_name", "SideQuestA8")
		side_quest_a_nine = FUNC("search_facility_by_name", "SideQuestA9")
		side_quest_a_ten = FUNC("search_facility_by_name", "SideQuestA10")
		side_quest_a_ten_one = FUNC("search_facility_by_name", "SideQuestA11")
		side_quest_a_ten_two = FUNC("search_facility_by_name", "SideQuestA12")
		side_quest_a_ten_three = FUNC("search_facility_by_name", "SideQuestA13")
		side_quest_a_ten_four = FUNC("search_facility_by_name", "SideQuestA14")
		side_quest_a_two_zero = FUNC("search_facility_by_name", "SideQuestA20")

		town_rouvray_one = FUNC("search_facility_by_name", "rouvray1")
		town_rouvray_two = FUNC("search_facility_by_name", "rouvray2")
		town_rouvray_three = FUNC("search_facility_by_name", "rouvray3")
		town_rouvray_four = FUNC("search_facility_by_name", "rouvray4")
		town_rouvray_five = FUNC("search_facility_by_name", "rouvray5")

		spawn_father_recno = FUNC("search_facility_by_name", "SpawnFather")
		spawn_mother_recno = FUNC("search_facility_by_name", "SpawnMother")

		spawn_blois_a = FUNC("search_facility_by_name", "spawnBloisA")
		spawn_blois_b = FUNC("search_facility_by_name", "spawnBloisB")

		spawn_chateaudun_a = FUNC("search_facility_by_name", "spawnChateaudunA")
		spawn_chateaudun_b = FUNC("search_facility_by_name", "spawnChateaudunB")
		spawn_chateaudun_c = FUNC("search_facility_by_name", "spawnChateaudunC")
		spawn_chateaudun_d = FUNC("search_facility_by_name", "spawnChateaudunD")
		spawn_chateaudun_e = FUNC("search_facility_by_name", "spawnChateaudunE")
		spawn_chateaudun_f = FUNC("search_facility_by_name", "spawnChateaudunF")

		facility_jargeau_barrack = FUNC("search_facility_by_name", "JargeauBarrackRecruit")
		facility_meung_barrack = FUNC("search_facility_by_name", "FacilityMeungRecruit")
		facility_beaugency_barrack = FUNC("search_facility_by_name", "BeaugencyBarrackRecruit")
		facility_g_one_barrack = FUNC("search_facility_by_name", "G1BarrackRecruit")

		spawn_chateauneut_a = FUNC("search_facility_by_name", "spawnChateauneutA")
		spawn_chateauneut_b = FUNC("search_facility_by_name", "spawnChateauneutB")
		spawn_chateauneut_c = FUNC("search_facility_by_name", "spawnChateauneutC")

		// facility for jargeau
		// --- Tower --- //
		facility_jargeau_west_tower_right = FUNC("search_facility_by_name", "FacilityJargeauWestTowerR")
		facility_jargeau_west_tower_right_ground = FUNC("search_facility_by_name", "FacilityJargeauWestTowerRG")
		
		facility_jargeau_north_tower_right_ground = FUNC("search_facility_by_name", "FacilityJargeauNorthTowerRG")
		facility_jargeau_north_tower_left_ground = FUNC("search_facility_by_name", "FacilityJargeauNorthTowerLG")

		// --- Gate --- //
	
		orlean_weapon_shop_recno = FUNC("search_facility_by_name" , "OrleanWeaponShop") 
		orlean_potion_shop_recno = FUNC("search_facility_by_name" , "OrleanPotionShop") 

		jargeau_weapon_shop_recno = FUNC("search_facility_by_name" , "JargeauWeaponShop") 
		jargeau_potion_shop_recno = FUNC("search_facility_by_name" , "JargeauPotionShop") 

		meung_weapon_shop_recno = FUNC("search_facility_by_name" , "MeungWeaponShop") 
		meung_potion_shop_recno = FUNC("search_facility_by_name" , "MeungPotionShop") 

		beaugency_weapon_shop_recno = FUNC("search_facility_by_name" , "BeaugencyWeaponShop") 
		beaugency_potion_shop_recno = FUNC("search_facility_by_name" , "BeaugencyPotionShop") 

		patay_weapon_shop_recno = FUNC("search_facility_by_name" , "PatayWeaponShop") 
		tour_potion_shop_recno = FUNC("search_facility_by_name" , "ToursPotionShop") 


		// get event place recno
		one_event_zero_place_recno = FUNC("search_place_by_name", "Event0")
		one_event_one_place_recno = FUNC("search_place_by_name", "Event1")
		one_event_four_place_recno = FUNC("search_place_by_name", "Town_Saint")
		one_event_five_place_recno = FUNC("search_place_by_name", "Town_Chateauneut9")
		one_event_seven_place_recno = FUNC("search_place_by_name", "Event7")
		one_event_eight_place_recno = FUNC("search_place_by_name", "Event8")
		one_event_ten_two_place_recno = FUNC("search_place_by_name", "Event12")

		two_event_two_one_place_recno = FUNC("search_place_by_name", "Event_2_2_1")
		two_event_two_two_place_recno = FUNC("search_place_by_name", "Event_2_2_2")
		two_event_three_place_recno = FUNC("search_place_by_name", "Event_2_3")
		two_event_four_place_recno = FUNC("search_place_by_name", "Event_2_4")
		
		two_event_six_place_recno = FUNC("search_place_by_name", "Event_2_6")
		two_event_seven_place_recno = FUNC("search_place_by_name", "Event_2_7")

		three_event_zero_place_recno = FUNC("search_place_by_name", "Event_3_0")
		three_event_one_place_recno = FUNC("search_place_by_name", "Event_3_1")
		three_event_two_place_recno = FUNC("search_place_by_name", "Event_3_2")
		three_event_three_place_recno = FUNC("search_place_by_name", "Event_3_3")

		three_event_five_place_recno = FUNC("search_place_by_name", "Event_3_5")
		three_event_nine_place_recno = FUNC("search_place_by_name", "Castle_Beaugency")

		three_event_ten_two_place_recno = FUNC("search_place_by_name", "Event_3_12")

		arrive_orlean_one_recno = FUNC("search_place_by_name", "arriveOrlean1")
		arrive_orlean_two_recno = FUNC("search_place_by_name", "arriveOrlean2")

		// get citizens
		orlean_weapon_seller_recno = FUNC("search_unit_by_name", "Achard Gueinier")
		FUNC("set_can_interact_flag", orlean_weapon_seller_recno, 1)
		ACTION("give_task", orlean_weapon_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		orlean_potion_seller_recno = FUNC("search_unit_by_name", "Vilain Bouclier")
		FUNC("set_can_interact_flag", orlean_potion_seller_recno, 1)
		ACTION("give_task", orlean_potion_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		jargeau_weapon_seller_recno = FUNC("search_unit_by_name", "Raoul Chanvier")
		FUNC("set_can_interact_flag", jargeau_weapon_seller_recno, 1)
		ACTION("give_task", jargeau_weapon_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		jargeau_potion_seller_recno = FUNC("search_unit_by_name", "Alard Florier")
		FUNC("set_can_interact_flag", jargeau_potion_seller_recno, 1)
		ACTION("give_task", jargeau_potion_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		meung_weapon_seller_recno = FUNC("search_unit_by_name", "Olivier Vanier")
		if ( FUNC("get_place_captured", castle_meung_recno) == 0 )
		{
			FUNC("set_can_interact_flag", meung_weapon_seller_recno, 0)
		}
		else
		{
			FUNC("set_can_interact_flag", meung_weapon_seller_recno, 1)
		}
		ACTION("give_task", meung_weapon_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		meung_potion_seller_recno = FUNC("search_unit_by_name", "Raymond Taier")
		if ( FUNC("get_place_captured", castle_meung_recno) == 0 )
		{
			FUNC("set_can_interact_flag", meung_potion_seller_recno, 0)
		}
		else
		{
			FUNC("set_can_interact_flag", meung_potion_seller_recno, 1)
		}
		ACTION("give_task", meung_potion_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		beaugency_weapon_seller_recno = FUNC("search_unit_by_name", "Gervais Amiraut")
		if ( FUNC("get_place_captured", castle_beaugency_recno) == 0 )
		{
			FUNC("set_can_interact_flag", beaugency_weapon_seller_recno, 0)
		}
		else
		{
			FUNC("set_can_interact_flag", beaugency_weapon_seller_recno, 1)
		}
		ACTION("give_task", beaugency_weapon_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		beaugency_potion_seller_recno = FUNC("search_unit_by_name", "Marcel Lingier")
		if ( FUNC("get_place_captured", castle_beaugency_recno) == 0 )
		{
			FUNC("set_can_interact_flag", beaugency_potion_seller_recno, 0)
		}
		else
		{
			FUNC("set_can_interact_flag", beaugency_potion_seller_recno, 1)
		}
		ACTION("give_task", beaugency_potion_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		patay_weapon_seller_recno = FUNC("search_unit_by_name", "Hugues Crosetier")
		if ( FUNC("get_place_captured", town_patay_recno) == 0 )
		{
			FUNC("set_can_interact_flag", patay_weapon_seller_recno, 0)
		}
		else
		{
			FUNC("set_can_interact_flag", patay_weapon_seller_recno, 1)
		}
		ACTION("give_task", patay_weapon_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		tour_potion_seller_recno = FUNC("search_unit_by_name", "Gobert Farinier")
		if ( FUNC("get_place_captured", town_tours_recno) == 0 )
		{
			FUNC("set_can_interact_flag", tour_potion_seller_recno, 0)
		}
		else
		{
			FUNC("set_can_interact_flag", tour_potion_seller_recno, 1)
		}
		ACTION("give_task", tour_potion_seller_recno, "IDLE", 1, 0, 0, 0, 0) 

		// get unit id
		ehinfant_id = FUNC("unit_code_to_id", "ENGLISH_HEAVY_INFANTRY") 
		ehinfcap_id = FUNC("unit_code_to_id", "ENGLISH_HEAVY_INFANTRY_CAPTAIN")
		ecrosscap_id = FUNC("unit_code_to_id", "ENGLISH_CROSSBOW_MAN_CAPTAIN")
		ecrossbow_id = FUNC("unit_code_to_id", "ENGLISH_CROSSBOW_MAN")
		earcher_id = FUNC("unit_code_to_id", "ENGLISH_ARCHER")
		earchcap_id = FUNC("unit_code_to_id", "ENGLISH_ARCHER_CAPTAIN")
		epolecap_id = FUNC("unit_code_to_id", "ENGLISH_POLEMAN_CAPTAIN")
		epoleman_id = FUNC("unit_code_to_id", "ENGLISH_POLEMAN")
		emaceman_id = FUNC("unit_code_to_id", "ENGLISH_MACEMAN")
		emacecap_id = FUNC("unit_code_to_id", "ENGLISH_MACEMAN_CAPTAIN")
		elinfcap_id = FUNC("unit_code_to_id", "ENGLISH_LIGHT_INFANTRY_CAPTAIN")
		elinfant_id = FUNC("unit_code_to_id", "ENGLISH_LIGHT_INFANTRY")

		eexarcher_id = FUNC("unit_code_to_id", "ENGLISH_EX_ARCHER")
		eexarcherc_id = FUNC("unit_code_to_id", "ENGLISH_EX_ARCHER_CAPTAIN")

		bur_linf_id = FUNC("unit_code_to_id", "BUR_LIGHTINFANTRY")

		spy_id = FUNC("unit_code_to_id", "ENGLISH_SPY")

		cart_id = FUNC("unit_code_to_id", "GOLD_CART5")

		flinfant_id = FUNC("unit_code_to_id", "FRENCH_LIGHT_INFANTRY") 
		flinfcap_id = FUNC("unit_code_to_id", "FRENCH_LIGHT_INFANTRY_CAPTAIN") 
		farccap_id = FUNC("unit_code_to_id", "FRENCH_ARCHER_CAPTAIN")
		farcher_id = FUNC("unit_code_to_id", "FRENCH_ARCHER")
		fhinfant_id = FUNC("unit_code_to_id", "FRENCH_HEAVY_INFANTRY")
		fhinfcap_id = FUNC("unit_code_to_id", "FRENCH_HEAVY_INFANTRY_CAPTAIN")
		fmacecap_id = FUNC("unit_code_to_id", "FRENCH_MACEMAN_CAPTAIN")
		fmaceman_id = FUNC("unit_code_to_id", "FRENCH_MACEMAN")
		fcrossbow_id = FUNC("unit_code_to_id", "FRENCH_CROSSBOW_MAN") 

		richemont_id = FUNC("unit_code_to_id", "arthur_de_richemont")
		suffolk_id = FUNC("unit_code_to_id", "william_de_la_pole")
		scales_id = FUNC("unit_code_to_id", "LORD_SCALES")
		fastolf_id = FUNC("unit_code_to_id", "JOHN_FASTOLF")
		glasdale_id = FUNC("unit_code_to_id", "WILLIAM_GLASDALE")
		bedford_id = FUNC("unit_code_to_id", "BEDFORD")

		orlean_id = FUNC("unit_code_to_id", "ORLEAN")

		citizen_one_id = FUNC("unit_code_to_id", "CITIZEN_01_2")
		citizen_two_id = FUNC("unit_code_to_id", "CITIZEN_02A_2")
		citizen_three_id = FUNC("unit_code_to_id", "CITIZEN_03_2")
		citizen_four_id = FUNC("unit_code_to_id", "CITIZEN_04A_2")
		mother_id = FUNC("unit_code_to_id", "CITIZEN_04B_2")
		priest_id = FUNC("unit_code_to_id", "PRIEST_01")

		hurt_citizen_one_id = FUNC("unit_code_to_id", "CITIZEN_01")
		hurt_citizen_two_id = FUNC("unit_code_to_id", "CITIZEN_02A")
		hurt_citizen_three_id = FUNC("unit_code_to_id", "CITIZEN_03")
		hurt_citizen_four_id = FUNC("unit_code_to_id", "CITIZEN_04A")
		
		child_id = FUNC("unit_code_to_id", "CITIZEN_03")
		
		// get item recno
		one_event_nine_item_recno = FUNC("search_item_by_name", "JargeauWestGate")
		one_event_ten_item_recno = FUNC("search_item_by_name", "JargeauMiddleGate")
		jargeau_north_gate_recno = FUNC("search_item_by_name", "JargeauNorthGate")
		jargeau_south_gate_recno = FUNC("search_item_by_name", "JargeauSouthGate")

		meung_north_gate_recno = FUNC("search_item_by_name", "MeungNorthGate")
		meung_south_gate_recno = FUNC("search_item_by_name", "MeungSouthGate")

		meung_left_tower = FUNC("search_item_by_name", "MeungLeftTower")
		meung_right_tower = FUNC("search_item_by_name", "MeungRightTower")

		beaugency_south_gate_recno = FUNC("search_item_by_name", "BeaugencySouthGate")
		beaugency_north_gate_recno = FUNC("search_item_by_name", "BeaugencyNorthGate")
		beaugency_middle_gate_recno_one = FUNC("search_item_by_name", "BeaugencyMiddleGate1")
		beaugency_middle_gate_recno_two = FUNC("search_item_by_name", "BeaugencyMiddleGate2")
		beaugency_south_wall_recno = FUNC("search_item_by_name", "BeaugencySouthWall")

		janville_gate_a = FUNC("search_item_by_name", "JanvilleGateA")
		janville_gate_b = FUNC("search_item_by_name", "JanvilleGateB")
		janville_gate_c = FUNC("search_item_by_name", "JanvilleGateC")

		lord_door_recno = FUNC("search_item_by_name", "lordDoor")

		gold_box_a = FUNC("search_item_by_name", "goldBoxA")
		gold_box_b = FUNC("search_item_by_name", "goldBoxB")
		gold_box_c = FUNC("search_item_by_name", "goldBoxC")
		gold_box_d = FUNC("search_item_by_name", "goldBoxD")
		gold_box_e = FUNC("search_item_by_name", "goldBoxE")
		gold_box_f = FUNC("search_item_by_name", "goldBoxF")

		s_five_l_seven_prison_gate_recno = FUNC("search_item_by_name", "S5L7PrisonGate")
		s_five_l_seven_prison_gate_recno_two = FUNC("search_item_by_name", "S5L7PrisonGate2")

		s_five_l_six_prison_gate_a = FUNC("search_item_by_name", "S5L6PrisonGateA")
		s_five_l_six_prison_gate_b = FUNC("search_item_by_name", "S5L6PrisonGateB")
		s_five_l_six_prison_gate_c = FUNC("search_item_by_name", "S5L6PrisonGateC")

		l_nine_prison_gate_a = FUNC("search_item_by_name", "S5L9PrisonGateA")
		l_nine_prison_gate_b = FUNC("search_item_by_name", "S5L9PrisonGateB")
		l_nine_prison_gate_c = FUNC("search_item_by_name", "S5L9PrisonGateC")
		l_nine_prison_gate_d = FUNC("search_item_by_name", "S5L9PrisonGateD")

		jargeau_north_right = FUNC("search_item_by_name", "JargeauNorthRight")
		jargeau_north_left  = FUNC("search_item_by_name", "JargeauNorthLeft")
		jargeau_west_right  = FUNC("search_item_by_name", "JargeauWestRight")
		jargeau_west_left	= FUNC("search_item_by_name", "JargeauWestLeft")

		prison_gate_one = FUNC("search_item_by_name", "PrisonGate1")
		prison_gate_two = FUNC("search_item_by_name", "PrisonGate2")
		prison_gate_three = FUNC("search_item_by_name", "PrisonGate3")

		meung_prison_gate_one = FUNC("search_item_by_name", "MeungPrisonGate1")
		meung_prison_gate_two = FUNC("search_item_by_name", "MeungPrisonGate2")
		meung_prison_gate_three = FUNC("search_item_by_name", "MeungPrisonGate3")
		meung_prison_gate_four = FUNC("search_item_by_name", "MeungPrisonGate4")
		meung_prison_gate_five = FUNC("search_item_by_name", "MeungPrisonGate5")
	
		// get init task for unit

		ACTION("give_task", team_five_six_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		ACTION("give_task", team_five_nine_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		ACTION("give_task", team_six_six_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)

		ACTION("give_task", team_one_five_eight_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		
		ACTION("give_task", team_four_nine_leader, "IDLE", 1, 0, 0, 0, 0)
		ACTION("give_task", team_five_two_leader, "IDLE", 1, 0, 0, 0, 0)
		
		ACTION("give_task", team_five_seven_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		ACTION("give_task", team_five_eight_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		ACTION("give_task", team_eight_zero_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		ACTION("give_task", team_one_five_zero_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)

		ACTION("give_task", team_five_nine_seven_recno, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		ACTION("give_task", team_five_nine_eight_recno, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		ACTION("give_task", team_five_nine_nine_recno, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		ACTION("give_task", team_six_zero_zero_recno, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
		ACTION("give_task", team_six_zero_one_recno, "TOWER_ATTACK", 1, 3000, 0, 0, 0)		

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


		// --- Defend Place --- //
//			ACTION("give_task", team_four_leader, "DEFEND_PLACE", 1, town_checy_recno, 0, 0, 0)
//			ACTION("give_task", team_eight_four_leader, "DEFEND_PLACE", 1, town_checy_recno, 0, 0, 0)
//			ACTION("give_task", team_eight_five_leader, "DEFEND_PLACE", 1, town_checy_recno, 0, 0, 0)
//			ACTION("give_task", team_eight_six_leader, "DEFEND_PLACE", 1, town_checy_recno, 0, 0, 0)
//			ACTION("give_task", team_five_leader, "DEFEND_PLACE", 1, town_checy_recno, 0, 0, 0)
			
			ACTION("give_task", team_eight_leader, "IDLE", 1, 0, 0, 0, 0)

			ACTION("give_task", team_nine_leader, "DEFEND_PLACE", 1, settle_fountainbleu_recno, 0, 0, 0)

		// --- Defend Place --- //

		// set the cannon team
		cannon_one = FUNC("search_unit_by_name", "Cannon01")
		cannon_one_a = FUNC("search_unit_by_name", "CannonBoy01a")

		cannon_recno_one = 0
		cannon_controller_recno_one = 0
		cannon_recno_two = 0
		cannon_controller_recno_two = 0

		ACTION("give_task", cannon_one_a, "LARGE_WEAPON_PUSH", 10, cannon_one, 0, 0, 0)
		cannon_one_b = FUNC("search_unit_by_name", "CannonBoy01b")
		ACTION("give_task", cannon_one_b, "LARGE_WEAPON_PUSH", 10, cannon_one, 1, 0, 0)

		cannon_two = FUNC("search_unit_by_name", "Cannon02")
		cannon_two_a = FUNC("search_unit_by_name", "CannonBoy02a")

		ACTION("give_task", cannon_two_a, "LARGE_WEAPON_PUSH", 10, cannon_two, 0, 0, 0)
		cannon_two_b = FUNC("search_unit_by_name", "CannonBoy02b")
		ACTION("give_task", cannon_two_b, "LARGE_WEAPON_PUSH", 10, cannon_two, 1, 0, 0)

		cannon_three = FUNC("search_unit_by_name", "Cannon03")
		cannon_three_a = FUNC("search_unit_by_name", "CannonBoy03a")

		ACTION("give_task", cannon_three_a, "LARGE_WEAPON_PUSH", 10, cannon_three, 0, 0, 0)
		cannon_three_b = FUNC("search_unit_by_name", "CannonBoy03b")
		ACTION("give_task", cannon_three_b, "LARGE_WEAPON_PUSH", 10, cannon_three, 1, 0, 0)

		cannon_four = FUNC("search_unit_by_name", "Cannon04")
		cannon_four_a = FUNC("search_unit_by_name", "Cannon04a")

		ACTION("give_task", cannon_four_a, "LARGE_WEAPON_PUSH", 10, cannon_four, 0, 0, 0)
		cannon_four_b = FUNC("search_unit_by_name", "Cannon04b")
		ACTION("give_task", cannon_four_b, "LARGE_WEAPON_PUSH", 10, cannon_four, 1, 0, 0)
		ACTION("give_task", cannon_four, "IDLE", 1, 0, 0, 0, 0)

		cannon_five = FUNC("search_unit_by_name", "Cannon05")
		cannon_five_a = FUNC("search_unit_by_name", "Cannon05a")

		ACTION("give_task", cannon_five_a, "LARGE_WEAPON_PUSH", 10, cannon_five, 0, 0, 0)
		cannon_five_b = FUNC("search_unit_by_name", "Cannon05b")
		ACTION("give_task", cannon_five_b, "LARGE_WEAPON_PUSH", 10, cannon_five, 1, 0, 0)
		ACTION("give_task", cannon_five, "IDLE", 1, 0, 0, 0, 0)

		cannon_six = FUNC("search_unit_by_name", "Cannon06")
		cannon_six_a = FUNC("search_unit_by_name", "Cannon06a")

		ACTION("give_task", cannon_six_a, "LARGE_WEAPON_PUSH", 10, cannon_six, 0, 0, 0)
		cannon_six_b = FUNC("search_unit_by_name", "Cannon06b")
		ACTION("give_task", cannon_six_b, "LARGE_WEAPON_PUSH", 10, cannon_six, 1, 0, 0)
		ACTION("give_task", cannon_six, "IDLE", 1, 0, 0, 0, 0)

		cannon_seven = FUNC("search_unit_by_name", "Cannon07")
		cannon_seven_a = FUNC("search_unit_by_name", "Cannon07a")

		ACTION("give_task", cannon_seven_a, "LARGE_WEAPON_PUSH", 10, cannon_seven, 0, 0, 0)
		cannon_seven_b = FUNC("search_unit_by_name", "Cannon07b")
		ACTION("give_task", cannon_seven_b, "LARGE_WEAPON_PUSH", 10, cannon_seven, 1, 0, 0)
		ACTION("give_task", cannon_seven, "IDLE", 1, 0, 0, 0, 0)

		cannon_eight = FUNC("search_unit_by_name", "Cannon08")
		cannon_eight_a = FUNC("search_unit_by_name", "Cannon08a")

		ACTION("give_task", cannon_eight_a, "LARGE_WEAPON_PUSH", 10, cannon_eight, 0, 0, 0)
		cannon_eight_b = FUNC("search_unit_by_name", "Cannon08b")
		ACTION("give_task", cannon_eight_b, "LARGE_WEAPON_PUSH", 10, cannon_eight, 1, 0, 0)
		ACTION("give_task", cannon_eight, "IDLE", 1, 0, 0, 0, 0)

		fcannon_recno_a = FUNC("search_unit_by_name", "fCannonA")
		fcannon_recno_a_one = FUNC("search_unit_by_name", "fCannonA1")
		fcannon_recno_a_two = FUNC("search_unit_by_name", "fCannonA2")

		ACTION("give_task", fcannon_recno_a_one, "LARGE_WEAPON_PUSH", 10, fcannon_recno_a, 0, 0, 0)
		ACTION("give_task", fcannon_recno_a_two, "LARGE_WEAPON_PUSH", 10, fcannon_recno_a, 1, 0, 0)
		ACTION("give_task", fcannon_recno_a, "IDLE", 1, 0, 0, 0, 0)

		fcannon_recno_b = FUNC("search_unit_by_name", "fCannonB")
		fcannon_recno_b_one = FUNC("search_unit_by_name", "fCannonB1")
		fcannon_recno_b_two = FUNC("search_unit_by_name", "fCannonB2")

		ACTION("give_task", fcannon_recno_b_one, "LARGE_WEAPON_PUSH", 10, fcannon_recno_b, 0, 0, 0)
		ACTION("give_task", fcannon_recno_b_two, "LARGE_WEAPON_PUSH", 10, fcannon_recno_b, 1, 0, 0)
		ACTION("give_task", fcannon_recno_b, "IDLE", 1, 0, 0, 0, 0)

		fcannon_recno_c = FUNC("search_unit_by_name", "fCannonC")
		fcannon_recno_c_one = FUNC("search_unit_by_name", "fCannonC1")
		fcannon_recno_c_two = FUNC("search_unit_by_name", "fCannonC2")

		ACTION("give_task", fcannon_recno_c_one, "LARGE_WEAPON_PUSH", 10, fcannon_recno_c, 0, 0, 0)
		ACTION("give_task", fcannon_recno_c_two, "LARGE_WEAPON_PUSH", 10, fcannon_recno_c, 1, 0, 0)
		ACTION("give_task", fcannon_recno_c, "IDLE", 1, 0, 0, 0, 0)

		fcannon_recno_d = FUNC("search_unit_by_name", "fCannonD")
		fcannon_recno_d_one = FUNC("search_unit_by_name", "fCannonD1")
		fcannon_recno_d_two = FUNC("search_unit_by_name", "fCannonD2")

		ACTION("give_task", fcannon_recno_d_one, "LARGE_WEAPON_PUSH", 10, fcannon_recno_d, 0, 0, 0)
		ACTION("give_task", fcannon_recno_d_two, "LARGE_WEAPON_PUSH", 10, fcannon_recno_d, 1, 0, 0)
		ACTION("give_task", fcannon_recno_d, "IDLE", 1, 0, 0, 0, 0)

		jcannon_one = FUNC("search_unit_by_name", "jCannon01")
		jcannon_one_a = FUNC("search_unit_by_name", "jCannon01a")

		ACTION("give_task", jcannon_one_a, "LARGE_WEAPON_PUSH", 10, jcannon_one, 0, 0, 0)
		jcannon_one_b = FUNC("search_unit_by_name", "jCannon01b")
		ACTION("give_task", jcannon_one_b, "LARGE_WEAPON_PUSH", 10, jcannon_one, 1, 0, 0)

		jcannon_two = FUNC("search_unit_by_name", "jCannon02")
		jcannon_two_a = FUNC("search_unit_by_name", "jCannon02a")

		ACTION("give_task", jcannon_two_a, "LARGE_WEAPON_PUSH", 10, jcannon_two, 0, 0, 0)
		jcannon_two_b = FUNC("search_unit_by_name", "jCannon02b")
		ACTION("give_task", jcannon_two_b, "LARGE_WEAPON_PUSH", 10, jcannon_two, 1, 0, 0)

		jbombard_one = FUNC("search_unit_by_name", "jBombard01")
		jbombard_one_a = FUNC("search_unit_by_name", "jBombard01a")

		ACTION("give_task", jbombard_one_a, "LARGE_WEAPON_PUSH", 10, jbombard_one, 0, 0, 0)
		jbombard_one_b = FUNC("search_unit_by_name", "jBombard01b")
		ACTION("give_task", jbombard_one_b, "LARGE_WEAPON_PUSH", 10, jbombard_one, 1, 0, 0)

		jbombard_two = FUNC("search_unit_by_name", "jBombard02")
		jbombard_two_a = FUNC("search_unit_by_name", "jBombard02a")

		ACTION("give_task", jbombard_two_a, "LARGE_WEAPON_PUSH", 10, jbombard_two, 0, 0, 0)
		jbombard_two_b = FUNC("search_unit_by_name", "jBombard02b")
		ACTION("give_task", jbombard_two_b, "LARGE_WEAPON_PUSH", 10, jbombard_two, 1, 0, 0)

		bombard_recno_a = FUNC("search_unit_by_name", "bombard01")
		bombard_recno_a_one = FUNC("search_unit_by_name", "bombard01a")

		ACTION("give_task", bombard_recno_a_one, "LARGE_WEAPON_PUSH", 10, bombard_recno_a, 0, 0, 0)
		bombard_recno_a_two = FUNC("search_unit_by_name", "bombard01b")
		ACTION("give_task", bombard_recno_a_two, "LARGE_WEAPON_PUSH", 10, bombard_recno_a, 1, 0, 0)

		bombard_recno_b = FUNC("search_unit_by_name", "bombard02")
		bombard_recno_b_one = FUNC("search_unit_by_name", "bombard02a")

		ACTION("give_task", bombard_recno_b_one, "LARGE_WEAPON_PUSH", 10, bombard_recno_b, 0, 0, 0)
		bombard_recno_b_two = FUNC("search_unit_by_name", "bombard02b")
		ACTION("give_task", bombard_recno_b_two, "LARGE_WEAPON_PUSH", 10, bombard_recno_b, 1, 0, 0)

		bombard_recno_c = FUNC("search_unit_by_name", "bombard03")
		bombard_recno_c_one = FUNC("search_unit_by_name", "bombard03a")

		ACTION("give_task", bombard_recno_c_one, "LARGE_WEAPON_PUSH", 10, bombard_recno_c, 0, 0, 0)
		bombard_recno_c_two = FUNC("search_unit_by_name", "bombard03b")
		ACTION("give_task", bombard_recno_c_two, "LARGE_WEAPON_PUSH", 10, bombard_recno_c, 1, 0, 0)

		ebombard_recno_six_one = FUNC("search_unit_by_name", "eBombard61")
		ebombard_recno_six_one_a = FUNC("search_unit_by_name", "eBombard61a")

		ACTION("give_task", ebombard_recno_six_one_a, "LARGE_WEAPON_PUSH", 10, ebombard_recno_six_one, 0, 0, 0)
		ebombard_recno_six_one_b = FUNC("search_unit_by_name", "eBombard61b")
		ACTION("give_task", ebombard_recno_six_one_b, "LARGE_WEAPON_PUSH", 10, ebombard_recno_six_one, 1, 0, 0)

		ebombard_recno_six_two = FUNC("search_unit_by_name", "eBombard62")
		ebombard_recno_six_two_a = FUNC("search_unit_by_name", "eBombard62a")

		ACTION("give_task", ebombard_recno_six_two_a, "LARGE_WEAPON_PUSH", 10, ebombard_recno_six_two, 0, 0, 0)
		ebombard_recno_six_two_b = FUNC("search_unit_by_name", "eBombard62b")
		ACTION("give_task", ebombard_recno_six_two_b, "LARGE_WEAPON_PUSH", 10, ebombard_recno_six_two, 1, 0, 0)

		crossbow_recno_a = FUNC("search_unit_by_name", "crossBow01")
		crossbow_recno_a_one = FUNC("search_unit_by_name", "crossBow01a")

		ACTION("give_task", crossbow_recno_a_one, "LARGE_WEAPON_PUSH", 10, crossbow_recno_a, 0, 0, 0)

		crossbow_recno_b = FUNC("search_unit_by_name", "crossBow02")
		crossbow_recno_b_one = FUNC("search_unit_by_name", "crossBow02a")
		
		ACTION("give_task", crossbow_recno_b_one, "LARGE_WEAPON_PUSH", 10, crossbow_recno_b, 0, 0, 0)

		crossbow_recno_c = FUNC("search_unit_by_name", "crossBow03")
		crossbow_recno_c_one = FUNC("search_unit_by_name", "crossBow03a")

		ACTION("give_task", crossbow_recno_c_one, "LARGE_WEAPON_PUSH", 10, crossbow_recno_c, 0, 0, 0)

		crossbow_recno_d = FUNC("search_unit_by_name", "crossBow04")
		crossbow_recno_d_one = FUNC("search_unit_by_name", "crossBow04a")

		ACTION("give_task", crossbow_recno_d_one, "LARGE_WEAPON_PUSH", 10, crossbow_recno_d, 0, 0, 0)

		cannon_recno_b = FUNC("search_unit_by_name", "English Cannon")
		cannon_recno_b_one = FUNC("search_unit_by_name", "English Cannon Controller 1")

		ACTION("give_task", cannon_recno_b_one, "LARGE_WEAPON_PUSH", 10, cannon_recno_b, 0, 0, 0)
		cannon_recno_b_two = FUNC("search_unit_by_name", "English Cannon Controller 2")
		ACTION("give_task", cannon_recno_b_two, "LARGE_WEAPON_PUSH", 10, cannon_recno_b, 1, 0, 0)

		// get init task for unit
		ACTION("give_task", team_one_five_seven_leader, "IDLE", 1, 0, 0, 0, 0)

		// set side quest
		if ( FUNC("get_scenario_stage") == 1 ) // the first game
		{
			FUNC("restore_bit_flag")

			if ( FUNC("is_rts_mode") == 1 )
			{
				FUNC("quit_rts_mode")
			}

			FUNC("set_can_interact_flag", one_man_citizen_recno, 1)
			FUNC("set_can_interact_flag", montargis_citizen_recno_a, 1)
			FUNC("set_can_interact_flag", montargis_citizen_recno_b, 1)
			FUNC("set_can_interact_flag", team_one_five_seven_leader, 1)

			if ( FUNC("get_scenario_event_bit_flag", 27) == 0  )
			{
				FUNC("set_control_flag", cannon_four, 0)
				FUNC("set_control_flag", cannon_four_a, 0)
				FUNC("set_control_flag", cannon_four_b, 0)
				FUNC("set_control_flag", cannon_five, 0)
				FUNC("set_control_flag", cannon_five_a, 0)
				FUNC("set_control_flag", cannon_five_b, 0)
				FUNC("set_control_flag", cannon_six, 0)
				FUNC("set_control_flag", cannon_six_a, 0)
				FUNC("set_control_flag", cannon_six_b, 0)
				FUNC("set_control_flag", cannon_seven, 0)
				FUNC("set_control_flag", cannon_seven_a, 0)
				FUNC("set_control_flag", cannon_seven_b, 0)
				FUNC("set_control_flag", cannon_eight, 0)
				FUNC("set_control_flag", cannon_eight_a, 0)
				FUNC("set_control_flag", cannon_eight_b, 0)
				FUNC("set_control_flag", dlllier_recno, 0)
			}

			if ( FUNC("get_scenario_event_bit_flag", 22) == 0  )
			{
				FUNC("set_control_flag", cannon_one, 0)
				FUNC("set_control_flag", cannon_one_a, 0)
				FUNC("set_control_flag", cannon_one_b, 0)
				FUNC("set_control_flag", cannon_two, 0)
				FUNC("set_control_flag", cannon_two_a, 0)
				FUNC("set_control_flag", cannon_two_b, 0)
				FUNC("set_control_flag", cannon_three, 0)
				FUNC("set_control_flag", cannon_three_a, 0)
				FUNC("set_control_flag", cannon_three_b, 0)
				FUNC("set_control_flag", dunois_recno, 0)
			}

			if ( FUNC("get_scenario_event_bit_flag_3", 11) == 0 && FUNC("get_scenario_event_bit_flag_3", 25) == 0 )
			{
				FUNC("set_control_flag", fcannon_recno_a, 0)
				FUNC("set_control_flag", fcannon_recno_a_one, 0)
				FUNC("set_control_flag", fcannon_recno_a_two, 0)
				FUNC("set_control_flag", fcannon_recno_b, 0)
				FUNC("set_control_flag", fcannon_recno_b_one, 0)
				FUNC("set_control_flag", fcannon_recno_b_two, 0)
				FUNC("set_control_flag", fcannon_recno_c, 0)
				FUNC("set_control_flag", fcannon_recno_c_one, 0)
				FUNC("set_control_flag", fcannon_recno_c_two, 0)
				FUNC("set_control_flag", fcannon_recno_d, 0)
				FUNC("set_control_flag", fcannon_recno_d_one, 0)
				FUNC("set_control_flag", fcannon_recno_d_two, 0)
			}

			if ( FUNC("get_scenario_event_bit_flag_3", 32) == 0 )
			{
				FUNC("set_team_control_flag", 603, 0)
			}

//			FUNC("set_end_condition_enabled", 1, 0)
			FUNC("set_end_condition_enabled", 2, 1)
//			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", 9, 1)
//			FUNC("set_end_condition_enabled", 10, 0)
//			FUNC("set_end_condition_enabled", 11, 0)
//			FUNC("set_end_condition_enabled", 12, 0)
//			FUNC("set_end_condition_enabled", 13, 0)
//			FUNC("set_end_condition_enabled", 15, 1)
//			FUNC("set_end_condition_enabled", 16, 0)
//			FUNC("set_end_condition_enabled", 18, 0)
//			FUNC("set_end_condition_enabled", 19, 0)
//			FUNC("set_end_condition_enabled", 20, 0)
//			FUNC("set_end_condition_enabled", 21, 0)			
//			FUNC("set_end_condition_enabled", 22, 0)
//			FUNC("set_end_condition_enabled", 23, 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, 1)		
//			FUNC("set_end_condition_enabled", 28, 0)
//			FUNC("set_end_condition_enabled", 29, 0)
//			FUNC("set_end_condition_enabled", 31, 0)
//			FUNC("set_end_condition_enabled", 32, 0)
//			FUNC("set_end_condition_enabled", 33, 0)
//			FUNC("set_end_condition_enabled", 34, 0)
//			FUNC("set_end_condition_enabled", 35, 0)
			FUNC("set_end_condition_enabled", 14, 1)
			FUNC("set_end_condition_enabled", 17, 1)
			FUNC("set_end_condition_enabled", 30, 1)
			FUNC("set_end_condition_enabled", 36, 1)

			FUNC("set_end_condition_finish", 14, "NORMAL")
			FUNC("set_end_condition_finish", 17, "NORMAL")
			FUNC("set_end_condition_finish", 30, "NORMAL")
			FUNC("set_end_condition_finish", 36, "NORMAL")

			FUNC("set_team_prisoner", 210, 2, 0)

			if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) == 0 )
			{
				FUNC("set_unit_team_vision_range", team_five_eight_one_leader, 200)
				ACTION("give_task", team_five_eight_one_leader, "IDLE", 1, 0, 0, 0, 0)
				FUNC("set_team_prisoner", 581, 2, 0)			
			}

			if ( FUNC("get_gate_state", prison_gate_two) == 0 )
			{
				FUNC("set_unit_team_vision_range", team_five_eight_two_leader, 200)
				ACTION("give_task", team_five_eight_two_leader, "IDLE", 1, 0, 0, 0, 0)
				FUNC("set_team_prisoner", 582, 2, 0)
			}

			if ( FUNC("get_gate_state", l_nine_prison_gate_b) == 0 )
			{
				FUNC("set_unit_team_vision_range", team_five_eight_three_leader, 200)
				ACTION("give_task", team_five_eight_three_leader, "IDLE", 1, 0, 0, 0, 0)
				FUNC("set_team_prisoner", 583, 2, 0)
			}

			FUNC("set_team_prisoner", 603, 2, 0)

			FUNC("set_unit_team_vision_range", l_six_prisoner, 200)

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

			FUNC("set_unit_retreat", lux_recno, 1)

			FUNC("set_gate_invincible", janville_gate_a, 1)
			FUNC("set_gate_invincible", janville_gate_b, 1)
			FUNC("set_gate_invincible", janville_gate_c, 1)

			FUNC("set_gate_invincible", beaugency_south_gate_recno, 1)
			FUNC("set_wall_invincible", beaugency_south_wall_recno, 1)

			FUNC("set_can_interact_flag", english_spy_recno, 1)

			ACTION("give_task", alexander_recno, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", talbot_recno, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", english_spy_recno, "IDLE", 1, 0, 0, 0, 0) 
			FUNC("set_unit_retreat", talbot_recno, 1)

			ACTION("give_task", team_one_two_zero_leader, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", team_one_two_one_leader, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", team_one_two_two_leader, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", team_one_two_three_leader, "IDLE", 1, 0, 0, 0, 0)

			ACTION("give_task", team_one_seven_zero_leader, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", team_one_seven_one_leader, "IDLE", 1, 0, 0, 0, 0)

			ACTION("give_task", team_one_nine_nine_leader, "IDLE", 1, 0, 0, 0, 0) 
			ACTION("give_task", team_one_two_four_leader, "IDLE", 1, 0, 0, 0, 0) 

			ACTION("give_task", crossbow_recno_a, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", crossbow_recno_b, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", crossbow_recno_c, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", crossbow_recno_d, "IDLE", 1, 0, 0, 0, 0)

			ACTION("give_task", cannon_four, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", cannon_five, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", cannon_six, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", cannon_seven, "IDLE", 1, 0, 0, 0, 0)
			ACTION("give_task", cannon_eight, "IDLE", 1, 0, 0, 0, 0)

			FUNC("give_item_to_unit", "FD_FISH", 1, 2, alexander_recno)
			FUNC("give_item_to_unit", "FD_FISH", 1, 3, talbot_recno)
			FUNC("give_item_to_unit", "FD_FISH", 1, 2, lux_recno)

			FUNC("set_gate_hp", meung_south_gate_recno, 3000)
			FUNC("set_gate_max_hp", meung_south_gate_recno, 3000)

			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("set_scenario_stage", 2)

			FUNC("stop_curr_task", joan_recno)
			FUNC("stop_curr_task", jean_recno)
			FUNC("stop_curr_task", alencon_recno)
			FUNC("stop_curr_task", la_hire_recno)
		}
		
//		FUNC("set_unit_retreat", alencon_recno, 1)

		FUNC("disable_team_drop_item", 49)
		FUNC("disable_team_drop_item", 66)
		FUNC("disable_team_drop_item", 80)
		FUNC("disable_team_drop_item", 52)

		FUNC("disable_team_drop_item", 171)
		FUNC("disable_team_drop_item", 170)

		FUNC("set_territory_nation", "Orleans", "French")

		FUNC("minimap_set_way_point", 1, 525.0, 15670.0, 600.0, 0, 0)
		FUNC("minimap_set_way_point", 2, 525.0, 15670.0, 600.0, 0, 0)

		if ( FUNC("get_end_condition_finish", 1) == 0 )		// 1
		{
			FUNC("minimap_set_way_point", 1, 5822.0, 6013.0, 200.0, 1, 0)
		}

		if ( FUNC("get_end_condition_finish", 18) == 0 )	// 2
		{
			FUNC("minimap_set_way_point", 2, 3023.0, 27654.0, 200.0, 1, 0)
		}

		if ( FUNC("get_end_condition_enabled", 19) > 0 && FUNC("get_end_condition_finish", 19) == 0 )	// 3
		{
			FUNC("minimap_set_way_point", 3, 525.0, 15670.0, 600.0, 1, 0)
		}

		if ( FUNC("get_end_condition_enabled", 2) > 0 && FUNC("get_end_condition_finish", 2) == 0 )		// 4
		{
			FUNC("minimap_set_way_point", 4, 9737.0, 50007.0, 200.0, 1, 0)
		}

		if ( FUNC("get_end_condition_enabled", 3) > 0 && FUNC("get_end_condition_finish", 3) == 0 )		// 5
		{
			FUNC("minimap_set_way_point", 5, 8924.0, 64489.0, 200.0, 1, 0)
		}

		if ( FUNC("get_scenario_bit_flag", 17) > 0 && FUNC("get_end_condition_finish", 12) == 0 )	// 6
		{
			FUNC("minimap_set_way_point", 6, 16390.0, 24840.0, 200.0, 1, 0)
		}

		if ( FUNC("get_end_condition_enabled", 10) > 0 && FUNC("get_end_condition_finish", 10) == 0 )		// 7
		{
			FUNC("minimap_set_way_point", 7, 14959.0, 3557.0, 200.0, 1, 0)
		}

		if ( FUNC("get_end_condition_enabled", 31) > 0 && FUNC("get_end_condition_finish", 31) == 0 )		// 8
		{
			FUNC("minimap_set_way_point", 8, 1545.0, 68106.0, 200.0, 1, 0)
		}

		if ( FUNC("get_scenario_bit_flag", 19) > 0 )	// 9
		{
			if ( FUNC("get_end_condition_finish", 24) > 0 && FUNC("get_end_condition_finish", 25) > 0 && FUNC("get_end_condition_finish", 16) > 0 )
			{
			}
			else
			{
				FUNC("minimap_set_way_point", 9, 25940.0, 68780.0, 200.0, 1, 0)
			}
		}
	} 

	main_recno = FUNC("get_main_character")
	talk_unit_recno = FUNC("get_interact_unit_recno", main_recno) 

	if ( FUNC("get_place_captured", castle_jargeau_recno) == 1 )
	{
		// Event 1
		if( FUNC("get_scenario_event_bit_flag", 25) == 0 && FUNC("get_unit_team_leader_by_team_id", 124) > 0 )
		{	
			alencon_in_place_recno = FUNC("is_unit_inside_place", three_event_one_place_recno, main_recno)
			
			if(alencon_in_place_recno > 0) 
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				// set main character to idle
				FUNC("set_idle", main_recno) 

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

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

				FUNC("change_camera_in_cut_scene", 0, team_one_two_four_leader, 200, ( FUNC("get_unit_dir", team_one_two_four_leader) ), 10)

				WAIT { DIALOG("add_dialog", team_one_two_four_leader, "[0001N]Hurry - The enemy has reached the vicinity of Beaugency! We must prevent them getting any closer!") }
				WAIT { DIALOG("add_dialog", la_hire_recno, "[0002N]Men to arms! Let us rid ourselves of the evil enemy!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", team_one_two_four_leader)
				ACTION("give_task", team_one_two_four_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
				ACTION("give_task", team_one_two_five_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
						
				FUNC("set_scenario_event_bit_flag", 25, 1)
			}
		}

		if ( FUNC("get_scenario_event_bit_flag_3", 11) == 0 && FUNC("get_scenario_event_bit_flag_3", 25) == 0 )
		{
			alencon_in_place_recno = FUNC("search_for_unit_in_place", meet_orlean_recno, "P")

			if ( alencon_in_place_recno > 0 && FUNC("is_unit_dead_by_name", orlean_recno, "Bastard von Orleans") == 0)
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				// set main character to idle
				FUNC("set_idle", main_recno) 

				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
				FUNC("set_unit_can_process_in_cut_scene", orlean_recno, 1)	// joan can process

				FUNC("change_camera_in_cut_scene", 0, 15646, 51495, 850, 350, 133, 24)
				ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, orlean_recno) , 0 , 0 , 0, 2500)
				ACTION("give_order" , orlean_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , orlean_recno, main_recno) , 0 , 0 , 0, 2500)
				WAIT { DIALOG("add_dialog", orlean_recno, "[0003N]It is good you have taken up my offer! Before we charge and attack the enemy within Meung I need to inform you of the current situation. The defenses in Meung have been considerably strengthened since we overtook Jargeau.") }

				FUNC("change_camera_in_cut_scene", 0, 13733, 51950, 1313, 350, 125, 27)
				WAIT { DIALOG("add_dialog", orlean_recno, "[0004N]The walls of Meung are infested with enemy archers. We need to rid ourselves of as many of them as possible, but we’d be wise to keep clear of their deadly arrows.") }

				FUNC("change_camera_in_cut_scene", 0, 15463, 51974, 81, 350, 92, 10)
				WAIT { DIALOG("add_dialog", orlean_recno, "[0005N]I also suspect that bombards and cannons may await us inside. I'm not certain but, if we manage to enter Meung, being aware of the possibility of their presence is preferable to any unpleasant surprises. Now, let us begin the attack!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("set_scenario_event_bit_flag_3", 11, 1)

				FUNC("set_control_flag", orlean_recno, 1)
				FUNC("set_control_flag", team_five_eight_five_recno, 1)
				FUNC("set_control_flag", team_five_eight_six_recno, 1)
				FUNC("set_control_flag", team_five_eight_seven_recno, 1)
				FUNC("set_control_flag", team_five_eight_eight_recno, 1)
				FUNC("set_control_flag", fcannon_recno_a, 1)
				FUNC("set_control_flag", fcannon_recno_a_one, 1)
				FUNC("set_control_flag", fcannon_recno_a_two, 1)
				FUNC("set_control_flag", fcannon_recno_b, 1)
				FUNC("set_control_flag", fcannon_recno_b_one, 1)
				FUNC("set_control_flag", fcannon_recno_b_two, 1)
				FUNC("set_control_flag", fcannon_recno_c, 1)
				FUNC("set_control_flag", fcannon_recno_c_one, 1)
				FUNC("set_control_flag", fcannon_recno_c_two, 1)
				FUNC("set_control_flag", fcannon_recno_d, 1)
				FUNC("set_control_flag", fcannon_recno_d_one, 1)
				FUNC("set_control_flag", fcannon_recno_d_two, 1)

				FUNC("stop_curr_task", orlean_recno)
				FUNC("stop_curr_task", team_five_eight_five_recno)
				FUNC("stop_curr_task", team_five_eight_six_recno)
				FUNC("stop_curr_task", team_five_eight_seven_recno)
				FUNC("stop_curr_task", team_five_eight_eight_recno)

				FUNC("attention_call_message", "[0006N]The Bastard of Orléans has joined the fight - now you can control him and his units via RTS!")
			}
		}

		if ( FUNC("get_scenario_event_bit_flag", 21) == 1 )
		{
			if ( FUNC("get_scenario_event_bit_flag_2", 11) == 0 && FUNC("is_unit_inside_place", meung_cart_target_recno, main_recno) > 0 )
			{
				FUNC("attention_call_message", "[0007N]The enemy is flanking you!")

				INT unit_one
				INT unit_two
				unit_one = FUNC("search_unit_by_name", "Trewe Alicok")
				unit_two = FUNC("search_unit_by_name", "Degare Bischop")

				ACTION("give_task", unit_one, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
				ACTION("give_task", unit_two, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)

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

		// Event 9 
		if ( FUNC("get_scenario_event_bit_flag", 31) == 0 && FUNC("get_place_captured", castle_meung_recno) == 0 )
		{
			if ( FUNC("is_item_deleted_by_name", meung_south_gate_recno, "MeungSouthGate") > 0 )
			{
				FUNC("attention_call_message_2", "[0008N]The English leader Regent Bedford must be behind this fortified wall! Troops move in and show them what we French are made of!", la_hire_recno)

//				FUNC("set_can_interact_flag", english_spy_recno, 0)
				if ( FUNC("get_scenario_event_bit_flag_3", 13) == 0 )
				{
					FUNC("del_unit", english_spy_recno)
					FUNC("set_end_condition_finish", 31, "LOSE")
				}

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

		// Event 6
		if( FUNC("get_scenario_event_bit_flag", 20) == 0 )
		{	
			alencon_in_place_recno = FUNC("is_unit_inside_place", two_event_six_place_recno, main_recno)
			
			if(alencon_in_place_recno > 0) 
			{
				FUNC("attention_call_message_2", "[0009N]The enemy has spotted us! Prepare for attack!", alencon_recno)

				FUNC("stop_curr_task", team_three_two_leader)
				FUNC("stop_curr_task", team_nine_seven_leader)
				ACTION("give_task", team_three_two_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
				ACTION("give_task", team_nine_seven_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)

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

		// Event 7
		if( FUNC("get_scenario_event_bit_flag", 21) == 0 && FUNC("get_place_captured", castle_meung_recno) == 0 )
		{	
			alencon_in_place_recno = FUNC("is_unit_inside_place", two_event_seven_place_recno, main_recno)

			if(alencon_in_place_recno > 0) 
			{
				INT captain_one
				INT captain_two
				captain_one = FUNC("search_unit_by_name", "Roger Baret")
				captain_two = FUNC("search_unit_by_name", "Martin Astan")

				if ( FUNC("is_unit_dead_by_name", cart_recno, "Cart") == 0 && FUNC("is_item_deleted_by_name", meung_south_gate_recno, "MeungSouthGate") == 0 && captain_one > 0 && captain_two > 0 )
				{
					FUNC("set_unit_track", cart_recno, "cartTrack")

					FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
					
					// set main character to idle
					FUNC("set_idle", main_recno) 

					FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
					FUNC("set_unit_can_process_in_cut_scene", cart_recno, 1)
					FUNC("set_unit_can_process_in_cut_scene", cart_driver_recno, 1)

					FUNC("change_camera_in_cut_scene", 0, 2204, 49952, 89, 350, -2, 11)
					WAIT { DIALOG("add_dialog", alencon_recno, "[0010N]I see movement just beyond the trees...") }
					FUNC("stop_curr_task", cart_recno)

					FUNC("change_camera_in_cut_scene", 0, 4132, 50473, 1392, 350, -34, 35)

					if ( FUNC("get_gate_state", meung_south_gate_recno) == 0 )
					{
						FUNC("add_gate_trigger", meung_south_gate_recno, 0)				
					}
					WAIT { DIALOG("add_dialog", captain_one, "[0011N]The wagon has arrived! Raise the gate, lads!") }

					ACTION("give_task", cart_recno, "APPROACH_PLACE", 1, meung_cart_target_recno, 0,0,0)

					WAIT { FUNC("pause_script", 500) }

					FUNC("set_unit_track", cart_recno, "Dummy")

					FUNC("del_unit", cart_recno)
					FUNC("del_unit", cart_driver_recno)

					cart_recno = FUNC("add_unit", "GOLD_CART5", "ENGLISH")
					FUNC("set_unit_name", cart_recno, "Cart")
					FUNC("set_unit_pos", cart_recno, 7144.0, 49685.0, 216.0)
					FUNC("set_unit_dir", cart_recno, 0) 
					FUNC("set_unit_level", cart_recno, 17)

					FUNC("stop_curr_task", cart_recno)
					FUNC("set_idle", cart_recno)
					ACTION("give_task", cart_recno, "IDLE", 1, 0, 0, 0, 0)

					FUNC("change_camera_in_cut_scene", 0, 7596, 49243, 1069, 152, 144, 35)
					WAIT { DIALOG("add_dialog", captain_two, "[0012N]Just set the goods where they belong. We will deliver the gold to our king across the strait.") }

					WAIT { DIALOG("add_dialog", captain_one, "[0013N]With the war going against us, it'll not hurt if we have a surplus of gold to count on. I understand our King Henry will send more troops our way!") }
				
					FUNC("change_camera_in_cut_scene", 0, 2204, 49952, 89, 350, -2, 11)
					WAIT { DIALOG("add_dialog", jean_recno, "[0014N]It seems the English are intent on taking our nation's riches to use for their own depraved needs - we must stop them!") }

					WAIT { DIALOG("add_dialog", la_hire_recno, "[0015N]What are we waiting for? Storm the gates!") }

					WAIT { DIALOG("add_dialog", jean_recno, "[0016N]Meung’s flanked by towers, be wary of enemy missiles!") }
					
					// leave cut scene
					DIALOG("del_all_dialog") 
					FUNC("set_cut_scene_flag" , 0)	// stop cut scene! 

					WAIT{ FUNC("is_cut_scene_finished") }

					if ( FUNC("get_scenario_event_bit_flag_3", 14) == 0 )
					{
						FUNC("add_gate_trigger", meung_south_gate_recno, 0)
					}
				}

				FUNC("stop_curr_task", team_one_seven_zero_leader) 
				FUNC("stop_curr_task", team_one_seven_one_leader)
				FUNC("stop_curr_task", team_one_two_zero_leader)
				FUNC("stop_curr_task", team_one_two_one_leader)
				FUNC("stop_curr_task", team_one_two_two_leader)
				FUNC("stop_curr_task", team_one_two_three_leader)
				ACTION("give_task", team_one_seven_zero_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
				ACTION("give_task", team_one_seven_one_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
				ACTION("give_task", team_one_two_zero_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
				ACTION("give_task", team_one_two_one_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
				ACTION("give_task", team_one_two_two_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
				ACTION("give_task", team_one_two_three_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)

				FUNC("stop_curr_task", crossbow_recno_a)
				FUNC("stop_curr_task", crossbow_recno_b)
				FUNC("stop_curr_task", crossbow_recno_c)
				FUNC("stop_curr_task", crossbow_recno_d)

				FUNC("set_scenario_event_bit_flag", 21, 1)
			}		
			else
			{
				alencon_in_place_recno = FUNC("search_for_unit_in_place", has_french_recno, "E")

				if ( alencon_in_place_recno )
				{
					FUNC("stop_curr_task", team_one_seven_zero_leader) 
					FUNC("stop_curr_task", team_one_seven_one_leader)
					FUNC("stop_curr_task", team_one_two_zero_leader)
					FUNC("stop_curr_task", team_one_two_one_leader)
					FUNC("stop_curr_task", team_one_two_two_leader)
					FUNC("stop_curr_task", team_one_two_three_leader)
					ACTION("give_task", team_one_seven_zero_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
					ACTION("give_task", team_one_seven_one_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
					ACTION("give_task", team_one_two_zero_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
					ACTION("give_task", team_one_two_one_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
					ACTION("give_task", team_one_two_two_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
					ACTION("give_task", team_one_two_three_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)

					FUNC("stop_curr_task", crossbow_recno_a)
					FUNC("stop_curr_task", crossbow_recno_b)
					FUNC("stop_curr_task", crossbow_recno_c)
					FUNC("stop_curr_task", crossbow_recno_d)

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

		if ( FUNC("get_scenario_bit_flag", 15) == 0 && FUNC("get_place_captured", castle_meung_recno) == 0 && FUNC("get_scenario_event_bit_flag_2", 7) == 1 && bedford_recno > 0 && FUNC("is_unit_dead_by_name", bedford_recno, "Regent Bedford") == 0 )
		{
			if ( FUNC("search_for_unit_in_place", meet_bedford_recno, "E") > 0 )
			{
				FUNC("start_cut_scene_2", 1, 0, bedford_recno, 200, ( 180 - FUNC("get_unit_dir", bedford_recno) ), 10, 1)
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }

				FUNC("change_camera_in_cut_scene", 0, bedford_recno, 150, ( 180 - FUNC("get_unit_dir", bedford_recno) ), 10)
				WAIT{ DIALOG("add_dialog", bedford_recno, "[0017N]You, offspring of a woman of ill-repute! This is very simple: just stay still while I crush your skull - You shall not feel much pain, as your end will come all too quickly. You will all be destroyed for killing my dear comrade!") }
				WAIT{ DIALOG("add_dialog", bedford_recno, "[0018N]Of course, if you choose to stay, I will be forced to use my mighty hammer to plaster your face all over the walls.") }

				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_end_condition_enabled", 21, 1)

				FUNC("attention_call_message", "[0019N]Defeat Bedford in a one-on-one duel without leaving the barracks.")

				FUNC("stop_curr_task", bedford_recno)

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

		if ( FUNC("get_scenario_event_bit_flag_3", 7) == 0 )
		{
			if ( FUNC("search_for_unit_in_place", l_six_prison, "P") > 0 )
			{
				FUNC("attention_call_message_2", "[0020N]Fellow comrades! Do free us from our imprisonment!", l_six_prisoner)
				FUNC("set_unit_team_vision_range", l_six_prisoner, 1600)
				FUNC("set_scenario_event_bit_flag_3", 7, 1)
			}
		}

		// Arrived Orlean
		if ( FUNC("get_scenario_event_bit_flag", 17) == 0 )
		{
			if ( FUNC("get_place_captured", settlement_blois_recno) == 0 || FUNC("get_place_captured", settlement_bourges_recno) == 0 )
			{
				joan_in_place_recno = FUNC("is_unit_inside_place", arrive_orlean_one_recno, main_recno)

				if ( joan_in_place_recno == 0 )
				{
					joan_in_place_recno = FUNC("is_unit_inside_place", arrive_orlean_two_recno, main_recno)
				}

				if ( joan_in_place_recno )
				{
					INT messager_one_recno
					messager_one_recno = FUNC("search_unit_by_name", "Renier Balancier")
					FUNC("attention_call_message_2", "[0021N]Your grace, bad tidings from our brethren living near the mountainous pass west of Orléans - they are in dire need of our help. It appears that enemies have occupied two settlements there.", messager_one_recno)
					FUNC("set_scenario_event_bit_flag", 17, 1)
				}
			}
		}

		if ( FUNC("get_scenario_event_bit_flag_2", 7) == 0 )
		{
			if ( FUNC("is_unit_dead_by_name", alexander_recno, "Alexander de la Pole") > 0 && FUNC("is_unit_dead_by_name", bedford_recno, "Regent Bedford") == 0 && bedford_recno > 0 )
			{
				FUNC("start_cut_scene_2", 1, 0, bedford_recno, 200, ( 180 - FUNC("get_unit_dir", bedford_recno) ), 10, 1)
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, bedford_recno, 200, ( 180 - FUNC("get_unit_dir", bedford_recno) ), 10)
				WAIT{ DIALOG("add_dialog", bedford_recno, "[0022N]No! My dear friend has been slain! I shall avenge your death, de la Pole! You whelps of sewer dogs! Come and face me at the barracks - if you have the gall! I shall tear you limb from limb!") }

				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("attention_call_message", "[0023N]Alexander de la Pole has been slain! This is a serious setback for the English in this endless war!")
				FUNC("attention_call_message", "[0024N]Regent Bedford challenges you to a one-on-one duel - if you dare show your face!")

				FUNC("set_scenario_event_bit_flag_2", 7, 1)

				FUNC("set_end_condition_finish", 35, "WIN")

				if ( FUNC("number_of_fightable_enemy_in_place", castle_meung_recno, main_recno) > 1 )
				{
					FUNC("attention_call_message", "[0025N]You have slain Alexander de la Pole! Now eliminate all enemy troops in Meung!")
				}

				if ( FUNC("number_of_fightable_enemy_in_place", castle_meung_recno, main_recno) == 1 )
				{
					FUNC("attention_call_message", "[0026N]All enemies in Meung have been slain! However Regent Bedford, overlord of Meung, is still alive and somewhere in the castle - defeat him to capture Meung!")
				}
			}

			if ( FUNC("is_unit_dead_by_name", alexander_recno, "Alexander de la Pole" ) > 0 && bedford_recno == 0  )
			{
				bedford_recno = FUNC("add_unit", "BEDFORD", "ENGLISH") 
			
				FUNC("set_unit_pos", bedford_recno, 12407.0, 50439.0, 187.0)
				FUNC("set_unit_dir", bedford_recno, -180)
				FUNC("set_unit_team", bedford_recno, 203)
				FUNC("set_unit_name", bedford_recno, "Regent Bedford")
				FUNC("set_unit_level", bedford_recno, 22)
				FUNC("set_unit_ranking", bedford_recno, "GENERAL")
				FUNC("set_main_character", bedford_recno, 0)
				FUNC("set_can_interact_flag", bedford_recno, 0)

				FUNC("set_unit_retreat", bedford_recno, 1)

				FUNC("give_item_to_unit", "FD_FISH", 1, 3, bedford_recno)

				INT getItemId
				getItemId = FUNC("item_code_to_id", "LA_HIRE_MACE_LV3")
				FUNC("set_unit_drop_item_id", bedford_recno, getItemId)

				FUNC("set_idle", bedford_recno)
				ACTION("give_task", bedford_recno, "IDLE", 1, 1, 0, 0, 0)
			}
		}

		if ( FUNC("get_scenario_event_bit_flag_2", 6) == 0 )
		{
			alencon_in_place_recno = FUNC("search_for_unit_in_place", meet_alexander_recno, "E")

			if ( alencon_in_place_recno > 0 && FUNC("is_unit_dead_by_name", alexander_recno, "Alexander de la Pole") == 0 )
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				// set main character to idle
				FUNC("set_idle", main_recno) 

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

				FUNC("change_camera_in_cut_scene", 0, 5022, 49485, 1232, 187, 0, 44)
				WAIT { DIALOG("add_dialog", alexander_recno, "[0027N]You sad abomination of a human! Come here and I will ensure that you meet your maker! I will not allow you to put our months of military planning to waste!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("set_end_condition_enabled", 35, 1)
					
				FUNC("stop_curr_task", main_recno)
				FUNC("stop_curr_task", alexander_recno)

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

		if ( FUNC("get_scenario_event_bit_flag", 19) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", goto_wall_recno, "E")

			if ( joan_in_place_recno && FUNC("is_unit_dead_by_name", alexander_recno, "Alexander de la Pole") == 0 )
			{
				FUNC("start_cut_scene_2", 1, 0, alexander_recno, 200, ( 180 - FUNC("get_unit_dir", alexander_recno) ), 10, 1)
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, 5581, 49842, 1148, 183, -132, 27)

				WAIT{ DIALOG("add_dialog", alexander_recno, "[0028N]You arrogant fools! You think you can just waltz in here and destroy everything we have fought hard to claim from you? Ha! Over my dead body!") }

				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_scenario_event_bit_flag", 19, 1)
			}
		}


//		if ( FUNC("get_scenario_event_bit_flag_2", 23) == 0 && FUNC("is_item_deleted_by_name", block_three_a_item, "block3A") == 0 )
//		{
//			joan_in_place_recno = FUNC("search_for_unit_in_place", block_three_a, "P")

//			if ( joan_in_place_recno > 0 )
//			{
//				FUNC("attention_call_message", "[0001N]You cannot go beyond the battlefield - your duties beckon.")

//				FUNC("set_scenario_event_bit_flag_2", 23, 1)
//			}
//		}
//		else
//		{
//			joan_in_place_recno = FUNC("search_for_unit_in_place", block_three_a, "P")

//			if ( joan_in_place_recno == 0 )
//			{
//				FUNC("set_scenario_event_bit_flag_2", 23, 0)
//			}
//		}

//		if ( FUNC("get_scenario_event_bit_flag_2", 24) == 0 && FUNC("is_item_deleted_by_name", block_three_b_item, "block3B") == 0 )
//		{x
//			joan_in_place_recno = FUNC("search_for_unit_in_place", block_three_b, "P")

//			if ( joan_in_place_recno > 0 )
//			{
//				FUNC("attention_call_message", "[0001N]You cannot go beyond the battlefield - your duties beckon.")

//				FUNC("set_scenario_event_bit_flag_2", 24, 1)
//			}
//		}
//		else
//		{
//			joan_in_place_recno = FUNC("search_for_unit_in_place", block_three_b, "P")

//			if ( joan_in_place_recno == 0 )
//			{
//				FUNC("set_scenario_event_bit_flag_2", 24, 0)
//			}
//		}


		if ( FUNC("get_scenario_event_bit_flag_2", 13) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", prison_one, "P")

			if ( joan_in_place_recno > 0 )
			{
				INT speaker_one
				speaker_one = FUNC("search_unit_by_name", "Achard Cheville")

				FUNC("attention_call_message_2", "[0029N]Help!", speaker_one)

				FUNC("set_scenario_event_bit_flag_2", 13, 1)

				if ( FUNC("get_scenario_event_bit_flag_2", 18) == 0 )
				{
					FUNC("attention_call_message_2", "[0030N]Many of our fellow citizens are trapped in cells in Meung.", alencon_recno)

					FUNC("set_end_condition_enabled", 20, 1)
					FUNC("set_scenario_rescue_limit", 5)

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

		if ( FUNC("get_scenario_event_bit_flag_2", 14) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", prison_two, "P")

			if ( joan_in_place_recno > 0 )
			{
				INT speaker_two
				speaker_two = FUNC("search_unit_by_name", "Marcel Goulier")

				FUNC("attention_call_message_2", "[0031N]Help us!", speaker_two)

				FUNC("set_scenario_event_bit_flag_2", 14, 1)

				if ( FUNC("get_scenario_event_bit_flag_2", 18) == 0 )
				{
					FUNC("attention_call_message_2", "[0030N]Many of our fellow citizens are trapped in cells in Meung.", alencon_recno)

					FUNC("set_end_condition_enabled", 20, 1)
					FUNC("set_scenario_rescue_limit", 5)

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

		if ( FUNC("get_scenario_event_bit_flag_2", 15) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", prison_three, "P")

			if ( joan_in_place_recno > 0 )
			{
				INT speaker_three
				speaker_three = FUNC("search_unit_by_name", "Charles Lampier")

				FUNC("attention_call_message_2", "[0032N]Please free me!", speaker_three)

				FUNC("set_scenario_event_bit_flag_2", 15, 1)

				if ( FUNC("get_scenario_event_bit_flag_2", 18) == 0 )
				{
					FUNC("attention_call_message_2", "[0030N]Many of our fellow citizens are trapped in cells in Meung.", alencon_recno)

					FUNC("set_end_condition_enabled", 20, 1)
					FUNC("set_scenario_rescue_limit", 5)

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

		if ( FUNC("get_scenario_event_bit_flag_2", 16) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", prison_four, "P")

			if ( joan_in_place_recno > 0 )
			{
				INT speaker_four
				speaker_four = FUNC("search_unit_by_name", "Brucie Deicier")

				FUNC("attention_call_message_2", "[0033N]Can you rescue me?", speaker_four)

				FUNC("set_scenario_event_bit_flag_2", 16, 1)

				if ( FUNC("get_scenario_event_bit_flag_2", 18) == 0 )
				{
					FUNC("attention_call_message_2", "[0030N]Many of our fellow citizens are trapped in cells in Meung.", alencon_recno)

					FUNC("set_end_condition_enabled", 20, 1)
					FUNC("set_scenario_rescue_limit", 5)

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

		if ( FUNC("get_scenario_event_bit_flag_2", 17) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", prison_five, "P")

			if ( joan_in_place_recno > 0 )
			{
				INT speaker_five
				speaker_five = FUNC("search_unit_by_name", "Zara Ferron")

				FUNC("attention_call_message_2", "[0034N]Help me! We cannot stay locked in here forever!", speaker_five)

				FUNC("set_scenario_event_bit_flag_2", 17, 1)

				if ( FUNC("get_scenario_event_bit_flag_2", 18) == 0 )
				{
					FUNC("attention_call_message_2", "[0030N]Many of our fellow citizens are trapped in cells in Meung.", alencon_recno)

					FUNC("set_end_condition_enabled", 20, 1)
					FUNC("set_scenario_rescue_limit", 5)

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

		// Event 2
		if ( FUNC("get_scenario_event_bit_flag", 16) == 0 )
		{
			alencon_in_place_recno = FUNC("is_unit_inside_place", two_event_two_one_place_recno, main_recno)
			
			if ( alencon_in_place_recno == 0 )
			{
				alencon_in_place_recno = FUNC("is_unit_inside_place", two_event_two_two_place_recno, main_recno)
			}

			if ( alencon_in_place_recno > 0 )
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
				
				// set weapon seller to idle and rotate him
				FUNC("change_camera_in_cut_scene", 0, 9385, 33758, 1318, 187, 178, 30)
				WAIT { DIALOG("add_dialog", alencon_recno, "[0035N]We are approaching a forest. Careful lads, enemies are bound to be lurking under the canopy within!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }
					
				FUNC("stop_curr_task", main_recno)

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

		// Capture Castle Meung
		if ( FUNC("get_place_captured", castle_meung_recno) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", castle_meung_recno, "P")

			if ( joan_in_place_recno > 0 )
			{
				if ( FUNC("number_of_fightable_enemy_in_place", castle_meung_recno, main_recno) == 0 )
				{
					FUNC("attention_call_message", "[0036N]Congratulations on your successful siege of Meung! You have eliminated all enemy forces and sent the castle's overlord scampering away. ")
					FUNC("set_place_captured", castle_meung_recno, 1)
					FUNC("set_barrack_captured", facility_meung_barrack, 1)
					FUNC("set_territory_nation", "Meung", "French")

					FUNC("set_end_condition_enabled", 3, 1)
					FUNC("set_end_condition_finish", 2, "WIN")

//					FUNC("set_can_interact_flag", english_spy_recno, 0)
					FUNC("del_unit", english_spy_recno)
					FUNC("set_end_condition_finish", 31, "LOSE")

					FUNC("minimap_set_way_point", 4, 0.0, 0.0, 0.0, 0, 0)
					FUNC("minimap_set_way_point", 5, 8924.0, 64489.0, 200.0, 1, 0)		

					FUNC("set_can_interact_flag", meung_weapon_seller_recno, 1)	
					FUNC("set_can_interact_flag", meung_potion_seller_recno, 1)

					FUNC("set_item_nation", meung_south_gate_recno, "French" )
					FUNC("set_item_nation", meung_north_gate_recno, "French" )

					FUNC("set_gate_invincible", beaugency_south_gate_recno, 0)
					FUNC("set_wall_invincible", beaugency_south_wall_recno, 0)
				}
			}
		}

		// Capture Town Loches
		if ( FUNC("get_place_captured", town_loches_recno) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", town_loches_recno, "P")

			if ( joan_in_place_recno > 0 )
			{
				if ( FUNC("number_of_enemy_in_place", town_loches_recno, main_recno) == 0 )
				{
					FUNC("attention_call_message", "[0037N]You have liberated the township of Loches from enemy occupation!")

					FUNC("set_minimap_icon_display_enable", "ftownS5L6b", 1)
					FUNC("set_minimap_icon_display_enable", "e_townS5L6b", 0)
					FUNC("set_territory_nation", "Loches", "French")

					FUNC("facility_barrack_add_leader", spawn_loches_d, citizen_one_id, 0, 1010, "Milon Crieur", "Crieur")
					FUNC("facility_barrack_add_leader", spawn_loches_a, citizen_two_id, 0, 1011, "Simon Ferron", "Ferron")
					FUNC("facility_barrack_add_member", spawn_loches_b, citizen_four_id, 0, 1, 1)
					FUNC("facility_barrack_add_member", spawn_loches_c, citizen_one_id, 0, 1, 1)

					FUNC("show_objective")
					FUNC("set_place_captured", town_loches_recno, 1)
				}
			}
		}
		else
		{
			if ( team_one_zero_one_zero_leader == 0 )
			{
				team_one_zero_one_zero_leader = FUNC("search_unit_by_name", "Milon Crieur")
				FUNC("set_can_interact_flag", team_one_zero_one_zero_leader, 1)
			}

			if ( team_one_zero_one_one_leader == 0 )
			{
				team_one_zero_one_one_leader = FUNC("search_unit_by_name", "Simon Ferron")
				FUNC("set_can_interact_flag", team_one_zero_one_one_leader, 1)
			}
		}


		// Capture Settlement Montargis
		if ( FUNC("get_place_captured", settlement_montargis_recno) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", settlement_montargis_recno, "P")

			if ( joan_in_place_recno > 0 )
			{
				if ( FUNC("number_of_enemy_in_place", settlement_montargis_recno, main_recno) == 0 )
				{
					FUNC("attention_call_message", "[0038N]You have liberated the township of Montargis from enemy occupation!")

					FUNC("set_minimap_icon_display_enable", "ftownS5L6a", 1)
					FUNC("set_minimap_icon_display_enable", "e_townS5L6a", 0)
					FUNC("set_territory_nation", "Montargis", "French")

					FUNC("show_objective")
					FUNC("set_place_captured", settlement_montargis_recno, 1)

					FUNC("facility_barrack_add_leader", facility_s_four_one, hurt_citizen_one_id, 911, 1, "Hugues Coustier", "Coustier")
					FUNC("facility_barrack_add_leader", facility_s_four_two, hurt_citizen_one_id, 912, 1, "Ponce Batelier", "Batelier")
					FUNC("facility_barrack_add_leader", facility_s_four_three, hurt_citizen_two_id, 913, 1, "Ami Greffier", "Greffier")
					FUNC("facility_barrack_add_leader", facility_s_four_four, hurt_citizen_four_id, 914, 1, "Raoul Linier", "Linier")
					FUNC("facility_barrack_add_leader", facility_s_four_five, hurt_citizen_two_id, 915, 1, "Imbert Oignonnier", "Oignonnier")
				}
			}
		}

		if ( FUNC("get_scenario_event_bit_flag_3", 6) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", reach_loches_recno, "E")

			if ( joan_in_place_recno == 0 )
			{
				joan_in_place_recno = FUNC("search_for_unit_in_place", reach_loches_recno_b, "E")
			}

			if ( joan_in_place_recno > 0 )
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

				FUNC("change_camera_in_cut_scene", 0, lux_recno, 200, ( 180 - FUNC("get_unit_dir", lux_recno) ), 10)
				WAIT { DIALOG("add_dialog", lux_recno, "[0039N]Ah, so predictable of you French to unwittingly stumble upon such a trap!") }

				FUNC("change_camera_in_cut_scene", 0, 4823, 34085, 147, 350, -112, 7)
				WAIT { DIALOG("add_dialog", lux_recno, "[0040N]Please, come closer so that our bombards can have a good, close look before they decimate you and your forces!") }

//				FUNC("change_camera_in_cut_scene", 0, 8346, 66447, 784, 342, -73, 23)
				FUNC("change_camera_in_cut_scene", 0, lux_recno, 200, ( 250 - FUNC("get_unit_dir", lux_recno) ), 10)
				WAIT { DIALOG("add_dialog", lux_recno, "[0041N]This town and all those that had the misfortune to have lain in my path shall forever belong to England! I will personally see to it that the status-quo remains rightly so!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("set_scenario_event_bit_flag_3", 6, 1)
				FUNC("set_end_condition_enabled", 37, 1)
			}
		}

		if ( FUNC("get_place_captured", settlement_montargis_recno) == 1 && FUNC("get_scenario_bit_flag", 12) == 0 )
		{
			INT arriveCount
			INT aliveCount
			
			arriveCount = 0
			aliveCount = 0

			team_nine_one_one_leader = FUNC("search_unit_by_name", "Hugues Coustier")

			if ( team_nine_one_one_leader > 0 )
			{
				if ( FUNC("get_end_condition_enabled", 11) > 0 )
				{
					ACTION("give_task", team_nine_one_one_leader, "APPROACH_PLACE", 1, arrive_orlean_recno, 0, 0, 0)
				}
				aliveCount = ( aliveCount + 1 )

				if ( FUNC("is_unit_inside_place", arrive_orlean_recno, team_nine_one_one_leader) )
				{
					arriveCount = ( arriveCount + 1 )
				}

				FUNC("set_scenario_bit_flag", 13, 1)
			}

			team_nine_one_two_leader = FUNC("search_unit_by_name", "Ponce Batelier")

			if ( team_nine_one_two_leader > 0 )
			{
				if ( FUNC("get_end_condition_enabled", 11) > 0 )
				{
					ACTION("give_task", team_nine_one_two_leader, "APPROACH_PLACE", 1, arrive_orlean_recno, 0, 0, 0)
				}
				aliveCount = ( aliveCount + 1 )

				if ( FUNC("is_unit_inside_place", arrive_orlean_recno, team_nine_one_two_leader) )
				{
					arriveCount = ( arriveCount + 1 )
				}

				FUNC("set_scenario_bit_flag", 13, 1)
			}

			if ( team_nine_one_three_leader == 0 )
			{
				team_nine_one_three_leader = FUNC("search_unit_by_name", "Ami Greffier")

				if ( team_nine_one_three_leader > 0 )
				{
					FUNC("set_can_interact_flag", team_nine_one_three_leader, 1)
				}
			}

			if ( team_nine_one_three_leader > 0 )
			{
				if ( FUNC("get_end_condition_enabled", 11) > 0 )
				{
					ACTION("give_task", team_nine_one_three_leader, "APPROACH_PLACE", 1, arrive_orlean_recno, 0, 0, 0)
				}
				aliveCount = ( aliveCount + 1 )

				if ( FUNC("is_unit_inside_place", arrive_orlean_recno, team_nine_one_three_leader) )
				{
					arriveCount = ( arriveCount + 1 )
				}

				FUNC("set_scenario_bit_flag", 13, 1)
			}

			team_nine_one_four_leader = FUNC("search_unit_by_name", "Raoul Linier")

			if ( team_nine_one_four_leader > 0 )
			{
				if ( FUNC("get_end_condition_enabled", 11) > 0 )
				{
					ACTION("give_task", team_nine_one_four_leader, "APPROACH_PLACE", 1, arrive_orlean_recno, 0, 0, 0)
				}
				aliveCount = ( aliveCount + 1 )

				if ( FUNC("is_unit_inside_place", arrive_orlean_recno, team_nine_one_four_leader) )
				{
					arriveCount = ( arriveCount + 1 )
				}

				FUNC("set_scenario_bit_flag", 13, 1)
			}

			team_nine_one_five_leader = FUNC("search_unit_by_name", "Imbert Oignonnier")

			if ( team_nine_one_five_leader > 0 )
			{
				if ( FUNC("get_end_condition_enabled", 11) > 0 )
				{
					ACTION("give_task", team_nine_one_five_leader, "APPROACH_PLACE", 1, arrive_orlean_recno, 0, 0, 0)
				}
				aliveCount = ( aliveCount + 1 )

				if ( FUNC("is_unit_inside_place", arrive_orlean_recno, team_nine_one_five_leader) )
				{
					arriveCount = ( arriveCount + 1 )
				}

				FUNC("set_scenario_bit_flag", 13, 1)
			}

			if ( FUNC("get_scenario_bit_flag", 13) == 1 && FUNC("get_end_condition_enabled", 11) > 0 )
			{
				if ( aliveCount == 0 )
				{
					// mission failed
					FUNC("attention_call_message", "[0042N]Your escorts have been slain! You have failed to protect the innocents!")

					FUNC("set_end_condition_finish", 11, "LOSE")

					FUNC("set_scenario_bit_flag", 12, 1)
				}
				else
				{
					if ( aliveCount == arriveCount )
					{
						if ( aliveCount == 5 )
						{
							FUNC("attention_call_message", "[0043N]You have successfully escorted the villagers to Orléans. Your efforts have gained you 10000 experience points!")
						}
						else
						if ( aliveCount == 4 )
						{
							FUNC("attention_call_message", "[0044N]You have successfully escorted the villagers to Orléans. Your efforts have gained 8000 experience points!")
						}
						else
						if ( aliveCount == 3 )
						{
							FUNC("attention_call_message", "[0045N]You have successfully escorted the villagers to Orléans. Your efforts have gained 6000 experience points!")
						}
						else
						if ( aliveCount == 2 )
						{
							FUNC("attention_call_message", "[0046N]You have successfully escorted the villagers to Orléans. Your efforts have gained 4000 experience points!")
						}
						else
						if ( aliveCount == 1 )
						{
							FUNC("attention_call_message", "[0047N]You have successfully escorted the villagers to Orléans. Your efforts have gained 2000 experience points!")
						}

						FUNC("stop_curr_task", team_nine_one_one_leader )
						FUNC("stop_curr_task", team_nine_one_two_leader )
						FUNC("stop_curr_task", team_nine_one_three_leader )
						FUNC("stop_curr_task", team_nine_one_four_leader )
						FUNC("stop_curr_task", team_nine_one_five_leader )

						FUNC("add_unit_experience", joan_recno, 2000*aliveCount)
						FUNC("add_unit_experience", jean_recno, 2000*aliveCount)
						FUNC("add_unit_experience", alencon_recno, 2000*aliveCount)
						FUNC("add_unit_experience", la_hire_recno, 2000*aliveCount)

						FUNC("set_end_condition_finish", 11, "WIN")

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

		if ( FUNC("get_scenario_event_bit_flag_3", 12) == 0 && FUNC("get_place_captured", castle_meung_recno) == 0 )
		{
			alencon_in_place_recno = FUNC("is_unit_inside_place", three_event_two_place_recno, main_recno)
			
			if ( alencon_in_place_recno > 0 )
			{
				FUNC("attention_call_message_2", "[0048N]Breaking into Beaugency will pose many problems. I have information that within its walls is a gaffer with his team of repairmen, ready to repair any damage we cause to the towns structure.", jean_recno)

				if ( team_one_zero_one_zero_leader > 0 && FUNC("get_can_interact_flag", team_one_zero_one_zero_leader) == 0 && FUNC("get_scenario_event_bit_flag_3", 26) == 1 )
				{
					// has talked with the villager in Loches
					FUNC("attention_call_message_2", "[0049N]This must be what the kind man in Loches was talking about when he talked of special English units!", jean_recno)
				}

				FUNC("attention_call_message_2", "[0050N]Perhaps a better solution would be to take Meung first. Should we capture two castles, English morale will plummet, and our final approach at Beaugency will be easier!", alencon_recno)

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

		// Event 3
		if ( FUNC("get_scenario_event_bit_flag", 18) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", meet_bbridge, "E")

			if ( joan_in_place_recno > 0 )
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

				// set weapon seller to idle and rotate him
				FUNC("change_camera_in_cut_scene", 0, team_one_two_six_leader, 200, ( 180 - FUNC("get_unit_dir", team_one_two_six_leader) ), 10)
				WAIT { DIALOG("add_dialog", team_one_two_six_leader, "[0051N]We must warn Lord Talbot that the enemy is encroaching on our territory!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				ACTION("give_task", team_one_two_six_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
				ACTION("give_task", team_one_seven_nine_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)

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

	if ( FUNC("get_place_captured", castle_meung_recno) == 1 )
	{
		// Event 5
		if( FUNC("get_scenario_event_bit_flag", 28) == 0 )
		{	
			joan_in_place_recno = FUNC("search_for_unit_in_place", three_event_five_place_recno, "E")

			if ( joan_in_place_recno == 0 )
			{
				joan_in_place_recno = FUNC("search_for_unit_in_place", meet_talbot_recno, "E")
			}
			
			if(joan_in_place_recno > 0) 
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

				if ( FUNC("search_for_unit_in_place", three_event_five_place_recno, "E") > 0 )
				{
					FUNC("change_camera_in_cut_scene", 0, 8346, 66447, 784, 342, -73, 23)
					WAIT { DIALOG("add_dialog", jean_recno, "[0052N]This door must lead to the inner walls of Beaugency! Let us enter and seek out the enemy's overseer!") }
				}

				INT maceman_cap_recno_one
				maceman_cap_recno_one = FUNC("search_unit_by_name", "Swalle Bate")

				if ( maceman_cap_recno_one > 0 )
				{
					FUNC("change_camera_in_cut_scene", 0, talbot_recno, 200, 0, 10)
					WAIT { DIALOG("add_dialog", talbot_recno, "[0053N]If we allow the French to claim possession of Beaugency we will lose control of the Loire, and all we have fought for will be for naught!") }

					FUNC("change_camera_in_cut_scene", 0, maceman_cap_recno_one, 200, 0, 10)
					WAIT { DIALOG("add_dialog", maceman_cap_recno_one, "[0054N]Milord, I will ensure it will not happen! Strike to kill, men! Destroy the enemy!") }
				}

				FUNC("set_end_condition_enabled", 32, 1)

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", talbot_recno)

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

		if ( FUNC("get_scenario_event_bit_flag_2", 29) == 0 && ( talbot_recno == 0 || FUNC("search_for_unit_in_place", reach_north_gate_recno, "E") > 0 ) )
		{
//			FUNC("attention_call_message", "In his defeat, Lord Talbot has run away!")

			WAIT { FUNC("pause_script", 5000) }

			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno) 
			
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

			INT maceman_cap_recno
			maceman_cap_recno = FUNC("search_unit_by_name", "Paulinus Agnetis")

			INT hvy_cap_recno
			hvy_cap_recno = FUNC("search_unit_by_name", "Warin Amcotes")

			if ( maceman_cap_recno > 0 && hvy_cap_recno > 0 )
			{
				FUNC("change_camera_in_cut_scene", 0, maceman_cap_recno, 200, ( 180 - FUNC("get_unit_dir", maceman_cap_recno) ), 10)
				if ( FUNC("is_unit_dead_by_name", talbot_recno, "Lord Talbot") > 0 )
				{
					WAIT { DIALOG("add_dialog", maceman_cap_recno, "[0055N]Our Lord Talbot has run away!") }
				}
				else
				{
					WAIT { DIALOG("add_dialog", maceman_cap_recno, "[0056N]The enemy has breached the second wall!") }
				}

				FUNC("change_camera_in_cut_scene", 0, hvy_cap_recno, 200, ( 180 - FUNC("get_unit_dir", hvy_cap_recno) ), 10)
				WAIT { DIALOG("add_dialog", hvy_cap_recno, "[0057N]Quick! Call for reinforcements!") }
			}

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_scenario_event_bit_flag_2", 29, 1)
						
			talbot_recno = 0
		}

		// Event 0
		if( FUNC("get_scenario_event_bit_flag", 24) == 0 && FUNC("get_place_captured", castle_meung_recno) == 1 && FUNC("get_place_captured", castle_beaugency_recno) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", three_event_zero_place_recno, "P")
			
			if(joan_in_place_recno > 0) 
			{
				FUNC("attention_call_message_2", "[0058N]There are two settlements along the mountainous path - we should assist our poor citizens and release them from enemy occupation!", jean_recno)
				FUNC("set_scenario_event_bit_flag", 24, 1)
			}
		}

		// Event 2
		if ( FUNC("get_scenario_event_bit_flag", 26) == 0 && FUNC("get_place_captured", castle_meung_recno) == 1 && FUNC("get_place_captured", castle_jargeau_recno) == 1 && FUNC("get_place_captured", castle_beaugency_recno) == 0 )
		{
			alencon_in_place_recno = FUNC("is_unit_inside_place", three_event_two_place_recno, main_recno)
			
			if ( alencon_in_place_recno > 0 )
			{
				FUNC("attention_call_message_2", "[0059N]We have finally arrived at Beaugency! Let's make preparations for this final siege, men!", alencon_recno)
				FUNC("set_scenario_event_bit_flag", 26, 1)
			}
		}

		// Event 11-14
		if( FUNC("get_scenario_event_bit_flag", 23) == 0 )
		{	
			if ( FUNC("get_place_captured", castle_meung_recno) == 1 )
			{
				FUNC("attention_call_message_2", "[0060N]Well done! We seem to have the enemy on the run. Keep up the pressure!", jean_recno)

				if ( FUNC("get_place_captured", castle_beaugency_recno) == 0 )
				{
					FUNC("attention_call_message_2", "[0061N]Capturing Beaugency will be much tougher, men. The northern pass may be blocked, but there is a southern route that we can take.", la_hire_recno)
					FUNC("attention_call_message_2", "[0062N]Indeed, the southern approach is far more accessible, closer, and there are reports of a small French town in the vicinity.", la_hire_recno)
					FUNC("attention_call_message_2", "[0063N]A small French town near Beaugency? Perhaps they have items that we can acquire to help us lay siege to Beaugency.", jean_recno)
					FUNC("attention_call_message_2", "[0064N]What are we waiting for? Let us move swiftly and vanquish these scoundrels!", la_hire_recno)

					FUNC("attention_call_message_2", "[0065N]I am the bearer of good news, mes amis! With two castles redeemed, we are witnessing the decline of our enemy’s morale firsthand! Not only have English units fled Beaugency, but their gaffer has also gone!", alencon_recno)
					FUNC("attention_call_message_2", "[0066N]Outstanding news, frères dans des bras! Without the gaffer present they cannot repair the damage we create on Beaugency. Now we can whittle away at its defenses until they yield!", jean_recno)
				}

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

		if ( FUNC("get_scenario_event_bit_flag", 11) == 0 )
		{
			if ( FUNC("is_item_deleted_by_name", beaugency_south_gate_recno, "BeaugencySouthGate") > 0 )
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
					
				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
				
				// set weapon seller to idle and rotate him
				FUNC("change_camera_in_cut_scene", 0, talbot_recno, 200, 0, 10)

				WAIT { DIALOG("add_dialog", talbot_recno, "[0067N]If we lose Beaugency the control of the Loire region will revert to French hands! This will allow them safe travel throughout south-central France, and 100 years of struggle will have been in vain!") }

				FUNC("change_camera_in_cut_scene", 0, 7756, 65674, 968, 350, -16, 20)
				WAIT { DIALOG("add_dialog", alencon_recno, "[0068N]We have managed to breach the southern entrance of Beaugency, but I fear there is a more difficult task ahead...") }

				WAIT { DIALOG("add_dialog", alencon_recno, "[0069N]Take heed, soldiers, and be wary of range attacks! Our armor will not stop the piercing arrows of the archers atop the walls of Beaugency. They could strike from north or south. ") }

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

				WAIT{ FUNC("is_cut_scene_finished") }
					
				FUNC("stop_curr_task", main_recno)		

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



		if ( FUNC("get_place_captured", settlement_montargis_recno) == 1 && team_nine_one_three_leader == 0 )
		{
			team_nine_one_three_leader = FUNC("search_unit_by_name", "Ami Greffier")

			if ( team_nine_one_three_leader > 0 )
			{
				FUNC("set_can_interact_flag", team_nine_one_three_leader, 1)
			}
		}

		// Capture Castle Beaugency
		if ( FUNC("get_place_captured", castle_beaugency_recno) == 0 && FUNC("get_scenario_bit_flag", 19) > 0 && FUNC("get_scenario_event_bit_flag_2", 30) > 0 && FUNC("get_scenario_event_bit_flag_2", 31) > 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", castle_beaugency_recno, "P")

			if ( joan_in_place_recno > 0 )
			{
				if ( FUNC("number_of_fightable_enemy_in_place", castle_beaugency_recno, main_recno) == 0 )
				{
					FUNC("attention_call_message", "[0070N]You have eliminated all enemy forces and sent the castle's overlord scampering away - congratulations your siege of Beaugency was successful!")
					FUNC("set_place_captured", castle_beaugency_recno, 1)
					FUNC("set_barrack_captured", facility_beaugency_barrack, 1)
					FUNC("set_territory_nation", "Beaugency", "French")

					FUNC("minimap_set_way_point", 5, 0.0, 0.0, 0.0, 0, 0)
					FUNC("set_end_condition_finish", 3, "WIN")

					FUNC("set_item_nation", beaugency_south_gate_recno, "French" )
					FUNC("set_item_nation", beaugency_north_gate_recno, "French" )
					FUNC("set_item_nation", beaugency_middle_gate_recno_one, "French" )
					FUNC("set_item_nation", beaugency_middle_gate_recno_two, "French" )

					FUNC("set_can_interact_flag", beaugency_weapon_seller_recno, 1)	
					FUNC("set_can_interact_flag", beaugency_potion_seller_recno, 1)

					FUNC("del_item_by_name", "block4a")
					FUNC("del_item_by_name", "block4c")

					FUNC("set_end_condition_enabled", 22, 1)
					FUNC("set_end_condition_enabled", 23, 1)

					FUNC("set_gate_invincible", janville_gate_a, 0)
					FUNC("set_gate_invincible", janville_gate_b, 0)
					FUNC("set_gate_invincible", janville_gate_c, 0)

					// temp?
					FUNC("add_gate_trigger", janville_gate_a, 0)
					FUNC("add_gate_trigger", janville_gate_b, 0)
					FUNC("add_gate_trigger", janville_gate_c, 0)

					FUNC("give_item_to_unit", "FD_FISH", 1, 3, glasdale_recno)
					FUNC("give_item_to_unit", "FD_FISH", 1, 2, fastolf_recno)
					FUNC("give_item_to_unit", "FD_FISH", 1, 2, scales_recno)
				}
			}
		}
	}

	if ( FUNC("get_place_captured", castle_beaugency_recno) == 1)
	{
		// Capture Town Janville
		if ( FUNC("get_place_captured", town_janville_recno) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", town_janville_recno, "P")

			if ( joan_in_place_recno > 0 )
			{
				if ( FUNC("number_of_enemy_in_place", town_janville_recno, main_recno) == 0 )
				{
					FUNC("attention_call_message", "[0071N]You have liberated the township of Janville from enemy occupation!")

					FUNC("set_minimap_icon_display_enable", "ftownS5L3a", 1)
					FUNC("set_minimap_icon_display_enable", "e_townS5L3a", 0)
					FUNC("set_territory_nation", "Janville", "French")

					FUNC("show_objective")
					FUNC("set_place_captured", town_janville_recno, 1)
				}
			}
		}

		// Capture Town Patay
		if ( FUNC("get_place_captured", town_patay_recno) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", town_patay_recno, "P")

			if ( joan_in_place_recno > 0 )
			{
				if ( FUNC("number_of_enemy_in_place", town_patay_recno, main_recno) == 0 )
				{
					FUNC("attention_call_message", "[0072N]You have liberated the township of Patay from enemy occupation!")

					FUNC("set_minimap_icon_display_enable", "ftownS5L3a-2", 1)
					FUNC("set_minimap_icon_display_enable", "e_townS5L3a-2", 0)
					FUNC("set_territory_nation", "Patay", "French")

					FUNC("show_objective")
					FUNC("set_place_captured", town_patay_recno, 1)

					FUNC("set_can_interact_flag", patay_weapon_seller_recno, 1)	
				}
			}
		}

		// Capture Town Tours
		if ( FUNC("get_place_captured", town_tours_recno) == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", town_tours_recno, "P")

			if ( joan_in_place_recno > 0 )
			{
				if ( FUNC("number_of_enemy_in_place", town_tours_recno, main_recno) == 0 )
				{
					FUNC("attention_call_message", "[0073N]You have liberated the township of Tours from enemy occupation!")

					FUNC("set_minimap_icon_display_enable", "ftownS5L3a-3", 1)
					FUNC("set_minimap_icon_display_enable", "e_townS5L3a-3", 0)
					FUNC("set_territory_nation", "Tours", "French")

					FUNC("show_objective")
					FUNC("set_place_captured", town_tours_recno, 1)

					FUNC("set_can_interact_flag", tour_potion_seller_recno, 1)
				}
			}
		}

		// Event 12
		if( FUNC("get_scenario_event_bit_flag", 30) == 0 && FUNC("get_place_captured", castle_beaugency_recno) == 1 )
		{	
			alencon_in_place_recno = FUNC("search_for_unit_in_place", three_event_ten_two_place_recno, "F")
			
			if(alencon_in_place_recno > 0) 
			{
				FUNC("attention_call_message_2", "[0074N]Let us plan carefully our attack so we can squash these insects!", la_hire_recno)

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

		// Event 9
		if( FUNC("get_scenario_event_bit_flag", 29) == 0 )
		{	
			if ( FUNC("get_place_captured", castle_beaugency_recno) == 1 )
			{
				FUNC("attention_call_message_2", "[0075N]The stronghold is ours! We have successfully vanquished the enemy forces!", jean_recno)

				FUNC("attention_call_message_2", "[0076N]Sir William Glasdale, Lord Scales and Lord Fastolf have all retreated to the north of the Loire valley. I say we seek them out!", la_hire_recno)

				FUNC("attention_call_message_2", "[0077N]But we should be careful - who knows what kind of military establishment they may have up north. Perhaps we would be better by recruiting new recruits to strengthen our endeavors.", jean_recno)

				FUNC("attention_call_message_2", "[0078N]Very well, but we must eliminate the enemy camp to the north, for surely the moment we depart from the Loire towards Reims the English dogs will return. ", la_hire_recno)

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

		if ( FUNC("get_place_captured", final_camp_recno) == 0 && FUNC("number_of_fightable_enemy_in_place", final_camp_recno, main_recno) == 0 )
		{
			FUNC("set_end_condition_finish", 22, "WIN")
			FUNC("set_place_captured", final_camp_recno, 1)
		}

		if ( FUNC("get_scenario_event_bit_flag_2", 5) == 0 )
		{
			alencon_in_place_recno = FUNC("search_for_unit_in_place", burn_town_recno, "E")

			if ( alencon_in_place_recno > 0 )
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

				FUNC("change_camera_in_cut_scene", 0, 22438, 59878, 880, 191, -127, 12)
				WAIT { DIALOG("add_dialog", la_hire_recno, "[0079N]How unfortunate, alas we were too late to save this town from its untimely demise.") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)

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

		if ( FUNC("get_end_condition_finish", 24) > 0 && FUNC("get_end_condition_finish", 25) > 0 && FUNC("get_end_condition_finish", 16) > 0 )
		{
			FUNC("minimap_set_way_point", 9, 25940.0, 68780.0, 200.0, 0, 0)
		}

//		if ( FUNC("get_scenario_event_bit_flag_3", 15) == 0 && fastolf_recno > 0 )
//		{
//			if ( FUNC("is_unit_dead_by_name", fastolf_recno, "John Fastolf") == 1 )
//			{
//				FUNC("attention_call_message", "[0001N]You have slain Lord Fastolf! The English are losing their military leaders! Without their leadership, the 100 years' war is finally turning in our favor. Loire is French for the taking!")
//
//				FUNC("set_end_condition_finish", 24, "WIN")

//				fastolf_recno = 0 

//				FUNC("set_scenario_event_bit_flag_3", 15, 1)
//			}
//		}

		if ( FUNC("is_unit_dead_by_name", jcannon_one_a, "jCannon01a") > 0 && FUNC("is_unit_dead_by_name", jcannon_one_b, "jCannon01b") > 0 )
		{
			if ( FUNC("is_unit_dead_by_name", jcannon_one, "jCannon01") == 0 )
			{
				FUNC("set_unit_nation", jcannon_one, "French")
			}
		}

		if ( FUNC("get_end_condition_finish", 23) == 0 )
		{
			if ( FUNC("is_unit_dead_by_name", jcannon_one_a, "jCannon01a") > 0 && FUNC("is_unit_dead_by_name", jcannon_one_b, "jCannon01b") > 0 )
			{
				if ( FUNC("is_unit_dead_by_name", jcannon_two_a, "jCannon02a") > 0 && FUNC("is_unit_dead_by_name", jcannon_two_b, "jCannon02b") > 0 )
				{
					if ( FUNC("is_unit_dead_by_name", jbombard_one_a, "jBombard01a") > 0 && FUNC("is_unit_dead_by_name", jbombard_one_b, "jBombard01b") > 0 )
					{
						if ( FUNC("is_unit_dead_by_name", jbombard_two_a, "jBombard02a") > 0 && FUNC("is_unit_dead_by_name", jbombard_two_b, "jBombard02b") > 0 )
						{
							FUNC("set_end_condition_finish", 23, "WIN")
						}
					}
				}
			}
		}

		if ( FUNC("is_unit_dead_by_name", jcannon_two_a, "jCannon02a") > 0 && FUNC("is_unit_dead_by_name", jcannon_two_b, "jCannon02b") > 0 )
		{
			if ( FUNC("is_unit_dead_by_name", jcannon_two, "jCannon02") == 0 )
			{
				FUNC("set_unit_nation", jcannon_two, "French")
			}
		}

		if ( FUNC("is_unit_dead_by_name", jbombard_one_a, "jBombard01a") > 0 && FUNC("is_unit_dead_by_name", jbombard_one_b, "jBombard01b") > 0 )
		{
			if ( FUNC("is_unit_dead_by_name", jbombard_one, "jBombard01") == 0 )
			{
				FUNC("set_unit_nation", jbombard_one, "French")
			}
		}

		if ( FUNC("is_unit_dead_by_name", jbombard_two_a, "jBombard02a") > 0 && FUNC("is_unit_dead_by_name", jbombard_two_b, "jBombard02b") > 0 )
		{
			if ( FUNC("is_unit_dead_by_name", jbombard_two, "jBombard02") == 0 )
			{
				FUNC("set_unit_nation", jbombard_two, "French")
			}
		}

	}

	if ( FUNC("get_scenario_event_bit_flag_3", 2) == 0 )
	{
		alencon_in_place_recno = FUNC("search_for_unit_in_place", meet_prison_a, "P")

		if ( alencon_in_place_recno > 0 && FUNC("is_unit_dead_by_name", team_one_six_five_leader, "Willa Neucomen") == 0 )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno) 
			
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

			FUNC("change_camera_in_cut_scene", 0, 22090, 16125, 233, 350, 67, 7)
			WAIT { DIALOG("add_dialog", team_five_eight_two_leader, "[0080N]Please free us from here! The leader of the English troop holds the key!") }

			FUNC("change_camera_in_cut_scene", 0, 20883, 14421, 267, 350, 19, 20)
			WAIT { DIALOG("add_dialog", team_one_six_five_leader, "[0081N]Wretch! You dare challenge me? After I am finished with you, you shall rot with the other French prisoners!") }

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

			WAIT{ FUNC("is_cut_scene_finished") }
				
			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", team_one_six_five_leader)

			FUNC("set_scenario_event_bit_flag_3", 2, 1)

			FUNC("set_end_condition_enabled", 28, 1)
		}

		alencon_in_place_recno = FUNC("search_for_unit_in_place", meet_prison_b, "P")

		if ( alencon_in_place_recno > 0 && FUNC("is_unit_dead_by_name", team_eight_nine_leader, "Esmond Wenton") == 0 )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno) 
			
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

			FUNC("change_camera_in_cut_scene", 0, 7300, 23950, 50, 350, 90, 11)
			WAIT { DIALOG("add_dialog", team_five_eight_one_leader, "[0080N]Please free us from here! The leader of the English troop holds the key!") }
			FUNC("change_camera_in_cut_scene", 0, 7220, 22532, 50, 350, -118, 23)
			WAIT { DIALOG("add_dialog", team_eight_nine_leader, "[0081N]Wretch! You dare challenge me? After I am finished with you, you shall rot with the other French prisoners!") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", team_eight_nine_leader)
			
			FUNC("set_scenario_event_bit_flag_3", 2, 1)

			FUNC("set_end_condition_enabled", 28, 1)
		}

		alencon_in_place_recno = FUNC("search_for_unit_in_place", meet_prison_c, "P")

		if ( alencon_in_place_recno > 0 && FUNC("is_unit_dead_by_name", team_ten_four_leader, "Denston Tixover") == 0 )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno) 
			
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process

			FUNC("change_camera_in_cut_scene", 0, 15691, 3085, 104, 350, -88, -3)
			WAIT { DIALOG("add_dialog", team_five_eight_three_leader, "[0080N]Please free us from here! The leader of the English troop holds the key!") }
			FUNC("change_camera_in_cut_scene", 0, 17728, 2923, 97, 350, 174, 13)
			WAIT { DIALOG("add_dialog", team_ten_four_leader, "[0081N]Wretch! You dare challenge me? After I am finished with you, you shall rot with the other French prisoners!") }

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

			WAIT{ FUNC("is_cut_scene_finished") }
				
			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", team_ten_four_leader)

			FUNC("set_scenario_event_bit_flag_3", 2, 1)

			FUNC("set_end_condition_enabled", 28, 1)
		}
	}

	if ( FUNC("get_end_condition_enabled", 28) > 0 && FUNC("get_end_condition_finish", 28) == 0 )
	{
		if ( team_ten_four_leader > 0 && FUNC("is_unit_dead_by_name", team_ten_four_leader, "Denston Tixover") == 1 )
		{
			FUNC("attention_call_message", "[0082N]You have slain Denston Tixover, leader of the units in Chateauneut! Among his remains is a key...")
			team_ten_four_leader = 0
		}

		if ( team_eight_nine_leader > 0 && FUNC("is_unit_dead_by_name", team_eight_nine_leader, "Esmond Wenton") == 1 )
		{
			FUNC("attention_call_message", "[0083N]You have slain Esmond Wenton, leader of the units in St-Aignar! Among his remains is a key...")
			team_eight_nine_leader = 0
		}

		if ( team_one_six_five_leader > 0 && FUNC("is_unit_dead_by_name", team_one_six_five_leader, "Willa Neucomen") == 1 )
		{
			FUNC("attention_call_message", "[0084N]You have slain Willa Neucomen, leader of the units in Checy! Among his remains is a key...")
			team_one_six_five_leader = 0
		}
	}

	if ( mother_recno == 0 && FUNC("get_scenario_bit_flag", 16) == 1 )
	{
		mother_recno = FUNC("search_unit_by_name", "Claire")
		ACTION("give_task", mother_recno, "IDLE", 1, 0, 0, 0, 0)
		FUNC("set_can_interact_flag", mother_recno, 1)	
	}

	if ( father_recno == 0 && FUNC("get_scenario_bit_flag", 16) == 1 )
	{
		father_recno = FUNC("search_unit_by_name", "Capellarius")
		ACTION("give_task", father_recno, "IDLE", 1, 0, 0, 0, 0)
		FUNC("set_can_interact_flag", father_recno, 1)	
	}

	if ( FUNC("is_unit_dead_by_name", crossbow_recno_a_one, "crossBow01a") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", crossbow_recno_a, "crossBow01") == 0 )
		{
			FUNC("set_unit_nation", crossbow_recno_a, "French")
		}
	}

	if ( FUNC("is_unit_dead_by_name", crossbow_recno_b_one, "crossBow02a") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", crossbow_recno_b, "crossBow02") == 0 )
		{
			FUNC("set_unit_nation", crossbow_recno_b, "French")
		}
	}

	if ( FUNC("is_unit_dead_by_name", crossbow_recno_c_one, "crossBow03a") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", crossbow_recno_c, "crossBow03") == 0 )
		{
			FUNC("set_unit_nation", crossbow_recno_c, "French")
		}
	}

	if ( FUNC("is_unit_dead_by_name", crossbow_recno_d_one, "crossBow04a") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", crossbow_recno_d, "crossBow04") == 0 )
		{
			FUNC("set_unit_nation", crossbow_recno_d, "French")
		}
	}

	if ( FUNC("is_unit_dead_by_name", bombard_recno_a_one, "bombard01a") > 0 && FUNC("is_unit_dead_by_name", bombard_recno_a_two, "bombard01b") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", bombard_recno_a, "bombard01") == 0 )
		{
			FUNC("set_unit_nation", bombard_recno_a, "French")
		}
	}

	if ( FUNC("is_unit_dead_by_name", bombard_recno_b_one, "bombard02a") > 0 && FUNC("is_unit_dead_by_name", bombard_recno_b_two, "bombard02b") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", bombard_recno_b, "bombard02") == 0 )
		{
			FUNC("set_unit_nation", bombard_recno_b, "French")
		}
	}

	if ( FUNC("is_unit_dead_by_name", bombard_recno_c_one, "bombard03a") > 0 && FUNC("is_unit_dead_by_name", bombard_recno_c_two, "bombard03b") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", bombard_recno_c, "bombard03") == 0 )
		{
			FUNC("set_unit_nation", bombard_recno_c, "French")
		}
	}

	if ( FUNC("is_unit_dead_by_name", ebombard_recno_six_one_a, "eBombard61a") > 0 && FUNC("is_unit_dead_by_name", ebombard_recno_six_one_b, "eBombard61b") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", ebombard_recno_six_one, "eBombard61") == 0 )
		{
			FUNC("set_unit_nation", ebombard_recno_six_one, "French")
		}
	}

	if ( FUNC("is_unit_dead_by_name", ebombard_recno_six_two_a, "eBombard62a") > 0 && FUNC("is_unit_dead_by_name", ebombard_recno_six_two_b, "eBombard62b") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", ebombard_recno_six_two, "eBombard62") == 0 )
		{
			FUNC("set_unit_nation", ebombard_recno_six_two, "French")
		}
	}

	if ( FUNC("is_unit_dead_by_name", cannon_recno_b_one, "English Cannon Controller 1") > 0 && FUNC("is_unit_dead_by_name", cannon_recno_b_two, "English Cannon Controller 2") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", cannon_recno_b, "English Cannon") == 0 )
		{
			FUNC("set_unit_nation", cannon_recno_b, "French")
		}
	}

	if ( cannon_recno_one > 0 && cannon_controller_recno_one > 0 )
	{
		ACTION("give_task", cannon_controller_recno_one, "LARGE_WEAPON_PUSH", 10, cannon_recno_one, 0, 0, 0)
	}
	if ( cannon_recno_two > 0 && cannon_controller_recno_two > 0 )
	{
		ACTION("give_task", cannon_controller_recno_two, "LARGE_WEAPON_PUSH", 10, cannon_recno_two, 0, 0, 0)
	}

	//alencon retreat
//	if(FUNC("get_unit_retreat", alencon_recno) == -1)
//	{
//		FUNC("start_cut_scene_2", 1, 0, alencon_recno, 200, ( 180 - FUNC("get_unit_dir", alencon_recno) ), 10, 1)
//		FUNC("set_unit_can_process_in_cut_scene", 0, 0)
//		FUNC("set_unit_can_process_in_cut_scene", alencon_recno, 1)

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

//		WAIT{ FUNC("is_cut_scene_status_black_screen") }
//		FUNC("change_camera_in_cut_scene", 0, alencon_recno, 200, ( 180 - FUNC("get_unit_dir", alencon_recno) ), 10)

//		WAIT{ DIALOG("add_dialog", alencon_recno, "[0002N]I'm wounded! I must seek refuge before my moribund state takes its toll!") }

//		FUNC("enable_unit_bounding_volume", alencon_recno, 0)

//		WAIT{ ACTION("give_order", alencon_recno, "APPROACH_PLACE", 1, 1, xpoint_recno, 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", alencon_recno)
//		WAIT{ FUNC("is_cut_scene_finished") }
//	}
	
		// weapon shop
		if( ( beaugency_weapon_seller_recno > 0 ) && ( talk_unit_recno == beaugency_weapon_seller_recno ) )	// talking with Weapon shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", beaugency_weapon_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				FUNC("set_idle", beaugency_weapon_seller_recno) 
				ACTION("give_task", beaugency_weapon_seller_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", beaugency_weapon_seller_recno, "[0085N]Bonjour mes amis! I carry finely crafted tools for all your warring needs.") }

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

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

				WAIT { DIALOG("add_dialog", beaugency_weapon_seller_recno, "[0086N]If you ever need more supplies, you know where I am!") }

				FUNC("set_cut_scene_flag", 0)

				FUNC("set_interact_unit_recno", main_recno, 0) 

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)
			}
		}

		// potion shop
		if( ( beaugency_potion_seller_recno > 0 ) && ( talk_unit_recno == beaugency_potion_seller_recno ) )	// talking with Potion shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", beaugency_potion_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", beaugency_potion_seller_recno) 
				ACTION("give_task", beaugency_potion_seller_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", beaugency_potion_seller_recno, "[0087N]Bonjour. Please, feel free to peruse. No obligation to buy!") }

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

				// change to buy weapon interface, wait until finish buying
				WAIT { FUNC("start_buy_interface", beaugency_potion_shop_recno, beaugency_potion_seller_recno) } 
		
				WAIT { DIALOG("add_dialog", beaugency_potion_seller_recno, "[0088N]Thank you for your patronage - do come again.") }

				FUNC("set_cut_scene_flag", 0)

				FUNC("set_interact_unit_recno", main_recno, 0) 

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)
			}
		}

		// weapon shop
		if( ( patay_weapon_seller_recno > 0 ) && ( talk_unit_recno == patay_weapon_seller_recno ) )	// talking with Weapon shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", patay_weapon_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", patay_weapon_seller_recno) 
				ACTION("give_task", patay_weapon_seller_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", patay_weapon_seller_recno, "[0089N]Bonjour mes amis! I carry finely crafted tools for your warring needs.") }

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

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

				WAIT { DIALOG("add_dialog", patay_weapon_seller_recno, "[0086N]If you ever need more supplies, you know where I am!") }

				FUNC("set_cut_scene_flag", 0)

				FUNC("set_interact_unit_recno", main_recno, 0) 

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)
			}
		}

		// potion shop
		if( ( tour_potion_seller_recno > 0 ) && ( talk_unit_recno == tour_potion_seller_recno ) )	// talking with Potion shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", tour_potion_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", tour_potion_seller_recno) 
				ACTION("give_task", tour_potion_seller_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", tour_potion_seller_recno, "[0090N]Good day. Please, feel free to peruse. No obligation to buy!") }

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

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

				WAIT { DIALOG("add_dialog", tour_potion_seller_recno, "[0088N]Thank you for your patronage - do come again.") }

				FUNC("set_interact_unit_recno", main_recno, 0) 

				FUNC("set_cut_scene_flag", 0)

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)
			}
		}

		// priest
		if(	priest_recno > 0 && FUNC( "get_can_interact_flag" , priest_recno ) > 0 && ( talk_unit_recno == priest_recno ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno) 
			
			FUNC("set_idle", priest_recno) 
			ACTION("give_task", priest_recno, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", priest_recno, 1)	// joan can process

			// 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, main_recno) , 0 , 0 , 0, 2500)

			WAIT { DIALOG("add_dialog", priest_recno, "[0091N]Bon Dieu! To have confirmed with my own eyes of your presence is proof that the noble French cause is alive and well! I knew this day would come! Please accept this package on behalf of all my constituents.") }
			WAIT { DIALOG("add_dialog", priest_recno, "[0092N]I bid you good tidings in your struggle for the liberation of France! Inside you shall find a small memento we have saved for the day you should grace us with your presence!") }
			WAIT { DIALOG("add_dialog", priest_recno, "[0093N]To the South lies Jargeau - right now it needs your heroics more than any other castle.") }

			FUNC("give_item_to_unit", "MALACHITE", 5, 1, main_recno)			

//			FUNC("attention_call_message_2", "Milady, we are about to reach the gates of Jargeau. Please head south towards Chateauneut!", "Dlllier")

			// leave cut scene
			DIALOG("del_all_dialog") 

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", priest_recno)
					
			FUNC("set_can_interact_flag", priest_recno, 0)		
			FUNC("stop_curr_task" , priest_recno )

			FUNC("attention_call_message", "[0094N]You have received a Malachite.")
		}

		// citizen
		if( ( st_citizen_recno > 0 ) && ( talk_unit_recno == st_citizen_recno ) && FUNC( "get_can_interact_flag" , st_citizen_recno ) > 0 )	
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno) 
			FUNC("set_idle", st_citizen_recno) 
			ACTION("give_task", st_citizen_recno, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", st_citizen_recno, 1)	// joan can process

			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", st_citizen_recno ) 
			ACTION("give_order" , st_citizen_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , st_citizen_recno, main_recno) , 0 , 0 , 0, 2500)
			ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, st_citizen_recno) , 0 , 0 , 0, 2500)
			WAIT { DIALOG("add_dialog", st_citizen_recno, "[0095N]Our deacon's prophecies have come true! Our savior has arrived! He insisted the day would come when our town would be free from the tyranny of English rule!") }
			WAIT { DIALOG("add_dialog", st_citizen_recno, "[0096N]Our deacon should be out and about now there are no more interfering English around. I'm sure he would like a word with you!") }

			// leave cut scene
			DIALOG("del_all_dialog") 

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", st_citizen_recno)
					
			FUNC("set_can_interact_flag", st_citizen_recno, 0)		
		}

		// citizen
		if( ( st_citizen_recno_two > 0 ) && ( talk_unit_recno == st_citizen_recno_two ) && FUNC( "get_can_interact_flag" , st_citizen_recno_two ) > 0 )	
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno) 
			
			FUNC("set_idle", st_citizen_recno_two) 
			ACTION("give_task", st_citizen_recno_two, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", st_citizen_recno_two, 1)	// joan can process

			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", st_citizen_recno_two ) 
			ACTION("give_order" , st_citizen_recno_two, "TURN" , 3 , 0 , FUNC("get_rotation" , st_citizen_recno_two, main_recno) , 0 , 0 , 0, 2500)
			ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, st_citizen_recno_two) , 0 , 0 , 0, 2500)
			WAIT { DIALOG("add_dialog", st_citizen_recno_two, "[0097N]Merci beaucoup - I thank you for saving our town! Have you seen our local deacon? He is most anxious to meet you, my savior!") }

			// leave cut scene
			DIALOG("del_all_dialog") 

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", st_citizen_recno_two)
					
			FUNC("set_can_interact_flag", st_citizen_recno_two, 0)		
		}

		// Loches
		if( ( team_one_zero_one_zero_leader > 0 ) && ( talk_unit_recno == team_one_zero_one_zero_leader ) )	// talking with Weapon shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", team_one_zero_one_zero_leader) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", team_one_zero_one_zero_leader) 
				ACTION("give_task", team_one_zero_one_zero_leader, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", team_one_zero_one_zero_leader, "[0098N]Hail, o most valiant savior of our small village! Since the English occupied the entire Loire region, we have had the misfortune to live under the shadow of our vile captors. Now we are once again free!") }
				WAIT { DIALOG("add_dialog", team_one_zero_one_zero_leader, "[0099N]No benefit has graced us during this period of chaos, but there is much for you to gain as we frequently overheard the English talking amongst themselves. I believe I have information that may assist your endeavor.") }
				WAIT { DIALOG("add_dialog", team_one_zero_one_zero_leader, "[0100N]From what I have overheard, Meung appears to be some sort of containment facility for the many riches that the enemy has stolen and looted from us. I have witnessed myself more than one cart carrying crates-full of gold leave our town.") }
				WAIT { DIALOG("add_dialog", team_one_zero_one_zero_leader, "[0101N]Beaugency, on the other hand, conceals many English, but despite their appearance, they are not ordinary soldiers. They were brought in from lands afar to conduct special tasks. Unfortunately I know nothing of their nature.") }
				WAIT { DIALOG("add_dialog", team_one_zero_one_zero_leader, "[0102N]Perhaps on your journey towards the castle you may be more successful in discovering their secrets - alas, I know not more. I bid you the best of luck, gentle warriors, and may the grace of our Lord forever shine upon you! Vive la France!") }

				// leave cut scene
				DIALOG("del_all_dialog") 

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", team_one_zero_one_zero_leader)
				FUNC("stop_curr_task", main_recno)

				FUNC("set_can_interact_flag", team_one_zero_one_zero_leader, 0)
			}
		}

		if( ( team_one_zero_one_one_leader > 0 ) && ( talk_unit_recno == team_one_zero_one_one_leader ) )	// talking with Weapon shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", team_one_zero_one_one_leader) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", team_one_zero_one_one_leader) 
				ACTION("give_task", team_one_zero_one_one_leader, "IDLE", 1, 0, 0, 0, 0)

				// set weapon seller to idle and rotate him
				ACTION("stop_all_order", team_one_zero_one_one_leader ) 
				ACTION("give_order" , team_one_zero_one_one_leader, "TURN" , 3 , 0 , FUNC("get_rotation" , team_one_zero_one_one_leader , main_recno) , 0 , 0 , 0, 2500)
				ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, team_one_zero_one_one_leader ) , 0 , 0 , 0, 2500)
				FUNC("change_camera_in_cut_scene", 0, 2615, 34626, 1044, 350, 5, 46)
				WAIT { DIALOG("add_dialog", team_one_zero_one_one_leader, "[0103N]Alors, I am happy to see that the French forces are alive and well! Please, before we part ways, allow me to inform you about a peculiar incident I saw a few moons ago.") }
				WAIT { DIALOG("add_dialog", team_one_zero_one_one_leader, "[0104N]Should you venture past the castles of Meung and Beaugency, there is a house with an English unit. What struck me as odd about this fellow was that he was chased out of Beaugency by his very own people!") }
				FUNC("change_camera_in_cut_scene", 0, 3455, 34697, 95, 350, 166, 11)
				WAIT { DIALOG("add_dialog", team_one_zero_one_one_leader, "[0105N]I thought you might be interested in this piece of news.") }

				// leave cut scene
				DIALOG("del_all_dialog") 

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", team_one_zero_one_one_leader)
				FUNC("stop_curr_task", main_recno)

				FUNC("set_can_interact_flag", team_one_zero_one_one_leader, 0)

				english_spy_recno = FUNC("add_unit", "ENGLISH_SPY", "FRENCH")
				FUNC("set_unit_name", english_spy_recno, "Elya Tinchor")
				FUNC("set_unit_pos", english_spy_recno, 1545.0, 68106.0, 50.0)
				FUNC("set_unit_dir", english_spy_recno, 180) 
				FUNC("set_unit_level", english_spy_recno, 17)

				FUNC("stop_curr_task", english_spy_recno)
				FUNC("set_idle", english_spy_recno)
				ACTION("give_task", english_spy_recno, "IDLE", 1, 0, 0, 0, 0)

				FUNC("set_can_interact_flag", english_spy_recno, 1)

				FUNC("minimap_set_way_point", 8, 1545.0, 68106.0, 200.0, 1, 0)
				FUNC("set_end_condition_enabled", 31, 1)
			}
		}

		if( ( english_spy_recno > 0 ) && ( talk_unit_recno == english_spy_recno ) )	// talking with Weapon shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", english_spy_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", english_spy_recno) 
				ACTION("give_task", english_spy_recno, "IDLE", 1, 0, 0, 0, 0)

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

				if ( FUNC("get_end_condition_finish", 31) == 0 )
				{
					FUNC("change_camera_in_cut_scene", 0, 1600, 67644, 50, 188, 104, 8)
					WAIT { DIALOG("add_dialog", english_spy_recno, "[0106N]French soldiers - do not attack! I am no longer at one with the English! I see that you are a French general - spare my life, and I shall make it worth your while!") }

					FUNC("change_camera_in_cut_scene", 0, 1516, 67762, 50, 187, 66, 5)
					WAIT { DIALOG("add_dialog", english_spy_recno, "[0107N]You see, unfortunately I was discovered stealing some valuables from within the city of Beaugency. My actions angered my commander, who ordered me to be put to death! If not for my hasty escape, I would not be here talking with you!") }

					FUNC("change_camera_in_cut_scene", 0, 1697, 67504, 231, 187, 107, 29)
					WAIT { DIALOG("add_dialog", english_spy_recno, "[0108N]In exchange for my life, I can perform a task that will prove very useful to you. I know Meung well, having served there prior to being reassigned to Beaugency where I, shall we say, 'fell from grace'.") }

					FUNC("change_camera_in_cut_scene", 0, 1246, 68404, 91, 187, -56, 23)
					WAIT { DIALOG("add_dialog", english_spy_recno, "[0109N]As such, I can help you gain entrance to the city, but the risks are high, and therefore I must ask for a compensatory sum of 3,000 in gold before I risk my life by revisiting, shall we say, the lion's den.") }

					if ( FUNC("get_unit_gold") >= 3000 )
					{
						WAIT { DIALOG("add_dialog", english_spy_recno, "[0110N]Fine - I shall leave immediately and inform you once my deed is done! Wearing my English uniform I shan't have much trouble entering the town, and as I've just trimmed my facial hair - I doubt that anyone will recognize me!") }
						FUNC("add_gold", -3000)

						FUNC("set_scenario_event_bit_flag_3", 13, 1)
					}
					else
					{
						WAIT { DIALOG("add_dialog", english_spy_recno, "[0111N]That is most unfortunate, but worry not, I shall still be here should you manage to gather enough gold and wish to enlist my services on another occasion.") }
					}
				}
				else
				{
					if ( FUNC("get_unit_gold") >= 3000 )
					{
						FUNC("change_camera_in_cut_scene", 0, 1246, 68404, 91, 187, -56, 23)
						WAIT { DIALOG("add_dialog", english_spy_recno, "[0112N]Ah, I see you have returned - I presume you have the gold with you!") }
						WAIT { DIALOG("add_dialog", english_spy_recno, "[0113N]Fine - I shall go immediately and inform you once my deed is done! I shan't have much trouble entering, as my uniform assures that I am English, and I just trimmed my facial hair - I doubt that anyone will recognize me!") }
						FUNC("add_gold", -3000)

						FUNC("set_scenario_event_bit_flag_3", 13, 1)
					}
					else
					{
						WAIT { DIALOG("add_dialog", english_spy_recno, "[0114N]That is most unfortunate. Worry not, I shall be here should you manage to gather enough gold and decide to enlist my services on another occasion.") }
					}
				}

				// leave cut scene
				DIALOG("del_all_dialog") 

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)

				if ( FUNC("get_scenario_event_bit_flag_3", 13) == 1 )
				{
					FUNC("stop_curr_task", english_spy_recno)
					ACTION("give_task", english_spy_recno, "APPROACH_PLACE", 1, spy_target_recno, 0,0,0)
					FUNC("set_can_interact_flag", english_spy_recno, 0)
				}

				FUNC("minimap_set_way_point", 8, 0.0, 0.0, 0.0, 0, 0)
				FUNC("set_end_condition_finish", 31, "WIN")
			}
		}

		if ( FUNC("get_scenario_event_bit_flag_3", 13) > 0 && FUNC("get_scenario_event_bit_flag_3", 14) == 0 )
		{
			alencon_in_place_recno = FUNC("is_unit_inside_place", spy_target_recno, english_spy_recno)

			if ( alencon_in_place_recno > 0 )
			{
				// the spy has arrived the place
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process

				INT captain_one
				captain_one = FUNC("search_unit_by_name", "Roger Baret")

				if ( FUNC("is_item_deleted_by_name", meung_south_gate_recno, "MeungSouthGate") == 0 )
				{
					FUNC("change_camera_in_cut_scene", 0, 3925, 50077, 305, 350, -21, -5)
					WAIT { DIALOG("add_dialog", captain_one, "[0115N]Oy, you there! Raise the gate and allow this fellow soldier entrance!") }

					if ( FUNC("search_for_unit_in_place", attack_meung_recno, "E") == 0 )
					{
						WAIT { DIALOG("add_dialog", captain_one, "[0116N]Alright mate! Hold your horses!") }

						FUNC("add_gate_trigger", meung_south_gate_recno, 0)

						// leave cut scene
						DIALOG("del_all_dialog") 

						// change to buy weapon interface, wait until finish buying
						FUNC("set_cut_scene_flag" , 0)	// leave cut scene!

						FUNC("stop_curr_task", english_spy_recno)
						ACTION("give_task", english_spy_recno, "APPROACH_PLACE", 1, meet_bedford_recno, 0,0,5000)

						WAIT{ FUNC("is_cut_scene_finished") }

						FUNC("attention_call_message_2", "[0117N]Alright now! I have opened the southern gate and damaged the gate mechanism - it will take the English many days to repair the mechanism.", english_spy_recno)
						FUNC("attention_call_message_2", "[0118N]Take the advantage and head to the southern gate of Meung now, before the English are aware of this 'incident'!", english_spy_recno)
					}
					else
					{
						WAIT { DIALOG("add_dialog", captain_one, "[0119N]Oy, mate! Are you blind? Do you not see that the enemy is attacking us as we speak! You should be aiding us and eliminating the enemy, not seeking entrance!") }

						// leave cut scene
						DIALOG("del_all_dialog") 

						// change to buy weapon interface, wait until finish buying
						FUNC("set_cut_scene_flag" , 0)	// leave cut scene!

						FUNC("stop_curr_task", english_spy_recno)
						ACTION("give_task", english_spy_recno, "APPROACH_PLACE", 1, meet_bedford_recno, 0,0,5000)

						WAIT{ FUNC("is_cut_scene_finished") }

						FUNC("attention_call_message_2", "[0120N]Well, gents, the English have bolted shut the entrance to Meung and will not allow me entrance. I cannot be of any help, I'm afraid, but thanks for the gold, and farewell!", english_spy_recno)
					}
				}
				else
				{
					WAIT { DIALOG("add_dialog", english_spy_recno, "[0121N]Well, looks like you have already gained entrance to Meung. You shant be needing my services anymore, but thanks for the gold, and farewell!") }

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

					// leave cut scene
					DIALOG("del_all_dialog") 

					FUNC("stop_curr_task", english_spy_recno)
					ACTION("give_task", english_spy_recno, "APPROACH_PLACE", 1, town_loches_recno, 0,0,5000)

					// change to buy weapon interface, wait until finish buying
					FUNC("set_cut_scene_flag" , 0)	// leave cut scene!

					WAIT{ FUNC("is_cut_scene_finished") }
				}

				FUNC("set_scenario_event_bit_flag_3", 14, 1)

				FUNC("del_unit", english_spy_recno)
				english_spy_recno = 0
			}
		}

		// weapon shop
		if( ( orlean_weapon_seller_recno > 0 ) && ( talk_unit_recno == orlean_weapon_seller_recno ) )	// talking with Weapon shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", orlean_weapon_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", orlean_weapon_shop_recno) 
				ACTION("give_task", orlean_weapon_shop_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", orlean_weapon_seller_recno, "[0122N]Hello there! Finely crafted tools for your warring needs I carry!") }

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

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

				WAIT { DIALOG("add_dialog", orlean_weapon_seller_recno, "[0086N]If you ever need more supplies, you know where I am!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)
			}
		}

		// potion shop
		if( ( orlean_potion_seller_recno > 0 ) && ( talk_unit_recno == orlean_potion_seller_recno ) )	// talking with Potion shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", orlean_potion_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", orlean_potion_shop_recno) 
				ACTION("give_task", orlean_potion_shop_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", orlean_potion_seller_recno, "[0090N]Good day. Please, feel free to peruse. No obligation to buy!") }

				// leave cut scene
				DIALOG("del_all_dialog") 

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

				WAIT { DIALOG("add_dialog", orlean_potion_seller_recno, "[0088N]Thank you for your patronage - do come again.") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)
			}
		}

		if(	team_nine_one_three_leader > 0 && FUNC( "get_can_interact_flag" , team_nine_one_three_leader) && ( talk_unit_recno == team_nine_one_three_leader ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno) 
			
			FUNC("set_idle", team_nine_one_three_leader) 
			ACTION("give_task", team_nine_one_three_leader, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", team_nine_one_three_leader, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", team_nine_one_three_leader, "[0123N]Thank you for assisting us - we have been unable to travel to the shoppe in Orléans to replenish our food source.") }
			WAIT { DIALOG("add_dialog", team_nine_one_three_leader, "[0124N]Would you be kind enough to escort us to Orléans so our children will not go hungry? We thank you in advance!") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_unit_can_process_in_cut_scene", 0, 1)	

			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", team_nine_one_three_leader)
					
			FUNC("set_can_interact_flag", team_nine_one_three_leader, 0)		
			FUNC("stop_curr_task" , team_nine_one_three_leader )

			FUNC("attention_call_message", "[0125N]You have been assigned to escort the inhabitants to Orléans - you must protect them!")
			
			FUNC("set_end_condition_enabled", 11, 1)

			capture_settle_montargis_unit_recno = main_recno
		}


		if(	bourges_citizen_recno > 0 && FUNC( "get_can_interact_flag" , bourges_citizen_recno) && ( talk_unit_recno == bourges_citizen_recno ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno) 
			
			FUNC("set_idle", bourges_citizen_recno) 
			ACTION("give_task", bourges_citizen_recno, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", bourges_citizen_recno, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", bourges_citizen_recno, "[0126N]Words cannot express my gratitude - you came just in time to vanquish our tyrannical captors! My unwavering faith in cross and church has finally been rewarded.") }
			WAIT { DIALOG("add_dialog", bourges_citizen_recno, "[0127N]Now, may this cross that I have carried for my blessings grace your path and bless you and your noble men wherever you may be!") }

			FUNC("give_item_to_unit", "CROSS_C", 0, 1, main_recno)

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", bourges_citizen_recno)
					
			FUNC("set_can_interact_flag", bourges_citizen_recno, 0)		

			FUNC("attention_call_message", "[0128N]You have received the ruby cross which can be socketed to the St Catherine de Fierbois sword, augmenting its power!")
		}

		if(	blois_citizen_recno > 0 && FUNC( "get_can_interact_flag" , blois_citizen_recno) && ( talk_unit_recno == blois_citizen_recno ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", blois_citizen_recno)
			ACTION("give_task", blois_citizen_recno, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", blois_citizen_recno, 1)	// joan can process

			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", blois_citizen_recno ) 
			ACTION("give_order" , blois_citizen_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , blois_citizen_recno, main_recno) , 0 , 0 , 0, 2500)
			ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, blois_citizen_recno) , 0 , 0 , 0, 2500)
			WAIT { DIALOG("add_dialog", blois_citizen_recno, "[0129N]Fastolf has a small camp at the end of the town of Janville. Be careful, for there are many troops within.") }

			FUNC("give_item_to_unit", "Warrior", 5, 1, main_recno)

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", blois_citizen_recno)
			
			FUNC("attention_call_message", "[0130N]Olivier Gruier has given you the Warrior of Infinity enhancer!")

			FUNC("set_can_interact_flag", blois_citizen_recno, 0)		
		}

		if(	blois_citizen_recno_two > 0 && FUNC( "get_can_interact_flag" , blois_citizen_recno_two) && ( talk_unit_recno == blois_citizen_recno_two ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", blois_citizen_recno_two)
			ACTION("give_task", blois_citizen_recno_two, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", blois_citizen_recno_two, 1)	// joan can process

			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", blois_citizen_recno_two ) 
			ACTION("give_order" , blois_citizen_recno_two, "TURN" , 3 , 0 , FUNC("get_rotation" , blois_citizen_recno_two, main_recno) , 0 , 0 , 0, 2500)
			ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, blois_citizen_recno_two) , 0 , 0 , 0, 2500)
			WAIT { DIALOG("add_dialog", blois_citizen_recno_two, "[0131N]If you are heading to Janville beware of enemies nearby! There are many paths that can give you a clear view of the area, so perhaps you should explore a bit - that way you will know the terrain and not be caught flat-footed!") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_can_interact_flag", blois_citizen_recno_two, 0)

			FUNC("stop_curr_task", main_recno)
			FUNC("stop_curr_task", blois_citizen_recno_two)
		}

		if(	chateaudun_citizen_recno_a > 0 && FUNC( "get_can_interact_flag" , chateaudun_citizen_recno_a) && ( talk_unit_recno == chateaudun_citizen_recno_a ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", chateaudun_citizen_recno_a)
			ACTION("give_task", chateaudun_citizen_recno_a, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", chateaudun_citizen_recno_a, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_a, "[0132N]This quartz crystal may aid you in your quest for the liberation of France. Now I must excuse myself - there is much to do to restore our town to order!") }

			FUNC("give_item_to_unit", "Quartz", 2, 1, main_recno)

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)

			FUNC("attention_call_message", "[0133N]You have received a Quartz Crystal.")
					
			FUNC("set_can_interact_flag", chateaudun_citizen_recno_a, 0)
			FUNC("stop_curr_task" , chateaudun_citizen_recno_a )
		}

		if(	chateaudun_citizen_recno_b > 0 && FUNC( "get_can_interact_flag" , chateaudun_citizen_recno_b) && ( talk_unit_recno == chateaudun_citizen_recno_b ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", chateaudun_citizen_recno_b)
			ACTION("give_task", chateaudun_citizen_recno_b, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", chateaudun_citizen_recno_b, 1)	// joan can process

			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", chateaudun_citizen_recno_b ) 
			ACTION("stop_curr_task", chateaudun_citizen_recno_b ) 
			ACTION("give_order" , chateaudun_citizen_recno_b, "TURN" , 3 , 0 , FUNC("get_rotation" , chateaudun_citizen_recno_b, main_recno) , 0 , 0 , 0, 2500)
			ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, chateaudun_citizen_recno_b) , 0 , 0 , 0, 2500)
			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_b, "[0134N]Merci beaucoup. You have restored peace to our village.") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_can_interact_flag", chateaudun_citizen_recno_b, 0)

			FUNC("stop_curr_task", main_recno)
					
			FUNC("stop_curr_task" , chateaudun_citizen_recno_b )
		}

		if(	chateaudun_citizen_recno_c > 0 && FUNC( "get_can_interact_flag", chateaudun_citizen_recno_c) && ( talk_unit_recno == chateaudun_citizen_recno_c ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			

			FUNC("set_idle", chateaudun_citizen_recno_c)
			ACTION("give_task", chateaudun_citizen_recno_c, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", chateaudun_citizen_recno_c, 1)	// joan can process

			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", chateaudun_citizen_recno_c ) 
			ACTION("stop_curr_task", chateaudun_citizen_recno_c ) 
			ACTION("give_order" , chateaudun_citizen_recno_c, "TURN" , 3 , 0 , FUNC("get_rotation" , chateaudun_citizen_recno_c, main_recno) , 0 , 0 , 0, 2500)
			ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, chateaudun_citizen_recno_c) , 0 , 0 , 0, 2500)
			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_c, "[0135N]I can play with Jacques and Pierre again, now that all the bad people have gone!") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_can_interact_flag", chateaudun_citizen_recno_c, 0)

			FUNC("stop_curr_task", main_recno)			
			FUNC("stop_curr_task" , chateaudun_citizen_recno_c )
		}

		if(	chateaudun_citizen_recno_d > 0 && FUNC( "get_can_interact_flag", chateaudun_citizen_recno_d) && ( talk_unit_recno == chateaudun_citizen_recno_d ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", chateaudun_citizen_recno_d)
			ACTION("give_task", chateaudun_citizen_recno_d, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", chateaudun_citizen_recno_d, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_d, "[0136N]Merci mes amis. My little one can finally live without fear. How can I ever repay you for such a wonderful prize?") }

			FUNC("give_item_to_unit", "fd_chicken", 1, 1, main_recno)
			FUNC("give_item_to_unit", "fd_meat", 1, 1, main_recno)
			FUNC("give_item_to_unit", "fd_fish", 1, 1, main_recno)

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)
					
			FUNC("stop_curr_task" , chateaudun_citizen_recno_d )
			FUNC("set_can_interact_flag", chateaudun_citizen_recno_d, 0)

			FUNC("attention_call_message", "[0137N]You have been given a chicken, a leg of ham and a salted fish!")
		}

		if(	chateaudun_citizen_recno_e > 0 && FUNC( "get_can_interact_flag", chateaudun_citizen_recno_e) && ( talk_unit_recno == chateaudun_citizen_recno_e ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", chateaudun_citizen_recno_e)
			ACTION("give_task", chateaudun_citizen_recno_e, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", chateaudun_citizen_recno_e, 1)	// joan can process

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

			FUNC("change_camera_in_cut_scene", 0, chateaudun_citizen_recno_e, 300, ( 80 - FUNC("get_unit_dir", chateaudun_citizen_recno_e) ), 10)
			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_e, "[0138N]The men of this village once depended on this lake and the surrounding forests to provide their families with food, until the bloody English confiscated half of our hunt and most of our catch to feed their own fat bellies!") }

			FUNC("change_camera_in_cut_scene", 0, chateaudun_citizen_recno_e, 300, ( 240 - FUNC("get_unit_dir", chateaudun_citizen_recno_e) ), 10)
			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_e, "[0139N]Today's catch and hunt belongs to you. It is a pittance compared to the English's voracious demands!") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)
					
			FUNC("stop_curr_task" , chateaudun_citizen_recno_e )

			FUNC("set_can_interact_flag", chateaudun_citizen_recno_e, 0)
		}

		if(	chateaudun_citizen_recno_f > 0 && FUNC("get_can_interact_flag", chateaudun_citizen_recno_f) && ( talk_unit_recno == chateaudun_citizen_recno_f ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", chateaudun_citizen_recno_f)
			ACTION("give_task", chateaudun_citizen_recno_f, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", chateaudun_citizen_recno_f, 1)	// joan can process

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

			FUNC("change_camera_in_cut_scene", 0, chateaudun_citizen_recno_f, 300, ( 80 - FUNC("get_unit_dir", chateaudun_citizen_recno_f) ), 10)
			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_f, "[0140N]The Loire valley has not enjoyed such peace and tranquility since I was a child! I still remember when I was a boy how we would play in this lake.") }

			FUNC("change_camera_in_cut_scene", 0, chateaudun_citizen_recno_f, 300, ( 240 - FUNC("get_unit_dir", chateaudun_citizen_recno_f) ), 10)
			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_f, "[0141N]I also remember when the river was tainted red by the incessant fighting, and we no longer swam in its waters.") }

			FUNC("change_camera_in_cut_scene", 0, 1093, 21524, 1467, 187, 47, 29)
			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_f, "[0142N]I may be too old now, but my grandchildren are able to splash safely in its waters once more.") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)
					
			FUNC("stop_curr_task" , chateaudun_citizen_recno_f )

			FUNC("set_can_interact_flag", chateaudun_citizen_recno_f, 0)
		}

		if(	chateauneut_citizen_a > 0 && FUNC( "get_can_interact_flag" , chateauneut_citizen_a) && ( talk_unit_recno == chateauneut_citizen_a ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", chateauneut_citizen_a)
			ACTION("give_task", chateauneut_citizen_a, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", chateauneut_citizen_a, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", chateauneut_citizen_a, "[0143N]We have not witnessed the presence of friendly troops here in Marcellin ever since the evil English forces occupied our town. You must be tired after such a long journey.") }
			WAIT { DIALOG("add_dialog", chateauneut_citizen_a, "[0144N]You will find scattered throughout our town many a crate and barrel. The English have been using this town as a storage point for their weapons supplies as well as foodstuffs and other provisions, probably to supplement supplies in Jargeau.") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)

			FUNC("stop_curr_task" , chateauneut_citizen_a )

			FUNC("set_can_interact_flag", chateauneut_citizen_a, 0)
		}

		if(	chateauneut_citizen_b > 0 && FUNC( "get_can_interact_flag" , chateauneut_citizen_b) && ( talk_unit_recno == chateauneut_citizen_b ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", chateauneut_citizen_b)
			ACTION("give_task", chateauneut_citizen_b, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", chateauneut_citizen_b, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", chateauneut_citizen_b, "[0145N]This town has been cast a dark shadow with the walls of Jargeau looming ahead. Its fortified towers are laden with archers, who will quickly stop your advance if your goal is to enter. Beware the towers! You have been forewarned!") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)

			FUNC("stop_curr_task" , chateauneut_citizen_b )

			FUNC("set_can_interact_flag", chateauneut_citizen_b, 0)
		}

		if(	chateauneut_citizen_c > 0 && FUNC( "get_can_interact_flag" , chateauneut_citizen_c) && ( talk_unit_recno == chateauneut_citizen_c ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", chateauneut_citizen_c)
			ACTION("give_task", chateauneut_citizen_c, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", chateauneut_citizen_c, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", chateauneut_citizen_c, "[0146N]You all have come a long way, and could use rest. I know our town is big, but thanks to the enemies, we have nary a visitor, and not even a store for you to replenish your hard-spent energy!") }
			WAIT { DIALOG("add_dialog", chateauneut_citizen_c, "[0147N]However, I have seen the English deliver goods here from within the castle, so I suspect there must be a shoppe somewhere within Jargeau. I wish you all the best of fortune, fellow Frenchmen!") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)

			FUNC("stop_curr_task" , chateauneut_citizen_c )
			
			FUNC("set_can_interact_flag", chateauneut_citizen_c, 0)
		}

		if(	one_man_citizen_recno > 0 && FUNC("get_can_interact_flag", one_man_citizen_recno) && ( talk_unit_recno == one_man_citizen_recno ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", one_man_citizen_recno)
			ACTION("give_task", one_man_citizen_recno, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", one_man_citizen_recno, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", one_man_citizen_recno, "[0148N]I thought the day would never arrive! It is good to see that our troops are expelling the enemy forces!") }

			if ( FUNC("get_scenario_bit_flag", 1) == 0 )
			{
				WAIT { DIALOG("add_dialog", one_man_citizen_recno, "[0149N]I have some good news for you, o brethren! Word has arrived that general Arthur de Richemont will be arriving soon. When I do not know, but I can tell you that he is expecting some action when he arrives!") }
				WAIT { DIALOG("add_dialog", one_man_citizen_recno, "[0150N]He has instructed me to hand this package to you when we meet.") }
			}

			WAIT { DIALOG("add_dialog", one_man_citizen_recno, "[0151N]Until then, there are some provisions laying nearby in the town. Please feel free to make use of them as you see fit! Good luck to you all when you approach Beaugency!") }

			if ( FUNC("get_scenario_bit_flag", 1) == 0 )
			{
				FUNC("give_item_to_unit", "Blood", 9, 1, main_recno)
				FUNC("attention_call_message", "[0152N]You have received a hematite bloodstone!")
			}

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)

			FUNC("set_can_interact_flag", one_man_citizen_recno, 0)
			FUNC("stop_curr_task", one_man_citizen_recno )
		}

		if(	montargis_citizen_recno_a > 0 && FUNC("get_can_interact_flag", montargis_citizen_recno_a) && ( talk_unit_recno == montargis_citizen_recno_a ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", montargis_citizen_recno_a)
			ACTION("give_task", montargis_citizen_recno_a, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", montargis_citizen_recno_a, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", montargis_citizen_recno_a, "[0153N]If it is Meung you seek, it is further down the path. Be wary, for there are enemies hidden amongst the trees, ready to strike at anyone that nears them.") }

			WAIT { DIALOG("add_dialog", montargis_citizen_recno_a, "[0154N]News has been spreading across Loire that the English are looting and storing caches of gold within the walls of Meung, and caravans are making deliveries all day round. Perhaps that is why the path is heavily guarded.") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)

			FUNC("set_can_interact_flag", montargis_citizen_recno_a, 0)

//			FUNC("stop_curr_task", montargis_citizen_recno_a )
		}

		if(	montargis_citizen_recno_b > 0 && FUNC("get_can_interact_flag", montargis_citizen_recno_b) && ( talk_unit_recno == montargis_citizen_recno_b ) )
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			
			// set main character to idle
			FUNC("set_idle", main_recno)
			
			FUNC("set_idle", montargis_citizen_recno_b)
			ACTION("give_task", montargis_citizen_recno_b, "IDLE", 1, 0, 0, 0, 0)

			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
			FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", montargis_citizen_recno_b, 1)	// joan can process

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

			WAIT { DIALOG("add_dialog", montargis_citizen_recno_b, "[0155N]We French are grateful for your deeds. Please - accept these rations that my dear husband has caught today.") }

			FUNC("give_item_to_unit", "FD_FISH", 1, 3, main_recno)

			FUNC("attention_call_message", "[0156N]You have been given three pieces of salted fish.")

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("stop_curr_task", main_recno)

			FUNC("set_can_interact_flag", montargis_citizen_recno_b, 0)
		}

		// weapon shop
		if( ( meung_weapon_seller_recno > 0 ) && ( talk_unit_recno == meung_weapon_seller_recno ) )	// talking with Weapon shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", meung_weapon_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", meung_weapon_seller_recno) 
				ACTION("give_task", meung_weapon_seller_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", meung_weapon_seller_recno, "[0122N]Hello there! Finely crafted tools for your warring needs I carry!") }

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

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

				WAIT { DIALOG("add_dialog", meung_weapon_seller_recno, "[0086N]If you ever need more supplies, you know where I am!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)

				FUNC("set_interact_unit_recno", main_recno, 0) 
			}
		}

		// potion shop
		if( ( meung_potion_seller_recno > 0 ) && ( talk_unit_recno == meung_potion_seller_recno ) )	// talking with Potion shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", meung_potion_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	
				FUNC("set_unit_can_process_in_cut_scene", talk_unit_recno, 1)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", meung_potion_seller_recno) 
				ACTION("give_task", meung_potion_seller_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", meung_potion_seller_recno, "[0090N]Good day. Please, feel free to peruse. No obligation to buy!") }

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

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

				WAIT { DIALOG("add_dialog", meung_potion_seller_recno, "[0088N]Thank you for your patronage - do come again.") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)

				FUNC("set_interact_unit_recno", main_recno, 0) 
			}
		}


		// weapon shop
		if( ( jargeau_weapon_seller_recno > 0 ) && ( talk_unit_recno == jargeau_weapon_seller_recno ) )	// talking with Weapon shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", jargeau_weapon_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", jargeau_weapon_seller_recno) 
				ACTION("give_task", jargeau_weapon_seller_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", jargeau_weapon_seller_recno, "[0122N]Hello there! Finely crafted tools for your warring needs I carry!") }

				// leave cut scene
				DIALOG("del_all_dialog") 

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

				WAIT { DIALOG("add_dialog", jargeau_weapon_seller_recno, "[0086N]If you ever need more supplies, you know where I am!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)

				FUNC("set_interact_unit_recno", main_recno, 0) 
			}
		}

		// potion shop
		if( ( jargeau_potion_seller_recno > 0 ) && ( talk_unit_recno == jargeau_potion_seller_recno ) )	// talking with Potion shop keeper~~~~~ 
		{
			if( FUNC("get_interact_stage", jargeau_potion_seller_recno) == 0)
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", jargeau_potion_shop_recno) 
				ACTION("give_task", jargeau_potion_shop_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT { DIALOG("add_dialog", jargeau_potion_seller_recno, "[0090N]Good day. Please, feel free to peruse. No obligation to buy!") }

				// leave cut scene
				DIALOG("del_all_dialog") 

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

				WAIT { DIALOG("add_dialog", jargeau_potion_seller_recno, "[0088N]Thank you for your patronage - do come again.") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("stop_curr_task", main_recno)

				FUNC("set_interact_unit_recno", main_recno, 0) 
			}
		}

	// --- Side quest --- //
	if ( FUNC("get_place_captured", town_rouvray_recno) == 1 )
	{
		if ( child_recno == 0 )
		{
			child_recno = FUNC("search_unit_by_name", "Lucien Escuier")
		}
	}

	if ( child_recno > 0 )
	{
		if ( FUNC("get_scenario_bit_flag", 17) == 0 )
		{
			ACTION("give_order" , child_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , child_recno, main_recno) , 0 , 0 , 0, 2500)

			if ( talk_unit_recno == child_recno )
			{
				// start cut scene
				FUNC("set_can_interact_flag", child_recno, 0)

				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)
				FUNC("set_unit_can_process_in_cut_scene", child_recno, 1)

				// set main character to idle
				FUNC("stop_curr_task", main_recno)
				FUNC("set_idle", main_recno)
				FUNC("set_idle", child_recno)
				ACTION("give_task", child_recno, "IDLE", 1, 0, 0, 0, 0)

				FUNC("change_camera_in_cut_scene", 0, main_recno, 300, ( 80 - FUNC("get_unit_dir", main_recno) ), 10)

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

				WAIT { DIALOG("add_dialog", child_recno, "[0157N]I was playing in the forest with my friends, when these big men came and tried to take us!") }

//				FUNC("change_camera_in_cut_scene", 0, child_recno, 100, ( 180 - FUNC("get_unit_dir", child_recno) ), 10)
				WAIT { DIALOG("add_dialog", child_recno, "[0158N]I ran away, but now I cannot find my friends and am lost! Please take me home to my mother - I'm scared!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				DIALOG("del_all_dialog") 

				FUNC("attention_call_message", "[0159N]You must lead the child back to his parents in Rouvray.")

				FUNC("minimap_set_way_point", 6, 16390.0, 24840.0, 200.0, 1, 0)		

				FUNC("free_team_prisoner", 210)
				
				FUNC("stop_curr_task", main_recno)
				FUNC("stop_curr_task", child_recno)

				FUNC("set_scenario_bit_flag", 17, 1)

				side_quest_c_unit_recno = main_recno
	
				FUNC("stop_curr_task", child_recno)
				ACTION("give_task", child_recno, "FOLLOW_UNIT", 1, side_quest_c_unit_recno, 0, 0, 0)

				FUNC("facility_barrack_add_leader", spawn_for_child_a, elinfcap_id, 666, 19, "Nicholas Weston", "Weston")
				FUNC("facility_barrack_add_member", spawn_for_child_b, elinfant_id, 666, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_c, ehinfant_id, 666, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_d, ehinfant_id, 666, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_e, ecrossbow_id, 666, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_f, ecrossbow_id, 666, 1, 19)

				FUNC("facility_barrack_add_leader", spawn_for_child_g, emacecap_id, 667, 19, "Triston Walsoken", "Walsoken")
				FUNC("facility_barrack_add_member", spawn_for_child_h, emaceman_id, 667, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_i, emaceman_id, 667, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_j, ecrossbow_id, 667, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_k, ecrossbow_id, 667, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_l, ecrossbow_id, 667, 1, 19)

				FUNC("facility_barrack_add_leader", spawn_for_child_m, ehinfcap_id, 668, 19, "Jacobus Sprode", "Sprode")
				FUNC("facility_barrack_add_member", spawn_for_child_n, ehinfant_id, 668, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_o, ehinfant_id, 668, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_p, ehinfant_id, 668, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_q, earcher_id, 668, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_r, earcher_id, 668, 1, 19)

				FUNC("facility_barrack_add_member", spawn_for_child_aa, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_ab, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_ac, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_ad, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_ae, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_af, bur_linf_id, 1000, 1, 19)

				FUNC("facility_barrack_add_member", spawn_for_child_da, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_db, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_dc, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_dd, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_de, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_df, ehinfant_id, 1000, 1, 19)

				FUNC("facility_barrack_add_member", spawn_for_child_ea, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_eb, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_ec, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_ed, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_ee, bur_linf_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_ef, bur_linf_id, 1000, 1, 19)

				FUNC("facility_barrack_add_member", spawn_for_child_fa, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_fb, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_fc, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_fd, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_fe, ehinfant_id, 1000, 1, 19)
				FUNC("facility_barrack_add_member", spawn_for_child_ff, ehinfant_id, 1000, 1, 19)

				FUNC("set_can_interact_flag", child_recno, 0)
			}
		}
	}

	if ( FUNC("get_scenario_bit_flag", 17) > 0 )
	{
		if ( team_six_six_six_leader == 0 )
		{
			team_six_six_six_leader = FUNC("get_unit_team_leader_by_team_id", 666)
			FUNC("stop_curr_task", team_six_six_six_leader)
			ACTION("give_task", team_six_six_six_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}
		else
		{
			if ( FUNC("get_scenario_bit_flag", 24) == 0 && FUNC("get_unit_dist", main_recno, team_six_six_six_leader) < 500 )
			{
				INT messager_two_recno
				messager_two_recno = FUNC("search_unit_by_name", "Nicholas Weston")
				FUNC("attention_call_message_2", "[0160N]Look up ahead - there's the enemy! To the attack!", messager_two_recno)
				FUNC("set_scenario_bit_flag", 24, 1)
			}
		}

		if ( team_six_six_seven_leader == 0 )
		{
			team_six_six_seven_leader = FUNC("get_unit_team_leader_by_team_id", 667)
			FUNC("stop_curr_task", team_six_six_seven_leader)
			ACTION("give_task", team_six_six_seven_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}
		else
		{
			if ( FUNC("get_scenario_bit_flag", 25) == 0 && FUNC("get_unit_dist", main_recno, team_six_six_seven_leader) < 500 )
			{
				INT messager_three_recno
				messager_three_recno = FUNC("search_unit_by_name", "Triston Walsoken")

				FUNC("attention_call_message_2", "[0161N]I see a fiend in the midst! Come on, lads, let's destroy these transgressors of English sovereignty!", messager_three_recno)
				FUNC("set_scenario_bit_flag", 25, 1)
			}
		}

		if ( team_six_six_eight_leader == 0 )
		{
			team_six_six_eight_leader = FUNC("get_unit_team_leader_by_team_id", 668)
			FUNC("stop_curr_task", team_six_six_eight_leader)
			ACTION("give_task", team_six_six_eight_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}
		else
		{
			if ( FUNC("get_scenario_bit_flag", 26) == 0 && FUNC("get_unit_dist", main_recno, team_six_six_eight_leader) < 500 )
			{
				INT messager_four_recno
				messager_four_recno = FUNC("search_unit_by_name", "Jacobus Sprode")

				FUNC("attention_call_message_2", "[0162N]What is that I see? It's the French! Attack, men! Leave no one standing!", messager_four_recno)
				FUNC("set_scenario_bit_flag", 26, 1)
			}
		}
	}


	if ( FUNC("get_scenario_event_bit_flag", 32) == 1 && FUNC("get_end_condition_finish", 12) == 0 )
	{
		if ( child_recno > 0 && FUNC("is_unit_dead_by_name", child_recno, "Lucien Escuier") > 0 )
		{
			FUNC("attention_call_message", "[0163N]The child has died - you have failed to rescue him!")
			FUNC("set_end_condition_finish", 12, "LOSE")

			FUNC("minimap_set_way_point", 6, 0.0, 0.0, 0.0, 0, 0)
		}
	}

	if( ( father_recno > 0 ) && ( talk_unit_recno == father_recno ) && FUNC("get_place_captured", town_rouvray_recno) == 0 )
	{
		FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
		FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)
		FUNC("set_unit_can_process_in_cut_scene", father_recno, 1)

		// set main character to idle
		FUNC("set_idle", main_recno) 
		
		FUNC("set_idle", father_recno) 
		ACTION("give_task", father_recno, "IDLE", 1, 0, 0, 0, 0)

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

		WAIT { DIALOG("add_dialog", father_recno, "[0164N]Will you please help us against the English?") }

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

		FUNC("stop_curr_task", main_recno)
		FUNC("stop_curr_task", father_recno)

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

		WAIT{ FUNC("is_cut_scene_finished") }

		FUNC("stop_curr_task", father_recno)
		ACTION("give_task", father_recno, "IDLE", 1, 0, 0, 0, 0)
	}

	if( ( mother_recno > 0 ) && ( talk_unit_recno == mother_recno ) && FUNC("get_place_captured", town_rouvray_recno) == 0 )
	{
		FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
		FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)
		FUNC("set_unit_can_process_in_cut_scene", mother_recno, 1)

		// set main character to idle
		FUNC("set_idle", main_recno) 
		
		FUNC("set_idle", mother_recno) 
		ACTION("give_task", mother_recno, "IDLE", 1, 0, 0, 0, 0)

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

		WAIT { DIALOG("add_dialog", mother_recno, "[0165N]I... am... too scared... to talk...") }

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

		WAIT{ FUNC("is_cut_scene_finished") }

		FUNC("stop_curr_task", main_recno)
		FUNC("stop_curr_task", mother_recno)

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

		FUNC("stop_curr_task", mother_recno)
		ACTION("give_task", mother_recno, "IDLE", 1, 0, 0, 0, 0)
	}

	if( ( ( father_recno > 0 ) && ( talk_unit_recno == father_recno ) ) ||
		( ( mother_recno > 0 ) && ( talk_unit_recno == mother_recno ) ) )
	{
		if ( FUNC("get_place_captured", town_rouvray_recno) == 1 )
		{
			if ( FUNC("get_scenario_bit_flag", 18) == 0 || FUNC("get_scenario_bit_flag", 27) == 0 )
			{
				FUNC("set_cut_scene_flag" , 1)	// enter cut scene! 
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)
				FUNC("set_unit_can_process_in_cut_scene", mother_recno, 1)
				FUNC("set_unit_can_process_in_cut_scene", father_recno, 1)

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", mother_recno) 
				ACTION("give_task", mother_recno, "IDLE", 1, 0, 0, 0, 0)

				FUNC("set_idle", father_recno) 
				ACTION("give_task", father_recno, "IDLE", 1, 0, 0, 0, 0)

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

				if ( FUNC("get_scenario_event_bit_flag", 32) == 0 )
				{
					WAIT { DIALOG("add_dialog", father_recno, "[0166N]l'ennui est moi! Our child has gone missing ever since the evil English accosted our poor, defenseless town! I wonder where he is?") }
				}
				else
				if ( FUNC("get_scenario_bit_flag", 18) == 0 )
				{
					WAIT { DIALOG("add_dialog", father_recno, "[0167N]My boy is lost! What can a poor helpless father do?") }
				}
				else
				{
					WAIT { DIALOG("add_dialog", father_recno, "[0168N]It saddens me that you have returned without the missing children. I do hope you can find and deliver them from peril!") }
				}

				ACTION("give_order" , father_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , father_recno, mother_recno) , 0 , 0 , 0, 2500)
				ACTION("give_order" , mother_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , mother_recno, main_recno) , 0 , 0 , 0, 2500)
				ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, mother_recno) , 0 , 0 , 0, 2500)

				if ( FUNC("get_scenario_event_bit_flag", 32) == 0 )
				{
					WAIT { DIALOG("add_dialog", mother_recno, "[0169N]No... no! My precious little boy is lost somewhere out there, but where? I can only hope that he will return safely soon!") }

//					child_recno = FUNC("add_unit", "CITIZEN_03", "FRENCH") 
				
//					FUNC("set_unit_pos", child_recno, 15750.0, 19100.0, 0.0)
//					FUNC("set_unit_dir", child_recno, 180)
//					FUNC("set_unit_team", child_recno, 210)
//					FUNC("set_unit_name", child_recno, "Lucien Escuier")
//					FUNC("set_main_character", child_recno, 0)
					FUNC("set_can_interact_flag", child_recno, 1)

					FUNC("set_end_condition_enabled", 12, 1)
				}
				else
				if ( FUNC("get_scenario_bit_flag", 18) == 0 )
				{
					WAIT { DIALOG("add_dialog", mother_recno, "[0170N]I'm too upset to talk... somebody, anybody, please find my child and bring him back to his mother's arms!") }
				}
				else
				{
					WAIT { DIALOG("add_dialog", mother_recno, "[0171N]Have you not found this town's precious children? Oh, please, o noble warrior, rescue them, for they are all the future this town has left!") }
				}

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

				ACTION("give_task", mother_recno, "IDLE", 1, 0, 0, 0, 0)
				ACTION("give_task", father_recno, "IDLE", 1, 0, 0, 0, 0)

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("set_scenario_event_bit_flag", 32, 1)
				talk_unit_recno = 0
			}
		}
	}

	if ( FUNC("get_scenario_event_bit_flag", 12) == 0 )
	{
		if ( FUNC("is_unit_inside_place", rouvray_area_recno, child_recno) > 0 )
		{
			// start cut scene
			FUNC("set_cut_scene_flag", 1)	// enter cut scene! 
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
			FUNC("set_unit_can_process_in_cut_scene", child_recno, 1)

			// set main character to idle
			FUNC("set_idle", main_recno)
			FUNC("set_idle", child_recno)
			FUNC("stop_curr_task", child_recno)
			WAIT { ACTION("give_task", child_recno, "APPROACH_PLACE", 1, reach_rouvray_recno, 0, 0, 0) }

			FUNC("change_camera_in_cut_scene", 0, child_recno, 300, 180, 20)

			// set weapon seller to idle and rotate him
			WAIT { DIALOG("add_dialog", child_recno, "[0172N]Momma...") }

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

			WAIT{ FUNC("is_cut_scene_finished") }

			DIALOG("del_all_dialog") 

			FUNC("del_unit", child_recno)

			child_recno = FUNC("add_unit", "CITIZEN_03", "FRENCH") 
		
			FUNC("set_unit_pos", child_recno, 15513.0, 23042.0, 143.0)
			FUNC("set_unit_dir", child_recno, 180)
			FUNC("set_unit_team", child_recno, 210)
			FUNC("set_unit_name", child_recno, "Lucien Escuier")
			FUNC("set_main_character", child_recno, 0)
			FUNC("set_can_interact_flag", child_recno, 0)
			
			ACTION("give_task", child_recno, "IDLE", 1, 0, 0, 0, 0)

			WAIT { FUNC("is_cut_scene_finished") }

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

	if ( FUNC("get_end_condition_enabled", 12) > 0 && FUNC("get_scenario_bit_flag", 18) == 0 && FUNC("is_unit_inside_place", reach_rouvray_recno, main_recno) > 0 && FUNC("is_unit_inside_place", reach_rouvray_recno, child_recno) > 0)
	{
		// start cut scene
		FUNC("set_cut_scene_flag", 1)	// enter cut scene! 
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can process
		FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)
		FUNC("set_unit_can_process_in_cut_scene", child_recno, 1)
		FUNC("set_unit_can_process_in_cut_scene", mother_recno, 1)
		FUNC("set_unit_can_process_in_cut_scene", father_recno, 1)

		// set main character to idle
		FUNC("set_idle", main_recno)
		FUNC("set_idle", child_recno)

		WAIT { ACTION("give_task", child_recno, "IDLE", 1, 0, 0, 0, 0) }

		FUNC("change_camera_in_cut_scene", 0, main_recno, 300, 120, 10)

		// set weapon seller to idle and rotate him
		ACTION("give_order" , mother_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , mother_recno, child_recno) , 0 , 0 , 0, 2500)
		ACTION("give_order" , child_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , child_recno, mother_recno) , 0 , 0 , 0, 2500)
		ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, mother_recno) , 0 , 0 , 0, 2500)
		WAIT { DIALOG("add_dialog", mother_recno, "[0173N]Lucien! I was so worried about you! Where have you been?") }

		FUNC("change_camera_in_cut_scene", 0, child_recno, 200, 120, 10)
		WAIT { DIALOG("add_dialog", child_recno, "[0174N]Mommy, I got scared when I saw the bad people come. I ran away, and then I got lost in the forest!") }

		ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, father_recno) , 0 , 0 , 0, 2500)
		ACTION("give_order" , father_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , father_recno, main_recno) , 0 , 0 , 0, 2500)
		WAIT { DIALOG("add_dialog", father_recno, "[0175N]Thank you for bringing our dear son back to us. Please accept this wee offering we have managed to gather. The war has made us poor - we are sorry that we cannot offer you any more, but these provisions may also come in use for you.") }

		ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, mother_recno) , 0 , 0 , 0, 2500)
		ACTION("give_order" , mother_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , mother_recno, child_recno) , 0 , 0 , 0, 2500)
		FUNC("change_camera_in_cut_scene", 0, 15863, 22778, 454, 350, 141, 22)
		WAIT { DIALOG("add_dialog", mother_recno, "[0176N]I once again thank you for delivering my dear child to safety. May your path be forever illuminated by the grace of our creator!") }

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

		WAIT{ FUNC("is_cut_scene_finished") }

		DIALOG("del_all_dialog") 

		FUNC("minimap_set_way_point", 6, 0.0, 0.0, 0.0, 0, 0)

		FUNC("give_item_to_unit", "CROSS_B", 0, 1, main_recno)

		FUNC("stop_curr_task", main_recno)
		FUNC("stop_curr_task", child_recno)	
		FUNC("stop_curr_task", mother_recno)
		FUNC("stop_curr_task", father_recno)
		ACTION("give_task", mother_recno, "IDLE", 1, 0, 0, 0, 0)
		ACTION("give_task", father_recno, "IDLE", 1, 0, 0, 0, 0)
		ACTION("give_task", child_recno, "IDLE", 1, 0, 0, 0, 0)

		WAIT { FUNC("is_cut_scene_finished") }

		FUNC("set_scenario_bit_flag", 18, 1)
		FUNC("set_end_condition_finish", 12, "WIN")

		FUNC("set_can_interact_flag", father_recno, 0)
		FUNC("set_can_interact_flag", mother_recno, 0)
	}

	if ( FUNC("get_scenario_bit_flag", 16) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", see_rouvray_recno, "P")

		if ( joan_in_place_recno )
		{
			INT messager_five_recno
			messager_five_recno = FUNC("search_unit_by_name", "Radulfus Bradcroft")

			FUNC("attention_call_message_2", "[0177N]Men, I see the enemy ahead! We must fight hard - we cannot allow this town to fall back into the hands of those miserable French dogs!", messager_five_recno)

			FUNC("stop_curr_task", team_eight_leader)
			ACTION("give_task", team_eight_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)

			FUNC("facility_barrack_add_leader", spawn_father_recno, citizen_one_id, 0, 699, "Capellarius", "Capellarius")
			FUNC("facility_barrack_add_leader", spawn_mother_recno, mother_id, 0, 698, "Claire", "Claire")
			
			FUNC("set_scenario_bit_flag", 16, 1)
		}
	}


	// Event 1
	if( FUNC("get_scenario_event_bit_flag", 2) == 0 )
	{	
		joan_in_place_recno = FUNC("search_for_unit_in_place", one_event_one_place_recno, "P")
	
		if(joan_in_place_recno > 0) 
		{
			FUNC("attention_call_message_2", "[0178N]We should head towards Saint-Florent-Le-Saumur, just up the mountain pass towards the east, and reclaim our French sovereignty over any enemy-occupied towns!", la_hire_recno)

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

//	if ( FUNC("get_scenario_event_bit_flag", 3) == 0 )
//	{
//		alencon_in_place_recno = FUNC("is_unit_inside_place", one_event_two_place_recno, main_recno)

//		if ( alencon_in_place_recno == 0 )
//		{
//			alencon_in_place_recno = FUNC("is_unit_inside_place", spawn_h_one, main_recno)
//		}

//		if ( alencon_in_place_recno == 0 )
//		{
//			alencon_in_place_recno = FUNC("is_unit_inside_place", see_rouvray_recno, main_recno)
//		}

//		if ( alencon_in_place_recno == 0 )
//		{
//			alencon_in_place_recno = FUNC("is_unit_inside_place", town_checy_recno, main_recno)
//		}

//		if ( alencon_in_place_recno > 0 )
//		{
//			FUNC("attention_call_message", "[0001N]If you want to order your units to attack in RTS mode, first select the units, then right-click on any visible enemy units. Your troops will rush into battle. You can issue these commands to any member of the French forces.", 1)

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

	if ( FUNC("get_scenario_event_bit_flag", 4) == 0 )
	{
		if ( FUNC("is_unit_dead_by_name", team_eight_five_leader, "Aleyn Manton") > 0 )
		{
			FUNC("attention_call_message", "[0179N]You have slain the English archer captain! There appears to be a letter among his remains...")
			FUNC("set_scenario_event_bit_flag", 4, 1)
		}
	}

	// Event 4
	if( FUNC("get_scenario_event_bit_flag", 5) == 0 )
	{	
		joan_in_place_recno = FUNC("search_for_unit_in_place", one_event_four_place_recno, "P")
		
		INT itemId

		if(joan_in_place_recno > 0) 
		{
			FUNC("facility_barrack_add_member", facility_saint_one, ehinfant_id, 13, 2, 19)
			FUNC("facility_barrack_add_member", facility_saint_two, ehinfant_id, 13, 2, 19)
			FUNC("facility_barrack_add_member", facility_saint_three, earcher_id, 13, 2, 19)
			FUNC("facility_barrack_add_member", facility_saint_four, earcher_id, 13, 2, 19)
			FUNC("facility_barrack_add_member", facility_saint_five, ehinfant_id, 13, 2, 19)
			FUNC("facility_barrack_add_member", facility_saint_six, ehinfant_id, 13, 2, 19)

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

	// Event 5
	if( FUNC("get_scenario_event_bit_flag", 6) == 0 )
	{	
		if ( FUNC("get_place_captured", town_chateauneut_recno_one) == 1 && FUNC("get_place_captured", castle_jargeau_recno) == 0 )
		{
//			FUNC("attention_call_message_2", "[0001N]I believe that we will be approaching Jargeau soon. Perhaps we should explore this town and see if there are any items we may appropriate for our king's duty.", "La Hire")

			FUNC("facility_barrack_add_leader", spawn_chateauneut_a, mother_id, 0, 777, "Rosemaria Cheville", "Cheville")
			FUNC("facility_barrack_add_leader", spawn_chateauneut_b, citizen_one_id, 0, 778, "Macaire Florier", "Florier")
			FUNC("facility_barrack_add_leader", spawn_chateauneut_c, citizen_four_id, 0, 779, "Baudouin Hostellier", "Hostellier")

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

	INT tower_left
	tower_left = 0

	if ( FUNC("get_wall_hp", jargeau_north_right) != 0 )
	{
		tower_left = ( tower_left + 1 )
	}
	else
	{
		if ( FUNC("get_scenario_event_bit_flag_2", 3) == 0 )
		{
			FUNC("attention_call_message_2", "[0180N]There are many more towers surrounding Jargeau - it would be wise to bring them all down!", jean_recno)
			FUNC("set_scenario_event_bit_flag_2", 3, 1)
			FUNC("set_end_condition_enabled", 26, 1)
		}
	}

	if ( FUNC("get_wall_hp", jargeau_north_left) != 0 )
	{
		tower_left = ( tower_left + 1 )
	}
	else
	{
		if ( FUNC("get_scenario_event_bit_flag_2", 3) == 0 )
		{
			FUNC("attention_call_message_2", "[0180N]There are many more towers surrounding Jargeau - it would be wise to bring them all down!", jean_recno)
			FUNC("set_scenario_event_bit_flag_2", 3, 1)
			FUNC("set_end_condition_enabled", 26, 1)
		}
	}

	if ( FUNC("get_wall_hp", jargeau_west_right) != 0 )
	{
		tower_left = ( tower_left + 1 )
	}
	else
	{
		if ( FUNC("get_scenario_event_bit_flag_2", 3) == 0 )
		{
			FUNC("attention_call_message_2", "[0180N]There are many more towers surrounding Jargeau - it would be wise to bring them all down!", jean_recno)
			FUNC("set_scenario_event_bit_flag_2", 3, 1)
			FUNC("set_end_condition_enabled", 26, 1)
		}
	}

	if ( FUNC("get_wall_hp", jargeau_west_left) != 0 )
	{
		tower_left = ( tower_left + 1 )
	}
	else
	{
		if ( FUNC("get_scenario_event_bit_flag_2", 3) == 0 )
		{
			FUNC("attention_call_message_2", "[0180N]There are many more towers surrounding Jargeau - it would be wise to bring them all down!", jean_recno)
			FUNC("set_scenario_event_bit_flag_2", 3, 1)
			FUNC("set_end_condition_enabled", 26, 1)
		}
	}

	// Event 6
	if( FUNC("get_scenario_event_bit_flag", 7) == 0 )
	{	
		joan_in_place_recno = FUNC("search_for_unit_in_place", town_st_aignar_recno, "P")

		if ( joan_in_place_recno == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", castle_jargeau_recno, "P")
		}
	
		if(joan_in_place_recno > 0) 
		{
			FUNC("attention_call_message", "[0181N]When in RTS mode, Right-click anywhere on the barracks. The recruiting interface will appear and you can hire the units you need. You cannot recruit new units if the barracks is controlled by the enemy.", 1)

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

	// Event 7
	if( FUNC("get_scenario_event_bit_flag", 8) == 0 && tower_left > 0 )
	{	
		if ( FUNC("get_place_captured", one_event_seven_place_recno) == 1 )
		{
			FUNC("attention_call_message_2", "[0182N]Show no mercy for these enemy vassals and destroy the towers, they are sure to collapse at any instant!", la_hire_recno)

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

	// Event 8
	if( FUNC("get_scenario_event_bit_flag", 9) == 0 && tower_left > 0 )
	{	
		if ( FUNC("get_place_captured", one_event_eight_place_recno) == 1 )
		{
			FUNC("attention_call_message_2", "[0183N]We should also tear down the remaining towers surrounding Jargeau! We should not allow the slightest of opportunity for our foes to strike back!", jean_recno)

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

	// Event 12
	if( FUNC("get_scenario_event_bit_flag", 13) == 0 )
	{	
		joan_in_place_recno = FUNC("search_for_unit_in_place", one_event_ten_two_place_recno, "F")
		
		if(joan_in_place_recno > 0) 
		{
			FUNC("attention_call_message_2", "[0184N]Quick, men, at arms! We are being ambushed!", jean_recno)

			// Spawn at H3
			FUNC("facility_barrack_add_leader", facility_h_three_recno, ehinfcap_id, 18, 20, "Stiward Burle", "Burle")
			FUNC("facility_barrack_add_member", facility_h_three_recno_b, ehinfant_id, 18, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_three_recno_c, ehinfant_id, 18, 1, 20)

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

	if ( FUNC("get_scenario_event_bit_flag", 22) == 1 && FUNC("get_scenario_event_bit_flag_3", 27) == 0 )
	{
		if ( FUNC("is_unit_dead_by_name", dunois_recno, "Dunois") > 0 )
		{
			FUNC("attention_call_message", "[0185N]Dunois has been slain in battle!")
			FUNC("set_scenario_event_bit_flag_3", 27, 1)
		}
	}

	if ( FUNC("get_scenario_event_bit_flag", 22) == 0 )
	{
		alencon_in_place_recno = FUNC("is_unit_inside_place", meet_dunois_recno, main_recno)

		if ( alencon_in_place_recno > 0 )
		{
			if ( FUNC("is_unit_dead_by_name", dunois_recno, "Dunois") == 0 )
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	

				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", dunois_recno) 
				ACTION("give_task", dunois_recno, "IDLE", 1, 0, 0, 0, 0)

				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
				
				// set weapon seller to idle and rotate him
				ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, dunois_recno) , 0 , 0 , 0, 2500)
				FUNC("change_camera_in_cut_scene", 0, 3372, 27766, 195, 187, -177, 16)
				WAIT { DIALOG("add_dialog", dunois_recno, "[0186N]Greetings! I received the letter from Charles VII requesting the presence of my men, my fauconneaus, and myself. I shall be under your command, General. Lead the way and I shall follow.") }

				if ( FUNC("get_scenario_event_bit_flag", 27) == 0 )
				{
					FUNC("change_camera_in_cut_scene", 0, 1858, 27750, 195, 187, -7, 15)
					WAIT { DIALOG("add_dialog", dunois_recno, "[0187N]d'Illiers, our comrade-in-arms should be arriving at Jargeau as we speak. We will surely need his support as well, breaching walls of solid granite is no small feat!") }
				}

				FUNC("change_camera_in_cut_scene", 0, 3372, 27766, 195, 187, -178, 16)
				WAIT { DIALOG("add_dialog", dunois_recno, "[0188N]If I may be so bold as to suggest, we should move along wider paths.") }

				FUNC("set_end_condition_finish", 18, "WIN")

				if ( FUNC("get_scenario_event_bit_flag", 27) == 0 )
				{
					FUNC("set_end_condition_enabled", 19, 1)
				}

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

				WAIT{ FUNC("is_cut_scene_finished") }
			}
			else
			{
				FUNC("attention_call_message", "[0189N]Alas, Dunois is nowhere to be found. The enemy must have reached him sooner than you were able to arrive.")
				FUNC("set_end_condition_finish", 18, "LOSE")
				FUNC("set_scenario_event_bit_flag_3", 27, 1)
			}

			FUNC("set_control_flag", dunois_recno, 1)
			FUNC("set_control_flag", cannon_one, 1)
			FUNC("set_control_flag", cannon_one_a, 1)
			FUNC("set_control_flag", cannon_one_b, 1)
			FUNC("set_control_flag", cannon_two, 1)
			FUNC("set_control_flag", cannon_two_a, 1)
			FUNC("set_control_flag", cannon_two_b, 1)
			FUNC("set_control_flag", cannon_three, 1)
			FUNC("set_control_flag", cannon_three_a, 1)
			FUNC("set_control_flag", cannon_three_b, 1)

			FUNC("minimap_set_way_point", 2, 0.0, 0.0, 0.0, 0, 0)
			FUNC("minimap_set_way_point", 3, 525.0, 15670.0, 600.0, 1, 0)
					
			if ( FUNC("get_scenario_event_bit_flag_2", 32) == 0 )
			{
				FUNC("attention_call_message", "[0190N]Assign units to siege machines in RTS mode by selecting units, then right-clicking on the siege machine. Your units will position themselves alongside the machine. Then you can command the siege machines in the same way as you would with troops.", 1)
				FUNC("attention_call_message", "[0191N]Only light infantry units can operate siege machines. Each siege machine requires a different number of units to operate. Look under the <Siege Machines> heading under the <Mission Brief> interface for a list of requirements.", 1)

				FUNC("set_scenario_event_bit_flag_2", 32, 1)
			}	

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

	if ( FUNC("get_scenario_event_bit_flag", 27) == 1 && FUNC("get_scenario_event_bit_flag_3", 28) == 0 )
	{
		if ( FUNC("is_unit_dead_by_name", dlllier_recno, "d'Illiers") == 1 )
		{
			FUNC("attention_call_message", "[0192N]d'Illiers has been slain in battle!")
			FUNC("set_scenario_event_bit_flag_3", 28, 1)
		}
	}

	// Meet dillier
	if ( FUNC("get_scenario_event_bit_flag", 27) == 0 )
	{
		alencon_in_place_recno = FUNC("is_unit_inside_place", meet_dillier_recno, main_recno)

		if ( alencon_in_place_recno > 0 )
		{
			if ( FUNC("is_unit_dead_by_name", dlllier_recno, "d'Illiers") == 0 )
			{
				FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
				
				// set main character to idle
				FUNC("set_idle", main_recno) 
				
				FUNC("set_idle", dlllier_recno) 
				ACTION("give_task", dlllier_recno, "IDLE", 1, 0, 0, 0, 0)

				FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
				FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
				
				// set weapon seller to idle and rotate him
				ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, dlllier_recno) , 0 , 0 , 0, 2500)
				FUNC("change_camera_in_cut_scene", 0, 525, 15670, 600, 187, -54, 16)
				WAIT { DIALOG("add_dialog", dlllier_recno, "[0193N]My dear General! It is an honor to fight by your side.") }

				if ( FUNC("get_end_condition_enabled", 19) > 0 )
				{
					FUNC("set_end_condition_finish", 19, "WIN")
				}

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

				WAIT{ FUNC("is_cut_scene_finished") }
			}
			else
			{
				FUNC("attention_call_message", "[0194N]Alas, d'Illiers is nowhere to be found. The enemy must have reached him sooner than you were able to arrive.")
				if ( FUNC("get_end_condition_enabled", 19) > 0 )
				{
					FUNC("set_end_condition_finish", 19, "LOSE")
				}
				FUNC("set_scenario_event_bit_flag_3", 28, 1)
			}

			FUNC("minimap_set_way_point", 3, 0.0, 0.0, 0.0, 0, 0)

			FUNC("set_control_flag", dlllier_recno, 1)
			FUNC("set_control_flag", cannon_four, 1)
			FUNC("set_control_flag", cannon_four_a, 1)
			FUNC("set_control_flag", cannon_four_b, 1)
			FUNC("set_control_flag", cannon_five, 1)
			FUNC("set_control_flag", cannon_five_a, 1)
			FUNC("set_control_flag", cannon_five_b, 1)
			FUNC("set_control_flag", cannon_six, 1)
			FUNC("set_control_flag", cannon_six_a, 1)
			FUNC("set_control_flag", cannon_six_b, 1)
			FUNC("set_control_flag", cannon_seven, 1)
			FUNC("set_control_flag", cannon_seven_a, 1)
			FUNC("set_control_flag", cannon_seven_b, 1)
			FUNC("set_control_flag", cannon_eight, 1)
			FUNC("set_control_flag", cannon_eight_a, 1)
			FUNC("set_control_flag", cannon_eight_b, 1)
					
			FUNC("stop_curr_task", cannon_four)
			FUNC("stop_curr_task", cannon_five)
			FUNC("stop_curr_task", cannon_six)
			FUNC("stop_curr_task", cannon_seven)
			FUNC("stop_curr_task", cannon_eight)

			FUNC("stop_curr_task", main_recno)

			if ( FUNC("get_scenario_event_bit_flag_2", 32) == 0 )
			{
				FUNC("attention_call_message", "[0190N]Assign units to siege machines in RTS mode by selecting units, then right-clicking on the siege machine. Your units will position themselves alongside the machine. Then you can command the siege machines in the same way as you would with troops.", 1)

				FUNC("attention_call_message", "[0191N]Only light infantry units can operate siege machines. Each siege machine requires a different number of units to operate. Look under the <Siege Machines> heading under the <Mission Brief> interface for a list of requirements.", 1)

				FUNC("set_scenario_event_bit_flag_2", 32, 1)
			}

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


	// control AI movement





	// Capture Settlement Bourges
	if ( FUNC("get_place_captured", settlement_bourges_recno) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", settlement_bourges_recno, "P")

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", settlement_bourges_recno, main_recno) == 0 )
			{
				FUNC("attention_call_message", "[0195N]You have liberated the township of Bourges from enemy occupation!")

				FUNC("set_minimap_icon_display_enable", "ftownS5L2b", 1)
				FUNC("set_minimap_icon_display_enable", "e_townS5L2b", 0)
				FUNC("set_territory_nation", "Bourges", "French")

				FUNC("show_objective")
				FUNC("set_place_captured", settlement_bourges_recno, 1)

				FUNC("facility_barrack_add_leader", facility_s_two_one, citizen_one_id, 901, 1, "Raymond Fritier", "Fritier")
				FUNC("facility_barrack_add_member", facility_s_two_two, citizen_one_id, 0, 1, 1)
				FUNC("facility_barrack_add_member", facility_s_two_three, citizen_two_id, 0, 1, 1)
			}
		}
	}

	// Capture Settlement Blois
	if ( FUNC("get_place_captured", settlement_blois_recno) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", settlement_blois_recno, "P")

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", settlement_blois_recno, main_recno) == 0 )
			{
				FUNC("attention_call_message", "[0196N]You have liberated the township of Blois from enemy occupation!")

				FUNC("set_minimap_icon_display_enable", "ftownS5L2a", 1)
				FUNC("set_minimap_icon_display_enable", "e_townS5L2a", 0)
				FUNC("set_territory_nation", "Blois", "French")

				FUNC("show_objective")

				FUNC("set_place_captured", settlement_blois_recno, 1)
	
				FUNC("facility_barrack_add_leader", spawn_blois_a, citizen_two_id, 902, 1, "Olivier Gruier", "Gruier")
				FUNC("facility_barrack_add_leader", spawn_blois_b, citizen_one_id, 980, 1, "Josserand Boiselier", "Boiselier")
			}
		}
	}




	// Capture Town Checy
	if ( FUNC("get_place_captured", town_checy_recno) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", town_checy_recno, "P")

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", town_checy_recno, main_recno) == 0 )
			{
				FUNC("attention_call_message", "[0197N]You have liberated the township of Checy from enemy occupation!")

				FUNC("set_minimap_icon_display_enable", "ftownS5L10a", 1)
				FUNC("set_minimap_icon_display_enable", "e_townS5L10a", 0)
				FUNC("set_territory_nation", "Checy", "French")

				FUNC("show_objective")
				FUNC("set_place_captured", town_checy_recno, 1)
			}
		}
	}

	// Capture Town Rouvray
	if ( FUNC("get_place_captured", town_rouvray_recno) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", town_rouvray_recno, "P")

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", town_rouvray_recno, main_recno) == 0 )
			{
				FUNC("attention_call_message", "[0198N]You have liberated the township of Rouvray from enemy occupation!")

				FUNC("set_minimap_icon_display_enable", "ftownS5L10b", 1)
				FUNC("set_minimap_icon_display_enable", "e_townS5L10b", 0)
				FUNC("set_territory_nation", "Rouvray", "French")

				FUNC("show_objective")

				FUNC("set_place_captured", town_rouvray_recno, 1)

				FUNC("facility_barrack_add_member", town_rouvray_one, citizen_four_id, 0, 1, 1)
				FUNC("facility_barrack_add_member", town_rouvray_two, citizen_two_id, 0, 1, 1)
				FUNC("facility_barrack_add_member", town_rouvray_three, citizen_one_id, 0, 1, 1)
				FUNC("facility_barrack_add_member", town_rouvray_four, citizen_two_id, 0, 1, 1)
				FUNC("facility_barrack_add_member", town_rouvray_five, citizen_four_id, 0, 1, 1)
			}
		}
	}

	// Capture Settlement Fountainbleu
	if ( FUNC("get_place_captured", settle_fountainbleu_recno) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", settle_fountainbleu_recno, "P")

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", settle_fountainbleu_recno, main_recno) == 0 )
			{
				FUNC("attention_call_message", "[0199N]You have liberated the township of Fountainbleu from enemy occupation!")

				FUNC("set_minimap_icon_display_enable", "ftownS5L10c", 1)
				FUNC("set_minimap_icon_display_enable", "e_townS5L10c", 0)
				FUNC("set_territory_nation", "Fountainbleu", "French")
				
				FUNC("show_objective")
				FUNC("set_place_captured", settle_fountainbleu_recno, 1)
			}
		}
	}

	// Capture Town Saint
	if ( FUNC("get_place_captured", town_saint_florent) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", town_saint_florent, "P")

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", town_saint_florent, main_recno) == 0 )
			{
				FUNC("attention_call_message", "[0200N]You have liberated the township of Saint-Florent-Le-Saumur from enemy occupation!")

				FUNC("set_minimap_icon_display_enable", "ftownS5L9b", 1)
				FUNC("set_minimap_icon_display_enable", "e_townS5L9b", 0)
				FUNC("set_territory_nation", "Saint-Florent-Le-Saumur", "French")

				FUNC("show_objective")
				FUNC("set_place_captured", town_saint_florent, 1)

//				FUNC("set_place_nation_by_code", town_saint_florent, "French")

				FUNC("facility_barrack_add_leader", saint_villager_a, priest_id, 888, 1, "Priest", "Priest")
				FUNC("facility_barrack_add_leader", saint_villager_b, citizen_one_id, 889, 1, "Garnier Autelleur", "Autelleur")
				FUNC("facility_barrack_add_member", saint_villager_c, citizen_one_id, 0, 1, 1)
				FUNC("facility_barrack_add_leader", saint_villager_d, citizen_two_id, 890, 1, "Vilain Braelier", "Vilain Braelier")
				FUNC("facility_barrack_add_member", saint_villager_e, citizen_one_id, 0, 1, 1)
				FUNC("facility_barrack_add_member", saint_villager_f, citizen_two_id, 0, 1, 1)

//				FUNC("attention_call_message_2", "Thank you for protecting our town. Please come to accept a gift in exchange for our gratitude!", "Priest")
			}
		}
	}

	if ( priest_recno == 0 && FUNC("get_place_captured", town_saint_florent) == 1 )
	{
		priest_recno = FUNC("search_unit_by_name", "Priest")

		if ( priest_recno > 0 )
		{
			FUNC("set_can_interact_flag", priest_recno, 1)	
		}
	}

	if ( st_citizen_recno == 0 && FUNC("get_place_captured", town_saint_florent) == 1 )
	{
		st_citizen_recno = FUNC("search_unit_by_name", "Garnier Autelleur")

		if ( st_citizen_recno > 0 )
		{
			FUNC("set_can_interact_flag", st_citizen_recno, 1)					
		}
	}
	
	if ( st_citizen_recno_two == 0 && FUNC("get_place_captured", town_saint_florent) == 1 )
	{
		st_citizen_recno_two = FUNC("search_unit_by_name", "Vilain Braelier")

		if ( st_citizen_recno_two > 0 )
		{
			FUNC("set_can_interact_flag", st_citizen_recno_two, 1)
		}
	}

	if ( chateauneut_citizen_a == 0 && FUNC("get_place_captured", town_chateauneut_recno_one) == 1 )
	{
		chateauneut_citizen_a = FUNC("search_unit_by_name", "Rosemaria Cheville")

		if ( chateauneut_citizen_a > 0 )
		{
			FUNC("set_can_interact_flag", chateauneut_citizen_a, 1)					
		}
	}

	if ( chateauneut_citizen_b == 0 && FUNC("get_place_captured", town_chateauneut_recno_one) == 1 )
	{
		chateauneut_citizen_b = FUNC("search_unit_by_name", "Macaire Florier")

		if ( chateauneut_citizen_b > 0 )
		{
			FUNC("set_can_interact_flag", chateauneut_citizen_b, 1)					
		}
	}

	if ( chateauneut_citizen_c == 0 && FUNC("get_place_captured", town_chateauneut_recno_one) == 1 )
	{
		chateauneut_citizen_c = FUNC("search_unit_by_name", "Baudouin Hostellier")

		if ( chateauneut_citizen_c > 0 )
		{
			FUNC("set_can_interact_flag", chateauneut_citizen_c, 1)
		}
	}

	// Capture Town St-Aignar
	if ( FUNC("get_place_captured", town_st_aignar_recno) == 0 )
	{
		alencon_in_place_recno = FUNC("search_for_unit_in_place", town_st_aignar_recno, "P")

		if ( alencon_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", town_st_aignar_recno, main_recno) == 0 )
			{
				FUNC("attention_call_message", "[0201N]You have liberated the township of St-Aignar from enemy occupation!")

				FUNC("set_minimap_icon_display_enable", "ftownS5L7a", 1)
				FUNC("set_minimap_icon_display_enable", "e_townS5L7a", 0)
				FUNC("set_territory_nation", "St-Aignar", "French")

				FUNC("show_objective")
				FUNC("set_place_captured", town_st_aignar_recno, 1)
				FUNC("set_barrack_captured", facility_g_one_barrack, 1)
			}
		}
	}

	// Capture Town Chateaudun
	if ( FUNC("get_place_captured", town_chateaudun_recno) == 0 )
	{
		alencon_in_place_recno = FUNC("search_for_unit_in_place", town_chateaudun_recno, "P")

		if ( alencon_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", town_chateaudun_recno, main_recno) == 0 )
			{
				FUNC("attention_call_message", "[0202N]You have liberated the township of Chateaudun from enemy occupation!")

				FUNC("set_minimap_icon_display_enable", "ftownS5L7b", 1)
				FUNC("set_minimap_icon_display_enable", "e_townS5L7b", 0)
				FUNC("set_territory_nation", "Chateaudun", "French")

				FUNC("show_objective")

				FUNC("facility_barrack_add_leader", spawn_chateaudun_a, citizen_two_id, 903, 1, "Anseau Paucier", "Paucier")
				FUNC("facility_barrack_add_leader", spawn_chateaudun_b, mother_id, 904, 1, "Apollina Chaenier", "Chaenier")
				FUNC("facility_barrack_add_leader", spawn_chateaudun_c, child_id, 905, 1, "Conon Harier", "Harier")
				FUNC("facility_barrack_add_leader", spawn_chateaudun_d, citizen_four_id, 906, 1, "Damien Tartier", "Tartier")
				FUNC("facility_barrack_add_leader", spawn_chateaudun_e, citizen_one_id, 907, 1, "Ponce Mercier", "Mercier")
				FUNC("facility_barrack_add_leader", spawn_chateaudun_f, citizen_two_id, 908, 1, "Eudes Barrillier", "Barrillier")
				
				FUNC("set_place_captured", town_chateaudun_recno, 1)
			}
		}
	}

	// Capture Town Chateauneut
	if ( FUNC("get_place_captured", town_chateauneut_recno_one) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", town_chateauneut_recno_one, "P")
		if ( joan_in_place_recno == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", town_chateauneut_recno_two, "P")
		}

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", town_chateauneut_recno_one, main_recno) == 0 &&
				 FUNC("number_of_enemy_in_place", town_chateauneut_recno_two, main_recno) == 0 )
			{
				if ( FUNC("get_scenario_bit_flag", 3) == 0 )
				{
					FUNC("attention_call_message", "[0203N]You have liberated the township of Chateauneut from enemy occupation!")

					FUNC("set_minimap_icon_display_enable", "ftownS5L9a", 1)
					FUNC("set_minimap_icon_display_enable", "e_townS5L9a", 0)
					FUNC("set_territory_nation", "Chateauneut", "French")

					FUNC("show_objective")
				}

				FUNC("set_place_captured", town_chateauneut_recno_one, 1)
				FUNC("set_place_captured", town_chateauneut_recno_two, 1)
			}
		}
	}

	// Capture tower 1 (event 7)
	if ( FUNC("get_place_captured", one_event_seven_place_recno) == 0 )
	{
		if ( FUNC("get_wall_hp", jargeau_north_left) == 0 )
		{
			FUNC("set_place_captured", one_event_seven_place_recno, 1)
		}
	}

	// Capture tower 2 (event 8)
	if ( FUNC("get_place_captured", one_event_eight_place_recno) == 0 )
	{
		if ( FUNC("get_wall_hp", jargeau_north_right) == 0 )
		{
			FUNC("set_place_captured", one_event_eight_place_recno, 1)
		}
	}

	if ( FUNC("get_scenario_event_bit_flag_3", 10) == 0 )
	{
		FUNC("start_cut_scene_2", 1, 0, orlean_recno, 200, ( 180 - FUNC("get_unit_dir", orlean_recno) ), 10, 1)
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)
		FUNC("set_end_cut_scene_type", 1)

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

		WAIT{ FUNC("is_cut_scene_status_black_screen") }

		FUNC("change_camera_in_cut_scene", 0, 15491, 52300, 50, 350, 83, 0)
		WAIT{ DIALOG("add_dialog", orlean_recno, "[0204N]I commend you on your brilliant effort in reclaiming Jargeau for France! I realize that this was no small effort, and as such I am assisting your cause.") }

		FUNC("change_camera_in_cut_scene", 0, 15819, 51660, 305, 350, 137, 7)
		WAIT{ DIALOG("add_dialog", orlean_recno, "[0205N]I have brought along the creme de la creme of my soldiers for Meung - do come and rendezvous with me immediately, for I am about to commence the siege!") }

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

		FUNC("stop_curr_task", orlean_recno)

		WAIT { FUNC("show_scenario_brief") }

		FUNC("set_scenario_event_bit_flag_3", 10, 1)

		FUNC("attention_call_message_2", "[0206N]This is good news, lads! Having Orléans buttress our plans to overtake the Loire will make life easier for us if we attack Meung together! Let's go now and head north to meet with the Bastard!", la_hire_recno)
		FUNC("attention_call_message_2", "[0207N]I beg to differ. We should take the southern route. We will arrive much quicker. I am sure that Orléans will be able to handle himself. If we both attack from the south of Meung, we stand a good chance of confusing our enemy.", alencon_recno)
		FUNC("attention_call_message_2", "[0208N]I see - the old divide and conquer, eh? I like that - attack these ruffians from both sides! It matters not where we head - we are sure to succeed restoring peace in Meung with the Bastard's helping hand! Now, let's see some English heads roll!", la_hire_recno)

		if ( FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, joan_recno) ||
			 FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, la_hire_recno) ||
			 FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, jean_recno) ||
			 FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, alencon_recno) )
		{
			FUNC("attention_call_message", "[0209N]A small caravan is approaching Meung-sur-Loire with weapon supplies and possibly reinforcements. Stop them from reaching the castle!")
		}

		FUNC("set_unit_hide_in_command_interface", orlean_recno, 0)
	}

	if ( FUNC("get_scenario_bit_flag", 22) == 1 && FUNC("get_scenario_bit_flag", 14) == 0 )
	{
		if ( FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, joan_recno) ||
			 FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, la_hire_recno) ||
			 FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, jean_recno) ||
			 FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, alencon_recno) )
		{
			FUNC("set_end_condition_enabled", 15, 1)

			FUNC("facility_barrack_add_leader", side_quest_a_one, epolecap_id, 205, 20, "Triston Rote", "Rote")
			FUNC("facility_barrack_add_member", side_quest_a_two, epoleman_id, 205, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_a_three, epoleman_id, 205, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_a_four, epoleman_id, 205, 1, 20)

			FUNC("facility_barrack_add_leader", side_quest_a_six, cart_id, 201, 20, "Bertram Framton", "Framton")
			FUNC("facility_barrack_add_leader", side_quest_a_two_zero, citizen_one_id, 0, 20, "CartDriver", "CartDriver")

			FUNC("facility_barrack_add_member", side_quest_a_eight, ecrossbow_id, 205, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_a_nine, ecrossbow_id, 205, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_a_ten, ecrossbow_id, 205, 1, 20)

			FUNC("facility_barrack_add_member", side_quest_a_ten_one, elinfant_id, 205, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_a_ten_two, elinfant_id, 205, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_a_ten_three, elinfant_id, 205, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_a_ten_four, elinfant_id, 205, 1, 20)

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


	// *** check when player cross some places, ask AI to attack *** //

	// Spawn H11
	if ( FUNC("get_spawn_unit_count_in_place", spawn_h_ten_one) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_ten_one, "E")

		if ( joan_in_place_recno > 0 ) 
		{
			// need spawn H11
			FUNC("facility_barrack_add_leader", facility_h_ten_one_recno, ehinfcap_id, 48, 20, "Aubrey Wodgrayue", "Wodgrayue")
			FUNC("facility_barrack_add_member", facility_h_ten_one_recno, ehinfant_id, 48, 2, 20)
		}
	}

	// beyond 5 
	joan_in_place_recno = FUNC("search_for_unit_in_place", beyond_five, "E")

	if ( joan_in_place_recno > 0 )
	{
		// ask troop 3 and 4 to attack 
		boss_HI_othree = FUNC("get_unit_team_leader_by_team_id", 5)
		if ( boss_HI_othree > 0 )
		{
			ACTION("give_task", boss_HI_othree, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}

		boss_HI_othree = FUNC("get_unit_team_leader_by_team_id", 86)
		if ( boss_HI_othree > 0 )
		{
			ACTION("give_task", boss_HI_othree, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}

		boss_HI_ofour = FUNC("get_unit_team_leader_by_team_id", 6)
		if ( boss_HI_ofour > 0 )
		{
			ACTION("give_task", boss_HI_ofour, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}

		boss_HI_ofour = FUNC("get_unit_team_leader_by_team_id", 87)
		if ( boss_HI_ofour > 0 )
		{
			ACTION("give_task", boss_HI_ofour, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}
	}

	// beyond 6
	joan_in_place_recno = FUNC("search_for_unit_in_place", beyond_six, "E")

	if ( joan_in_place_recno > 0 )
	{
		// ask troop 4 to attack 
		boss_HI_ofour = FUNC("get_unit_team_leader_by_team_id", 6)
		if ( boss_HI_ofour > 0 )
		{
			ACTION("give_task", boss_HI_ofour, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}
		
		boss_HI_ofour = FUNC("get_unit_team_leader_by_team_id", 87)
		if ( boss_HI_ofour > 0 )
		{
			ACTION("give_task", boss_HI_ofour, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}
	}

	// after 12
	alencon_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_seven, "E")
	if ( alencon_in_place_recno > 0 )
	{
		// ask 12 and H7 to attack
		boss_HI_ten_two = FUNC("get_unit_team_leader_by_team_id", 17)
		if ( boss_HI_ten_two > 0 )
		{
			ACTION("give_task", boss_HI_ten_two, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}

		// spawn at H7
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_seven) == 0 )
		{
			FUNC("facility_barrack_add_leader", facility_h_seven_recno, ehinfcap_id, 24, 19, "Gawayn Thistleton", "Thistleton")
			FUNC("facility_barrack_add_member", facility_h_seven_recno, ehinfant_id, 24, 5, 19)
		}
	}

	// between H6 and H7
	joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_six, "E")
	if ( joan_in_place_recno > 0 )
	{
		// spawn at H7
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_seven) == 7 )	// 7 stands for has spawn first time
		{
			FUNC("facility_barrack_add_leader", facility_h_seven_recno, ehinfcap_id, 25, 19, "Bartholomew Capellarius", "Capellarius")
			FUNC("facility_barrack_add_member", facility_h_seven_recno, ehinfant_id, 25, 5, 19)

			boss_SI_oone = FUNC("get_unit_team_leader_by_team_id", 25)
			
			if ( boss_SI_oone > 0 )
			{
				ACTION("give_task", boss_SI_oone, "FOLLOW_UNIT", 1, joan_in_place_recno, 0, 0, 0)
			}
		}

		// spawn at H6
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_six) == 0 )
		{
			FUNC("facility_barrack_add_leader", facility_h_six_recno, ehinfcap_id, 26, 20, "Olyver Whissendine", "Whissendine")
			FUNC("facility_barrack_add_member", facility_h_six_recno, ehinfant_id, 26, 6, 20)

			boss_SI_oone = FUNC("get_unit_team_leader_by_team_id", 26)
			
			if ( boss_SI_oone > 0 )
			{
				ACTION("give_task", boss_SI_oone, "FOLLOW_UNIT", 1, joan_in_place_recno, 0, 0, 0)
			}
		}
	}

	// between H6 and H5
	joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_five, "E")
	if ( joan_in_place_recno > 0 )
	{
		// spawn at H5
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_five) == 7 )	// 7 stands for has spawn first time
		{
			FUNC("facility_barrack_add_leader", facility_h_five_recno, ehinfcap_id, 27, 20, "Ascun Bardolf", "Bardolf")
			FUNC("facility_barrack_add_member", facility_h_five_recno, ehinfant_id, 27, 6, 20)

			boss_SI_oone = FUNC("get_unit_team_leader_by_team_id", 27)
			
			if ( boss_SI_oone > 0 )
			{
				ACTION("give_task", boss_SI_oone, "FOLLOW_UNIT", 1, joan_in_place_recno, 0, 0, 0)
			}
		}

		// spawn at H6
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_six) == 7 )
		{
			FUNC("facility_barrack_add_leader", facility_h_six_recno, ehinfcap_id, 28, 20, "Wolfstano Amerous", "Amerous")
			FUNC("facility_barrack_add_member", facility_h_six_recno, ehinfant_id, 28, 6, 20)

			boss_SI_oone = FUNC("get_unit_team_leader_by_team_id", 28)
			
			if ( boss_SI_oone > 0 )
			{
				ACTION("give_task", boss_SI_oone, "FOLLOW_UNIT", 1, joan_in_place_recno, 0, 0, 0)
			}
		}
	}

	// between H6 and H4
	joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_four, "E")
	if ( joan_in_place_recno > 0 )
	{
		// spawn at H5
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_five) == 0 ||
			 FUNC("get_spawn_unit_count_in_place", spawn_h_five) == 7 )	// 7 stands for has spawn first time
		{
			FUNC("facility_barrack_add_leader", facility_h_five_recno, ehinfcap_id, 29, 20, "Siward Berlet", "Berlet")
			FUNC("facility_barrack_add_member", facility_h_five_recno, ehinfant_id, 29, 6, 20)

			boss_SI_oone = FUNC("get_unit_team_leader_by_team_id", 29)
			
			if ( boss_SI_oone > 0 )
			{
				ACTION("give_task", boss_SI_oone, "FOLLOW_UNIT", 1, joan_in_place_recno, 0, 0, 0)
			}
		}

		// spawn at H6
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_six) == 7 || 
			 FUNC("get_spawn_unit_count_in_place", spawn_h_six) == 14 )
		{
			FUNC("facility_barrack_add_leader", facility_h_six_recno, ehinfcap_id, 30, 20, "Warner Cart", "Cart")
			FUNC("facility_barrack_add_member", facility_h_six_recno, ehinfant_id, 30, 6, 20)

			boss_SI_oone = FUNC("get_unit_team_leader_by_team_id", 30)
			
			if ( boss_SI_oone > 0 )
			{
				ACTION("give_task", boss_SI_oone, "FOLLOW_UNIT", 1, joan_in_place_recno, 0, 0, 0)
			}
		}

		// spawn at H4
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_four) == 0 )
		{
			FUNC("facility_barrack_add_leader", facility_h_four_recno, ehinfcap_id, 31, 20, "Randulf Copere", "Copere")
			FUNC("facility_barrack_add_member", facility_h_four_recno, ehinfant_id, 31, 6, 20)

			boss_SI_oone = FUNC("get_unit_team_leader_by_team_id", 31)
			
			if ( boss_SI_oone > 0 )
			{
				ACTION("give_task", boss_SI_oone, "FOLLOW_UNIT", 1, joan_in_place_recno, 0, 0, 0)
			}
		}
	}

	// spawn H1
	if ( FUNC("get_spawn_unit_count_in_place", spawn_h_one) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_one, "E")

		if ( joan_in_place_recno > 0 )
		{
			FUNC("facility_barrack_add_leader", facility_h_one_recno_a, earchcap_id, 10, 20, "Arthur Napier", "Napier")
			FUNC("facility_barrack_add_member", facility_h_one_recno_b, earcher_id, 10, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_one_recno_c, earcher_id, 10, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_one_recno_d, ecrossbow_id, 10, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_one_recno_e, ecrossbow_id, 10, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_one_recno_f, ecrossbow_id, 10, 1, 20)	
		}
	}


	// check need to spawn H2
	if ( FUNC("get_spawn_unit_count_in_place", spawn_h_two) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", mountain_start_recno, "E")

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("number_of_enemy_in_place", check_enemy_alive_recno, main_recno) > 0 )
			{
				// need spawn H2
				FUNC("facility_barrack_add_leader", facility_h_two_recno_a, ehinfcap_id, 700, 19, "Andrew Stretton", "Stretton")
				FUNC("facility_barrack_add_member", facility_h_two_recno_b, ehinfant_id, 700, 1, 19)			
				FUNC("facility_barrack_add_member", facility_h_two_recno_c, ehinfant_id, 700, 1, 19)			
				FUNC("facility_barrack_add_member", facility_h_two_recno_d, ehinfant_id, 700, 1, 19)			
				FUNC("facility_barrack_add_member", facility_h_two_recno_e, ehinfant_id, 700, 1, 19)			
				FUNC("facility_barrack_add_member", facility_h_two_recno_f, ehinfant_id, 700, 1, 19)			

				// ask troop 7 to chase Joan 
				boss_HI_oeight = FUNC("get_unit_team_leader_by_team_id", 12)

				if ( boss_HI_oeight > 0 )
				{
					ACTION("give_task", boss_HI_oeight, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
				}

				// ask troop 6 to chase Joan
				boss_SI_oone = FUNC("get_unit_team_leader_by_team_id", 11)

				if ( boss_SI_oone > 0 )
				{
					ACTION("give_task", boss_SI_oone, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
				}

				// ask troop 5 to chase Joan
				boss_HI_ofive = FUNC("get_unit_team_leader_by_team_id", 7)

				if ( boss_HI_ofive > 0 )
				{
					ACTION("give_task", boss_HI_ofive, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
				}
			}
		}
	}

	if ( FUNC("get_spawn_unit_count_in_place", spawn_h_two) == 0 || FUNC("get_spawn_unit_count_in_place", spawn_h_two) == 12 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", mountain_top_recno, "E")

		if ( joan_in_place_recno > 0 ) 
		{
			// need spawn H2
			FUNC("facility_barrack_add_leader", facility_h_two_recno_a, ehinfcap_id, 701, 19, "Andrew Stretton", "Stretton")
			FUNC("facility_barrack_add_member", facility_h_two_recno_b, ehinfant_id, 701, 1, 19)
			FUNC("facility_barrack_add_member", facility_h_two_recno_c, ehinfant_id, 701, 1, 19)
			FUNC("facility_barrack_add_member", facility_h_two_recno_d, ehinfant_id, 701, 1, 19)
			FUNC("facility_barrack_add_member", facility_h_two_recno_e, ehinfant_id, 701, 1, 19)
			FUNC("facility_barrack_add_member", facility_h_two_recno_f, ehinfant_id, 701, 1, 19)
		}
	}

	if ( boss_two_recno == 0 )
	{
		boss_two_recno = FUNC("get_unit_team_leader_by_team_id", 700)
		if ( boss_two_recno > 0 )
		{
			ACTION("give_task", boss_two_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}
	}

	if ( boss_ten_recno == 0 )
	{
		boss_ten_recno = FUNC("get_unit_team_leader_by_team_id", 701)
		if ( boss_ten_recno > 0 )
		{
			ACTION("give_task", boss_ten_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}
	}

	if ( team_ten_leader == 0 )
	{
		team_ten_leader = FUNC("get_unit_team_leader_by_team_id", 10)
	}

	if ( team_ten_leader > 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_one, "E")
		if ( joan_in_place_recno > 0 )
		{
			ACTION("give_task", team_ten_leader, "FOLLOW_UNIT", 1, joan_in_place_recno, 0, 0, 0)
		}
	}

	


	// *** check when player cross some places, ask AI to attack *** //

	// Spawn H8
	joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_eight, "E")

	if ( joan_in_place_recno > 0 ) 
	{
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_eight) == 0 )
		{
			// need spawn H8
			FUNC("facility_barrack_add_leader", facility_h_eight_recno_a, epolecap_id, 34, 20, "Stephan Alicie", "Alicie")
//			FUNC("facility_barrack_add_leader_order", facility_h_eight_recno_a, "APPROACH_PLACE", 1, spawn_h_eight,0,0,0,0,0)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_b, epoleman_id, 34, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_c, epoleman_id, 34, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_d, epoleman_id, 34, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_e, epoleman_id, 34, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_f, epoleman_id, 34, 1, 20)

			FUNC("facility_barrack_add_leader", facility_h_eight_recno_a, earchcap_id, 96, 20, "Theobald Alsthorpe", "Alsthorpe")
			FUNC("facility_barrack_add_member", facility_h_eight_recno_b, earcher_id, 96, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_c, earcher_id, 96, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_d, earcher_id, 96, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_e, earcher_id, 96, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_f, earcher_id, 96, 1, 20)
		}
	}


	// Spawn H9
	joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_nine, "E")

	if ( joan_in_place_recno > 0 ) 
	{
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_nine) == 0 )
		{
			// need spawn H9
			FUNC("facility_barrack_add_leader", facility_h_nine_recno_a, ehinfcap_id, 35, 20, "Willielmus Hely", "Hely")
//			FUNC("facility_barrack_add_leader_order", facility_h_nine_recno_a, "APPROACH_PLACE", 1, spawn_h_nine,0,0,0,0,0)
			FUNC("facility_barrack_add_member", facility_h_nine_recno_b, ehinfant_id, 35, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_nine_recno_c, ehinfant_id, 35, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_nine_recno_d, ehinfant_id, 35, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_nine_recno_e, ehinfant_id, 35, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_nine_recno_f, ehinfant_id, 35, 1, 20)

			FUNC("facility_barrack_add_leader", facility_h_nine_recno_a, ecrosscap_id, 95, 20, "Arnold Carter", "Carter")
			FUNC("facility_barrack_add_member", facility_h_nine_recno_b, ecrossbow_id, 95, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_nine_recno_c, ecrossbow_id, 95, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_nine_recno_d, ecrossbow_id, 95, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_nine_recno_e, ecrossbow_id, 95, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_nine_recno_f, ecrossbow_id, 95, 1, 20)
		}
		
		if ( FUNC("get_spawn_unit_count_in_place", spawn_h_eight) == 12 )
		{
			// need spawn H8
			FUNC("facility_barrack_add_leader", facility_h_eight_recno_a, ehinfcap_id, 36, 20, "Paul Bercarius", "Bercarius")
			FUNC("facility_barrack_add_member", facility_h_eight_recno_b, ehinfant_id, 36, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_c, ehinfant_id, 36, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_d, ehinfant_id, 36, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_e, ehinfant_id, 36, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_eight_recno_f, ehinfant_id, 36, 1, 20)
		}
	}

	// Spawn H10
	if ( FUNC("get_spawn_unit_count_in_place", spawn_h_ten) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_ten, "E")

		if ( joan_in_place_recno > 0 ) 
		{
			// need spawn H10
			FUNC("facility_barrack_add_leader", facility_h_ten_recno, ehinfcap_id, 37, 20, "Willlelm Couhyrd", "Couhyrd")
			FUNC("facility_barrack_add_member", facility_h_ten_recno, ehinfant_id, 37, 6, 20)

			if ( FUNC("get_end_condition_enabled", 15) > 0 && FUNC("get_end_condition_finish", 15) == 0 )
			{
				FUNC("attention_call_message", "[0210N]There is the enemy cart with supplies heading to Meung - we must stop it from reaching the castle!")
			}
		}
	}

	// Spawn H15
	if ( FUNC("get_spawn_unit_count_in_place", spawn_h_ten_five) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", spawn_h_ten_five, "E")

		if ( joan_in_place_recno > 0 ) 
		{
			// need spawn H15
			FUNC("facility_barrack_add_leader", facility_h_ten_five_recno_a, elinfcap_id, 152, 20, "Willlelm Couhyrd", "Couhyrd")
			FUNC("facility_barrack_add_member", facility_h_ten_five_recno_b, elinfant_id, 152, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_ten_five_recno_c, elinfant_id, 152, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_ten_five_recno_d, elinfant_id, 152, 1, 20)
			FUNC("facility_barrack_add_member", facility_h_ten_five_recno_e, elinfant_id, 152, 1, 20)
		}
	}


	// ask AI unit to attack 
	if ( boss_ten_three_recno > 0 )
	{
		ACTION("give_task", boss_ten_three_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
	}
	else
	{
		boss_ten_three_recno = FUNC("get_unit_team_leader_by_team_id", 34)
	}

	if ( boss_ten_four_recno > 0 )
	{
		ACTION("give_task", boss_ten_four_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
	}
	else
	{
		boss_ten_four_recno = FUNC("get_unit_team_leader_by_team_id", 96)
	}

	if ( boss_ten_five_recno > 0 && FUNC("search_for_unit_in_place", side_quest_two_recno, "P") > 0 )
	{
		ACTION("give_task", boss_ten_five_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
	}
	else
	{
		boss_ten_five_recno = FUNC("get_unit_team_leader_by_team_id", 36)
	}

	if ( FUNC("get_end_condition_enabled", 11) == 1 && boss_ten_five_recno == 0 && FUNC("search_for_unit_in_place", side_quest_two_recno, "E") > 0 )
	{
		FUNC("facility_barrack_add_leader", facility_h_eight_recno_f, ehinfcap_id, 36, 19, "Paul Bercarius", "Bercarius")
		FUNC("facility_barrack_add_member", facility_h_eight_recno_b, ehinfant_id, 36, 1, 19)
		FUNC("facility_barrack_add_member", facility_h_eight_recno_c, ehinfant_id, 36, 1, 19)
		FUNC("facility_barrack_add_member", facility_h_eight_recno_d, ehinfant_id, 36, 1, 19)
		FUNC("facility_barrack_add_member", facility_h_eight_recno_e, ehinfant_id, 36, 1, 19)
		FUNC("facility_barrack_add_member", facility_h_eight_recno_a, ehinfant_id, 36, 1, 19)
	}

	if ( boss_ten_six_recno == 0 )
	{
		boss_ten_six_recno = FUNC("get_unit_team_leader_by_team_id", 35)
	}

	if ( boss_ten_six_recno > 0 )
	{
		ACTION("give_task", boss_ten_six_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
	}

	boss_ten_six_recno = FUNC("get_unit_team_leader_by_team_id", 95)
	if ( boss_ten_six_recno > 0 )
	{
		ACTION("give_task", boss_ten_six_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
	}

	if(	team_one_five_seven_leader > 0 && FUNC( "get_can_interact_flag" , team_one_five_seven_leader ) && FUNC("is_unit_inside_place", spawn_h_ten_six , main_recno) )
	{
		FUNC("start_cut_scene_2", 1, 0, team_one_five_seven_leader, 200, ( 180 - FUNC("get_unit_dir", team_one_five_seven_leader) ), 10, 1)

		FUNC("set_idle", main_recno) 
		
		FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
		FUNC("set_unit_can_process_in_cut_scene", team_one_five_seven_leader, 1)

		WAIT{ FUNC("is_cut_scene_status_black_screen") }

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

		FUNC("change_camera_in_cut_scene", 0, team_one_five_seven_leader, 150, ( 180 - FUNC("get_unit_dir", team_one_five_seven_leader) ), 10)
		WAIT { DIALOG("add_dialog", team_one_five_seven_leader, "[0211N]You! Meddling peasants! This land is of the rightful ownership of our king Henry, and you have just trampled across it uninvited - for that you shall pay dearly!") }

		DIALOG("del_all_dialog") 
		FUNC("end_cut_scene_2", 0, 1)
		WAIT{ FUNC("is_cut_scene_status_black_screen") }
	
		//spawn troops
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_a, ehinfant_id, 151, 3, 20)
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_b, ehinfant_id, 151, 3, 20)
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_c, elinfant_id, 151, 3, 20)

		FUNC("facility_barrack_add_leader", facility_h_ten_six_recno_d, eexarcherc_id, 900, 20, "Stephan Alicie", "Alicie")
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_e, eexarcher_id, 900, 2, 20)
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_f, eexarcher_id, 900, 1, 20)
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_g, eexarcher_id, 900, 2, 20)
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_h, eexarcher_id, 900, 1, 20)
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_i, earcher_id, 151, 2, 20)
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_j, earcher_id, 151, 1, 20)
		FUNC("facility_barrack_add_member", facility_h_ten_six_recno_k, earcher_id, 151, 2, 20)

		WAIT{ FUNC("is_cut_scene_finished") }		

		FUNC("set_can_interact_flag", team_one_five_seven_leader, 0)		
		FUNC("stop_curr_task" , team_one_five_seven_leader )
	}
	else
	{
		team_one_five_seven_leader = FUNC("get_unit_team_leader_by_team_id", 157)
	}

	if ( team_nine_zero_zero_leader > 0 )
	{
		ACTION("give_task", team_nine_zero_zero_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
	}
	else
	{
		team_nine_zero_zero_leader = FUNC("get_unit_team_leader_by_team_id", 900)
	}
	
	if ( bourges_citizen_recno == 0 && FUNC("get_place_captured", settlement_bourges_recno) == 1 )
	{
		bourges_citizen_recno = FUNC("search_unit_by_name", "Raymond Fritier")

		if ( bourges_citizen_recno > 0 )
		{
			FUNC("set_can_interact_flag", bourges_citizen_recno, 1)					
		}
	}
	
	if ( blois_citizen_recno == 0 && FUNC("get_place_captured", settlement_blois_recno) == 1 )
	{
		blois_citizen_recno = FUNC("search_unit_by_name", "Olivier Gruier")

		if ( blois_citizen_recno > 0 )
		{
			FUNC("set_can_interact_flag", blois_citizen_recno, 1)					
		}
	}

	if ( blois_citizen_recno_two == 0 && FUNC("get_place_captured", settlement_blois_recno) == 1 )
	{
		blois_citizen_recno_two = FUNC("search_unit_by_name", "Josserand Boiselier")

		if ( blois_citizen_recno_two > 0 )
		{
			FUNC("set_can_interact_flag", blois_citizen_recno_two, 1)
		}
	}

	if ( chateaudun_citizen_recno_a == 0 && FUNC("get_place_captured", town_chateaudun_recno) == 1 )
	{
		chateaudun_citizen_recno_a = FUNC("search_unit_by_name", "Anseau Paucier")

		if ( chateaudun_citizen_recno_a > 0 )
		{
			FUNC("set_can_interact_flag", chateaudun_citizen_recno_a, 1)
		}
	}

	if ( chateaudun_citizen_recno_b == 0 && FUNC("get_place_captured", town_chateaudun_recno) == 1 )
	{
		chateaudun_citizen_recno_b = FUNC("search_unit_by_name", "Apollina Chaenier")

		if ( chateaudun_citizen_recno_b > 0 )
		{
			FUNC("set_can_interact_flag", chateaudun_citizen_recno_b, 1)
		}
	}

	if ( chateaudun_citizen_recno_c == 0 && FUNC("get_place_captured", town_chateaudun_recno) == 1 )
	{
		chateaudun_citizen_recno_c = FUNC("search_unit_by_name", "Conon Harier")

		if ( chateaudun_citizen_recno_c > 0 )
		{
			FUNC("set_can_interact_flag", chateaudun_citizen_recno_c, 1)
		}
	}

	if ( chateaudun_citizen_recno_d == 0 && FUNC("get_place_captured", town_chateaudun_recno) == 1 )
	{
		chateaudun_citizen_recno_d = FUNC("search_unit_by_name", "Damien Tartier")

		if ( chateaudun_citizen_recno_d > 0 )
		{
			FUNC("set_can_interact_flag", chateaudun_citizen_recno_d, 1)
		}
	}

	if ( chateaudun_citizen_recno_e == 0 && FUNC("get_place_captured", town_chateaudun_recno) == 1 )
	{
		chateaudun_citizen_recno_e = FUNC("search_unit_by_name", "Ponce Mercier")

		if ( chateaudun_citizen_recno_e > 0 )
		{
			FUNC("set_can_interact_flag", chateaudun_citizen_recno_e, 1)
		}
	}

	if ( chateaudun_citizen_recno_f == 0 && FUNC("get_place_captured", town_chateaudun_recno) == 1 )
	{
		chateaudun_citizen_recno_f = FUNC("search_unit_by_name", "Eudes Barrillier")

		if ( chateaudun_citizen_recno_f > 0 )
		{
			FUNC("set_can_interact_flag", chateaudun_citizen_recno_f, 1)
		}
	}

	if ( FUNC("get_scenario_bit_flag", 11) == 0 && FUNC("get_place_captured", settlement_montargis_recno) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", side_quest_two_recno, "P")

		if ( joan_in_place_recno > 0 )
		{
			FUNC("attention_call_message_2", "[0212N]The settlement of Montargis is under enemy occupation! Men, let's help the inhabitants rid themselves of the enemy threat!", jean_recno)

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


	if ( talbot_recno > 0 )
	{
		if( FUNC("get_unit_retreat", talbot_recno) == -1 )
		{
			FUNC("start_cut_scene_2", 1, 0, talbot_recno, 200, ( 180 - FUNC("get_unit_dir", talbot_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", talbot_recno, 1)

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

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, talbot_recno, 200, ( 180 - FUNC("get_unit_dir", talbot_recno) ), 10)

			WAIT{ DIALOG("add_dialog", talbot_recno, "[0213N]This is the second time you have defeated me. Do not count your victories yet, for we shall meet again, and I shall have the last laugh!") }

			FUNC("enable_unit_bounding_volume", talbot_recno, 0)

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

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

			WAIT{ FUNC("is_cut_scene_finished") }

			FUNC("set_end_condition_finish", 32, "WIN")

			talbot_recno = 0
		}
	}

	if ( bedford_recno > 0 )
	{
		if( FUNC("get_unit_retreat", bedford_recno) == -1 )
		{
			FUNC("start_cut_scene_2", 1, 0, bedford_recno, 200, ( 180 - FUNC("get_unit_dir", bedford_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", bedford_recno, 1)

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

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, bedford_recno, 200, ( 80 - FUNC("get_unit_dir", bedford_recno) ), 10)

			WAIT{ DIALOG("add_dialog", bedford_recno, "[0214N]I do not understand - how? I am big and strong and next to me you seem so puny! I shall now retreat, and inform Sir William de la Pole that his brother is dead.") }
			WAIT{ DIALOG("add_dialog", bedford_recno, "[0215N]And... as for you... blast it! Start to count the days till we meet again, for that day will be your destruction!") }

			FUNC("enable_unit_bounding_volume", bedford_recno, 0)

			WAIT{ ACTION("give_order", bedford_recno, "APPROACH_PLACE", 1, 1, xpoint_recno, 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", bedford_recno)

			WAIT{ FUNC("is_cut_scene_finished") }
			bedford_recno = 0

			if ( FUNC("get_end_condition_finish", 21) == 0 )
			{
				FUNC("set_end_condition_finish", 21, "WIN")
				FUNC("attention_call_message", "[0216N]You have received 2000 experience points")
				FUNC("add_unit_experience", main_recno, 2000)
			}

			if ( FUNC("number_of_fightable_enemy_in_place", castle_meung_recno, main_recno) > 0 )
			{
				FUNC("attention_call_message", "[0217N]You have rid Meung of the English generals! The enemy forces are in disarray! Now is the time to eliminate them and reclaim Meung as French territory!")
			}
		}
	}

//	if ( FUNC("get_scenario_bit_flag", 22) == 1 && FUNC("get_scenario_bit_flag", 14) == 0 )
//	{
//		if ( FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, joan_recno) ||
//			 FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, la_hire_recno) ||
//			 FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, jean_recno) ||
//			 FUNC("get_item_quantity_in_unit_inventory", imperial_scroll_id, alencon_recno) )
//		{
//			FUNC("set_end_condition_enabled", 15, 1)

//			FUNC("facility_barrack_add_leader", side_quest_a_one, epolecap_id, 205, 18, "Triston Rote", "Rote")
//			FUNC("facility_barrack_add_member", side_quest_a_two, epoleman_id, 205, 1, 18)
//			FUNC("facility_barrack_add_member", side_quest_a_three, epoleman_id, 205, 1, 18)
//			FUNC("facility_barrack_add_member", side_quest_a_four, epoleman_id, 205, 1, 18)

//			FUNC("facility_barrack_add_leader", side_quest_a_six, cart_id, 201, 18, "Bertram Framton", "Framton")
//			FUNC("facility_barrack_add_leader", side_quest_a_two_zero, citizen_one_id, 0, 18, "CartDriver", "CartDriver")

//			FUNC("facility_barrack_add_member", side_quest_a_eight, ecrossbow_id, 205, 1, 18)
//			FUNC("facility_barrack_add_member", side_quest_a_nine, ecrossbow_id, 205, 1, 18)
//			FUNC("facility_barrack_add_member", side_quest_a_ten, ecrossbow_id, 205, 1, 18)

//			FUNC("facility_barrack_add_member", side_quest_a_ten_one, elinfant_id, 205, 1, 18)
//			FUNC("facility_barrack_add_member", side_quest_a_ten_two, elinfant_id, 205, 1, 18)
//			FUNC("facility_barrack_add_member", side_quest_a_ten_three, elinfant_id, 205, 1, 18)
//			FUNC("facility_barrack_add_member", side_quest_a_ten_four, elinfant_id, 205, 1, 18)

//			FUNC("set_scenario_bit_flag", 14, 1)
//		}
//	}

	if ( FUNC("get_scenario_bit_flag", 20) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", reach_jargeau_recno, "E")

		if ( joan_in_place_recno == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", reach_jargeau_recno_two, "E")
		}

		if ( joan_in_place_recno > 0 )
		{
			FUNC("attention_call_message", "[0218N]If you wish to enter enemy castles, you will need to attack the gate, either by explosive arrows or siege machines in the same way you would attack enemy troops.", 1)

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

	// retreat if William dies
	if ( FUNC("get_scenario_bit_flag", 1) == 0 && FUNC("search_for_unit_in_place", get_reinforcement_recno, "E") > 0 )
	{
		FUNC("set_scenario_bit_flag", 1, 1)

		FUNC("facility_barrack_add_leader", facility_talbot_a, fastolf_id, 54, 24, "John Fastolf", "Fastolf")
		FUNC("facility_barrack_add_member", facility_talbot_b, epoleman_id, 54, 1, 21)
		FUNC("facility_barrack_add_member", facility_talbot_c, epoleman_id, 54, 1, 21)
		FUNC("facility_barrack_add_member", facility_talbot_d, earcher_id, 54, 1, 21)
		FUNC("facility_barrack_add_member", facility_talbot_e, earcher_id, 54, 1, 21)
		FUNC("facility_barrack_add_member", facility_talbot_f, earcher_id, 54, 1, 21)
		FUNC("facility_barrack_add_member", facility_talbot_g, epoleman_id, 54, 1, 21)
		FUNC("facility_barrack_add_member", facility_talbot_h, epoleman_id, 54, 1, 21)
		FUNC("facility_barrack_add_member", facility_talbot_i, epoleman_id, 54, 1, 21)
		FUNC("facility_barrack_add_member", facility_talbot_j, epoleman_id, 54, 1, 21)

		FUNC("facility_barrack_add_leader", facility_scales_a, scales_id, 167, 23, "Lord Scales", "Scales")
		FUNC("facility_barrack_add_member", facility_scales_b, epoleman_id, 167, 1, 21)
		FUNC("facility_barrack_add_member", facility_scales_c, epoleman_id, 167, 1, 21)
		FUNC("facility_barrack_add_member", facility_scales_d, earcher_id, 167, 1, 21)
		FUNC("facility_barrack_add_member", facility_scales_e, earcher_id, 167, 1, 21)
		FUNC("facility_barrack_add_member", facility_scales_f, earcher_id, 167, 1, 21)
		FUNC("facility_barrack_add_member", facility_scales_g, epoleman_id, 167, 1, 21)
		FUNC("facility_barrack_add_member", facility_scales_h, epoleman_id, 167, 1, 21)
		FUNC("facility_barrack_add_member", facility_scales_i, epoleman_id, 167, 1, 21)
		FUNC("facility_barrack_add_member", facility_scales_j, epoleman_id, 167, 1, 21)

		FUNC("facility_barrack_add_leader", facility_richemont_aa, richemont_id, 55, 15, "Arthur de Richemont", "Arthur")
		FUNC("facility_barrack_add_member", facility_richemont_b, flinfant_id, 55, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_c, flinfant_id, 55, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_d, flinfant_id, 55, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_e, flinfant_id, 55, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_f, flinfant_id, 55, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_g, fcrossbow_id, 55, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_h, fcrossbow_id, 55, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_i, fcrossbow_id, 55, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_j, fcrossbow_id, 55, 1, 19)

		FUNC("facility_barrack_add_leader", facility_richemont_a, fhinfcap_id, 602, 15, "Mareel Fruitier", "Fruitier")
		FUNC("facility_barrack_add_member", facility_richemont_ab, fhinfant_id, 602, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_ac, fhinfant_id, 602, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_ad, fhinfant_id, 602, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_ae, fhinfant_id, 602, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_af, fhinfant_id, 602, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_ag, fhinfant_id, 602, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_ah, fhinfant_id, 602, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_ai, fhinfant_id, 602, 1, 19)
		FUNC("facility_barrack_add_member", facility_richemont_aj, fhinfant_id, 602, 1, 19)

		FUNC("facility_barrack_add_leader", facility_suffolk_a, glasdale_id, 38, 25, "Sir William Glasdale", "Glasdale")
		FUNC("facility_barrack_add_member", facility_suffolk_b, ehinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_c, ehinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_d, ehinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_e, ehinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_f, ehinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_g, ehinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_h, elinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_i, elinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_j, elinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_k, elinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_n, elinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_m, elinfant_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_l, emaceman_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_o, emaceman_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_p, emaceman_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_q, emaceman_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_r, emaceman_id, 38, 3, 21)
		FUNC("facility_barrack_add_member", facility_suffolk_s, emaceman_id, 38, 3, 21)
	}
	else
	{
		talbot_recno = FUNC("search_unit_by_name" , "Lord Talbot")

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

	if ( william_recno )
	{
		ACTION("give_task", william_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
	}
	else
	{
		william_recno = FUNC("search_unit_by_name", "William Gough")
	}

	if ( richemont_recno == 0 )
	{
		richemont_recno = FUNC("search_unit_by_code", "arthur_de_richemont")

		if ( richemont_recno > 0 )
		{
			FUNC("give_item_to_unit", "fd_bread_L", 1, 5, richemont_recno)
			FUNC("give_item_to_unit", "fd_apple", 1, 5, richemont_recno)
			FUNC("give_item_to_unit_troop", "fd_bread_L", 1, 5, richemont_recno)
		}
	}

	// retreat if Suffolk dies
	if ( glasdale_recno )
	{
			if( FUNC("get_unit_retreat", glasdale_recno) == -1 )
			{
				FUNC("start_cut_scene_2", 1, 0, glasdale_recno, 200, ( 180 - FUNC("get_unit_dir", glasdale_recno) ), 10, 1)
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
				FUNC("set_unit_can_process_in_cut_scene", glasdale_recno, 1)

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

				WAIT{ FUNC("is_cut_scene_status_black_screen") }
				FUNC("change_camera_in_cut_scene", 0, glasdale_recno, 200, ( 180 - FUNC("get_unit_dir", glasdale_recno) ), 10)

				if ( FUNC("get_scenario_bit_flag", 19) == 0 )
				{
					WAIT{ DIALOG("add_dialog", glasdale_recno, "[0219N]Blast! I have been forced to retreat to our camp!") }

					FUNC("enable_unit_bounding_volume", glasdale_recno, 0)

					WAIT{ ACTION("give_order", glasdale_recno, "APPROACH_PLACE", 1, 1, town_janville_recno, 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", glasdale_recno)

					WAIT{ FUNC("is_cut_scene_finished") }

					FUNC("facility_barrack_add_leader", spawn_javille_a, glasdale_id, 184, 21, "Sir William Glasdale", "Glasdale")
					FUNC("facility_barrack_add_member", spawn_javille_b, ehinfant_id, 184, 1, 21)
					FUNC("facility_barrack_add_member", spawn_javille_c, ehinfant_id, 184, 1, 21)
					FUNC("facility_barrack_add_member", spawn_javille_d, eexarcher_id, 184, 1, 21)
					FUNC("facility_barrack_add_member", spawn_javille_e, eexarcher_id, 184, 1, 21)
					FUNC("facility_barrack_add_member", spawn_javille_f, eexarcher_id, 184, 1, 21)
					FUNC("facility_barrack_add_member", spawn_javille_g, eexarcher_id, 184, 1, 21)
					FUNC("facility_barrack_add_member", spawn_javille_h, epoleman_id, 184, 1, 21)
					FUNC("facility_barrack_add_member", spawn_javille_i, epoleman_id, 184, 1, 21)
					FUNC("facility_barrack_add_member", spawn_javille_j, epoleman_id, 184, 1, 21)

					glasdale_recno = 0

					FUNC("attention_call_message_2", "[0220N]Sir William Glasdale is retreating, and is heading north towards Janville!", jean_recno)

					if ( FUNC("get_place_captured", castle_beaugency_recno) == 0 )
					{
						FUNC("attention_call_message_2", "[0221N]Let us first capture Beaugency! We can always catch up with Glasdale and annihilate him later!", la_hire_recno)
					}
					else
					{
						FUNC("attention_call_message_2", "[0222N]Let us follow Sir William Glasdale and annihilate him!", la_hire_recno)
					}

					FUNC("minimap_set_way_point", 9, 25940.0, 68780.0, 200.0, 1, 0)

					FUNC("set_scenario_bit_flag", 19, 1)
				}
				else
				{
					// second retreat
					WAIT{ DIALOG("add_dialog", glasdale_recno, "[0223N]I have failed this time, but my spirit is willing - you may have taken Loire, but I will never allow you to reach Reims with your king!") }

					FUNC("enable_unit_bounding_volume", glasdale_recno, 0)

					WAIT{ ACTION("give_order", glasdale_recno, "APPROACH_PLACE", 1, 1, castle_beaugency_recno, 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", glasdale_recno)

					FUNC("set_end_condition_finish", 16, "WIN")

					WAIT{ FUNC("is_cut_scene_finished") }

					FUNC("attention_call_message", "[0224N]Sir William Glasdale has scampered away from harm's way! Without a leader, the English are vulnerable! Now is the time to finish them all off!")
				}
			}
			else
			{
				//set alexander to defend place
				if ( FUNC("get_scenario_bit_flag", 19) == 0 && FUNC("get_scenario_bit_flag", 19) == 0)
				{
					ACTION("give_task", glasdale_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
				}
			}
	}
	else
	{
		if ( FUNC("get_scenario_bit_flag", 19) == 0 )
		{
			glasdale_recno = FUNC("search_unit_by_name" , "Sir William Glasdale")

			if ( glasdale_recno > 0 )
			{
				FUNC("give_item_to_unit", "FD_FISH", 1, 3, glasdale_recno)
			}
		}
	}

	if ( glasdale_recno )
	{
		if ( FUNC("get_scenario_bit_flag", 19) == 0 )
		{
			FUNC("set_unit_retreat", glasdale_recno, 1)
			ACTION("give_task", glasdale_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
		}
		else
		{
			FUNC("set_unit_retreat", glasdale_recno, 1)
		}

		if ( FUNC("get_end_condition_enabled", 16) == 0 )
		{
			FUNC("set_scenario_bit_flag", 10, 1)
			FUNC("set_end_condition_enabled", 16, 1)
			FUNC("set_end_condition_enabled", 24, 1)
			FUNC("set_end_condition_enabled", 25, 1)
		}

		if ( FUNC("get_scenario_event_bit_flag_2", 12) == 0 )
		{
			FUNC("start_cut_scene_2", 1, 0, glasdale_recno, 200, ( 180 - FUNC("get_unit_dir", glasdale_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			
			WAIT{ FUNC("pause_script", 1) }

			WAIT{ FUNC("is_cut_scene_status_black_screen") }

			FUNC("change_camera_in_cut_scene", 0, 15726, 65500, 81, 242, -11, 9)

			WAIT{ DIALOG("add_dialog", glasdale_recno, "[0225N]The French think that they can just waltz into our territory and walk away without a care in the world! Well, men, we'll have to show our guests the way out, won't we?") }

			FUNC("change_camera_in_cut_scene", 0, 16265, 65521, 81, 242, -159, 8)

			WAIT{ DIALOG("add_dialog", glasdale_recno, "[0226N]Men, storm the castle! I want to see that maid's head on a platter!") }

			if ( fastolf_recno == 0 )
			{
				fastolf_recno = FUNC("search_unit_by_name", "John Fastolf")
			}

			FUNC("give_item_to_unit", "FD_FISH", 1, 2, fastolf_recno)

			FUNC("change_camera_in_cut_scene", 0, fastolf_recno, 100, ( 90 - FUNC("get_unit_dir", fastolf_recno) ), -5)
			WAIT{ DIALOG("add_dialog", fastolf_recno, "[0227N]...and I, my dear friend Sir William Glasdale, will help see your wish fulfilled - I, too, would enjoy seeing the scourge of the Armagnacs burnt on a stake!") }

			if ( scales_recno == 0 )
			{
				scales_recno = FUNC("search_unit_by_name", "Lord Scales")
			}

			FUNC("give_item_to_unit", "FD_FISH", 1, 2, scales_recno)

			FUNC("change_camera_in_cut_scene", 0, 1566, 57826, 78, 350, -97, 1)

			WAIT{ DIALOG("add_dialog", scales_recno, "[0228N]We must not allow Beaugency to capitulate! The future of this war is at stake! Charge, men!") }

			FUNC("change_camera_in_cut_scene", 0, 11544, 64527, 441, 176, -9, 11)
			if ( FUNC("get_gate_state", beaugency_north_gate_recno) == 0 )
			{
				FUNC("add_gate_trigger", beaugency_north_gate_recno, 0)
			}
			WAIT{ DIALOG("add_dialog", jean_recno, "[0229N]The enemy has raised the gate! Sir Glasdale is rushing into the castle!") }

//			FUNC("change_camera_in_cut_scene", 0, jean_recno, 200, ( 180 - FUNC("get_unit_dir", jean_recno) ), 10)
			WAIT{ DIALOG("add_dialog", jean_recno, "[0230N]It seems that we are outnumbered this time! What are we going to do?") }

			FUNC("change_camera_in_cut_scene", 0, 1556, 68155, 442, 350, -90, 27)
			WAIT{ DIALOG("add_dialog", richemont_recno, "[0231N]Fear not, brothers in arms! I have answered your prayers! Lead the way, and I shall aid your fight!") }

			FUNC("change_camera_in_cut_scene", 0, 1560, 66753, 19, 350, 95, 14)
			WAIT{ DIALOG("add_dialog", richemont_recno, "[0232N]Let us expel these foul English and rid us of their stench!") }

			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_scenario_event_bit_flag_2", 12, 1)

			FUNC("set_unit_retreat", fastolf_recno, 1)
			FUNC("set_unit_retreat", scales_recno, 1)
			FUNC("set_unit_retreat", glasdale_recno, 1)

			ACTION("give_task", team_one_three_nine_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
			ACTION("give_task", team_one_four_zero_leader, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)

			FUNC("attention_call_message", "[0233N]You can now count on general Arthur de Richemont and his men to aid you in the siege of Beaugency!")

			WAIT{ FUNC("is_cut_scene_finished") }
		}
	}
	else
	{
		if ( glasdale_recno == 0 && FUNC("get_scenario_bit_flag", 1) > 0 && FUNC("get_end_condition_finish", 16) == 0 )
		{
			glasdale_recno = FUNC("search_unit_by_name", "Sir William Glasdale")

			if ( glasdale_recno > 0 && FUNC("get_scenario_bit_flag", 19) == 1 )
			{
				FUNC("set_scenario_event_bit_flag_2", 4, 1)
			}
		}
	}

	if ( lux_recno > 0 )
	{
		if( FUNC("get_unit_retreat", lux_recno) == -1 )
		{
			FUNC("start_cut_scene_2", 1, 0, lux_recno, 200, ( 180 - FUNC("get_unit_dir", lux_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", lux_recno, 1)

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

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, lux_recno, 200, ( 180 - FUNC("get_unit_dir", lux_recno) ), 10)

			WAIT{ DIALOG("add_dialog", lux_recno, "[0234N]These accursed French have injured me! I shall have to retreat in order to fight another day!") }

			FUNC("enable_unit_bounding_volume", lux_recno, 0)

			WAIT{ ACTION("give_order", lux_recno, "APPROACH_PLACE", 1, 1, castle_meung_recno, 0, 0, 0, 3000) }

			FUNC("set_end_condition_finish", 37, "WIN")

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

			lux_recno = 0

			WAIT{ FUNC("is_cut_scene_finished") }
		}
	}

	if ( scales_recno > 0 )
	{
		if( FUNC("get_unit_retreat", scales_recno) == -1 )
		{
			FUNC("start_cut_scene_2", 1, 0, scales_recno, 200, ( 180 - FUNC("get_unit_dir", scales_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", scales_recno, 1)

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

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, scales_recno, 200, ( 100 - FUNC("get_unit_dir", scales_recno) ), 10)

			if ( FUNC("get_scenario_event_bit_flag_2", 30) == 0 )
			{
				WAIT{ DIALOG("add_dialog", scales_recno, "[0235N]My campaign has fared poorly - I will be returning to our camp at Janville immediately!") }

				FUNC("enable_unit_bounding_volume", scales_recno, 0)

				WAIT{ ACTION("give_order", scales_recno, "APPROACH_PLACE", 1, 1, town_janville_recno, 0, 0, 0, 3000) }

				FUNC("facility_barrack_add_leader", spawn_javille_k, scales_id, 182, 21, "Lord Scales", "Scales")
				FUNC("facility_barrack_add_member", spawn_javille_l, emaceman_id, 182, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_m, emaceman_id, 182, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_n, emaceman_id, 182, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_o, emaceman_id, 182, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_p, emaceman_id, 182, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_q, epoleman_id, 182, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_r, epoleman_id, 182, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_s, epoleman_id, 182, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_t, epoleman_id, 182, 1, 21)

				FUNC("set_scenario_event_bit_flag_2", 30, 1)
			}
			else
			{
				WAIT{ DIALOG("add_dialog", scales_recno, "[0236N]Our work here is no more - the cause is lost, men! Let us retreat and help our troops to the north!") }

				FUNC("enable_unit_bounding_volume", scales_recno, 0)

				FUNC("set_end_condition_finish", 25, "WIN")

				WAIT{ ACTION("give_order", scales_recno, "APPROACH_PLACE", 1, 1, town_janville_recno, 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", scales_recno)

			scales_recno = 0

			WAIT{ FUNC("is_cut_scene_finished") }
		}
	}
	else
	{
		if ( scales_recno == 0 && FUNC("get_scenario_bit_flag", 1) > 0 && FUNC("get_end_condition_finish", 25) == 0 )
		{
			scales_recno = FUNC("search_unit_by_code" , "LORD_SCALES")
			FUNC("set_unit_retreat", scales_recno, 1)

			if ( FUNC("get_scenario_bit_flag", 19) == 0 && FUNC("get_scenario_event_bit_flag_2", 30) == 0)
			{
				ACTION("give_task", scales_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
			}
		}
	}

	if ( fastolf_recno > 0 )
	{
		if( FUNC("get_unit_retreat", fastolf_recno) == -1 )
		{
			FUNC("start_cut_scene_2", 1, 0, fastolf_recno, 200, ( 180 - FUNC("get_unit_dir", fastolf_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", fastolf_recno, 1)

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

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, fastolf_recno, 200, ( 180 - FUNC("get_unit_dir", fastolf_recno) ), 10)

			if ( FUNC("get_scenario_event_bit_flag_2", 31) == 0 )
			{
				WAIT{ DIALOG("add_dialog", fastolf_recno, "[0237N]My men and I have experienced a severe set-back – I must return to camp!") }

				FUNC("enable_unit_bounding_volume", fastolf_recno, 0)

				WAIT{ ACTION("give_order", fastolf_recno, "APPROACH_PLACE", 1, 1, town_janville_recno, 0, 0, 0, 3000) }

				FUNC("facility_barrack_add_leader", spawn_javille_u, fastolf_id, 183, 21, "John Fastolf", "Fastolf")
				FUNC("facility_barrack_add_member", spawn_javille_v, ehinfant_id, 183, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_w, ehinfant_id, 183, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_x, ehinfant_id, 183, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_y, ehinfant_id, 183, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_z, ehinfant_id, 183, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_aa, epoleman_id, 183, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_ab, epoleman_id, 183, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_ac, epoleman_id, 183, 1, 21)
				FUNC("facility_barrack_add_member", spawn_javille_ad, epoleman_id, 183, 1, 21)

				FUNC("set_scenario_event_bit_flag_2", 31, 1)
			}
			else
			{
				WAIT{ DIALOG("add_dialog", fastolf_recno, "[0238N]Wounded I am and need to seek safer grounds! Englishmen, you shall kill these French miscreants where I failed!") }

				FUNC("enable_unit_bounding_volume", fastolf_recno, 0)

				WAIT{ ACTION("give_order", fastolf_recno, "APPROACH_PLACE", 1, 1, town_janville_recno, 0, 0, 0, 3000) }

				FUNC("set_end_condition_finish", 24, "WIN")
			}

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

			fastolf_recno = 0

			WAIT{ FUNC("is_cut_scene_finished") }
		}
	}
	else
	{
		if ( fastolf_recno == 0 && FUNC("get_scenario_bit_flag", 1) > 0 && FUNC("get_end_condition_finish", 24) == 0 )
		{
			fastolf_recno = FUNC("search_unit_by_code" , "JOHN_FASTOLF")
			FUNC("set_unit_retreat", fastolf_recno, 1)
			
			if ( FUNC("get_scenario_event_bit_flag_2", 12) == 0  && FUNC("get_scenario_event_bit_flag_2", 31) == 0)
			{
				ACTION("give_task", fastolf_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
			}
		}
	}

	if ( FUNC("get_scenario_bit_flag", 19) == 0 && FUNC("get_scenario_bit_flag", 1) > 0 )
	{
		if ( glasdale_recno == 0 )
		{
			glasdale_recno = FUNC("search_unit_by_code", "WILLIAM_GLASDALE")
		}

		ACTION("give_task", glasdale_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
	}

	if ( FUNC("get_scenario_event_bit_flag_2", 30) == 0 && FUNC("get_scenario_bit_flag", 1) > 0 )
	{
		if ( scales_recno == 0 )
		{
			scales_recno = FUNC("search_unit_by_code", "LORD_SCALES")
		}

		ACTION("give_task", scales_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
	}

	if ( FUNC("get_scenario_event_bit_flag_2", 31) == 0 && FUNC("get_scenario_bit_flag", 1) > 0 )
	{
		if ( fastolf_recno == 0 )
		{
			fastolf_recno = FUNC("search_unit_by_code", "JOHN_FASTOLF")
		}

		ACTION("give_task", fastolf_recno, "FOLLOW_UNIT", 1, main_recno, 0, 0, 0)
	}

	if ( FUNC("get_wall_hp", jargeau_north_right) == 0 && FUNC("get_scenario_bit_flag", 5) == 0 ) 
	{
		FUNC("del_unit_team", 52)
		FUNC("reset_spawn_count_in_facility", facility_jargeau_north_tower_right_ground)
		FUNC("set_scenario_bit_flag", 5, 1)
	}

	if ( FUNC("get_wall_hp", jargeau_north_left) == 0 && FUNC("get_scenario_bit_flag", 6) == 0 ) 
	{
		FUNC("del_unit_team", 49)
		FUNC("reset_spawn_count_in_facility", facility_jargeau_north_tower_left_ground)
		FUNC("set_scenario_bit_flag", 6, 1)
	}

	if ( FUNC("get_wall_hp", jargeau_west_right) == 0 && FUNC("get_scenario_bit_flag", 7) == 0 ) 
	{
		FUNC("del_unit_team", 66)
		FUNC("reset_spawn_count_in_facility", facility_jargeau_west_tower_right_ground)
		FUNC("set_scenario_bit_flag", 7, 1)
	}

	if ( FUNC("get_wall_hp", jargeau_west_left) == 0 && FUNC("get_scenario_bit_flag", 8) == 0 ) 
	{
		FUNC("del_unit_team", 80)
	
		FUNC("set_scenario_bit_flag", 8, 1)
	}

	if ( FUNC("get_wall_hp", meung_left_tower) == 0 && FUNC("get_scenario_event_bit_flag_2", 8) == 0 ) 
	{
		FUNC("del_unit_team", 171)
		FUNC("set_scenario_event_bit_flag_2", 8, 1)
	}

	if ( FUNC("get_wall_hp", meung_right_tower) == 0 && FUNC("get_scenario_event_bit_flag_2", 9) == 0 ) 
	{
		FUNC("del_unit_team", 170)
		FUNC("set_scenario_event_bit_flag_2", 9, 1)
	}

	// --- Side quest --- //

	if ( FUNC("get_scenario_event_bit_flag_3", 1) == 0 && FUNC("get_end_condition_enabled", 26) == 1 )
	{
		INT towerLeftCount
		towerLeftCount = 0

		if ( FUNC("get_wall_hp", jargeau_north_right) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( FUNC("get_wall_hp", jargeau_north_left) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( FUNC("get_wall_hp", jargeau_west_right) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( FUNC("get_wall_hp", jargeau_west_left) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( towerLeftCount == 0 )
		{
			FUNC("attention_call_message_2", "[0239N]Methinks the enemy guard towers will trouble us no more, for that was the last one standing!", la_hire_recno)

			FUNC("set_end_condition_finish", 26, "WIN")
			FUNC("set_scenario_event_bit_flag_3", 1, 1)
		}
	}

	if ( FUNC("get_scenario_bit_flag", 3) == 0 && FUNC("get_place_captured", town_chateauneut_recno_one) == 1 )
	{
		INT towerLeftCount
		towerLeftCount = 0

		if ( FUNC("get_wall_hp", jargeau_north_right) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( FUNC("get_wall_hp", jargeau_north_left) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( FUNC("get_wall_hp", jargeau_west_right) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( FUNC("get_wall_hp", jargeau_west_left) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( towerLeftCount < 2 )
		{
			FUNC("set_end_condition_enabled", 10, 1)
			FUNC("attention_call_message", "[0240N]Enemy reinforcements have been spotted on their way to Chateauneut. You have five minutes to rid the town of all enemy hostilities!")
//			FUNC("attention_call_message", "")

			FUNC("minimap_set_way_point", 7, 14959.0, 3557.0, 200.0, 1, 0)		

			FUNC("set_objective_count_time", 300)
			FUNC("set_scenario_count_time")
//			FUNC("start_kill_interface", 3)
//			FUNC("set_kill_citizen_limit", 300)

			// spawn enemy
//			FUNC("facility_barrack_add_leader_order", side_quest_one_a, "APPROACH_PLACE", 1, town_chateauneut_recno_two,0,0,0,0,0)
			FUNC("facility_barrack_add_leader", side_quest_one_a, ehinfcap_id, 161, 20, "Elias Mellor", "Mellor")
			FUNC("facility_barrack_add_member", side_quest_one_b, ehinfant_id, 161, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_c, ehinfant_id, 161, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_d, ehinfant_id, 161, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_e, ehinfant_id, 161, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_f, ehinfant_id, 161, 1, 20)

//			FUNC("facility_barrack_add_leader_order", side_quest_one_a, "APPROACH_PLACE", 1, town_chateauneut_recno_two,0,0,0,0,0)
			FUNC("facility_barrack_add_leader", side_quest_one_f, epolecap_id, 162, 20, "Stiward Sower", "Sower")
			FUNC("facility_barrack_add_member", side_quest_one_b, epoleman_id, 162, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_c, epoleman_id, 162, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_d, epoleman_id, 162, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_e, epoleman_id, 162, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_a, epoleman_id, 162, 1, 20)

//			FUNC("facility_barrack_add_leader_order", side_quest_one_g, "APPROACH_PLACE", 1, town_chateauneut_recno_two,0,0,0,0,0)
			FUNC("facility_barrack_add_leader", side_quest_one_g, elinfcap_id, 163, 20, "James Waly", "Waly")
			FUNC("facility_barrack_add_member", side_quest_one_h, elinfant_id, 163, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_i, elinfant_id, 163, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_j, elinfant_id, 163, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_k, elinfant_id, 163, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_l, elinfant_id, 163, 1, 20)

//			FUNC("facility_barrack_add_leader_order", side_quest_one_g, "APPROACH_PLACE", 1, town_chateauneut_recno_two,0,0,0,0,0)
			FUNC("facility_barrack_add_leader", side_quest_one_l, ecrosscap_id, 164, 20, "Triston Rote", "Rote")
			FUNC("facility_barrack_add_member", side_quest_one_h, ecrossbow_id, 164, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_i, ecrossbow_id, 164, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_j, ecrossbow_id, 164, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_k, ecrossbow_id, 164, 1, 20)
			FUNC("facility_barrack_add_member", side_quest_one_g, ecrossbow_id, 164, 1, 20)

			FUNC("set_place_captured", town_chateauneut_recno_one, 0)
			FUNC("set_place_captured", town_chateauneut_recno_two, 0)

			FUNC("set_territory_nation", "Chateauneut", "English")

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

	if ( FUNC("get_end_condition_enabled", 10) > 0 && FUNC("get_end_condition_finish", 10) == 0 )
	{
		if ( FUNC("get_scenario_count_time") > 240000 && FUNC("get_scenario_event_bit_flag_3", 30) == 0 )
		{
			FUNC("show_objective")
			FUNC("set_scenario_event_bit_flag_3", 30, 1)
		}
	}

	if ( FUNC("get_scenario_bit_flag", 4) == 0 && FUNC("get_scenario_bit_flag", 3) == 1 )
	{
		if ( FUNC("get_scenario_count_time") > 300000 )
		{
			FUNC("attention_call_message", "[0241N]You have failed to rid the town of all enemy threats - the time to defend Chateauneut has come to a close.")

			FUNC("minimap_set_way_point", 7, 0.0, 0.0, 0.0, 0, 0)

//			FUNC("end_kill_interface")

			FUNC("set_end_condition_finish", 10, "LOSE")

			FUNC("set_scenario_bit_flag", 4, 1)
		}

		team_one_six_one_leader = FUNC("get_unit_team_leader_by_team_id", 161)
		if ( team_one_six_one_leader > 0 )
		{
			ACTION("give_task", team_one_six_one_leader, "ATTACK_PLACE", 1, town_chateauneut_recno_two,0,0,0) 
		}

		team_one_six_two_leader = FUNC("get_unit_team_leader_by_team_id", 162)
		if ( team_one_six_two_leader > 0 )
		{
			ACTION("give_task", team_one_six_two_leader, "ATTACK_PLACE", 1, town_chateauneut_recno_two,0,0,0) 
		}

		team_one_six_three_leader = FUNC("get_unit_team_leader_by_team_id", 163)
		if ( team_one_six_three_leader > 0 )
		{
			ACTION("give_task", team_one_six_three_leader, "ATTACK_PLACE", 1, town_chateauneut_recno_two,0,0,0) 
		}

		team_one_six_four_leader = FUNC("get_unit_team_leader_by_team_id", 164)
		if ( team_one_six_four_leader > 0 )
		{
			ACTION("give_task", team_one_six_four_leader, "ATTACK_PLACE", 1, town_chateauneut_recno_two,0,0,0) 
		}

		if ( FUNC("get_place_captured", town_chateauneut_recno_one) > 0 )
		{
			FUNC("attention_call_message", "[0242N]Your formidable defense of Chateauneut is to be commended - the enemy shall torment the townsfolk of Chateauneut no longer!")
//			FUNC("end_kill_interface")

			FUNC("set_end_condition_finish", 10, "WIN")

			FUNC("minimap_set_way_point", 7, 0.0, 0.0, 0.0, 0, 0)

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

	if ( FUNC("get_scenario_bit_flag", 14) == 1 && FUNC("get_scenario_bit_flag", 23) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", move_cart_recno, "P")

		if ( joan_in_place_recno > 0 )
		{
			team_two_zero_five = FUNC("search_unit_by_name", "Triston Rote")

			if ( team_two_zero_five > 0 )
			{
				ACTION("give_task", team_two_zero_five, "APPROACH_PLACE", 1, cart_target_recno, 0,0,0)
			}

			team_two_zero_one = FUNC("search_unit_by_name", "Bertram Framton")

			if ( team_two_zero_one > 0 )
			{
				ACTION("give_task", team_two_zero_one, "APPROACH_PLACE", 1, cart_target_recno, 0,0,0)
			}

			cart_recno_two = FUNC("search_unit_by_name", "Bertram Framton")
			cart_driver_recno_two = FUNC("search_unit_by_name", "CartDriver")

			FUNC("set_unit_ride_cart", cart_driver_recno_two, cart_recno_two)

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

	if ( FUNC("get_scenario_bit_flag", 23) == 1 && FUNC("get_end_condition_finish", 15) == 0 )
	{
		team_two_zero_five = FUNC("search_unit_by_name", "Triston Rote")

		if ( team_two_zero_five > 0 )
		{
			ACTION("give_task", team_two_zero_five, "DEFEND_PLACE", 1, cart_target_recno, 0,0,0)
		}

		team_two_zero_one = FUNC("search_unit_by_name", "Bertram Framton")

		if ( team_two_zero_one > 0 )
		{
			ACTION("give_task", team_two_zero_one, "APPROACH_PLACE", 1, cart_target_recno, 0,0,0)

			if ( FUNC("is_unit_inside_place", cart_target_recno, team_two_zero_one) == 1 )
			{
				cannon_recno_b = FUNC("add_unit", "CANNON", "ENGLISH")
				FUNC("set_unit_name", cannon_recno_b, "English Cannon")
//				FUNC("set_unit_ranking", cannon_recno_a, "GENERAL")
				FUNC("set_unit_team", cannon_recno_b, 202)
				FUNC("set_unit_pos", cannon_recno_b, 3903.0, 49978.0, 0.0)
				FUNC("set_unit_dir", cannon_recno_b, 180) 
				FUNC("set_unit_level", cannon_recno_b, 19)
				cannon_recno_b_one = FUNC("add_unit", "ENGLISH_LIGHT_INFANTRY", "ENGLISH")
				FUNC("set_unit_name", cannon_recno_b_one, "English Cannon Controller 1")
				FUNC("set_unit_pos", cannon_recno_b_one, 3910.0, 50104.0, 0.0)
				FUNC("set_unit_dir", cannon_recno_b_one, 180) 
				FUNC("set_unit_team", cannon_recno_b_one, 202)
				FUNC("set_unit_level", cannon_recno_b_one, 19)
				ACTION("give_task", cannon_recno_b_one, "LARGE_WEAPON_PUSH", 10, cannon_recno_b, 1, 0, 0)
				cannon_recno_b_two = FUNC("add_unit", "ENGLISH_LIGHT_INFANTRY", "ENGLISH")
				FUNC("set_unit_name", cannon_recno_b_two, "English Cannon Controller 2")
				FUNC("set_unit_pos", cannon_recno_b_two, 3944.0, 50181.0, 0.0)
				FUNC("set_unit_dir", cannon_recno_b_two, 180) 
				FUNC("set_unit_team", cannon_recno_b_two, 202)
				FUNC("set_unit_level", cannon_recno_b_two, 19)
				ACTION("give_task", cannon_recno_b_two, "LARGE_WEAPON_PUSH", 10, cannon_recno_b, 0, 0, 0)

				FUNC("del_unit", team_two_zero_one)

				if ( cart_driver_recno_two == 0 )
				{
					cart_driver_recno_two = FUNC("search_unit_by_name", "CartDriver")
				}

				FUNC("del_unit", cart_driver_recno_two)

				FUNC("attention_call_message", "[0243N]You have failed to ambush the cart headed towards Meung.")

				FUNC("set_end_condition_finish", 15, "LOSE")
			}
		}
		else
		{
			FUNC("attention_call_message", "[0244N]You have caught the enemy's supply wagon off-guard - Meung can no longer count on their reinforcements to arrive!")

			FUNC("give_item_to_unit", "FD_APPLE", 1, 2, main_recno)
			FUNC("give_item_to_unit", "FD_FISH", 1, 3, main_recno)
			FUNC("give_item_to_unit", "FD_MEAT", 1, 3, main_recno)
			FUNC("give_item_to_unit", "GOLDCOIN", 1000, 1, main_recno)

			FUNC("attention_call_message", "[0245N]You have received two apples, three fish, three meats, and 1000 in golds.")

			FUNC("set_end_condition_finish", 15, "WIN")
		}
	}

		// check player interact with door with key

	INT interact_item_recno_one

	interact_item_recno_one = FUNC("get_interact_item_recno", main_recno)
	
	if ( interact_item_recno_one > 0 )
	{
		if ( FUNC("get_gate_state", s_five_l_six_prison_gate_a) == 0 )
		{
			if ( interact_item_recno_one == s_five_l_six_prison_gate_a )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_six_id, main_recno) )
				{
					FUNC("add_gate_trigger", s_five_l_six_prison_gate_a, 0)

					if ( FUNC("get_gate_state", s_five_l_six_prison_gate_b) > 0 && FUNC("get_gate_state", s_five_l_six_prison_gate_c) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_six_id, main_recno)
						FUNC("attention_call_message_2", "[0246N]Thank you for freeing us! We were formerly under the command of Lord Seamer, we are well trained in the art of operating siege machine, please let us join you in your cause!", l_six_prisoner)
						FUNC("free_team_prisoner", 603)
						FUNC("set_scenario_event_bit_flag_3", 32, 1)
						FUNC("set_team_control_flag", 603, 1)
					}

//					FUNC("attention_call_message", "Waiting message")
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", s_five_l_six_prison_gate_b) == 0 )
		{
			if ( interact_item_recno_one == s_five_l_six_prison_gate_b )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_six_id, main_recno) )
				{
					FUNC("add_gate_trigger", s_five_l_six_prison_gate_b, 0)

					if ( FUNC("get_gate_state", s_five_l_six_prison_gate_a) > 0 && FUNC("get_gate_state", s_five_l_six_prison_gate_c) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_six_id, main_recno)
						FUNC("attention_call_message_2", "[0246N]Thank you for freeing us! We were formerly under the command of Lord Seamer, we are well trained in the art of operating siege machine, please let us join you in your cause!", l_six_prisoner)
						FUNC("free_team_prisoner", 603)
						FUNC("set_scenario_event_bit_flag_3", 32, 1)
						FUNC("set_team_control_flag", 603, 1)
					}

//					FUNC("attention_call_message", "Waiting message")
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", s_five_l_six_prison_gate_c) == 0 )
		{
			if ( interact_item_recno_one == s_five_l_six_prison_gate_c )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_six_id, main_recno) )
				{
					FUNC("add_gate_trigger", s_five_l_six_prison_gate_c, 0)

					if ( FUNC("get_gate_state", s_five_l_six_prison_gate_b) > 0 && FUNC("get_gate_state", s_five_l_six_prison_gate_a) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_six_id, main_recno)
						FUNC("attention_call_message_2", "[0246N]Thank you for freeing us! We were formerly under the command of Lord Seamer, we are well trained in the art of operating siege machine, please let us join you in your cause!", l_six_prisoner)
						FUNC("free_team_prisoner", 603)
						FUNC("set_scenario_event_bit_flag_3", 32, 1)
						FUNC("set_team_control_flag", 603, 1)
					}

//					FUNC("attention_call_message", "Waiting message")
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) == 0 )
		{
			if ( interact_item_recno_one == s_five_l_seven_prison_gate_recno )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_seven_id, main_recno) )
				{
					FUNC("add_gate_trigger", s_five_l_seven_prison_gate_recno, 0)

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) > 0 &&
						 FUNC("get_gate_state", prison_gate_one) > 0 &&
						 FUNC("get_gate_state", prison_gate_two) > 0 &&
						 FUNC("get_gate_state", prison_gate_three) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_a) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_b) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_c) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						FUNC("set_end_condition_finish", 28, "WIN")
					}

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_seven_id, main_recno)
					}

						FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
						
						// set main character to idle
						FUNC("set_idle", main_recno) 
						
						FUNC("set_idle", team_five_eight_one_leader) 
						ACTION("give_task", team_five_eight_one_leader, "IDLE", 1, 0, 0, 0, 0)

						FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
						FUNC("set_unit_can_process_in_cut_scene", team_five_eight_one_leader, 1)	// joan can process

						// set weapon seller to idle and rotate him
						ACTION("stop_all_order", team_five_eight_one_leader ) 
						ACTION("give_order" , team_five_eight_one_leader, "TURN" , 3 , 0 , FUNC("get_rotation" , team_five_eight_one_leader, main_recno) , 0 , 0 , 0, 2500)
						FUNC("set_unit_can_process_in_cut_scene", team_five_eight_one_leader, 0)	// joan can process

						FUNC("change_camera_in_cut_scene", 0, 7329, 23794, 50, 330, 89, 27)
						if ( FUNC("get_scenario_event_bit_flag_3", 3) == 0 )
						{
							// first time rescue a commander
							WAIT { DIALOG("add_dialog", team_five_eight_one_leader, "[0249N]On behalf of my men, I thank you profusely for rescuing us and returning our freedom! Now we can once again fight for our cause!") }
							WAIT { DIALOG("add_dialog", team_five_eight_one_leader, "[0250N]I only regret that two fellow commanders are suffering a similar fate to mine. They are in Checy and Chateauneut. I am sure if you can rescue them as well, we will all be able to fight alongside you!") }
							WAIT { DIALOG("add_dialog", team_five_eight_one_leader, "[0251N]I am eternally obliged to you, and will assist you in any way possible. If we are able to rescue the other two generals, you shall have many an experienced unit to assist you and your cause!") }
							FUNC("set_scenario_event_bit_flag_3", 3, 1)
						}
						else
						{
							if ( FUNC("get_scenario_event_bit_flag_3", 4) == 0 )
							{
								// second commander
								WAIT { DIALOG("add_dialog", team_five_eight_one_leader, "[0252N]Thank you for saving me from those miserable foes across the strait! It is good to see that you have not left us, the more unfortunate troops, to rot away!") }
								FUNC("set_scenario_event_bit_flag_3", 4, 1)
							}
							else
							{
								WAIT { DIALOG("add_dialog", team_five_eight_one_leader, "[0253N]Merci beaucoup. You have rescued me! We are all raring to take the fight to the English - now all we need are enough troops to undertake any offensive that you may desire!") }
							}
						}

						FUNC("set_unit_team_vision_range", team_five_eight_one_leader, 1600)
						FUNC("free_team_prisoner", 581)

						// leave cut scene
						DIALOG("del_all_dialog") 

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

						WAIT{ FUNC("is_cut_scene_finished") }

						FUNC("stop_curr_task", main_recno)
						FUNC("stop_curr_task", team_five_eight_one_leader)
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) == 0 )
		{
			if ( interact_item_recno_one == s_five_l_seven_prison_gate_recno_two )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_seven_id, main_recno) )
				{
					FUNC("add_gate_trigger", s_five_l_seven_prison_gate_recno_two, 0)

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) > 0 &&
						 FUNC("get_gate_state", prison_gate_one) > 0 &&
						 FUNC("get_gate_state", prison_gate_two) > 0 &&
						 FUNC("get_gate_state", prison_gate_three) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_a) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_b) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_c) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						FUNC("set_end_condition_finish", 28, "WIN")

//						FUNC("attention_call_message", "You now have three eager commanders as well as your generals - to effectively wage war on the English, you should build up an army that is 80 men strong!")
//						FUNC("set_end_condition_enabled", 29, 1)
					}

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_seven_id, main_recno)
					}
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", prison_gate_one) == 0 )
		{
			if ( interact_item_recno_one == prison_gate_one )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_ten_id, main_recno) )
				{
					FUNC("add_gate_trigger", prison_gate_one, 0)

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) > 0 &&
						 FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) > 0 &&
						 FUNC("get_gate_state", prison_gate_two) > 0 &&
						 FUNC("get_gate_state", prison_gate_three) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_a) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_b) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_c) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						FUNC("set_end_condition_finish", 28, "WIN")
//						FUNC("attention_call_message", "You now have three eager commanders as well as your generals - to effectively wage war on the English, you should build up an army that is 80 men strong!")
//						FUNC("set_end_condition_enabled", 29, 1)
					}

					if ( FUNC("get_gate_state", prison_gate_two) > 0 && FUNC("get_gate_state", prison_gate_three) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_ten_id, main_recno)
					}
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", prison_gate_two) == 0 )
		{
			if ( interact_item_recno_one == prison_gate_two )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_ten_id, main_recno) )
				{
					FUNC("add_gate_trigger", prison_gate_two, 0)

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) > 0 &&
						 FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) > 0 &&
						 FUNC("get_gate_state", prison_gate_one) > 0 &&
						 FUNC("get_gate_state", prison_gate_three) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_a) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_b) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_c) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						FUNC("set_end_condition_finish", 28, "WIN")
//						FUNC("attention_call_message", "You now have three eager commanders as well as your generals - to effectively wage war on the English, you should build up an army that is 80 men strong!")
//						FUNC("set_end_condition_enabled", 29, 1)
					}

					if ( FUNC("get_gate_state", prison_gate_one) > 0 && FUNC("get_gate_state", prison_gate_three) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_ten_id, main_recno)
					}

						// first time rescue a commander
						FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 

						FUNC("set_unit_team_vision_range", team_five_eight_two_leader, 1600)
						FUNC("free_team_prisoner", 582)

						// set main character to idle
						FUNC("set_idle", main_recno) 
						
						FUNC("set_idle", team_five_eight_two_leader) 
						ACTION("give_task", team_five_eight_two_leader, "IDLE", 1, 0, 0, 0, 0)

						FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
						FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
						FUNC("set_unit_can_process_in_cut_scene", team_five_eight_two_leader, 1)	// joan can process

						// set weapon seller to idle and rotate him
						ACTION("stop_all_order", team_five_eight_two_leader ) 
						ACTION("give_order" , team_five_eight_two_leader, "TURN" , 3 , 0 , FUNC("get_rotation" , team_five_eight_two_leader, main_recno) , 0 , 0 , 0, 2500)
						FUNC("set_unit_can_process_in_cut_scene", team_five_eight_two_leader, 0)	// joan can process
						ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, team_five_eight_two_leader) , 0 , 0 , 0, 2500)

						FUNC("change_camera_in_cut_scene", 0, 21998, 15935, 250, 350, 70, 16)
						if ( FUNC("get_scenario_event_bit_flag_3", 3) == 0 )
						{
							// first time rescue a commander
							WAIT { DIALOG("add_dialog", team_five_eight_two_leader, "[0249N]On behalf of my men, I thank you profusely for rescuing us and returning our freedom! Now we can once again fight for our cause!") }
							WAIT { DIALOG("add_dialog", team_five_eight_two_leader, "[0254N]I only regret that two fellow commanders are suffering a similar fate to mine! They are in St-Aignar and Chateauneut. I am sure if you can rescue them as well, we will all be able to fight alongside you!") }
							WAIT { DIALOG("add_dialog", team_five_eight_two_leader, "[0251N]I am eternally obliged to you, and will assist you in any way possible. If we are able to rescue the other two generals, you shall have many an experienced unit to assist you and your cause!") }
							FUNC("set_scenario_event_bit_flag_3", 3, 1)
						}
						else
						{
							if ( FUNC("get_scenario_event_bit_flag_3", 4) == 0 )
							{
								// second commander
								WAIT { DIALOG("add_dialog", team_five_eight_two_leader, "[0255N]Thank you for saving me hind from those miserable foes across the strait! It is good to see that you have not left we, the more unfortunate troops, to rot away!") }
								FUNC("set_scenario_event_bit_flag_3", 4, 1)
							}
							else
							{
								WAIT { DIALOG("add_dialog", team_five_eight_two_leader, "[0256N]Much obliged for rescuring me! We are all raring to take the fight to the English - now all we need are enough troops to undertake any offensive that you may desire!") }
							}
						}

						// leave cut scene
						DIALOG("del_all_dialog") 

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

						WAIT{ FUNC("is_cut_scene_finished") }

						FUNC("stop_curr_task", main_recno)
						FUNC("stop_curr_task", team_five_eight_two_leader)
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", prison_gate_three) == 0 )
		{
			if ( interact_item_recno_one == prison_gate_three )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_ten_id, main_recno) )
				{
					FUNC("add_gate_trigger", prison_gate_three, 0)

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) > 0 &&
						 FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) > 0 &&
						 FUNC("get_gate_state", prison_gate_two) > 0 &&
						 FUNC("get_gate_state", prison_gate_one) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_a) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_b) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_c) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						FUNC("set_end_condition_finish", 28, "WIN")
//						FUNC("attention_call_message", "You now have three eager commanders as well as your generals - to effectively wage war on the English, you should build up an army that is 80 men strong!")
//						FUNC("set_end_condition_enabled", 29, 1)
					}

					if ( FUNC("get_gate_state", prison_gate_two) > 0 && FUNC("get_gate_state", prison_gate_one) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_ten_id, main_recno)
					}
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", l_nine_prison_gate_a) == 0 )
		{
			if ( interact_item_recno_one == l_nine_prison_gate_a )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_nine_id, main_recno) )
				{
					FUNC("add_gate_trigger", l_nine_prison_gate_a, 0)

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) > 0 &&
						 FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) > 0 &&
						 FUNC("get_gate_state", prison_gate_two) > 0 &&
						 FUNC("get_gate_state", prison_gate_three) > 0 &&
						 FUNC("get_gate_state", prison_gate_one) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_b) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_c) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						FUNC("set_end_condition_finish", 28, "WIN")
//						FUNC("attention_call_message", "You now have three eager commanders as well as your generals - to effectively wage war on the English, you should build up an army that is 80 men strong!")
//						FUNC("set_end_condition_enabled", 29, 1)
					}

					if ( FUNC("get_gate_state", l_nine_prison_gate_b) > 0 && FUNC("get_gate_state", l_nine_prison_gate_c) == 1 && FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_nine_id, main_recno)
					}
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", l_nine_prison_gate_b) == 0 )
		{
			if ( interact_item_recno_one == l_nine_prison_gate_b )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_nine_id, main_recno) )
				{
					FUNC("add_gate_trigger", l_nine_prison_gate_b, 0)

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) > 0 &&
						 FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) > 0 &&
						 FUNC("get_gate_state", prison_gate_two) > 0 &&
						 FUNC("get_gate_state", prison_gate_three) > 0 &&
						 FUNC("get_gate_state", prison_gate_one) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_a) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_c) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						FUNC("set_end_condition_finish", 28, "WIN")
//						FUNC("attention_call_message", "You now have three eager commanders as well as your generals - to effectively wage war on the English, you should build up an army that is 80 men strong!")
//						FUNC("set_end_condition_enabled", 29, 1)
					}

					if ( FUNC("get_gate_state", l_nine_prison_gate_a) > 0 && FUNC("get_gate_state", l_nine_prison_gate_c) > 0 && FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_nine_id, main_recno)
					}

						FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 

						FUNC("set_unit_team_vision_range", team_five_eight_three_leader, 1600)
						FUNC("free_team_prisoner", 583)
							
						// set main character to idle
						FUNC("set_idle", main_recno) 
						
						FUNC("set_idle", team_five_eight_three_leader) 
						ACTION("give_task", team_five_eight_three_leader, "IDLE", 1, 0, 0, 0, 0)

						FUNC("set_unit_can_process_in_cut_scene", 0, 0)	// all unit can't process
						FUNC("set_unit_can_process_in_cut_scene", main_recno, 1)	// joan can process
						FUNC("set_unit_can_process_in_cut_scene", team_five_eight_three_leader, 1)	// joan can process

						// set weapon seller to idle and rotate him
						ACTION("stop_all_order", team_five_eight_three_leader ) 
						ACTION("give_order" , team_five_eight_three_leader, "TURN" , 3 , 0 , FUNC("get_rotation" , team_five_eight_three_leader, main_recno) , 0 , 0 , 0, 2500)
						FUNC("set_unit_can_process_in_cut_scene", team_five_eight_three_leader, 0)	// joan can process

						FUNC("change_camera_in_cut_scene", 0, 15720, 3206, 50, 350, -104, 28)
						if ( FUNC("get_scenario_event_bit_flag_3", 3) == 0 )
						{
							// first time rescue a commander
							WAIT { DIALOG("add_dialog", team_five_eight_three_leader, "[0249N]On behalf of my men, I thank you profusely for rescuing us and returning our freedom! Now we can once again fight for our cause!") }
							WAIT { DIALOG("add_dialog", team_five_eight_three_leader, "[0257N]I only regret that two fellow commanders are suffering a similar fate to mine! They are in Checy and St-Aignar. I am sure if you can rescue them as well, we will all be able to fight alongside you!") }
							WAIT { DIALOG("add_dialog", team_five_eight_three_leader, "[0251N]I am eternally obliged to you, and will assist you in any way possible. If we are able to rescue the other two generals, you shall have many an experienced unit to assist you and your cause!") }
							FUNC("set_scenario_event_bit_flag_3", 3, 1)
						}
						else
						{
							if ( FUNC("get_scenario_event_bit_flag_3", 4) == 0 )
							{
								// second commander
								WAIT { DIALOG("add_dialog", team_five_eight_three_leader, "[0255N]Thank you for saving me hind from those miserable foes across the strait! It is good to see that you have not left we, the more unfortunate troops, to rot away!") }
								FUNC("set_scenario_event_bit_flag_3", 4, 1)
							}
							else
							{
								WAIT { DIALOG("add_dialog", team_five_eight_three_leader, "[0256N]Much obliged for rescuring me! We are all raring to take the fight to the English - now all we need are enough troops to undertake any offensive that you may desire!") }
							}
						}

						// leave cut scene
						DIALOG("del_all_dialog") 

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

						WAIT{ FUNC("is_cut_scene_finished") }

						FUNC("stop_curr_task", main_recno)
						FUNC("stop_curr_task", team_five_eight_three_leader)
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", l_nine_prison_gate_c) == 0 )
		{
			if ( interact_item_recno_one == l_nine_prison_gate_c )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_nine_id, main_recno) )
				{
					FUNC("add_gate_trigger", l_nine_prison_gate_c, 0)

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) > 0 &&
						 FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) > 0 &&
						 FUNC("get_gate_state", prison_gate_two) > 0 &&
						 FUNC("get_gate_state", prison_gate_three) > 0 &&
						 FUNC("get_gate_state", prison_gate_one) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_b) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_a) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						FUNC("set_end_condition_finish", 28, "WIN")
//						FUNC("attention_call_message", "You now have three eager commanders as well as your generals - to effectively wage war on the English, you should build up an army that is 80 men strong!")
//						FUNC("set_end_condition_enabled", 29, 1)
					}

					if ( FUNC("get_gate_state", l_nine_prison_gate_a) > 0 && FUNC("get_gate_state", l_nine_prison_gate_b) > 0 && FUNC("get_gate_state", l_nine_prison_gate_d) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_nine_id, main_recno)
					}
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}

		if ( FUNC("get_gate_state", l_nine_prison_gate_d) == 0 )
		{
			if ( interact_item_recno_one == l_nine_prison_gate_d )
			{
				if ( FUNC("get_item_quantity_in_unit_inventory", key_l_nine_id, main_recno) )
				{
					FUNC("add_gate_trigger", l_nine_prison_gate_d, 0)

					if ( FUNC("get_gate_state", s_five_l_seven_prison_gate_recno_two) > 0 &&
						 FUNC("get_gate_state", s_five_l_seven_prison_gate_recno) > 0 &&
						 FUNC("get_gate_state", prison_gate_two) > 0 &&
						 FUNC("get_gate_state", prison_gate_three) > 0 &&
						 FUNC("get_gate_state", prison_gate_one) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_b) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_c) > 0 &&
						 FUNC("get_gate_state", l_nine_prison_gate_a) > 0 )
					{
						FUNC("set_end_condition_finish", 28, "WIN")
//						FUNC("attention_call_message", "You now have three eager commanders as well as your generals - to effectively wage war on the English, you should build up an army that is 80 men strong!")
//						FUNC("set_end_condition_enabled", 29, 1)
					}

					if ( FUNC("get_gate_state", l_nine_prison_gate_a) > 0 && FUNC("get_gate_state", l_nine_prison_gate_c) > 0 && FUNC("get_gate_state", l_nine_prison_gate_b) > 0 )
					{
						// open all the gate already
						FUNC("remove_item_from_unit_inventory", key_l_nine_id, main_recno)
					}
				}
				else
				{
					if ( main_recno == jean_recno )
					{
						FUNC("attention_call_message", "[0247N]The complexity of this lock prevents even the skillful Jean de Metz from picking it - only the correct key can unlock this.")
					}
					else
					{
						FUNC("attention_call_message", "[0248N]The cell door is locked. You will need to find the key to pick the lock.")
					}
				}
			}
		}
	}

//	if ( FUNC("get_end_condition_enabled", 29) == 1 && FUNC("get_end_condition_finish", 29) == 0 )
//	{
//		if ( FUNC("number_of_friend_in_world", main_recno) >= 80 )
//		{
//			FUNC("set_end_condition_finish", 29, "WIN")
//		}
//	}


//	if ( FUNC("get_scenario_bit_flag", 25) == 0 )
//	{
//		interact_item_recno_one = FUNC("get_interact_item_recno", main_recno)

//		if ( interact_item_recno_one == prison_gate_two )
//		{
//			if ( main_recno == jean_recno )
//			{
//				FUNC("add_gate_trigger", prison_gate_two, 0)

//				FUNC("set_scenario_bit_flag", 25, 1)
//			}
//			else
//			{
//				FUNC("attention_call_message", "[0001N]The cell door is locked. You will need Jean de Metz to pick the lock.")
//			}
//		}
//	}

//	if ( FUNC("get_scenario_bit_flag", 26) == 0 )
//	{
//		interact_item_recno_one = FUNC("get_interact_item_recno", main_recno)

//		if ( interact_item_recno_one == prison_gate_three )
//		{
//			if ( main_recno == jean_recno )
//			{
//				FUNC("add_gate_trigger", prison_gate_three, 0)

//				FUNC("set_scenario_bit_flag", 26, 1)
//			}
//			else
//			{
//				FUNC("attention_call_message", "[0001N]The gate is locked - only Jean de Metz can pick locks.")
//			}
//		}
//	}


	door_opened = 0

	if ( FUNC("get_scenario_bit_flag", 28) > 0 )
	{
		door_opened = ( door_opened + 1 )
	}
	
	if ( FUNC("get_scenario_bit_flag", 29) > 0 )
	{
		door_opened = ( door_opened + 1 )
	}

	if ( FUNC("get_scenario_bit_flag", 30) > 0 )
	{
		door_opened = ( door_opened + 1 )
	}

	if ( FUNC("get_scenario_bit_flag", 31) > 0 )
	{
		door_opened = ( door_opened + 1 )
	}

	if ( FUNC("get_scenario_bit_flag", 32) > 0 )
	{
		door_opened = ( door_opened + 1 )
	}

	if ( FUNC("get_end_condition_enabled", 20) > 0 && FUNC("get_end_condition_finish", 20) == 0 )
	{
		FUNC("set_scenario_rescue_count", door_opened)
	}

	interact_item_recno_one = FUNC("get_interact_item_recno", main_recno)

	if ( FUNC("get_scenario_bit_flag", 28) == 0 )
	{
		if ( interact_item_recno_one == meung_prison_gate_one )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", silver_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", silver_key_id, main_recno, 1)

				FUNC("set_interact_item_recno", main_recno, 0)

				FUNC("add_gate_trigger", meung_prison_gate_one, 0)

				INT speaker_one
				speaker_one = FUNC("search_unit_by_name", "Achard Cheville")
				FUNC("attention_call_message_2", "[0258N]Merci beaucoup you have returned my freedom!", speaker_one)

				door_opened = ( door_opened + 1 )

				FUNC("add_unit_experience", main_recno, 2000)

				FUNC("attention_call_message", "[0259N]You have rescued two prisoners and gained 2000 experience points!")

				if ( door_opened == 5 )
				{
					FUNC("attention_call_message", "[0260N]All trapped prisoners in Meung have been freed!")
					FUNC("set_scenario_rescue_count", door_opened)
					FUNC("set_end_condition_finish", 20, "WIN")
				}

				FUNC("set_scenario_bit_flag", 28, 1)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0261N]You do not possess the key to open this lock.")
			}
		}
	}

	if ( FUNC("get_scenario_bit_flag", 29) == 0 )
	{
		if ( interact_item_recno_one == meung_prison_gate_two )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", silver_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", silver_key_id, main_recno, 1)

				FUNC("add_gate_trigger", meung_prison_gate_two, 0)

				FUNC("set_interact_item_recno", main_recno, 0)

				door_opened = ( door_opened + 1 )
				FUNC("add_unit_experience", main_recno, 2000)

				INT speaker_two
				speaker_two = FUNC("search_unit_by_name", "Marcel Goulier")
				FUNC("attention_call_message_2", "[0262N]You have saved my life - I am eternally grateful!", speaker_two)

				FUNC("attention_call_message", "[0263N]You have rescued two prisoners and gained 2000 experience!")

				if ( door_opened == 5 )
				{
					FUNC("attention_call_message", "[0260N]All trapped prisoners in Meung have been freed!")
					FUNC("set_scenario_rescue_count", door_opened)
					FUNC("set_end_condition_finish", 20, "WIN")
				}
				FUNC("set_scenario_bit_flag", 29, 1)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0261N]You do not possess the key to open this lock.")
			}
		}
	}

	if ( FUNC("get_scenario_bit_flag", 30) == 0 )
	{
		if ( interact_item_recno_one == meung_prison_gate_three )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", silver_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", silver_key_id, main_recno, 1)
					
				FUNC("add_gate_trigger", meung_prison_gate_three, 0)

				FUNC("set_interact_item_recno", main_recno, 0)

				door_opened = ( door_opened + 1 )
				FUNC("add_unit_experience", main_recno, 2000)

				INT speaker_three
				speaker_three = FUNC("search_unit_by_name", "Charles Lampier")
				FUNC("attention_call_message_2", "[0264N]Freedom at last! I bid you Godspeed in your endeavors!", speaker_three)

				FUNC("attention_call_message", "[0263N]You have rescued two prisoners and gained 2000 experience!")

				if ( door_opened == 5 )
				{
					FUNC("attention_call_message", "[0260N]All trapped prisoners in Meung have been freed!")
					FUNC("set_scenario_rescue_count", door_opened)
					FUNC("set_end_condition_finish", 20, "WIN")
				}
				FUNC("set_scenario_bit_flag", 30, 1)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0261N]You do not possess the key to open this lock.")
			}
		}
	}

	if ( FUNC("get_scenario_bit_flag", 31) == 0 )
	{
		if ( interact_item_recno_one == meung_prison_gate_four )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", silver_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", silver_key_id, main_recno, 1)
					
				FUNC("add_gate_trigger", meung_prison_gate_four, 0)

				FUNC("set_interact_item_recno", main_recno, 0)

				door_opened = ( door_opened + 1 )
				FUNC("add_unit_experience", main_recno, 2000)

				INT speaker_four
				speaker_four = FUNC("search_unit_by_name", "Brucie Deicier")
				FUNC("attention_call_message_2", "[0265N]Bless you for rescuing me!", speaker_four)
				FUNC("attention_call_message", "[0263N]You have rescued two prisoners and gained 2000 experience!")

				if ( door_opened == 5 )
				{
					FUNC("attention_call_message", "[0260N]All trapped prisoners in Meung have been freed!")
					FUNC("set_scenario_rescue_count", door_opened)
					FUNC("set_end_condition_finish", 20, "WIN")
				}
				FUNC("set_scenario_bit_flag", 31, 1)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0261N]You do not possess the key to open this lock.")
			}
		}
	}

	if ( FUNC("get_scenario_event_bit_flag_3", 31) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", near_prison_c, "P")

		if ( joan_in_place_recno > 0 )
		{
			FUNC("attention_call_message_2", "[0266N]The English will butcher us if you do not free us!", team_five_eight_one_leader)

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

	if ( FUNC("get_scenario_event_bit_flag_3", 22) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", near_prison_a, "P")

		if ( joan_in_place_recno > 0 )
		{
			FUNC("attention_call_message_2", "[0267N]Free us from our cell!", team_five_eight_two_leader)

			FUNC("set_scenario_event_bit_flag_3", 22, 1)
		}
	}

	if ( FUNC("get_scenario_event_bit_flag_3", 23) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", near_prison_b, "P")

		if ( joan_in_place_recno > 0 )
		{
			FUNC("attention_call_message_2", "[0029N]Help! Help! We are trapped here by our enemy!", team_five_eight_three_leader)

			FUNC("set_scenario_event_bit_flag_3", 23, 1)
		}
	}

	if ( FUNC("get_scenario_event_bit_flag_3", 24) == 0 && FUNC("get_end_condition_enabled", 31) == 1 && FUNC("get_end_condition_finish", 31) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", meet_spy_recno, "P")

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("is_unit_dead_by_name", english_spy_recno, "Elya Tinchor") == 0 )
			{
				FUNC("attention_call_message_2", "[0268N]This must be the kind man in Loches was talking about when he mentioned about the special English units!", jean_recno)
			}
			else
			{
				FUNC("attention_call_message", "[0269N]The English unit reported to be here is no longer present. Perhaps your successful siege on Meung has allowed him entrance once more into the city.")
				FUNC("set_end_condition_finish", 31, "LOSE")
			}

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

	if ( FUNC("get_wall_hp", jargeau_north_right) == 0 && FUNC("get_scenario_bit_flag", 5) == 0 ) 
	{
		FUNC("del_unit_team", 52)
		FUNC("reset_spawn_count_in_facility", facility_jargeau_north_tower_right_ground)
		FUNC("set_scenario_bit_flag", 5, 1)
	}

	if ( FUNC("get_wall_hp", jargeau_north_left) == 0 && FUNC("get_scenario_bit_flag", 6) == 0 ) 
	{
		FUNC("del_unit_team", 49)
		FUNC("reset_spawn_count_in_facility", facility_jargeau_north_tower_left_ground)
		FUNC("set_scenario_bit_flag", 6, 1)
	}

	if ( FUNC("get_wall_hp", jargeau_west_right) == 0 && FUNC("get_scenario_bit_flag", 7) == 0 ) 
	{
		FUNC("del_unit_team", 66)
		FUNC("reset_spawn_count_in_facility", facility_jargeau_west_tower_right_ground)
		FUNC("set_scenario_bit_flag", 7, 1)
	}

	if ( FUNC("get_wall_hp", jargeau_west_left) == 0 && FUNC("get_scenario_bit_flag", 8) == 0 ) 
	{
		FUNC("del_unit_team", 80)
	
		FUNC("set_scenario_bit_flag", 8, 1)
	}

	if ( FUNC("get_scenario_event_bit_flag_3", 1) == 0 && FUNC("get_end_condition_enabled", 26) == 1 )
	{
		INT towerLeftCount
		towerLeftCount = 0

		if ( FUNC("get_wall_hp", jargeau_north_right) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( FUNC("get_wall_hp", jargeau_north_left) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( FUNC("get_wall_hp", jargeau_west_right) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( FUNC("get_wall_hp", jargeau_west_left) != 0 )
		{
			towerLeftCount = ( towerLeftCount + 1 )
		}

		if ( towerLeftCount == 0 )
		{
			FUNC("attention_call_message_2", "[0239N]Methinks the enemy guard towers will trouble us no more, for that was the last one standing!", la_hire_recno)

			FUNC("set_end_condition_finish", 26, "WIN")
			FUNC("set_scenario_event_bit_flag_3", 1, 1)
		}
	}

	if ( FUNC("get_scenario_event_bit_flag_3", 25) == 0 && FUNC("get_scenario_event_bit_flag_3", 11) == 0 )
	{
		if ( FUNC("get_gate_attacked", meung_south_gate_recno) == 1 )
		{
			FUNC("attention_call_message_2", "[0270N]Ah, you have arrived due south and started the offensive! We shall attack from the north and let's see if we cannot wreak havoc to the enemy's control of the Loire river basin!", orlean_recno)
			FUNC("set_scenario_event_bit_flag_3", 25, 1)

			FUNC("stop_curr_task", orlean_recno)
			FUNC("stop_curr_task", team_five_eight_five_recno)
			FUNC("stop_curr_task", team_five_eight_six_recno)
			FUNC("stop_curr_task", team_five_eight_seven_recno)
			FUNC("stop_curr_task", team_five_eight_eight_recno)

			ACTION("give_task", orlean_recno , "ATTACK_PLACE", 1, castle_meung_recno,0,0,0) 
			ACTION("give_task", team_five_eight_five_recno , "ATTACK_PLACE", 1, castle_meung_recno,0,0,0) 
			ACTION("give_task", team_five_eight_six_recno , "ATTACK_PLACE", 1, castle_meung_recno,0,0,0) 
			ACTION("give_task", team_five_eight_seven_recno , "ATTACK_PLACE", 1, castle_meung_recno,0,0,0) 
			ACTION("give_task", team_five_eight_eight_recno , "ATTACK_PLACE", 1, castle_meung_recno,0,0,0) 

			FUNC("set_control_flag", orlean_recno, 1)
			FUNC("set_control_flag", team_five_eight_five_recno, 1)
			FUNC("set_control_flag", team_five_eight_six_recno, 1)
			FUNC("set_control_flag", team_five_eight_seven_recno, 1)
			FUNC("set_control_flag", team_five_eight_eight_recno, 1)
			FUNC("set_control_flag", fcannon_recno_a, 1)
			FUNC("set_control_flag", fcannon_recno_a_one, 1)
			FUNC("set_control_flag", fcannon_recno_a_two, 1)
			FUNC("set_control_flag", fcannon_recno_b, 1)
			FUNC("set_control_flag", fcannon_recno_b_one, 1)
			FUNC("set_control_flag", fcannon_recno_b_two, 1)
			FUNC("set_control_flag", fcannon_recno_c, 1)
			FUNC("set_control_flag", fcannon_recno_c_one, 1)
			FUNC("set_control_flag", fcannon_recno_c_two, 1)
			FUNC("set_control_flag", fcannon_recno_d, 1)
			FUNC("set_control_flag", fcannon_recno_d_one, 1)
			FUNC("set_control_flag", fcannon_recno_d_two, 1)
		}
	}

	if ( FUNC("get_scenario_bit_flag", 32) == 0 )
	{
		if ( interact_item_recno_one == meung_prison_gate_five )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", silver_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", silver_key_id, main_recno, 1)
					
				FUNC("add_gate_trigger", meung_prison_gate_five, 0)

				FUNC("set_interact_item_recno", main_recno, 0)

				door_opened = ( door_opened + 1 )
				FUNC("add_unit_experience", main_recno, 2000)

				INT speaker_five
				speaker_five = FUNC("search_unit_by_name", "Zara Ferron")

				FUNC("attention_call_message_2", "[0271N]Thank you! May your efforts lead to triumph!", speaker_five)
				FUNC("attention_call_message", "[0263N]You have rescued two prisoners and gained 2000 experience!")

				if ( door_opened == 5 )
				{
					FUNC("attention_call_message", "[0260N]All trapped prisoners in Meung have been freed!")
					FUNC("set_scenario_rescue_count", door_opened)
					FUNC("set_end_condition_finish", 20, "WIN")
				}
				FUNC("set_scenario_bit_flag", 32, 1)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0261N]You do not possess the key to open this lock.")
			}
		}
	}

	if ( interact_item_recno_one > 0 )
	{
		if ( interact_item_recno_one == gold_box_a )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", gold_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", gold_key_id, main_recno, 1)
					
				FUNC("add_gate_trigger", gold_box_a, 0)

				FUNC("set_interact_item_recno", main_recno, 0)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0272N]You do not possess the key to open this box.")
			}
		}

		if ( interact_item_recno_one == gold_box_b )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", gold_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", gold_key_id, main_recno, 1)

				FUNC("set_interact_item_recno", main_recno, 0)
					
				FUNC("add_gate_trigger", gold_box_b, 0)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0272N]You do not possess the key to open this box.")
			}
		}

		if ( interact_item_recno_one == gold_box_c )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", gold_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", gold_key_id, main_recno, 1)

				FUNC("set_interact_item_recno", main_recno, 0)
					
				FUNC("add_gate_trigger", gold_box_c, 0)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0272N]You do not possess the key to open this box.")
			}
		}

		if ( interact_item_recno_one == gold_box_d )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", gold_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", gold_key_id, main_recno, 1)

				FUNC("set_interact_item_recno", main_recno, 0)
					
				FUNC("add_gate_trigger", gold_box_d, 0)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0272N]You do not possess the key to open this box.")
			}
		}

		if ( interact_item_recno_one == gold_box_e )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", gold_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", gold_key_id, main_recno, 1)
					
				FUNC("add_gate_trigger", gold_box_e, 0)

				FUNC("set_interact_item_recno", main_recno, 0)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0272N]You do not possess the key to open this box.")
			}
		}

		if ( interact_item_recno_one == gold_box_f )
		{
			if ( FUNC("get_item_quantity_in_unit_inventory", gold_key_id, main_recno) )
			{
				FUNC("remove_item_from_unit_inventory", gold_key_id, main_recno, 1)
					
				FUNC("add_gate_trigger", gold_box_f, 0)

				FUNC("set_interact_item_recno", main_recno, 0)
				FUNC("pause_script", 1000)
			}
			else
			{
				FUNC("attention_call_message", "[0272N]You do not possess the key to open this box.")
			}
		}
	}

	if ( FUNC("get_end_condition_finish", 9) == 0 )
	{
		if ( FUNC("get_place_captured", settle_fountainbleu_recno) == 1 && FUNC("get_place_captured", town_rouvray_recno) == 1 && FUNC("get_place_captured", town_checy_recno) == 1 )
		{
			if ( FUNC("get_place_captured", town_saint_florent) == 1 && FUNC("get_place_captured", town_chateauneut_recno_one) == 1 )
			{
				if ( FUNC("get_place_captured", settlement_blois_recno) == 1 && FUNC("get_place_captured", settlement_bourges_recno) == 1 ) 
				{
					if ( FUNC("get_place_captured", town_janville_recno) == 1 && FUNC("get_place_captured", town_patay_recno) == 1 && FUNC("get_place_captured", town_tours_recno) == 1 )
					{
						if ( FUNC("get_place_captured", castle_beaugency_recno) == 1 && FUNC("get_place_captured", castle_meung_recno) == 1 )
						{
							FUNC("set_end_condition_finish", 9, "WIN")
						}
					}
				}
			}
		}
	}

	if ( FUNC("get_end_condition_finish", 27) == 0 )
	{
		if ( FUNC("get_place_captured", town_st_aignar_recno) == 1 && FUNC("get_place_captured", town_chateaudun_recno) == 1 )
		{
			if ( FUNC("get_place_captured", town_loches_recno) == 1 && FUNC("get_place_captured", settlement_montargis_recno) == 1 )
			{
				if ( FUNC("get_place_captured", castle_jargeau_recno) == 1 )
				{
					FUNC("set_end_condition_finish", 27, "WIN")
				}
			}
		}
	}

	// --- Set mini-map Icon --- //
	if ( FUNC("get_place_captured", settlement_blois_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L2a", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L2a", 0)
		FUNC("set_territory_nation", "Blois", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L2a", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L2a", 1)
	}

	if ( FUNC("get_place_captured", town_janville_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L3a", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L3a", 0)
		FUNC("set_territory_nation", "Janville", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L3a", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L3a", 1)
	}

	if ( FUNC("get_place_captured", settlement_montargis_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L6a", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L6a", 0)
		FUNC("set_territory_nation", "Montargis", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L6a", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L6a", 1)
	}

	if ( FUNC("get_place_captured", town_loches_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L6b", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L6b", 0)
		FUNC("set_territory_nation", "Loches", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L6b", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L6b", 1)
	}

	if ( FUNC("get_place_captured", town_st_aignar_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L7a", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L7a", 0)
		FUNC("set_territory_nation", "St-Aignar", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L7a", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L7a", 1)
	}

	if ( FUNC("get_place_captured", town_chateaudun_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L7b", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L7b", 0)
		FUNC("set_territory_nation", "Chateaudun", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L7b", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L7b", 1)
	}

	if ( FUNC("get_place_captured", town_chateauneut_recno_one) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L9a", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L9a", 0)
		FUNC("set_territory_nation", "Chateauneut", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L9a", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L9a", 1)
	}

	if ( FUNC("get_place_captured", town_saint_florent) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L9b", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L9b", 0)
		FUNC("set_territory_nation", "Saint-Florent-Le-Saumur", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L9b", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L9b", 1)
	}

	if ( FUNC("get_place_captured", town_checy_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L10a", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L10a", 0)
		FUNC("set_territory_nation", "Checy", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L10a", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L10a", 1)
	}

	if ( FUNC("get_place_captured", town_rouvray_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L10b", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L10b", 0)
		FUNC("set_territory_nation", "Rouvray", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L10b", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L10b", 1)
	}

	if ( FUNC("get_place_captured", settlement_bourges_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L2b", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L2b", 0)
		FUNC("set_territory_nation", "Bourges", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L2b", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L2b", 1)
	}

	if ( FUNC("get_place_captured", settle_fountainbleu_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L10c", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L10c", 0)
		FUNC("set_territory_nation", "Fountainbleu", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L10c", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L10c", 1)
	}

	if ( FUNC("get_place_captured", town_patay_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L3a-2", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L3a-2", 0)
		FUNC("set_territory_nation", "Patay", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L3a-2", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L3a-2", 1)
	}

	if ( FUNC("get_place_captured", town_tours_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L3a-3", 1)
		FUNC("set_minimap_icon_display_enable", "e_townS5L3a-3", 0)
		FUNC("set_territory_nation", "Tours", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "ftownS5L3a-3", 0)
		FUNC("set_minimap_icon_display_enable", "e_townS5L3a-3", 1)
	}

	if ( FUNC("get_place_captured", castle_jargeau_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "fcastle_S5L8_J", 1)
		FUNC("set_minimap_icon_display_enable", "ecastle_S5L8_J", 0)
		FUNC("set_territory_nation", "Jargeau", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "fcastle_S5L8_J", 0)
		FUNC("set_minimap_icon_display_enable", "ecastle_S5L8_J", 1)
	}

	if ( FUNC("get_place_captured", castle_meung_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "fcastle_S5L5_M", 1)
		FUNC("set_minimap_icon_display_enable", "ecastle_S5L5_M", 0)
		FUNC("set_territory_nation", "Meung", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "fcastle_S5L5_M", 0)
		FUNC("set_minimap_icon_display_enable", "ecastle_S5L5_M", 1)
	}

	if ( FUNC("get_place_captured", castle_beaugency_recno) ) 
	{
		FUNC("set_minimap_icon_display_enable", "fcastle_S5L4_B", 1)
		FUNC("set_minimap_icon_display_enable", "ecastle_S5L4_B", 0)
		FUNC("set_territory_nation", "Beaugency", "French")
	}
	else
	{
		FUNC("set_minimap_icon_display_enable", "fcastle_S5L4_B", 0)
		FUNC("set_minimap_icon_display_enable", "ecastle_S5L4_B", 1)
	}
}