"S5L1_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 alexander_recno
	INT talbot_recno
	INT lux_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 john_recno
	INT richemont_recno

	INT suffolk_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 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 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

	// citizens
	INT orlean_weapon_seller_recno 
	INT orlean_potion_seller_recno
	INT jargeau_weapon_seller_recno
	INT jargeau_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

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

	INT side_quest_two_recno
	INT arrive_orlean_recno

	INT reach_rouvray_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 meet_suffolk_recno
	INT last_stand_recno

	INT have_archer_recno
	INT have_poleman_recno

	INT prison_one
	INT prison_two
	INT prison_three
	INT prison_four
	INT prison_five

	INT block_four_a

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

	// 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 jargeau_west_wall_recno
	INT jargeau_west_wall_recno_two

	INT lord_door_recno

	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

	// 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 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 letter_four_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")
		lux_recno = FUNC("search_unit_by_code", "Luxembourg")

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

		suffolk_recno = FUNC("search_unit_by_code", "william_de_la_pole")
		john_recno  = FUNC("search_unit_by_code" , "John_de_la_pole")

		l_six_prisoner = FUNC("search_unit_by_name" , "Ogier Foulon")

		priest_recno = 0
		st_citizen_recno = 0
		st_citizen_recno_two = 0

		door_opened = 0

		imperial_scroll_id = FUNC("item_code_to_id", "flyletter02")
		letter_three_id = FUNC("item_code_to_id", "flyletter03")
		letter_four_id = FUNC("item_code_to_id", "flyletter04")
		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

		FUNC("set_unit_drop_item_id", john_recno, letter_four_id)
		FUNC("set_unit_drop_item_id", suffolk_recno, imperial_scroll_id)		

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


		FUNC("set_can_interact_flag", one_man_citizen_recno, 1)

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

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

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

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

		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")
		meet_suffolk_recno = FUNC("search_place_by_name", "meetSuffolk")

		last_stand_recno = FUNC("search_place_by_name", "lastStand")
		
		have_archer_recno = FUNC("search_place_by_name", "haveArcher")
		have_poleman_recno = FUNC("search_place_by_name", "havePoleman")

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

		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")
		
		// Jargeau Gate
		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")

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

		// 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")
		if ( FUNC("get_place_captured", castle_jargeau_recno) == 0 )
		{
			FUNC("set_can_interact_flag", jargeau_weapon_seller_recno, 0)
		}
		else
		{
			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")
		if ( FUNC("get_place_captured", castle_jargeau_recno) == 0 )
		{
			FUNC("set_can_interact_flag", jargeau_potion_seller_recno, 0)
		}
		else
		{
			FUNC("set_can_interact_flag", jargeau_potion_seller_recno, 1)
		}
		ACTION("give_task", jargeau_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")

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

		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")
		jargeau_west_wall_recno = FUNC("search_item_by_name", "JargeauWestWall")
		jargeau_west_wall_recno_two = FUNC("search_item_by_name", "JargeauWestWall2")

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

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

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

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

		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)

		if ( FUNC("get_scenario_event_bit_flag", 22) == 0  )
		{
			FUNC("set_control_flag", cannon_two, 0)
			FUNC("set_control_flag", cannon_two_a, 0)
			FUNC("set_control_flag", cannon_two_b, 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)

		if ( FUNC("get_scenario_event_bit_flag", 22) == 0  )
		{
			FUNC("set_control_flag", cannon_three, 0)
			FUNC("set_control_flag", cannon_three_a, 0)
			FUNC("set_control_flag", cannon_three_b, 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)

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

		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)

		if ( FUNC("get_scenario_event_bit_flag", 27) == 0  )
		{
			FUNC("set_control_flag", cannon_five, 0)
			FUNC("set_control_flag", cannon_five_a, 0)
			FUNC("set_control_flag", cannon_five_b, 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)

		if ( FUNC("get_scenario_event_bit_flag", 27) == 0  )
		{
			FUNC("set_control_flag", cannon_six, 0)
			FUNC("set_control_flag", cannon_six_a, 0)
			FUNC("set_control_flag", cannon_six_b, 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)

		if ( FUNC("get_scenario_event_bit_flag", 27) == 0  )
		{
			FUNC("set_control_flag", cannon_seven, 0)
			FUNC("set_control_flag", cannon_seven_a, 0)
			FUNC("set_control_flag", cannon_seven_b, 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)

		if ( FUNC("get_scenario_event_bit_flag", 27) == 0  )
		{
			FUNC("set_control_flag", cannon_eight, 0)
			FUNC("set_control_flag", cannon_eight_a, 0)
			FUNC("set_control_flag", cannon_eight_b, 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)

		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)

		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)

		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)

		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)

		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
		FUNC("set_can_interact_flag", team_one_five_seven_leader, 1)
		ACTION("give_task", team_one_five_seven_leader, "IDLE", 1, 0, 0, 0, 0)

		if ( FUNC("get_scenario_event_bit_flag", 22) == 0 )
		{
			FUNC("set_control_flag", dunois_recno, 0)
		}

		if ( FUNC("get_scenario_event_bit_flag", 27) == 0 )
		{
			FUNC("set_control_flag", dlllier_recno, 0)
		}

		// set side quest
		if ( FUNC("get_scenario_event_bit_flag", 1) == 0 ) // the first game
		{
			if ( FUNC("get_scenario_event_bit_flag_3", 32) == 0 )
			{
				FUNC("set_team_control_flag", 603, 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)
			}

			FUNC("set_end_condition_enabled", 2, 0)
			FUNC("set_end_condition_enabled", 3, 0)
			FUNC("set_end_condition_enabled", 4, 0)
			FUNC("set_end_condition_enabled", 6, 0)
			FUNC("set_end_condition_enabled", 7, 0)
			FUNC("set_end_condition_enabled", 8, 0)
			FUNC("set_end_condition_enabled", 9, 0)
			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, 0)
			FUNC("set_end_condition_enabled", 16, 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, 0)
			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", 36, 0)
			FUNC("set_end_condition_enabled", 37, 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_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_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", 581, 2, 0)
			FUNC("set_team_prisoner", 582, 2, 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)

			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", 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, john_recno)
			FUNC("give_item_to_unit", "FD_FISH", 1, 2, suffolk_recno)

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

			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)

			FUNC("set_control_flag", orlean_recno, 0)
			FUNC("set_control_flag", team_five_eight_five_recno, 0)
			FUNC("set_control_flag", team_five_eight_six_recno, 0)
			FUNC("set_control_flag", team_five_eight_seven_recno, 0)
			FUNC("set_control_flag", team_five_eight_eight_recno, 0)

			ACTION("give_task", orlean_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", team_five_eight_five_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", team_five_eight_six_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", team_five_eight_seven_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", team_five_eight_eight_recno, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", fcannon_recno_a, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", fcannon_recno_b, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", fcannon_recno_c, "IDLE", 1, 1, 0, 0, 0)
			ACTION("give_task", fcannon_recno_d, "IDLE", 1, 1, 0, 0, 0)

			FUNC("set_unit_hide_in_command_interface", orlean_recno, 1)

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

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

			// Set minimap
			FUNC("set_minimap_icon_display_enable", "ftownS5L2a", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L2a", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L3a", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L3a", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L6a", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L6a", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L6b", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L6b", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L7a", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L7a", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L7b", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L7b", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L9a", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L9a", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L9b", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L9b", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L10a", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L10a", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L10b", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L10b", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L2b", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L2b", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L10c", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L10c", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L3a-2", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L3a-2", 1)
			FUNC("set_minimap_icon_display_enable", "ftownS5L3a-3", 0)
			FUNC("set_minimap_icon_display_enable", "e_townS5L3a-3", 1)
			FUNC("set_minimap_icon_display_enable", "fcastle_S5L8_J", 0)
			FUNC("set_minimap_icon_display_enable", "ecastle_S5L8_J", 1)
			FUNC("set_minimap_icon_display_enable", "fcastle_S5L5_M", 0)
			FUNC("set_minimap_icon_display_enable", "ecastle_S5L5_M", 1)
			FUNC("set_minimap_icon_display_enable", "fcastle_S5L4_B", 0)
			FUNC("set_minimap_icon_display_enable", "ecastle_S5L4_B", 1)	
		}
		
//		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")

		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_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)
		}
	} 

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


	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, "[0001N]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, "[0002N]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, "[0001N]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, "[0002N]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, "[0001N]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, "[0002N]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", "[0003N]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", "[0004N]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", "[0005N]You have slain Willa Neucomen, the captain of the prison 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", 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") }
