[anyone, "start", [
(eq, "$talk_context", tc_tavern_talk),
(neg|troop_is_hero, "$g_talk_troop"),
(is_between, "$g_talk_troop", "trp_looter", "trp_black_khergit_horseman"),
(party_get_slot, ":bandit_troop", "$g_encountered_party", slot_center_bandit_troop_type),
(party_get_slot, ":bandit_amount", "$g_encountered_party", slot_center_bandit_troop_amount),
(gt, ":bandit_amount", 0),
(store_sub, reg3, ":bandit_amount", 1),
(store_sub, reg4, reg3, 1),
(call_script, "script_game_get_join_cost", ":bandit_troop"),
(assign, ":join_cost", reg0),
(store_mul, reg5, ":bandit_amount", reg0),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(val_min, ":bandit_amount", ":free_capacity"),
(store_troop_gold, ":cur_gold", "trp_player"),
(try_begin),
(gt, ":join_cost", 0),
(val_div, ":cur_gold", ":join_cost"),
(val_min, ":bandit_amount", ":cur_gold"),
(try_end),
(assign, "$temp", ":bandit_amount"),
],
"Do you have a need for mercenaries, {sir/madam}?\
{reg3?Me and {reg4?{reg3} of my mates:one of my mates} are:I am} looking for a master.\
We'll join you for {reg5} denars.", "bandit_tavern_talk", []],
[anyone, "start", [
(eq, "$talk_context", tc_tavern_talk),
(is_between, "$g_talk_troop", "trp_looter", "trp_black_khergit_horseman"),
],
"Any orders, {sir/madam}?", "bandit_after_recruited", []],
[anyone|plyr, "bandit_after_recruited", [],
"Make your preparations. We'll be moving at dawn.", "bandit_after_recruited_2", []],
[anyone|plyr, "bandit_after_recruited", [],
"Take your time. We'll be staying in this town for a while.", "bandit_after_recruited_2", []],
[anyone, "bandit_after_recruited_2", [], "Yes {sir/madam}. We'll be ready when you tell us to leave.", "close_window", []],
[anyone|plyr, "bandit_tavern_talk", [(party_get_slot, ":bandit_amount", "$g_encountered_party", slot_center_bandit_troop_amount),
(eq, ":bandit_amount", "$temp"),
(party_get_slot, ":bandit_troop", "$g_encountered_party", slot_center_bandit_troop_type),
(call_script, "script_game_get_join_cost", ":bandit_troop"),
(store_mul, reg5, "$temp", reg0),
],
"All right. I will hire all of you. Here is {reg5} denars.", "bandit_tavern_talk_hire", []],
[anyone|plyr, "bandit_tavern_talk", [(party_get_slot, ":bandit_amount", "$g_encountered_party", slot_center_bandit_troop_amount),
(lt, "$temp", ":bandit_amount"),
(gt, "$temp", 0),
(assign, reg6, "$temp"),
(party_get_slot, ":bandit_troop", "$g_encountered_party", slot_center_bandit_troop_type),
(call_script, "script_game_get_join_cost", ":bandit_troop"),
(store_mul, reg5, "$temp", reg0),
],
"All right. But I can only hire {reg6} of you. Here is {reg5} denars.", "bandit_tavern_talk_hire", []],
[anyone, "bandit_tavern_talk_hire", [(store_random_in_range, ":rand", 0, 4),
(try_begin),
(eq, ":rand", 0),
(gt, "$temp", 1),
(str_store_string, s17,
"@You chose well, {sir/madam}. My lads know how to keep their word and earn their pay."),
(else_try),
(eq, ":rand", 1),
(str_store_string, s17,
"@Well done, {sir/madam}. Keep the money and wine coming our way, and there's no foe in Calradia you need fear."),
(else_try),
(eq, ":rand", 2),
(str_store_string, s17,
"@We are at your service, {sir/madam}. Point us in the direction of those who need hurting, and we'll do the rest."),
(else_try),
(str_store_string, s17,
"str_you_will_not_be_disappointed_sirmadam_you_will_not_find_better_warriors_in_all_calradia"),
(try_end),],
"{s17}", "close_window", [
(party_get_slot, ":bandit_troop", "$g_encountered_party", slot_center_bandit_troop_type),
(call_script, "script_game_get_join_cost", ":bandit_troop"),
(store_mul, ":total_cost", "$temp", reg0),
(troop_remove_gold, "trp_player", ":total_cost"),
(party_add_members, "p_main_party", ":bandit_troop", "$temp"),
(party_set_slot, "$g_encountered_party", slot_center_bandit_troop_amount, 0),
]],
[anyone|plyr, "bandit_tavern_talk", [(eq, "$temp", 0),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(ge, ":free_capacity", 1)],
"That sounds good. But I can't afford to hire any more men right now.", "tavern_bandit_cant_lead", []],
[anyone, "tavern_bandit_cant_lead", [], "That's a pity. Well, {reg3?we will:I will} be lingering around here for a while,\
if you need to hire anyone.", "close_window", []],
[anyone|plyr, "bandit_tavern_talk", [(eq, "$temp", 0),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(eq, ":free_capacity", 0)],
"That sounds good. But I can't lead any more men right now.", "tavern_bandit_cant_lead", []],
[anyone|plyr, "bandit_tavern_talk", [],
"Sorry. I don't need any other men right now.", "close_window", []],