Berserker Pride
Grandmaster Knight
Missing a comma or bracket the code will probably work with 1.011 once you find the typo.
DuoGum said:André de Cuyne said:bla bla bla...
I don't understand
# script_troop_set_skill_level
# Input: skill, skill_level
# Output: none
("troop_set_skill_level",
[
(store_script_param_1, ":skill"),
(store_script_param_2, ":skill_level"),
(store_skill_level, ":player_skill_level", ":skill", "trp_player"),
(val_sub, ":skill_level", ":player_skill_level"),
(troop_raise_skill, "trp_player",":skill",":skill_level"),
]
),
(call_script, "script_troop_set_skill_level", "skl_riding", 10),
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
Error: Unable to find object:mt_arena_duel_thing_std
ERROR: Illegal Identifier:mt_arena_duel_thing_std
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: array_party_num
WARNING: Global variable never used: talk_array_no
______________________________
Script processing has ended.
Press any key to exit. . .
("arena_duel_fight",0,
"You and your opponent prepare to fight for honour.",
"none",
[],
[
("continue",[],"Continue...",
[
############################### Duel Mod Start ##############################
("duel_menu",0,
"{s1}{s2}",
"none",
[
(str_clear, s2), (str_clear, s3), (str_clear, s5), (str_clear, s6), (str_clear, s7),
(troop_get_slot, ":duel_wins", "$g_talk_troop", slot_troop_duel_won),
(assign, reg(6), ":duel_wins"),
(troop_get_slot, ":duel_losses", "$g_talk_troop", slot_troop_duel_lost),
(assign, reg(7), ":duel_losses"),
(store_add, ":duel_total", ":duel_wins", ":duel_losses"),
(assign, reg(5), ":duel_total"),
(str_store_troop_name, s3, "$g_talk_troop"),
(try_begin),
(eq, "$g_duel_result", -1),
(str_store_string, s1, "@You lost your duel against ^^{s3}"),
(else_try),
(eq, "$g_duel_result", 1),
(str_store_string, s1, "@You won your duel against ^^{s3}"),
(else_try),
(str_store_string, s1, "@You prepare to duel ^^{s3}"),
(try_end),
(try_begin),
(troop_is_hero, "$g_talk_troop"),
(str_store_string, s2, "@^^^^You have fought {s3} {reg5} times. ^^You've won {reg6} times. ^^You've lost {reg7} times"),
(else_try),
(str_store_string, s2, "@^^^^Dueling with your own troops will not count towards your dueling statistics."),
(try_end),
],
[
("start_fight",[(eq, "$g_duel_result", 0)],"Start the duel.",
[(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, "$g_duel_vis_point_opp", "$g_talk_troop"),
(set_visitor, "$g_duel_vis_point_plyr", "trp_player"),
(set_jump_mission, "mt_arena_duel_thing_std"),
(jump_to_scene, ":arena_scene"),
(change_screen_mission),
]
),
("duel_again",[(neq, "$g_duel_result", 0)],"Duel again.",
[
(assign, "$g_duel_result", 0),
(jump_to_menu, "mnu_duel_menu"),
]
),
("leave",[],"Leave.",
[(change_screen_map),
]
),
]
),
############################### Duel Mod End ##############################
(jump_to_menu, "mnu_simple_encounter"),
(change_screen_mission),
]),
]
),
(store_random_in_range, ":starting_training_ground", training_grounds_begin, training_grounds_end),
(party_relocate_near_party, "p_main_party", ":starting_training_ground", 3),
(str_store_troop_name, s5, "trp_player"),
(party_set_name, "p_main_party", s5),
(call_script, "script_update_party_creation_random_limits"),
(store_random_in_range, ":starting_villages", villages_begin, villages_end),
(party_relocate_near_party, "p_main_party", ":starting_villages", 3),
(str_store_troop_name, s5, "trp_player"),
(party_set_name, "p_main_party", s5),
(call_script, "script_update_party_creation_random_limits"),
str_3 = bignum | 0x0000000003
str_4 = bignum | 0x0000000004
str_5 = bignum | 0x0000000005
str_6 = bignum | 0x0000000006
str_7 = bignum | 0x0000000007
str_8 = bignum | 0x0000000008
str_9 = bignum | 0x0000000009
str_10 = bignum | 0x000000000a
str_11 = bignum | 0x000000000b
str_12 = bignum | 0x000000000c
str_13 = bignum | 0x000000000d
str_14 = bignum | 0x000000000e
str_15 = bignum | 0x000000000f
str_16 = bignum | 0x0000000010
str_17 = bignum | 0x0000000011
str_18 = bignum | 0x0000000012
str_19 = bignum | 0x0000000013
str_20 = bignum | 0x0000000014
str_21 = bignum | 0x0000000015
str_22 = bignum | 0x0000000016
str_23 = bignum | 0x0000000017
str_24 = bignum | 0x0000000018
str_25 = bignum | 0x0000000019
str_26 = bignum | 0x000000001a
str_27 = bignum | 0x000000001b
str_28 = bignum | 0x000000001c
str_29 = bignum | 0x000000001d
str_30 = bignum | 0x000000001e
str_31 = bignum | 0x00000000ff
agi_3 = bignum | 0x0000030000
agi_4 = bignum | 0x0000040000
agi_5 = bignum | 0x0000050000
agi_6 = bignum | 0x0000060000
agi_7 = bignum | 0x0000070000
agi_8 = bignum | 0x0000080000
agi_9 = bignum | 0x0000090000
agi_10 = bignum | 0x00000a0000
agi_11 = bignum | 0x00000b0000
agi_12 = bignum | 0x00000c0000
agi_13 = bignum | 0x00000d0000
agi_14 = bignum | 0x00000e0000
agi_15 = bignum | 0x00000f0000
agi_16 = bignum | 0x0000100000
agi_17 = bignum | 0x0000110000
agi_18 = bignum | 0x0000120000
agi_19 = bignum | 0x0000130000
agi_20 = bignum | 0x0000140000
agi_21 = bignum | 0x0000150000
agi_22 = bignum | 0x0000160000
agi_23 = bignum | 0x0000170000
agi_24 = bignum | 0x0000180000
agi_25 = bignum | 0x0000190000
agi_26 = bignum | 0x00001a0000
agi_27 = bignum | 0x00001b0000
agi_28 = bignum | 0x00001c0000
agi_29 = bignum | 0x00001d0000
agi_30 = bignum | 0x00001e0000
int_3 = bignum | 0x0003000000
int_4 = bignum | 0x0004000000
int_5 = bignum | 0x0005000000
int_6 = bignum | 0x0006000000
int_7 = bignum | 0x0007000000
int_8 = bignum | 0x0008000000
int_9 = bignum | 0x0009000000
int_10 = bignum | 0x000a000000
int_11 = bignum | 0x000b000000
int_12 = bignum | 0x000c000000
int_13 = bignum | 0x000d000000
int_14 = bignum | 0x000e000000
int_15 = bignum | 0x000f000000
int_16 = bignum | 0x0010000000
int_17 = bignum | 0x0011000000
int_18 = bignum | 0x0012000000
int_19 = bignum | 0x0013000000
int_20 = bignum | 0x0014000000
int_21 = bignum | 0x0015000000
int_22 = bignum | 0x0016000000
int_23 = bignum | 0x0017000000
int_24 = bignum | 0x0018000000
int_25 = bignum | 0x0019000000
int_26 = bignum | 0x001a000000
int_27 = bignum | 0x001b000000
int_28 = bignum | 0x001c000000
int_29 = bignum | 0x001d000000
int_30 = bignum | 0x001e000000
cha_3 = bignum | 0x0300000000
cha_4 = bignum | 0x0400000000
cha_5 = bignum | 0x0500000000
cha_6 = bignum | 0x0600000000
cha_7 = bignum | 0x0700000000
cha_8 = bignum | 0x0800000000
cha_9 = bignum | 0x0900000000
cha_10 = bignum | 0x0a00000000
cha_11 = bignum | 0x0b00000000
cha_12 = bignum | 0x0c00000000
cha_13 = bignum | 0x0d00000000
cha_14 = bignum | 0x0e00000000
cha_15 = bignum | 0x0f00000000
cha_16 = bignum | 0x1000000000
cha_17 = bignum | 0x1100000000
cha_18 = bignum | 0x1200000000
cha_19 = bignum | 0x1300000000
cha_20 = bignum | 0x1400000000
cha_21 = bignum | 0x1500000000
cha_22 = bignum | 0x1600000000
cha_23 = bignum | 0x1700000000
cha_24 = bignum | 0x1800000000
cha_25 = bignum | 0x1900000000
cha_26 = bignum | 0x1a00000000
cha_27 = bignum | 0x1b00000000
cha_28 = bignum | 0x1c00000000
cha_29 = bignum | 0x1d00000000
I do post it here too!tansvanio said:(...)u should post that on the thread of the script, this is a script list thread, not a script thread
Pisces said:I've been playing around with trying to ensure certain troops have both a lance and a sword. I originally started with just adding a lance to the troop, which of course doesn't work as it adds it to the template of a troop, so the template is called and gets either a sword, lance or both randomly like normal. There appears to be no operation to give it to an agent. So I was trying an alternate strategy of reassigning the troops to an alternate entry point and deleting or removing the originals. I have very limited experience with mission_templates and scene editing so I haven't got it to work yet. I am just wondering if anyone has followed this line of logic before and can give any advice.
# Replaced
#custom_battle_check_victory_condition = (
# 1, 60, ti_once,
# [
# (store_mission_timer_a,reg(1)),
# (ge,reg(1),10),
# (all_enemies_defeated, 2),
# (neg|main_hero_fallen, 0),
# (set_mission_result,1),
# (display_message,"str_msg_battle_won"),
# (assign, "$battle_won",1),
# (assign, "$g_battle_result", 1),
# ],
# [
# (call_script, "script_custom_battle_end"),
# (finish_mission, 1),
# ])
#
#custom_battle_check_defeat_condition = (
# 1, 4, ti_once,
# [
# (main_hero_fallen),
# (assign,"$g_battle_result",-1),
# ],
# [
# (call_script, "script_custom_battle_end"),
# (finish_mission),
# ])
#
#common_battle_victory_display = (
# 10, 0, 0, [],
# [
# (eq,"$battle_won",1),
# (display_message,"str_msg_battle_won"),
# ])
#
common_battle_check_victory_condition = (
1, 60, ti_once,
[
(store_mission_timer_a,reg(1)),
(ge,reg(1),10),
(all_enemies_defeated, 5),
(set_mission_result,1),
(display_message,"str_msg_battle_won"),
(assign,"$battle_won",1),
(assign, "$g_battle_result", 1),
(call_script, "script_play_victorious_sound"),
],
[
(call_script, "script_count_mission_casualties_from_agents"),
(finish_mission, 1),
])
common_battle_check_defeat_condition = (
1, 60, ti_once,
[
(store_mission_timer_a,reg(1)),
(ge,reg(1),10),
(main_hero_fallen),
(assign, ":num_allies", 0),
(try_for_agents, ":agent"),
(agent_is_ally, ":agent"),
(agent_is_alive, ":agent"),
(val_add, ":num_allies", 1),
(try_end),
(set_mission_result,-1),
(eq, ":num_allies", 0),
(display_message,"str_msg_battle_lost"),
(assign,"$battle_won",-1),
(assign, "$g_battle_result", -1),
],
[
(call_script, "script_count_mission_casualties_from_agents"),
(finish_mission, 0),
])
common_battle_result_display = (
10, 0, 0, [],
[
(try_begin),
(eq,"$battle_won",1),
(display_message,"str_msg_battle_won"),
(else_try),
(eq,"$battle_won",-1),
(display_message,"str_msg_battle_lost"),
(try_end),
])
player_fall_check_continue = (
1, 4, ti_once, [(main_hero_fallen)],
[
(assign, "$pin_player_fallen", 1),
(display_message, "@You have been knocked out by the enemy."),
(assign, ":num_allies", 0),
(try_for_agents, ":agent"),
(agent_is_ally, ":agent"),
(agent_is_alive, ":agent"),
(val_add, ":num_allies", 1),
(try_end),
(try_begin),
(eq, ":num_allies", 0),
(assign, "$g_battle_result", -1),
(set_mission_result,-1),
(call_script, "script_count_mission_casualties_from_agents"),
(finish_mission,0),
(else_try),
(display_message, "@Watch your men continue the fight without you or press Tab to retreat."),
(display_message, "@If you choose to watch the fight you can use the LEFT ARROW and RIGHT ARROW keys to change your camera view."),
(try_end),
])
player_fall_check_retreat = (
1, 4, ti_once, [(main_hero_fallen)],
[
(assign, "$pin_player_fallen", 1),
(display_message, "@You have been knocked out by the enemy."),
(str_store_string, s5, "str_retreat"),
(call_script, "script_simulate_retreat", "$retreat_player_side", "$retreat_enemy_side"),
(assign, "$g_battle_result", -1),
(set_mission_result, -1),
(call_script, "script_count_mission_casualties_from_agents"),
(finish_mission,0)
])
retreat_confirm = (
ti_question_answered, 0, 0, [],
[(store_trigger_param_1,":answer"),
(eq,":answer",0),
(assign, "$pin_player_fallen", 0),
(assign, ":retreat", 1),
(try_begin),
(eq, "$retreat_type", 2),
(store_mission_timer_a, ":elapsed_time"),
(le, ":elapsed_time", 20),
(assign, ":retreat", 0),
(try_end),
(try_begin),
(eq, ":retreat", 1),
(str_store_string, s5, "str_retreat"),
(call_script, "script_simulate_retreat", "$retreat_player_side", "$retreat_enemy_side"),
(try_end),
(try_begin),
(eq, "$retreat_type", 1),
(assign, "$g_battle_result", -1),
(try_end),
(call_script, "script_count_mission_casualties_from_agents"),
(finish_mission,0),])
################################################################
## CUSTOM CAMERA
################################################################
camera_init = ( 0, 0, ti_once, [],
[
(get_player_agent_no, "$cam_current_agent"),
(mission_cam_set_mode, "$cam_mode"),
])
camera_mode = ( 0, 0, 0, [],
[
(try_begin),
(eq, "$cam_mode", 1),
(agent_get_look_position, pos1, "$cam_current_agent"),
(position_move_z, pos1, "$g_camera_z"),
(position_move_y, pos1, "$g_camera_y"),
(agent_get_horse, ":horse_agent", "$cam_current_agent"),
(try_begin),
(ge, ":horse_agent", 0),
(position_move_z, pos1, 80),
(try_end),
(mission_cam_set_position, pos1),
(else_try),
(main_hero_fallen),
(agent_get_position, 1, "$cam_current_agent"),
(get_player_agent_no, ":player_agent"),
(agent_set_position, ":player_agent", 1),
(try_end),
])
camera_zoom_in = ( 0, 0, 0,[(key_is_down, key_up)],
[
(eq, "$cam_mode", 1),
(val_add, "$g_camera_y",1),
])
camera_zoom_out = ( 0, 0, 0,[(key_is_down, key_down)],
[
(eq, "$cam_mode", 1),
(val_sub, "$g_camera_y",1),
])
camera_raise = ( 0, 0, 0,[(key_is_down, key_page_up)],
[
(eq, "$cam_mode", 1),
(val_add, "$g_camera_z",1),
])
camera_lower = ( 0, 0, 0,[(key_is_down, key_page_down)],
[
(eq, "$cam_mode", 1),
(val_sub, "$g_camera_z",1),
])
camera_set = ( 0, 0, 0,[(key_clicked, key_end)],
[
(try_begin),
(eq, "$cam_mode", 0),
(assign, "$cam_mode", 1),
(assign, reg6, "$g_camera_y"),
(assign, reg7, "$g_camera_z"),
(display_message,"@Custom Camera ( Distance = {reg6} ; Height = {reg7} )"),
(else_try),
(eq, "$cam_mode", 1),
(try_begin),
(neg|main_hero_fallen, 0),
(get_player_agent_no, "$cam_current_agent"),
(try_end),
(assign, "$cam_mode", 0),
(display_message,"@Default Camera"),
(try_end),
(mission_cam_set_mode, "$cam_mode"),
])
camera_cycle_fowards = ( 0, 0, 0,[(key_clicked, key_right),
(call_script, "script_dmod_cycle_forwards"),
], [])
camera_cycle_backwards = ( 0, 0, 0,[(key_clicked, key_left),
(call_script, "script_dmod_cycle_backwards"),
], [])
###############################################
(0, 0, ti_once, [], [(assign,"$battle_won",0),
(assign,"$defender_reinforcement_stage",0),
(assign,"$attacker_reinforcement_stage",0),
(assign,"$g_presentation_battle_active", 0),
(call_script, "script_place_player_banner_near_inventory"),
(call_script, "script_combat_music_set_situation_with_culture"),
(assign, "$retreat_player_side", 10), # Retreat Penalty Initialization
(assign, "$retreat_enemy_side", 20), #
(assign, "$retreat_type", 2), #
]),
# (ti_question_answered, 0, 0, [],
# [(store_trigger_param_1,":answer"),
# (eq,":answer",0),
# (assign, "$pin_player_fallen", 0),
# (try_begin),
# (store_mission_timer_a, ":elapsed_time"),
# (gt, ":elapsed_time", 20), # for mission that has this check give "$retreat_type" =2, else "$retreat_type"=1
# (str_store_string, s5, "str_retreat"),
# (call_script, "script_simulate_retreat", 10, 20), # 10 & 20 is assigned to "$retreat_player_side" and "$retreat_enemy_side"
# (try_end),
# (call_script, "script_count_mission_casualties_from_agents"),
# (finish_mission,0),]),
# Replaced by :
retreat_confirm,
common_battle_check_victory_condition,
# common_battle_victory_display,
#
# (1, 4, ti_once, [(main_hero_fallen)],
# [
# (assign, "$pin_player_fallen", 1),
# (str_store_string, s5, "str_retreat"),
# (call_script, "script_simulate_retreat", 10, 20),
# (assign, "$g_battle_result", -1),
# (set_mission_result,-1),
# (call_script, "script_count_mission_casualties_from_agents"),
# (finish_mission,0)]),
# Replaced by :
common_battle_check_defeat_condition,
common_battle_result_display,
player_fall_check_continue,
camera_init,
camera_mode,
camera_zoom_out,
camera_zoom_in,
camera_raise,
camera_lower,
camera_set,
camera_cycle_fowards,
camera_cycle_backwards,
on "game_start" script, add camera position initialization :
("game_start",
[
# DUNDE : Camera Init
(assign, "$g_camera_z", 600),
(assign, "$g_camera_y", -1000),
# Modified MartinF's code for DeathCam
# script_dmod_cycle_forwards
# Output: New $dmod_current_agent
# Used to cycle forwards through valid agents
("dmod_cycle_forwards",[
(assign, ":agent_moved", 0),
(assign, ":first_agent", -1),
(get_player_agent_no, ":player_agent"),
(agent_get_team, ":player_team", ":player_agent"),
(try_for_agents, ":agent_no"),
(neq, ":agent_moved", 1),
(agent_is_human, ":agent_no"),
(agent_is_alive, ":agent_no"),
(agent_get_team, ":cur_team", ":agent_no"),
###############################################################
# This is for compability with my new tournament only
#(this_or_next|eq, "$cam_free", 1),
###############################################################
(eq, ":cur_team", ":player_team"),
(try_begin),
(lt, ":first_agent", 0), # Find the 1st agent alive and (1 team or free mod)
(assign, ":first_agent", ":agent_no"),
(try_end),
(gt, ":agent_no", "$cam_current_agent"), # Find next agent alive and (1 team or free mod)
(assign, "$cam_current_agent", ":agent_no"),
(assign, ":agent_moved", 1),
(try_end),
(try_begin),
(eq, ":agent_moved", 0), # Next Agent not found, but 1st agent found, then the next is the first one
(neq, ":first_agent", -1),
(assign, "$cam_current_agent", ":first_agent"),
(assign, ":agent_moved", 1),
(else_try),
(eq, ":agent_moved", 0),
(eq, ":first_agent", -1),
(display_message, "@No Troops Left."),
(try_end),
(try_begin),
(eq, ":agent_moved", 1), # there is next one
(try_begin),
(agent_is_alive, ":player_agent"), # if player is still alive, push to mode 1
(assign, "$cam_mode", 1),
(mission_cam_set_mode, "$cam_mode"),
(try_end),
(str_store_agent_name, 1, "$cam_current_agent"),
(try_end),
]),
# script_dmod_cycle_backwards
# Output: New $dmod_current_agent
# Used to cycle backwards through valid agents
("dmod_cycle_backwards",[
(assign, ":new_agent", -1),
(assign, ":last_agent", -1),
(get_player_agent_no, ":player_agent"),
(agent_get_team, ":player_team", ":player_agent"),
(try_for_agents, ":agent_no"),
(agent_is_human, ":agent_no"),
(agent_is_alive, ":agent_no"),
(agent_get_team, ":cur_team", ":agent_no"),
###############################################################
# This is for compability with my new tournament only
#(this_or_next|eq, "$cam_free", 1),
###############################################################
(eq, ":cur_team", ":player_team"),
(assign, ":last_agent", ":agent_no"), # Ok, the last
(lt, ":agent_no", "$cam_current_agent"),
(assign, ":new_agent", ":agent_no"), # prev agent
(try_end),
(try_begin),
(eq, ":new_agent", -1),
(neq, ":last_agent", -1),
(assign, ":new_agent", ":last_agent"),
(else_try),
(eq, ":new_agent", -1),
(eq, ":last_agent", -1),
(display_message, "@No Troops Left."),
(try_end),
(try_begin),
(neq, ":new_agent", -1), # There is prev agent
(assign, "$cam_current_agent", ":new_agent"),
(try_begin),
(agent_is_alive, ":player_agent"),
(assign, "$cam_mode", 1),
(mission_cam_set_mode, "$cam_mode"),
(try_end),
(str_store_agent_name, 1, "$cam_current_agent"),
(try_end),
]),
#script_change_party_template by Kuba
#INPUT: arg1=party_no, arg2=template_no,
#OUTPUT: $g_encountered_party = party_no after template change
("change_party_template", [
(store_script_param_1, ":party_no"),
(store_script_param_2, ":template_no"),
(str_store_party_name, s19, ":party_no"),
(set_spawn_radius, 0),
(spawn_around_party, ":party_no", ":template_no"),
(assign, ":new_party", reg0),
(party_set_name, ":new_party", s19),
(call_script, "script_party_add_party", ":new_party", ":party_no"),
(try_for_range, ":cur_slot", 0, 500),
(party_get_slot, ":cur_value", ":party_no", ":cur_slot"),
(party_set_slot, ":new_party", ":cur_slot", ":cur_value"),
(try_end),
(try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end),
(troop_slot_eq, ":troop_no", slot_troop_leaded_party, ":party_no"),
(troop_set_slot, ":troop_no", slot_troop_leaded_party, ":new_party"),
(assign, ":party_leader", ":troop_no"),
(try_end),
(store_faction_of_party, ":cur_faction", ":party_no"),
(party_set_faction, ":new_party", ":cur_faction"),
(try_begin),
(gt, ":party_leader", 0),
(troop_get_slot, ":cur_banner", ":party_leader", slot_troop_banner_scene_prop),
(val_sub, ":cur_banner", banner_scene_props_begin),
(val_add, ":cur_banner", banner_map_icons_begin),
(party_set_banner_icon, ":new_party", ":cur_banner"),
(try_end),
(get_party_ai_behavior, ":cur_bhvr", ":party_no"),
(get_party_ai_object, ":cur_ai_obj", ":party_no"),
(party_get_ai_target_position, pos1, ":party_no"),
(party_set_ai_behavior, ":new_party", ":cur_bhvr"),
(party_set_ai_object, ":new_party", ":cur_ai_obj"),
(party_set_ai_target_position, ":new_party", pos1),
(remove_party, ":party_no"),
(assign, "$g_encountered_party", ":new_party"),
]),
# Maverick Companion Script Start #EPIC#
#Gain 20000 gold randomly if cheat mode is on
[anyone|plyr,"member_question_2", [(eq,"$cheat_mode",1)], "Cheat: Could you give me some cash from that large pot of gold?", "member_moneys",[]],
#recruit troops for a price
[anyone|plyr,"member_question_2", [], "Could you draft in some troops for me?", "member_draft_question",[]],
[anyone, "member_moneys", [
(call_script, "script_troop_add_gold", "trp_player", 20000),
], "Sure why not, there is plenty in here", "do_member_view_char",[]],
[anyone, "member_draft_question", [], "So what kind of troops do you want?", "member_draft_troop",[]],
[anyone|plyr,"member_draft_troop", [], "I would like some Caravan guards.", "member_draft_troop_big_small",[ (assign, "$cost_draft", 400),(assign, "$draft_id", "trp_caravan_guard"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Watchmen.", "member_draft_troop_big_small",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_watchman")]],
[anyone|plyr,"member_draft_troop", [], "I would like some Huntresses.", "member_draft_troop_big_small",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_hunter_woman"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Slave Drivers.", "member_draft_troop_big_small",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_slave_driver"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Swadian recruits.", "member_draft_troop_big_small",[(assign, "$cost_draft", 150), (assign, "$draft_id", "trp_swadian_recruit"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Veagir recruits.", "member_draft_troop_big_small",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_vaegir_recruit"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Khergit tribesmen.", "member_draft_troop_big_small",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_khergit_tribesman"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Nord recruits.", "member_draft_troop_big_small",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_nord_recruit"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Rhodok tribesmen.", "member_draft_troop_big_small",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_rhodok_tribesman"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Sarranid recruit.", "member_draft_troop_big_small",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_sarranid_recruit"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Looters.", "member_draft_troop_big_small",[(assign, "$cost_draft", 50), (assign, "$draft_id", "trp_looter"),]],
[anyone|plyr,"member_draft_troop", [], "Never mind.", "close_window",[]],
[anyone, "member_draft_troop_big_small",[],"Will you need many soldiers?","member_draft_big_small_ans",[]],
[anyone|plyr,"member_draft_big_small_ans", [], "I will need many soldiers.", "member_draft_troop_question2",[(assign, "$draft_big", 1),]],
[anyone|plyr,"member_draft_big_small_ans", [], "I only need a few soldiers.", "member_draft_troop_question2",[(assign, "$draft_big", 0),]],
[anyone|plyr,"member_draft_big_small_ans", [], "Never mind.", "close_window",[]],
[anyone, "member_draft_troop_question2", [], "How many troops do you want?", "member_draft_troop_2",[]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 100.", "member_draft_troop_3",[ (assign, "$draft_num", 100)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 1),], "I would like 50.", "member_draft_troop_3",[(assign, "$draft_num", 50)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 1),], "I would like 40.", "member_draft_troop_3",[(assign, "$draft_num", 40)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 1),], "I would like 35.", "member_draft_troop_3",[(assign, "$draft_num", 35)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 1),], "I would like 30.", "member_draft_troop_3",[(assign, "$draft_num", 30)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 1),], "I would like 25.", "member_draft_troop_3",[(assign, "$draft_num", 25)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 1),], "I would like 20.", "member_draft_troop_3",[(assign, "$draft_num", 20)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 1),], "I would like 15.", "member_draft_troop_3",[(assign, "$draft_num", 15)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 10.", "member_draft_troop_3",[ (assign, "$draft_num", 10)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 0),], "I would like 9.", "member_draft_troop_3",[(assign, "$draft_num", 9)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 0),], "I would like 8.", "member_draft_troop_3",[(assign, "$draft_num", 8)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 0),], "I would like 7.", "member_draft_troop_3",[(assign, "$draft_num", 7)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 0),], "I would like 6.", "member_draft_troop_3",[(assign, "$draft_num", 6)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 5.", "member_draft_troop_3",[(assign, "$draft_num", 5)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 0),], "I would like 4.", "member_draft_troop_3",[(assign, "$draft_num", 4)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 0),], "I would like 3.", "member_draft_troop_3",[(assign, "$draft_num", 3)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 0),], "I would like 2.", "member_draft_troop_3",[(assign, "$draft_num", 2)]],
[anyone|plyr,"member_draft_troop_2", [(eq, $draft_big, 0),], "I would like 1.", "member_draft_troop_3",[(assign, "$draft_num", 1)]],
[anyone|plyr,"member_draft_troop_2", [], "Never mind.", "close_window",[]],
[anyone, "member_draft_troop_3", [
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(val_min, "$draft_num", ":free_capacity"),
(store_troop_gold, ":gold", "trp_player"),
(store_div, ":gold_capacity", ":gold", "$cost_draft"),#denars relevant to the troop you are hiring
(val_min, "$draft_num", ":gold_capacity"),
(party_add_members, "p_main_party", "$draft_id", "$draft_num"),# sets troop to the one you chose
(store_mul, ":cost", "$draft_num", "$cost_draft"),
(troop_remove_gold, "trp_player", ":cost"),
], "It didn't take much to convince them to join you, Hope they serve you well.", "do_member_view_char",[]],
#This new piece of script allows you to recruit from 1 to 10 troops rather than the previous locked 10 :D
# Maverick Companion Script End #EPIC#
# Maverick Companion Script Start #EPIC#
#Gain 20000 gold randomly if cheat mode is on
[anyone|plyr,"member_question_2", [(eq,"$cheat_mode",1)], "Cheat: Could you give me some cash from that large pot of gold?", "member_moneys",[]],
#recruit troops for a price
[anyone|plyr,"member_question_2", [], "Could you draft in some troops for me?", "member_draft_question",[]],
[anyone, "member_moneys", [
(call_script, "script_troop_add_gold", "trp_player", 20000),
], "Sure why not, there is plenty in here", "do_member_view_char",[]],
[anyone, "member_draft_question", [], "So what kind of troops do you want?", "member_draft_troop",[]],
[anyone|plyr,"member_draft_troop", [], "I would like some Caravan guards.", "member_draft_troop_question2",[ (assign, "$cost_draft", 400),(assign, "$draft_id", "trp_caravan_guard"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Watchmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_watchman")]],
[anyone|plyr,"member_draft_troop", [], "I would like some Huntresses.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_hunter_woman"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Slave Drivers.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_slave_driver"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Swadian recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 150), (assign, "$draft_id", "trp_swadian_recruit"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Veagir recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_vaegir_recruit"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Khergit tribesmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_khergit_tribesman"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Nord recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_nord_recruit"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Rhodok tribesmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_rhodok_tribesman"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Sarranid recruit.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_sarranid_recruit"),]],
[anyone|plyr,"member_draft_troop", [], "I would like some Looters.", "member_draft_troop_question2",[(assign, "$cost_draft", 50), (assign, "$draft_id", "trp_looter"),]],
[anyone|plyr,"member_draft_troop", [], "Never mind.", "close_window",[]],
[anyone, "member_draft_troop_question2", [], "How many troops do you want?", "member_draft_troop_2",[]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 100.", "member_draft_troop_3",[ (assign, "$draft_num", 100)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 50.", "member_draft_troop_3",[(assign, "$draft_num", 50)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 40.", "member_draft_troop_3",[(assign, "$draft_num", 40)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 35.", "member_draft_troop_3",[(assign, "$draft_num", 35)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 30.", "member_draft_troop_3",[(assign, "$draft_num", 30)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 25.", "member_draft_troop_3",[(assign, "$draft_num", 25)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 20.", "member_draft_troop_3",[(assign, "$draft_num", 20)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 15.", "member_draft_troop_3",[(assign, "$draft_num", 15)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 10.", "member_draft_troop_3",[(assign, "$draft_num", 10)]],
[anyone|plyr,"member_draft_troop_2", [], "I would like 5.", "member_draft_troop_3",[(assign, "$draft_num", 5)]],
[anyone|plyr,"member_draft_troop_2", [], "Never mind.", "close_window",[]],
#This new piece of script allows you to recruit from 1 to 10 troops rather than the previous locked 10 or if you like bigger numbers (later on in the game) 5 - 100 soldiers :D
## add soldiers to party and print some stuff
#Old answer
# [anyone, "member_draft_troop_3", [
# (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
# (val_min, "$draft_num", ":free_capacity"),
# (store_troop_gold, ":gold", "trp_player"),
# (store_div, ":gold_capacity", ":gold", "$cost_draft"),#denars relevant to the troop you are hiring
# (val_min, "$draft_num", ":gold_capacity"),
# (party_add_members, "p_main_party", "$draft_id", "$draft_num"),# sets troop to the one you chose
# (store_mul, ":cost", "$draft_num", "$cost_draft"),
# (troop_remove_gold, "trp_player", ":cost"),
# ], "It didn't take much to convince them to join you, Hope they serve you well.", "do_member_view_char",[]],
# new version of resulting answer
[anyone, "member_draft_troop_3", [
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(store_troop_gold, ":gold", "trp_player"),
(store_div, ":gold_capacity", ":gold", "$cost_draft"),#denars relevant to the troop you are hiring
(store_mul, ":cost", "$draft_num", "$cost_draft"),
(try_begin)
(ge, ":gold", ":cost"),
#this line would check to see if party is full (gt, ":free_capacity",0), but currently adding it bugs my game.
(val_min, "$draft_num", ":free_capacity"),
(val_min, "$draft_num", ":gold_capacity"),
(party_add_members, "p_main_party", "$draft_id", "$draft_num"),# sets troop to the one you chose
(troop_remove_gold, "trp_player", ":cost"),
(str_store_troop_name, s9, "$draft_id"),
(assign, reg3, ":cost"),
(assign, reg5, "$draft_num"),
(str_store_string, s17, "Allright, I've recruited {reg5} {s9} as you ordered, it has cost me {reg3} denars to recruit them. Use them well. {m'lord/m'lady}."),
(else_try)
(lt, ":gold", ":cost"),
(str_store_troop_name, s9, "$draft_id"),
(assign, reg3, ":cost"),
(assign, reg5, "$draft_num"),
(assign, reg6, ":gold"),
(str_store_string, s17, "{M'lord/M'lady}, I'm afraid you have insufficient funds to recruit {reg5} {s9} like you wanted, it would cost me {reg3} denars to recruit them and you've only got {reg6} denars. talk to me again when you've enough money."),
#(else_try) # third if would be have enough money but not enough space in the party
# (le, ":free_capacity", "0"),
# (str_store_troop_name, s9, "$draft_id"),
# (assign, reg3, ":cost"),
# (assign, reg5, "$draft_num"),
# (assign, reg6, ":gold"),
# (str_store_string, s17, "{M'lord/M'lady}, I'm afraid you don't have enough space in your party for an extra {reg5} soldiers even if they are {s9} like you wanted, free up some space and then come back and talk to me."),
#
(try_end)
],"{s17}","do_member_view_char",[]],
# use this to store resulting text (str_store_string, s17, "text"),
# Maverick Companion Script End #EPIC#
## (try_begin),
## (store_random_in_range, ":random_no", 0, 100),
## (lt, ":random_no", 10),
## (call_script, "script_create_kingdom_party_if_below_limit", ":cur_kingdom", spt_patrol),
## (try_end),
## (eq, ":party_type", spt_patrol),
## (assign, ":party_count_limit", 1),
## (else_try),
## (eq, ":party_type", spt_patrol),
## (assign, ":party_template", "pt_patrol_party"),
# (assign, ":party_name_str", "str_s7_patrol"), <---- keep this outcommented
## (else_try),
spt_patrol = 7