################################################
# Duel Mod
################################################
[anyone|plyr,"member_question_2", [], "Care to duel?", "lord_challenge_duel",[]],
[anyone|plyr,"regular_member_talk", [], "Let's have a practice duel.", "lord_challenge_duel",[]],
[anyone|plyr,"lord_talk_ask_something_2", [], "I say, I've got a rather smashing idea!", "lord_talk_idea",[]],
[anyone,"lord_talk_idea", [], "What ho! Do tell old chap!", "lord_talk_ideas",[]],
[anyone|plyr,"lord_talk_ideas", [], "What say we have a duel?", "lord_challenge_duel",[]],
[anyone|plyr,"lord_talk_ideas", [], "I know, let's go peasant hunting!", "lord_peasant_hunt",[]],
[anyone,"lord_challenge_duel", [], "Hah! Have at ye!", "close_window",
[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 0),
(assign, "$g_leave_encounter", 1),
(try_begin),
(is_between, "$g_encountered_party", towns_begin, towns_end),
(party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
(else_try),
(assign, ":closest_dist", 100000),
(assign, ":closest_town", -1),
(try_for_range, ":cur_town", towns_begin, towns_end),
(store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
(lt, ":dist", ":closest_dist"),
(assign, ":closest_dist", ":dist"),
(assign, ":closest_town", ":cur_town"),
(try_end),
(party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
(try_end),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 0, "trp_player"),
(set_visitor, 1, "$g_talk_troop"),
(set_jump_mission, "mt_arena_duel_thing"),
(jump_to_scene, ":arena_scene"),
(try_begin),
(neq, "$talk_context", tc_court_talk),
(jump_to_menu, "mnu_arena_duel_fight"),
(try_end),
]],
[anyone,"lord_peasant_hunt", [], "Ah yes, good show!", "close_window",
[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 5),
(assign, "$g_leave_encounter", 1),
(try_begin),
(is_between, "$g_encountered_party", towns_begin, towns_end),
(party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
(else_try),
(assign, ":closest_dist", 100000),
(assign, ":closest_town", -1),
(try_for_range, ":cur_town", towns_begin, towns_end),
(store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
(lt, ":dist", ":closest_dist"),
(assign, ":closest_dist", ":dist"),
(assign, ":closest_town", ":cur_town"),
(try_end),
(party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
(try_end),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 0, "trp_player"),
#(set_visitor, 1, "$g_talk_troop"),
(set_jump_mission, "mt_peasant_hunt"),
(jump_to_scene, ":arena_scene"),
(try_begin),
(neq, "$talk_context", tc_court_talk),
(jump_to_menu, "mnu_peasants_begin"),
(try_end),
]],
################################################
# End of Duel Mod
################################################
#############################
# Duel Mod
#############################
(
"arena_duel_thing",mtf_arena_fight,-1,
"The duel begins!",
[
(56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []),
(58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []),
],
[
common_inventory_not_available,
(ti_tab_pressed, 0, 0, [(display_message, "@Cannot leave now.")], []),
#(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
(0, 0, ti_once, [],
[
(call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
]),
(1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)],
[
(finish_mission),
]),
],
),
# Peasant hunt
(
"peasant_hunt",mtf_arena_fight|mtf_commit_casualties,-1,
"Let the hunt begin!",
[
(56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []),
(58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []),
],
[
common_inventory_not_available,
(ti_tab_pressed, 0, 0, [(display_message, "@Cannot leave now.")], []),
#(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
(0, 0, ti_once, [],
[
(call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
]),
(0, 0, ti_once,[(call_script, "script_spawn_villagers")],[]),
(1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)],
[
(finish_mission),
]),
],
),
#############################
# End of Duel Mod
#############################
##############################
# Duel Mod
##############################
("duel_begin",0,
"You prepare to duel.",
"none",
[],
[
("continue",[],"Continue...",
[
(jump_to_menu, "mnu_simple_encounter"),
(change_screen_mission),
]),
]
),
("peasants_begin",0,
"You prepare slaughter peasants..",
"none",
[],
[
("continue",[],"Continue...",
[
(change_screen_mission),
]),
]
),
("duel_over",0,
"The duel is over",
"none",
[],
[
("continue",[],"Continue...",
[
(jump_to_menu, "mnu_reports"),
]),
]
),
##############################
# End of Duel Mod
##############################
################################################
# Duel Mod
################################################
[anyone|plyr,"member_question_2", [], "Care to duel?", "hero_challenge_duel",[]],
[anyone|plyr,"regular_member_talk", [], "Let's have a practice duel.", "troop_challenge_duel",[]],
[anyone|plyr,"lord_talk_ask_something_2", [], "Care to duel?", "lord_challenge_duel",[]],
[anyone,"hero_challenge_duel", [], "Ah yes, good show!", "close_window",
[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 0),
(assign, "$g_leave_encounter", 1),
(try_begin),
(is_between, "$g_encountered_party", towns_begin, towns_end),
(party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
(else_try),
(assign, ":closest_dist", 100000),
(assign, ":closest_town", -1),
(try_for_range, ":cur_town", towns_begin, towns_end),
(store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
(lt, ":dist", ":closest_dist"),
(assign, ":closest_dist", ":dist"),
(assign, ":closest_town", ":cur_town"),
(try_end),
(party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
(try_end),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 0, "trp_player"),
(set_visitor, 1, "$g_talk_troop"),
(set_jump_mission, "mt_arena_duel_thing"),
(jump_to_scene, ":arena_scene"),
(try_begin),
(neq, "$talk_context", tc_court_talk),
(jump_to_menu, "mnu_duel_begin"),
(try_end),
]],
[anyone,"lord_challenge_duel", [], "Ah yes, good show!", "close_window",
[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 0),
(assign, "$g_leave_encounter", 1),
(try_begin),
(is_between, "$g_encountered_party", towns_begin, towns_end),
(party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
(else_try),
(assign, ":closest_dist", 100000),
(assign, ":closest_town", -1),
(try_for_range, ":cur_town", towns_begin, towns_end),
(store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
(lt, ":dist", ":closest_dist"),
(assign, ":closest_dist", ":dist"),
(assign, ":closest_town", ":cur_town"),
(try_end),
(party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
(try_end),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 0, "trp_player"),
(set_visitor, 1, "$g_talk_troop"),
(set_jump_mission, "mt_arena_duel_thing"),
(jump_to_scene, ":arena_scene"),
(try_begin),
(neq, "$talk_context", tc_court_talk),
(jump_to_menu, "mnu_arena_duel_fight"),
(try_end),
]],
[anyone,"troop_challenge_duel", [], "Ah yes, good show!", "close_window",
[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 0),
(assign, "$g_leave_encounter", 1),
(try_begin),
(is_between, "$g_encountered_party", towns_begin, towns_end),
(party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
(else_try),
(assign, ":closest_dist", 100000),
(assign, ":closest_town", -1),
(try_for_range, ":cur_town", towns_begin, towns_end),
(store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
(lt, ":dist", ":closest_dist"),
(assign, ":closest_dist", ":dist"),
(assign, ":closest_town", ":cur_town"),
(try_end),
(party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
(try_end),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 0, "trp_player"),
(set_visitor, 1, "$g_talk_troop"),
(set_jump_mission, "mt_arena_duel_thing"),
(jump_to_scene, ":arena_scene"),
(try_begin),
(neq, "$talk_context", tc_court_talk),
(jump_to_menu, "mnu_arena_duel_fight"),
(try_end),
]],
################################################
# End of Duel Mod
################################################
(
"arena_duel_thing",mtf_arena_fight,-1,
"The duel begins!",
[
(56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []),
(58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []),
],
[
common_inventory_not_available,
(ti_tab_pressed, 0, 0, [(display_message, "@Cannot leave now.")], []),
#(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
(0, 0, ti_once, [],
[
(call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
]),
(1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)],
[
(finish_mission),
(jump_to_menu, "mnu_duel_over"),
]),
],
),
("duel_begin",0,
"You prepare to duel.",
"none",
[],
[
("continue",[],"Continue...",
[
(change_screen_mission),
]),
]
),
("duel_over",0,
"The duel is over",
"none",
[],
[
("continue",[],"Continue...",
[
(jump_to_menu, "mnu_reports"),
]),
]
),
[anyone|plyr,"member_question_2", [], "Care to duel?", "hero_challenge_duel",[]],
[anyone|plyr,"regular_member_talk", [], "Let's have a practice duel.", "troop_challenge_duel",[]],
[anyone|plyr,"lord_talk_ask_something_2", [], "Care to duel?", "lord_challenge_duel",[]],
[anyone,"hero_challenge_duel", [], "Ah yes, good show!", "close_window",
[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 0),
(assign, "$g_leave_encounter", 1),
(try_begin),
(is_between, "$g_encountered_party", towns_begin, towns_end),
(party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
(else_try),
(assign, ":closest_dist", 100000),
(assign, ":closest_town", -1),
(try_for_range, ":cur_town", towns_begin, towns_end),
(store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
(lt, ":dist", ":closest_dist"),
(assign, ":closest_dist", ":dist"),
(assign, ":closest_town", ":cur_town"),
(try_end),
(party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
(try_end),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 0, "trp_player"),
(set_visitor, 1, "$g_talk_troop"),
(set_jump_mission, "mt_arena_duel_thing"),
(jump_to_scene, ":arena_scene"),
(try_begin),
#(neq, "$talk_context", tc_court_talk),
#(jump_to_menu, "mnu_arena_duel_fight"),
(change_screen_mission),
(try_end),
]],
[anyone,"lord_challenge_duel", [], "Ah yes, good show!", "close_window",
[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 0),
(assign, "$g_leave_encounter", 1),
(try_begin),
(is_between, "$g_encountered_party", towns_begin, towns_end),
(party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
(else_try),
(assign, ":closest_dist", 100000),
(assign, ":closest_town", -1),
(try_for_range, ":cur_town", towns_begin, towns_end),
(store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
(lt, ":dist", ":closest_dist"),
(assign, ":closest_dist", ":dist"),
(assign, ":closest_town", ":cur_town"),
(try_end),
(party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
(try_end),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 0, "trp_player"),
(set_visitor, 1, "$g_talk_troop"),
(set_jump_mission, "mt_arena_duel_thing"),
(jump_to_scene, ":arena_scene"),
(try_begin),
(neq, "$talk_context", tc_court_talk),
(jump_to_menu, "mnu_arena_duel_fight"),
(try_end),
]],
[anyone,"troop_challenge_duel", [], "Ah yes, good show!", "close_window",
[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 0),
(assign, "$g_leave_encounter", 1),
(try_begin),
(is_between, "$g_encountered_party", towns_begin, towns_end),
(party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
(else_try),
(assign, ":closest_dist", 100000),
(assign, ":closest_town", -1),
(try_for_range, ":cur_town", towns_begin, towns_end),
(store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
(lt, ":dist", ":closest_dist"),
(assign, ":closest_dist", ":dist"),
(assign, ":closest_town", ":cur_town"),
(try_end),
(party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
(try_end),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 0, "trp_player"),
(set_visitor, 1, "$g_talk_troop"),
(set_jump_mission, "mt_arena_duel_thing"),
(jump_to_scene, ":arena_scene"),
(try_begin),
(neq, "$talk_context", tc_court_talk),
(jump_to_menu, "mnu_arena_duel_fight"),
(try_end),
]],
(
"arena_duel_thing",mtf_arena_fight,-1,
"You prepare to duel.",
[
(56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []),
(58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []),
],
[
common_inventory_not_available,
(ti_tab_pressed, 0, 0, [(display_message, "@Cannot leave now.")], []),
##(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
(0, 0, ti_once, [],
[
(call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
]),
(1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)],
[
(finish_mission),
]),
],
),