//	}

		// 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, "[0006N]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, "[0007N]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, "[0008N]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", "[0009N]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, "[0010N]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, "[0011N]Our deacon should be out and about now there are no more pestering 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, "[0012N]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, "[0013N]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, "[0014N]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, "[0015N]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, "[0016N]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, "[0017N]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)
			}
		}


		// 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, "[0018N]Hello there! 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", orlean_weapon_shop_recno, orlean_weapon_seller_recno) } 

				WAIT { DIALOG("add_dialog", orlean_weapon_seller_recno, "[0019N]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", orlean_weapon_shop_recno)
				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, "[0020N]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, "[0021N]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)
				FUNC("stop_curr_task", orlean_potion_shop_recno)
			}
		}


		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("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, "[0022N]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", "[0023N]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("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, "[0024N]Thank you for restoring 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("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, "[0025N]I can play with Jacques and Pierre again, now that the bad people have all 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("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, "[0026N]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", "[0027N]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("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, "[0028N]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, "[0029N]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("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, 400, ( 80 - FUNC("get_unit_dir", chateaudun_citizen_recno_f) ), 50)
			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_f, "[0030N]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, 400, ( 240 - FUNC("get_unit_dir", chateaudun_citizen_recno_f) ), 50)
			WAIT { DIALOG("add_dialog", chateaudun_citizen_recno_f, "[0031N]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, "[0032N]I may be too old now, but my grandchildren are able to wade 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, "[0033N]We have not witnessed the presence of friendly troops here in Chateauneut 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, "[0034N]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, "[0035N]This town has been cast a dark shadow with the walls of Jargeau looming ahead. Its fortified towers are laden with archers, and will stave your advance if your goal is enter Jargeau. 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, "[0036N]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, "[0037N]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, "[0038N]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, "[0039N]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, "[0040N]He has instructed me to hand this package to you when we meet.") }
			}

			WAIT { DIALOG("add_dialog", one_man_citizen_recno, "[0041N]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", "[0042N]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 )
		}

		// 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, "[0018N]Hello there! I carry finely crafted tools for all your warring needs.") }

				// 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, "[0019N]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("stop_curr_task", jargeau_weapon_seller_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, "[0020N]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, "[0021N]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("stop_curr_task", jargeau_potion_shop_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)
				ACTION("stop_all_order", child_recno) 

				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, "[0043N]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, "[0044N]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", "[0045N]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("stop_curr_task", main_recno)
				FUNC("stop_curr_task", child_recno)

				FUNC("free_team_prisoner", 210)

				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_one_recno
				messager_one_recno = FUNC("search_unit_by_name", "Nicholas Weston")

				FUNC("attention_call_message_2", "[0046N]Look up ahead - there's the enemy! To the attack!", messager_one_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_two_recno
				messager_two_recno = FUNC("search_unit_by_name", "Triston Walsoken")

				FUNC("attention_call_message_2", "[0047N]I see a fiend in the midst! Come on, lads, let's destroy these transgressors of English sovereignty!", messager_two_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_three_recno
				messager_three_recno = FUNC("search_unit_by_name", "Jacobus Sprode")

				FUNC("attention_call_message_2", "[0048N]What is that I see? It's the French! Attack, men! Leave no one standing!", messager_three_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", "[0049N]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, "[0050N]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, "[0051N]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, "[0052N]Oh, woe is me! 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, "[0053N]My poor boy is lost! What can a helpless father do?") }
				}
				else
				{
					WAIT { DIALOG("add_dialog", father_recno, "[0054N]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, "[0055N]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_team_prisoner", 210, 2, 0)

					FUNC("set_end_condition_enabled", 12, 1)
				}
				else
				if ( FUNC("get_scenario_bit_flag", 18) == 0 )
				{
					WAIT { DIALOG("add_dialog", mother_recno, "[0056N]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, "[0057N]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, "[0058N]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" , father_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , father_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, "[0059N]Lucien! I was so worried about you! Where have you been?") }

		FUNC("change_camera_in_cut_scene", 0, 15520, 22996, 193, 350, -57, 6)
		WAIT { DIALOG("add_dialog", child_recno, "[0060N]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, "[0061N]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, "[0062N]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)
	}


	// Event 0
	if( FUNC("get_scenario_event_bit_flag", 1) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", one_event_zero_place_recno, "P")
		
		if(joan_in_place_recno > 0) 
		{
			FUNC("set_cut_scene_flag" , 1)					// enter cut scene! 
			FUNC("set_end_cut_scene_type", 1)
			
			// 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", la_hire_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", jean_recno, 1)	// joan can process
			FUNC("set_unit_can_process_in_cut_scene", alencon_recno, 1)	// joan can process
			
			// set weapon seller to idle and rotate him
			ACTION("stop_all_order", la_hire_recno ) 
			ACTION("stop_all_order", jean_recno ) 
			
			ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, la_hire_recno) , 0 , 0 , 0, 2500)
			ACTION("give_order" , la_hire_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , la_hire_recno, main_recno) , 0 , 0 , 0, 2500)
			ACTION("give_order" , jean_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , jean_recno, main_recno) , 0 , 0 , 0, 2500)
			ACTION("give_order" , alencon_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , alencon_recno, main_recno) , 0 , 0 , 0, 2500)

			FUNC("change_camera_in_cut_scene", 0, 20252, 30594, 177, 187, -91, 20)
			WAIT { DIALOG("add_dialog", la_hire_recno, "[0063N]The English have been forced to abandon their strategic locations of Tourelles and St Augustin. Our main objective should now be the liberation of the rest of the Loire valley.") }

			FUNC("change_camera_in_cut_scene", 0, 19346, 30009, 358, 187, 6, 20)
			WAIT { DIALOG("add_dialog", jean_recno, "[0064N]Milady, we shall head east to Jargeau Castle and reclaim any French townships wrongfully occupied by the enemy on our way. La Hire and I will accompany you.") }

			FUNC("change_camera_in_cut_scene", 0, 20212, 29598, 174, 187, 88, 6)			
			WAIT { DIALOG("add_dialog", la_hire_recno, "[0065N]Alencon shall head due south to rendezvous with d'Illiers and Dunois, who are arriving with siege cannons.") }

			FUNC("change_camera_in_cut_scene", 0, 20828, 30531, 13, 187, -144, -2)
			WAIT { DIALOG("add_dialog", la_hire_recno, "[0066N]We shall need all the firepower we can afford to amass, for we must lay siege to three castles if we are to free the southern Loire region. Good luck, Alencon, and good luck to us all!") }
			
			FUNC("change_camera_in_cut_scene", 0, 20223, 30531, 156, 187, -90, 5)
			WAIT { DIALOG("add_dialog", jean_recno, "[0067N]Let us commence the offensive!") }

			ACTION("give_order" , la_hire_recno, "TURN" , 3 , 0 , 90, 0 , 0 , 0, 2500)
			ACTION("give_order" , jean_recno, "TURN" , 3 , 0 , 90, 0 , 0 , 0, 2500)
			ACTION("give_order" , alencon_recno, "TURN" , 3 , 0 , 90, 0 , 0 , 0, 2500)

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

			FUNC("end_cut_scene_2", 0, 1)
			WAIT{ FUNC("is_cut_scene_status_black_screen") }
				
			FUNC("stop_curr_task", main_recno)

			WAIT { FUNC("show_scenario_brief") }

			FUNC("minimap_set_way_point", 1, 5822.0, 6013.0, 200.0, 1, 0)
			FUNC("minimap_set_way_point", 2, 3023.0, 27654.0, 200.0, 1, 0)

			FUNC("attention_call_message", FUNC("format_string", "[0068N]You may have to employ real-time strategic elements in order to successfully accomplish this mission. To switch between Action and RTS modes, press _%1s_.", FUNC("get_key_string", "RTS_MODE")), 1)
			FUNC("attention_call_message", "[0069N]Spin the mousewheel to zoom in or out while in RTS mode. To move the camera, move the cursor until it touches the screen edges. Hold the mousewheel down and move the mouse left or right to rotate the camera.", 1)
			FUNC("attention_call_message", "[0070N]In RTS mode, select your troops by left-clicking on the troop leader or left-click and drag a bounding box around the units. A blue circle will appear under the selected units. Then left-click the location you want your units to move to.", 1)
			FUNC("attention_call_message", FUNC("format_string", "[0071N]You can also select and center the camera on a commander and troops by pressing their designated number twice (i.e. Press _%1s_ + _%1s_ to select Joan of Arc and her troop and center the view on them).", FUNC("get_key_string", "SWITCH_JOAN")), 1)
			FUNC("attention_call_message", "[0072N]To create groups within a troop in RTS mode, select the units you want in a group, then issue the group command by pressing Ctrl + any number (you can assign up to ten units, from 1-9). Press Alt + the number you assigned to the group.", 1)
			FUNC("attention_call_message", "[0073N]You can assign a unit or group to head out and scout an area in RTS mode. After reaching the destination, the unit or group will automatically return to the troop commander.", 1)
			FUNC("attention_call_message", "[0074N]In RTS mode, left-clicking on the toggle button to the side of the commander's portrait will instruct them to either hold their ground (red), or to resume their course of duty (green). You cannot issue this command to common units.", 1)
			FUNC("attention_call_message", "[0075N]To enter French castles in RTS mode, double-left-click on a castle gate to raise or lower the gate.", 1)
			FUNC("attention_call_message", "[0076N]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", 1, 1)
		}
	}

	if ( FUNC("get_scenario_bit_flag", 16) == 0 )
	{
		joan_in_place_recno = FUNC("search_for_unit_in_place", see_rouvray_recno, "E")

		if ( joan_in_place_recno )
		{
			INT messager_four_recno
			messager_four_recno = FUNC("search_unit_by_name", "Radulfus Bradcroft")

			FUNC("attention_call_message_2", "[0077N]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_four_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", "[0078N]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", "[0076N]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", "[0079N]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", "[0080N]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", "[0080N]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", "[0080N]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", "[0080N]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", "[0081N]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", "[0082N]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", "[0083N]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 9
	if ( FUNC("get_scenario_event_bit_flag", 10) == 0 && FUNC("get_place_captured", castle_jargeau_recno) == 0 )
	{
		if ( FUNC("is_item_deleted_by_name", one_event_nine_item_recno, "JargeauWestGate") > 0 || FUNC("get_wall_hp", jargeau_west_wall_recno) == 0 || FUNC("get_wall_hp", jargeau_west_wall_recno_two) == 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, 5899, 13532, 326, 350, -95, 0)
			WAIT { DIALOG("add_dialog", jean_recno, "[0084N]The western walls of Jargeau have been breached! The defeat of the English is at hand!") }
			
			if ( FUNC("is_item_deleted_by_name", one_event_ten_item_recno, "JargeauMiddleGate") == 0 )
			{
				FUNC("change_camera_in_cut_scene", 0, 5731, 7226, 1155, 187, -87, 23)
				WAIT { DIALOG("add_dialog", jean_recno, "[0085N]Mon Dieu! Jargeau has a second line of defense. We must penetrate these walls if we are to reach the Lord's chambers!") }
				WAIT { DIALOG("add_dialog", la_hire_recno, "[0086N]Why in our Lord's name do we want to recapture the Lord's chambers?") }

				FUNC("change_camera_in_cut_scene", 0, 4680, 2228, 355, 187, 76, -17)
				WAIT { DIALOG("add_dialog", jean_recno, "[0087N]Inside the Lord's chambers are many of our enemies secrets, that's why! If we enter, we will learn more about their fiendish plans!") }
			}

			// 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", jean_recno)
			FUNC("stop_curr_task", la_hire_recno)

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


	if ( FUNC("get_scenario_bit_flag", 9) == 0 && FUNC("get_place_captured", castle_jargeau_recno) == 0 )
	{
		if ( FUNC("is_item_deleted_by_name", one_event_ten_item_recno, "JargeauMiddleGate") == 0 && FUNC("is_item_deleted_by_name", jargeau_north_gate_recno, "JargeauNorthGate") > 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) 
			
			// set weapon seller to idle and rotate him
			FUNC("change_camera_in_cut_scene", 0, 4834, 3335, 1034, 187, 5, 22)

			INT archer_recno
			archer_recno = FUNC("search_unit_by_name", "Conand Pyrre")

			WAIT { DIALOG("add_dialog", archer_recno, "[0088N]Range units! The enemy has breached our first line of defense! We must prevent them from reaching our Lord's chambers!") }

			// 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_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", "[0089N]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) == 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
				FUNC("set_unit_can_process_in_cut_scene", dunois_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)
				ACTION("give_order" , dunois_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , dunois_recno, main_recno) , 0 , 0 , 0, 2500)
				FUNC("change_camera_in_cut_scene", 0, 3372, 27766, 195, 187, -177, 16)
				WAIT { DIALOG("add_dialog", dunois_recno, "[0090N]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, "[0091N]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!") }
				}

				if ( FUNC("get_place_captured", castle_jargeau_recno) == 0 )
				{
					FUNC("change_camera_in_cut_scene", 0, 2535, 27971, 112, 347, -53, 5)
					WAIT { DIALOG("add_dialog", dunois_recno, "[0092N]We must be wary when traveling with such unwieldly slow machines, narrow passes will be harder to traverse, and trees may complicate our movement even more on our journey to Jargeau.") }
				}

				FUNC("change_camera_in_cut_scene", 0, 3372, 27766, 195, 187, -178, 16)
				WAIT { DIALOG("add_dialog", dunois_recno, "[0093N]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", "[0094N]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_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", "[0095N]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", "[0096N]Only light infantry units can operate siege machines. Each siege machine requires a different number of units to operate. Look under the <Siege Weapon> 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)
		}
	}

	// 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
				FUNC("set_unit_can_process_in_cut_scene", dlllier_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)
				ACTION("give_order" , dlllier_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , dlllier_recno, main_recno) , 0 , 0 , 0, 2500)
				FUNC("change_camera_in_cut_scene", 0, 525, 15670, 600, 187, -54, 16)
				WAIT { DIALOG("add_dialog", dlllier_recno, "[0097N]My dear General! It is an honor to fight by your side.") }

				if ( FUNC("get_place_captured", castle_jargeau_recno) == 0 )
				{
					if ( FUNC("is_unit_inside_place", meet_dillier_recno, dunois_recno) == 0 )
					{
						WAIT { DIALOG("add_dialog", dlllier_recno, "[0098N]I see that you have arrived without my comrade Dunois.") }
						FUNC("change_camera_in_cut_scene", 0, 2018, 13790, 425, 350, 114, 10)
						WAIT { DIALOG("add_dialog", dlllier_recno, "[0099N]I hope that nothing has befallen him. How unfortunate that he should not be with us, for if my senses serve me well, we will need to employ all the might of our siege cannons if we are to even dent Jargeau's walls.") }
					}
					else
					{
						WAIT { DIALOG("add_dialog", dlllier_recno, "[0100N]I am also pleased to see you, Dunois!") }
						FUNC("change_camera_in_cut_scene", 0, 2018, 13790, 425, 350, 114, 10)
						WAIT { DIALOG("add_dialog", dunois_recno, "[0101N]Likewise. I see you have brought a sizable battery of siege cannons. If my prediction serves me well, we will need to employ all their might if we are to breach the walls of Jargeau.") }
					}

					if ( FUNC("search_for_unit_in_place", have_archer_recno, "F") > 0 )
					{
						FUNC("change_camera_in_cut_scene", 0, 5524, 11189, 1003, 187, 116, 32)
						WAIT { DIALOG("add_dialog", dlllier_recno, "[0102N]The walls of Jargeau are lined with archers able to strike from a distance...") }
					}

					if ( FUNC("search_for_unit_in_place", have_poleman_recno, "F") > 0 )
					{
						FUNC("change_camera_in_cut_scene", 0, 5072, 12584, 437, 187, -42, 14)
						WAIT { DIALOG("add_dialog", dlllier_recno, "[0103N]While below are many bombards that we must contend with before we are able to enter its walls.") }
					}

					FUNC("change_camera_in_cut_scene", 0, 525, 15670, 600, 187, -54, 16)
					WAIT { DIALOG("add_dialog", dlllier_recno, "[0104N]Therefore, we have much to do if our intent is to return Jargeau back to hands of the Valois. We await your command to strike, general!") }
				}

				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", "[0105N]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("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", "[0095N]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", "[0106N]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)
		}
	}

	if ( FUNC("get_scenario_bit_flag", 2) == 0 && FUNC("get_end_condition_enabled", 26) == 0)
	{
		alencon_in_place_recno = FUNC("is_unit_inside_place", cross_bridge_recno, main_recno)

		if ( alencon_in_place_recno == 0 )
		{
			alencon_in_place_recno = FUNC("is_unit_inside_place", cross_bridge_recno_two, 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", main_recno, 1)	// joan can process
			
			// set weapon seller to idle and rotate him
			if ( FUNC("is_unit_inside_place", cross_bridge_recno, main_recno) )
			{
				FUNC("change_camera_in_cut_scene", 0, 8168, 3596, 330, 350, 6, 5)
			}
			else
			{
				FUNC("change_camera_in_cut_scene", 0, 11169, 6648, 263, 178, -163, 4)
			}

			INT light_cap_recno
			light_cap_recno = FUNC("search_unit_by_name", "Triston Challener")

			WAIT { DIALOG("add_dialog", light_cap_recno, "[0107N]Lads! Our foes are approaching the walls of Jargeau! Do not give an inch to these Valois dogs!") }

			FUNC("change_camera_in_cut_scene", 0, 8267, 3271, 239, 187, -59, -36)
			WAIT { DIALOG("add_dialog", la_hire_recno, "[0108N]Careful, my friends, for the enemy has erected a number of archer towers before the walls of Jargeau.") }

//			FUNC("change_camera_in_cut_scene", 0, 8622, 2949, 809, 187, 56, 6)
//			WAIT { DIALOG("add_dialog", jean_recno, "[0029N]The archers inside will surely decimate us if we leave them be. We must eliminate these towers, be it by siege or by explosive arrows!") }

			if ( FUNC("get_scenario_bit_flag", 21) == 0 )
			{
				FUNC("change_camera_in_cut_scene", 0, suffolk_recno, 80, ( 180 - FUNC("get_unit_dir", suffolk_recno) ), -15)

				WAIT{ DIALOG("add_dialog", suffolk_recno, "[0109N]You worthless peasants! You shall never reclaim Jargeau while I am still in command of this castle! Approach one step more, and you shall experience my wrath!") }

				FUNC("set_end_condition_enabled", 34, 1)
				FUNC("stop_curr_task", suffolk_recno)

				FUNC("set_scenario_bit_flag", 21, 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", team_four_nine_leader)
			FUNC("stop_curr_task", team_five_two_leader)
			ACTION("give_task", team_four_nine_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)
			ACTION("give_task", team_five_two_leader, "TOWER_ATTACK", 1, 3000, 0, 0, 0)

			FUNC("stop_curr_task", main_recno)

			FUNC("set_scenario_bit_flag", 2, 1)

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

	if ( FUNC("get_scenario_bit_flag", 21) == 0 )
	{
		alencon_in_place_recno = FUNC("search_for_unit_in_place", meet_suffolk_recno, "E")

		if ( alencon_in_place_recno > 0 )
		{
			FUNC("start_cut_scene_2", 1, 0, suffolk_recno, 200, ( 180 - FUNC("get_unit_dir", suffolk_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", suffolk_recno, 1)

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

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

			WAIT{ DIALOG("add_dialog", suffolk_recno, "[0109N]You worthless peasants! You shall never reclaim Jargeau while I am still in command of this castle! Approach one step more, and you shall experience my wrath!") }

			FUNC("set_end_condition_enabled", 34, 1)

			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("stop_curr_task", suffolk_recno)
			ACTION("stop_all_order", suffolk_recno)

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

	if ( FUNC("get_scenario_event_bit_flag_2", 2) == 0 )
	{
		alencon_in_place_recno = FUNC("search_for_unit_in_place", last_stand_recno, "E")

		if ( alencon_in_place_recno > 0 )
		{
			if ( FUNC("is_unit_dead_by_name", suffolk_recno, "William de la Pole") == 0 )
			{
				FUNC("start_cut_scene_2", 1, 0, suffolk_recno, 200, ( 180 - FUNC("get_unit_dir", suffolk_recno) ), 10, 1)
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
				FUNC("set_unit_can_process_in_cut_scene", suffolk_recno, 1)

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

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

				WAIT{ DIALOG("add_dialog", suffolk_recno, "[0110N]This is our final stand, men, let us fight the good fight!") }

				FUNC("stop_curr_task", team_one_nine_nine_leader)

				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("stop_curr_task", suffolk_recno)

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

	if ( FUNC("get_scenario_event_bit_flag_3", 5) == 0 )
	{
		alencon_in_place_recno = FUNC("search_for_unit_in_place", reach_lord_recno, "E")

		if ( alencon_in_place_recno > 0 )
		{
			if ( FUNC("is_unit_dead_by_name", suffolk_recno, "William de la Pole") == 0 )
			{
				FUNC("start_cut_scene_2", 1, 0, suffolk_recno, 200, ( 180 - FUNC("get_unit_dir", suffolk_recno) ), 10, 1)
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
				FUNC("set_unit_can_process_in_cut_scene", suffolk_recno, 1)

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

				WAIT{ FUNC("is_cut_scene_status_black_screen") }

				FUNC("change_camera_in_cut_scene", 0, suffolk_recno, 400, ( 250 - FUNC("get_unit_dir", suffolk_recno) ), 10)
				WAIT{ DIALOG("add_dialog", suffolk_recno, "[0111N]Men! The enemy has made their way into the very heart of Jargeau! We must stage a brave defense for we cannot afford to let Loire revert into the hands of these miserable French curs!") }

				FUNC("change_camera_in_cut_scene", 0, 4986, 3016, 436, 348, 107, 3)
				FUNC("add_gate_trigger", lord_door_recno, 0)

				WAIT{ DIALOG("add_dialog", john_recno, "[0112N]Fear not, dear brother, for the enemy will have to rid us both if the French are to wrest Jargeau from the grasp of England! I am restored and fit as an ox - together let us destroy our aggressors!") }

				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("stop_curr_task", suffolk_recno)
				FUNC("stop_curr_task", john_recno)

				FUNC("set_end_condition_enabled", 33, 1)

				FUNC("set_scenario_event_bit_flag_3", 5, 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", "[0113N]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", "[0114N]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", "[0115N]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", "[0116N]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", "[0117N]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", "[0118N]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", "[0119N]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", "[0120N]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", "[0121N]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)
		}
	}

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

		if ( joan_in_place_recno == 0 )
		{
			joan_in_place_recno = FUNC("search_for_unit_in_place", castle_jargeau_recno_two, "P")
		}

		if ( joan_in_place_recno > 0 )
		{
			if ( FUNC("number_of_fightable_enemy_in_place", castle_jargeau_recno, main_recno) == 0 && FUNC("number_of_fightable_enemy_in_place", castle_jargeau_recno_two, main_recno) == 0 )
			{
				FUNC("set_place_captured", castle_jargeau_recno, 1)
				FUNC("set_barrack_captured", facility_jargeau_barrack, 1)
				FUNC("set_territory_nation", "Jargeau", "French")

				FUNC("backup_bit_flag")

				FUNC("minimap_set_way_point", 1, 0.0, 0.0, 0.0, 0, 0)		

				// do something here to splint the scenario 
				FUNC("set_can_interact_flag", jargeau_weapon_seller_recno, 1)	
				FUNC("set_can_interact_flag", jargeau_potion_seller_recno, 1)

				FUNC("set_item_nation", jargeau_north_gate_recno, "French")
				FUNC("set_item_nation", jargeau_south_gate_recno, "French")
				FUNC("set_item_nation", one_event_ten_item_recno, "French")
				FUNC("set_item_nation", one_event_nine_item_recno, "French")

				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

				// set weapon seller to idle and rotate him
				FUNC("change_camera_in_cut_scene", 0, 4568, 12283, 1112, 350, -42, 31)
				WAIT { DIALOG("add_dialog", la_hire_recno, "[0122N]We have captured Jargeau! The English are a threat here no more.") }
				FUNC("change_camera_in_cut_scene", 0, 9530, 3085, 1112, 350, 163, 22)
				WAIT { DIALOG("add_dialog", jean_recno, "[0123N]We must now focus our energies on Meung, as it commands a prime location along the Loire river.") }
				FUNC("change_camera_in_cut_scene", 0, 6175, 2698, 1670, 350, 149, 32)
				WAIT { DIALOG("add_dialog", la_hire_recno, "[0124N]Yes. While the English assume command of this castle, there is no guarantee that our people can safely navigate the Loire river in their daily activities without constant harassment from the English.") }
				FUNC("change_camera_in_cut_scene", 0, 6098, 7362, 742, 350, 100, 28)
				WAIT { DIALOG("add_dialog", jean_recno, "[0125N]Here in Jargeau lies a blacksmith, a shoppe and a barracks. We should equip ourselves here before attempting the siege on Meung. Let us make use of the facilities here in this castle before moving on.") }
				FUNC("change_camera_in_cut_scene", 0, 6627, 7821, 984, 350, -22, 27)
				WAIT { DIALOG("add_dialog", la_hire_recno, "[0126N]Very well, then. Let us acquire whatever provisions are necessary, and head west. Meung is a long way from here!") }

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

				WAIT{ FUNC("is_cut_scene_finished") }

				FUNC("del_item_by_name", "block2a")
				FUNC("del_item_by_name", "block2b")
				FUNC("del_item_by_name", "block2c")
				FUNC("del_item_by_name", "blockAAA")

				if ( FUNC("get_end_condition_enabled", 29) > 0 && FUNC("get_end_condition_finish", 29) == 0 )
				{
					FUNC("set_end_condition_finish", 29, "LOSE")
				}

				if ( FUNC("get_end_condition_enabled", 26) > 0 && FUNC("get_end_condition_finish", 26) == 0 )
				{
					FUNC("set_end_condition_finish", 26, "LOSE")
				}
			}
			
			INT enemyNumber
			enemyNumber = ( FUNC("number_of_fightable_enemy_in_place", castle_jargeau_recno, main_recno) + FUNC("number_of_fightable_enemy_in_place", castle_jargeau_recno_two, main_recno) )

			if ( FUNC("get_scenario_event_bit_flag_2", 10) == 0 &&  enemyNumber == 1 && FUNC("is_unit_dead_by_name", suffolk_recno, "William de la Pole") == 0 )
			{
				FUNC("attention_call_message", "[0127N]All the enemy forces in Jargeau have been eliminated - now you must seek out William de la Pole and slay him!")

				FUNC("set_scenario_event_bit_flag_2", 10, 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", "[0128N]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("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_five_seven_leader, 1)

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

		WAIT { DIALOG("add_dialog", team_one_five_seven_leader, "[0129N]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!") }

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

		WAIT{ FUNC("is_cut_scene_finished") }
			
		//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)

		FUNC("stop_curr_task", main_recno)

		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 ( 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 )
	{
		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", "[0130N]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)
		}
	}




	// retreat if John dies
	if ( john_recno > 0 && FUNC("is_unit_dead_by_name", john_recno, "John de la Pole") > 0 )
	{
		if ( FUNC("is_unit_dead_by_name", suffolk_recno, "William de la Pole") == 0 )
		{
			FUNC("start_cut_scene_2", 1, 0, suffolk_recno, 200, ( 180 - FUNC("get_unit_dir", suffolk_recno) ), 10, 1)
			FUNC("set_unit_can_process_in_cut_scene", 0, 0)
			FUNC("set_unit_can_process_in_cut_scene", suffolk_recno, 1)

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

			WAIT{ FUNC("is_cut_scene_status_black_screen") }
			FUNC("change_camera_in_cut_scene", 0, suffolk_recno, 200, ( 180 - FUNC("get_unit_dir", suffolk_recno) ), 10)
					
			WAIT{ DIALOG("add_dialog", suffolk_recno, "[0131N]No! Not my brother! You worthless peasants! I shall not allow dear John to perish senselessly! I shall tear you apart limb from limb for taking my brother's life!") }

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

			FUNC("stop_curr_task", suffolk_recno)
		}
		else
		{
			FUNC("attention_call_message", "[0132N]You have slain John de la Pole! Word spreads fast in the Loire - it is only a matter of time before William de la Pole finds out you have killed his brother!")
		}

		FUNC("set_end_condition_finish", 33, "WIN")

		john_recno = 0
	}

	// retreat if Suffolk dies
	if ( suffolk_recno > 0 )
	{
			if( FUNC("get_unit_retreat", suffolk_recno) == -1 )
			{
				FUNC("start_cut_scene_2", 1, 0, suffolk_recno, 200, ( 180 - FUNC("get_unit_dir", suffolk_recno) ), 10, 1)
				FUNC("set_unit_can_process_in_cut_scene", 0, 0)
				FUNC("set_unit_can_process_in_cut_scene", suffolk_recno, 1)

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

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

				WAIT{ DIALOG("add_dialog", suffolk_recno, "[0133N]I have been wounded enough for this battle! I shall retreat now, but all men present, do your utmost to prevent our foes from capturing Jargeau!") }

				FUNC("enable_unit_bounding_volume", suffolk_recno, 0)

				WAIT{ ACTION("give_order", suffolk_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", suffolk_recno)

				WAIT{ FUNC("is_cut_scene_finished") }

				if ( FUNC("number_of_fightable_enemy_in_place", castle_jargeau_recno, main_recno) == 0 && FUNC("number_of_fightable_enemy_in_place", castle_jargeau_recno_two, main_recno) == 0 )
				{
					FUNC("attention_call_message", "[0134N]William de la Pole has fallen under the might of your steel! The enemy forces within Jargeau have been vanquished - you have successfully captured Jargeau!")
				}
				else
				{
					FUNC("attention_call_message", "[0135N]William de la Pole has fallen under the might of your steel! The enemy forces within Jargeau are left without a leader - now is the time to eliminate them all from within Jargeau!")
				}

				FUNC("set_end_condition_finish", 34, "WIN")

				suffolk_recno = 0

				FUNC("set_scenario_bit_flag", 22, 1)
			}
			else
			{
				//set alexander to defend place
//				ACTION("give_task", suffolk_recno, "DEFEND_PLACE", 1, suffolk_place_recno, 0, 0, 0)
				FUNC("set_unit_retreat", suffolk_recno, 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", "[0136N]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)
		}
	}


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

	// --- 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", "[0137N]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", "[0138N]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_scenario_bit_flag", 4) == 0 && FUNC("get_scenario_bit_flag", 3) == 1 )
	{
		if ( FUNC("get_scenario_count_time") > 300000 )
		{
			FUNC("attention_call_message", "[0139N]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", "[0140N]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)
		}
	}

		// 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_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_place_captured", castle_jargeau_recno) == 0 )
						{
							FUNC("attention_call_message", "[0141N]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_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)
						FUNC("set_unit_can_process_in_cut_scene", main_recno, 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)
						ACTION("give_order" , main_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , main_recno, team_five_eight_one_leader) , 0 , 0 , 0, 2500)
						FUNC("set_unit_can_process_in_cut_scene", team_five_eight_one_leader, 0)
						FUNC("set_unit_can_process_in_cut_scene", main_recno, 0)

						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, "[0142N]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, "[0143N]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, "[0144N]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, "[0145N]Thank you for saving me hind 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, "[0146N]Much obliged for rescuing 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", "[0147N]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", "[0148N]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", "[0141N]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", "[0147N]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", "[0148N]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", "[0141N]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", "[0147N]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", "[0148N]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", "[0141N]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, "[0142N]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, "[0149N]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, "[0144N]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, "[0145N]Thank you for saving me hind 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_two_leader, "[0146N]Much obliged for rescuing 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", "[0147N]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", "[0148N]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", "[0141N]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", "[0147N]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", "[0148N]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", "[0141N]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) > 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", "[0147N]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", "[0148N]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", "[0141N]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, "[0142N]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, "[0150N]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, "[0144N]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, "[0145N]Thank you for saving me hind 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_three_leader, "[0146N]Much obliged for rescuing 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", "[0147N]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", "[0148N]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", "[0141N]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", "[0147N]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", "[0148N]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", "[0141N]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", "[0147N]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", "[0148N]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_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", "[0151N]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", "[0152N]Free us from my 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", "[0153N]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_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_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)
	}
}