sirgrigor
Sergeant at Arms
Hello,
I added a few tweaks to my version of your duel kit. Thanks for writing it.
First if you win, you gain renown and relationship with person, unless they are lord then you lose relation with them (they hate losing)
Here's the code:
Second addition is a report you can add to the reports menu:
I added a few tweaks to my version of your duel kit. Thanks for writing it.
First if you win, you gain renown and relationship with person, unless they are lord then you lose relation with them (they hate losing)
Here's the code:
#goes after:
#add 1 to the slot for amount of duels the player won against this troop if it is a tf_hero
# add renown. If lord lose relationship, else gain it.
(call_script,"script_change_troop_renown", "trp_player", 1),
(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1),
(try_begin), # lords actually hate it if you beat them.
(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero),
(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -2),
(try_end),
#add 1 to the slot for amount of duels the player won against this troop if it is a tf_hero
# add renown. If lord lose relationship, else gain it.
(call_script,"script_change_troop_renown", "trp_player", 1),
(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1),
(try_begin), # lords actually hate it if you beat them.
(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero),
(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -2),
(try_end),
Second addition is a report you can add to the reports menu:
# ####################################################################################################
# GSC, Oct 3, 2009
# MartinF's dueling lords code.
# Report of wins and losses.
####################################################################################################
("dueling_report",0,
"{s1}",
"none",
[(str_clear, s2),(assign, reg3, 0),(assign, reg4, 0),
(try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end),
(call_script, "script_troop_get_player_dueling_wins", ":troop_no"),
(assign, ":wins", reg0),
(call_script, "script_troop_get_player_dueling_losses", ":troop_no"),
(assign, ":losses", reg0),
(str_store_troop_name, s3, ":troop_no"),
(assign, reg1, ":wins"),
(store_add, reg3, ":wins"),
(assign, reg2, ":losses"),
(store_add, reg4, ":losses"),
(str_store_string, s2, "@{s2}^{s3}: Wins {reg1} Losses {reg2}"),
(try_end),
(str_store_string, s2, "@{s2}^ \n\n Totals: Wins {reg3} Losses {reg4}"),
(str_store_string, s1, "@Your dueling results with the Kingdom Lords are:^{s2}"),
],
[
("continue",[],"Continue...",
[(jump_to_menu, "mnu_reports"),
]
),
]
),
# end dueling lords code
# ####################################################################################################
# GSC, Oct 3, 2009
# MartinF's dueling lords code.
# Report of wins and losses.
####################################################################################################
("dueling_report",0,
"{s1}",
"none",
[(str_clear, s2),(assign, reg3, 0),(assign, reg4, 0),
(try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end),
(call_script, "script_troop_get_player_dueling_wins", ":troop_no"),
(assign, ":wins", reg0),
(call_script, "script_troop_get_player_dueling_losses", ":troop_no"),
(assign, ":losses", reg0),
(str_store_troop_name, s3, ":troop_no"),
(assign, reg1, ":wins"),
(store_add, reg3, ":wins"),
(assign, reg2, ":losses"),
(store_add, reg4, ":losses"),
(str_store_string, s2, "@{s2}^{s3}: Wins {reg1} Losses {reg2}"),
(try_end),
(str_store_string, s2, "@{s2}^ \n\n Totals: Wins {reg3} Losses {reg4}"),
(str_store_string, s1, "@Your dueling results with the Kingdom Lords are:^{s2}"),
],
[
("continue",[],"Continue...",
[(jump_to_menu, "mnu_reports"),
]
),
]
),
# end dueling lords code
# ####################################################################################################