how to siege citys

Users who are viewing this thread

DarkAnd

Sergeant Knight at Arms
hi every one i want to know how to make citys atacable i want to place the siege and conquer of citys to my mod (maybe pilage and destruction)
but to begin i need the code to atack citys in the menu i copy and paste the  folowing code:
      ("castle_attack_walls",
      [
          (party_slot_eq,"$g_encountered_party", slot_party_type,spt_castle),
          (store_faction_of_party,reg(3),  "$g_encountered_party"),
          (store_relation, reg(5), reg(3), "fac_player_faction"),
          (lt, reg(5), 0),
          (lt, "$g_encountered_party_2", 1),
          (call_script, "script_party_count_fit_regulars","p_main_party"),
          (gt, reg(0), 0),
        ],
        "Attack the walls.",
        [
            (jump_to_menu, "mnu_castle_attack_walls_begin"),
          ]),

to the folowing area
  (
    "town",0,
    "{s1}{s2}. {s3}",
    "none",
    [
#        (display_message, 0),
        (store_encountered_party,"$current_town"),
        (reset_price_rates,0),
        (party_get_slot, reg(10), "$current_town", slot_town_export_good),
        (party_get_slot, reg(11), "$current_town", slot_town_export_rate),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_export_good_2),
        (party_get_slot, reg(11), "$current_town", slot_town_export_rate_2),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_import_good),
        (party_get_slot, reg(11), "$current_town", slot_town_import_rate),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_import_good_2),
        (party_get_slot, reg(11), "$current_town", slot_town_import_rate_2),
        (set_price_rate_for_item,reg(10),reg(11)),
       
        (assign,"$all_doors_locked",0),

        (try_begin),
          (eq, "$g_town_visit_after_rest", 1),
          (assign, "$g_town_visit_after_rest", 0),
          (assign, "$town_entered", 1),
        (try_end),


        (str_store_party_name,2,"$current_town"),
        (try_begin),
          (party_slot_eq,"$current_town",slot_party_type, spt_castle),
          (str_store_string,1,"str_you_are_in_castle"),
        (else_try),
          (eq,"$entry_to_town_forbidden",0),
          (str_store_string,1,"str_you_are_in_town"),
        (else_try),
          (str_store_string,1,"str_you_sneaked_into_town"),
        (try_end),

        #forbidden to enter?
        (try_begin),
          (store_time_of_day,reg(12)),
          (ge,reg(12),5),
          (lt,reg(12),21),
          (assign,"$town_nighttime",0),
          (str_store_string,3,"str_empty_string"),
        (else_try),
          (assign,"$town_nighttime",1),
          (str_store_string,3,"str_town_nighttime"),
        (try_end),


        (assign,"$castle_undefended",0),
        (party_get_num_companions, ":castle_garrison_size","$g_encountered_party"),
        (try_begin),
          (eq,":castle_garrison_size",0),
          (assign,"$castle_undefended",1),
          (party_set_faction,"$g_encountered_party","fac_neutral"),
          (try_begin),
            (party_slot_eq,"$current_town",slot_party_type, spt_castle),
            (str_store_string, 3, "str_castle_is_abondened"),
          (else_try),
            (str_store_string, 3, "str_town_is_abondened"),
          (try_end),
        (else_try),
          (store_faction_of_party,reg(3),  "$g_encountered_party"),
          (eq,reg(3),"fac_player_faction"),
          (str_store_string, 3, "str_place_is_occupied_by_player"),
        (else_try),
          (store_faction_of_party,":encountered_faction",  "$g_encountered_party"),
          (store_relation, ":relation", ":encountered_faction", "fac_player_faction"),
          (try_begin),
            (lt, ":relation", 0),
            (str_store_string, 3, "str_place_is_occupied_by_enemy"),
          (else_try),
            (str_store_string, 3, "str_place_is_occupied_by_friendly"),
          (try_end),
        (try_end),
       
        ],
    [
      ("request_meeting",[(eq,1,0),(eq,"$entry_to_town_forbidden",1),(eq,"$ruler_meeting_denied",0),(eq,"$sneaked_into_town",0)],
      "Request a meeting with the lord.",
      [
          (store_encountered_party,"$last_sneak_attempt_town"),
          (store_current_hours,"$last_sneak_attempt_time"),
          (jump_to_menu,"mnu_lord_meeting_accepted"),
        ]),
      ("disguise_and_sneak",[(eq,1,0),(eq,"$entry_to_town_forbidden",1),(eq,"$sneaked_into_town",0),(eq,"$cant_sneak_into_town",0)],
      "Disguise yourself and try to sneak through the town gates.",[
          (store_random,reg(9),100),
          (try_begin),
            (lt, reg(9), 50),
            (jump_to_menu,"mnu_sneak_into_town_caught"),
          (else_try),
            (assign, "$sneaked_into_town",1),
            (jump_to_menu,"mnu_sneak_into_town_suceeded"),
          (try_end),
          ]),
      ("town_castle",[(party_slot_eq,"$current_town",slot_party_type, spt_town),(eq,"$entry_to_town_forbidden",0)],"Go to the castle.",
      [
          (try_begin),
            (eq,"$all_doors_locked",1),
            (display_message,"str_door_locked",0xFFFFAAAA),
          (else_try),
            (assign, "$town_entered", 1),
            (set_jump_mission,"mt_visit_town_castle"),
            (party_get_slot, ":castle_scene", "$current_town", slot_town_castle),
            (jump_to_scene,":castle_scene"),
            (change_screen_mission),
          (try_end),
        ], "Door to the castle."),
      ("town_center",[
          (party_slot_eq,"$current_town",slot_party_type, spt_town),
          (this_or_next|eq,"$entry_to_town_forbidden",0),
          (eq, "$sneaked_into_town",1)]
      ,"Go to the town square.",
      [
          (try_begin),
            (eq,"$town_nighttime",0),
            (party_get_slot, reg(11), "$current_town", slot_town_center),
          (else_try),
            (party_get_slot, reg(11), "$current_town", slot_town_center),
          (try_end),

          (modify_visitors_at_site,reg(11)),(reset_visitors),
          (store_faction_of_party, reg(20),"$current_town"),
          (try_begin),
            (eq,reg(20),"fac_swadians"),
            (assign,reg(0),"trp_swadian_infantry"),
            (assign,reg(1),"trp_swadian_infantry"),
            (assign,reg(2),"trp_swadian_crossbowman"),
            (assign,reg(3),"trp_swadian_footman"),
          (else_try),
            (assign,reg(0),"trp_vaegir_infantry"),
            (assign,reg(1),"trp_vaegir_infantry"),
            (assign,reg(2),"trp_vaegir_archer"),
            (assign,reg(3),"trp_vaegir_footman"),
          (try_end),
          (shuffle_range,0,4),
          (set_visitor,25,reg(0)),
          (set_visitor,26,reg(1)),
          (set_visitor,27,reg(2)),
          (set_visitor,28,reg(3)),

          (set_jump_mission,"mt_town_default"),
          (try_begin),
            (eq, "$sneaked_into_town",1),
            (set_jump_mission,"mt_town_disguised"),
          (else_try),
            (eq, "$town_entered", 0),
            (assign, "$town_entered", 1),
            (set_jump_mission,"mt_visit_town_horseback"),
            (set_jump_entry,1),
          (try_end),
          (jump_to_scene,reg(11)),
          (change_screen_mission),
        ],"Door to the town centre."),
so they become
[color=red  (
    "town",0,
    "{s1}{s2}. {s3}",
    "none",
    [
#        (display_message, 0),
        (store_encountered_party,"$current_town"),
        (reset_price_rates,0),
        (party_get_slot, reg(10), "$current_town", slot_town_export_good),
        (party_get_slot, reg(11), "$current_town", slot_town_export_rate),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_export_good_2),
        (party_get_slot, reg(11), "$current_town", slot_town_export_rate_2),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_import_good),
        (party_get_slot, reg(11), "$current_town", slot_town_import_rate),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_import_good_2),
        (party_get_slot, reg(11), "$current_town", slot_town_import_rate_2),
        (set_price_rate_for_item,reg(10),reg(11)),
       
        (assign,"$all_doors_locked",0),

        (try_begin),
          (eq, "$g_town_visit_after_rest", 1),
          (assign, "$g_town_visit_after_rest", 0),
          (assign, "$town_entered", 1),
        (try_end),


        (str_store_party_name,2,"$current_town"),
        (try_begin),
          (party_slot_eq,"$current_town",slot_party_type, spt_castle),
          (str_store_string,1,"str_you_are_in_castle"),
        (else_try),
          (eq,"$entry_to_town_forbidden",0),
          (str_store_string,1,"str_you_are_in_town"),
        (else_try),
          (str_store_string,1,"str_you_sneaked_into_town"),
        (try_end),

        #forbidden to enter?
        (try_begin),
          (store_time_of_day,reg(12)),
          (ge,reg(12),5),
          (lt,reg(12),21),
          (assign,"$town_nighttime",0),
          (str_store_string,3,"str_empty_string"),
        (else_try),
          (assign,"$town_nighttime",1),
          (str_store_string,3,"str_town_nighttime"),
        (try_end),


        (assign,"$castle_undefended",0),
        (party_get_num_companions, ":castle_garrison_size","$g_encountered_party"),
        (try_begin),
          (eq,":castle_garrison_size",0),
          (assign,"$castle_undefended",1),
          (party_set_faction,"$g_encountered_party","fac_neutral"),
          (try_begin),
            (party_slot_eq,"$current_town",slot_party_type, spt_castle),
            (str_store_string, 3, "str_castle_is_abondened"),
          (else_try),
            (str_store_string, 3, "str_town_is_abondened"),
          (try_end),
        (else_try),
          (store_faction_of_party,reg(3),  "$g_encountered_party"),
          (eq,reg(3),"fac_player_faction"),
          (str_store_string, 3, "str_place_is_occupied_by_player"),
        (else_try),
          (store_faction_of_party,":encountered_faction",  "$g_encountered_party"),
          (store_relation, ":relation", ":encountered_faction", "fac_player_faction"),
          (try_begin),
            (lt, ":relation", 0),
            (str_store_string, 3, "str_place_is_occupied_by_enemy"),
          (else_try),
            (str_store_string, 3, "str_place_is_occupied_by_friendly"),
          (try_end),
        (try_end),
       
        ],
    [
      ("request_meeting",[(eq,1,0),(eq,"$entry_to_town_forbidden",1),(eq,"$ruler_meeting_denied",0),(eq,"$sneaked_into_town",0)],
      "Request a meeting with the lord.",
      [
          (store_encountered_party,"$last_sneak_attempt_town"),
          (store_current_hours,"$last_sneak_attempt_time"),
          (jump_to_menu,"mnu_lord_meeting_accepted"),
        ]),
      ("disguise_and_sneak",[(eq,1,0),(eq,"$entry_to_town_forbidden",1),(eq,"$sneaked_into_town",0),(eq,"$cant_sneak_into_town",0)],
      "Disguise yourself and try to sneak through the town gates.",[
          (store_random,reg(9),100),
          (try_begin),
            (lt, reg(9), 50),
            (jump_to_menu,"mnu_sneak_into_town_caught"),
          (else_try),
            (assign, "$sneaked_into_town",1),
            (jump_to_menu,"mnu_sneak_into_town_suceeded"),
          (try_end),
          ]),
      ("town_castle",[(party_slot_eq,"$current_town",slot_party_type, spt_town),(eq,"$entry_to_town_forbidden",0)],"Go to the castle.",
      [
          (try_begin),
            (eq,"$all_doors_locked",1),
            (display_message,"str_door_locked",0xFFFFAAAA),
          (else_try),
            (assign, "$town_entered", 1),
            (set_jump_mission,"mt_visit_town_castle"),
            (party_get_slot, ":castle_scene", "$current_town", slot_town_castle),
            (jump_to_scene,":castle_scene"),
            (change_screen_mission),
          (try_end),
        ], "Door to the castle."),
      ("town_center",[
          (party_slot_eq,"$current_town",slot_party_type, spt_town),
          (this_or_next|eq,"$entry_to_town_forbidden",0),
          (eq, "$sneaked_into_town",1)]
      ,"Go to the town square.",
      [
          (try_begin),
            (eq,"$town_nighttime",0),
            (party_get_slot, reg(11), "$current_town", slot_town_center),
          (else_try),
            (party_get_slot, reg(11), "$current_town", slot_town_center),
          (try_end),

          (modify_visitors_at_site,reg(11)),(reset_visitors),
          (store_faction_of_party, reg(20),"$current_town"),
          (try_begin),
            (eq,reg(20),"fac_swadians"),
            (assign,reg(0),"trp_swadian_infantry"),
            (assign,reg(1),"trp_swadian_infantry"),
            (assign,reg(2),"trp_swadian_crossbowman"),
            (assign,reg(3),"trp_swadian_footman"),
          (else_try),
            (assign,reg(0),"trp_vaegir_infantry"),
            (assign,reg(1),"trp_vaegir_infantry"),
            (assign,reg(2),"trp_vaegir_archer"),
            (assign,reg(3),"trp_vaegir_footman"),
          (try_end),
          (shuffle_range,0,4),
          (set_visitor,25,reg(0)),
          (set_visitor,26,reg(1)),
          (set_visitor,27,reg(2)),
          (set_visitor,28,reg(3)),

          (set_jump_mission,"mt_town_default"),
          (try_begin),
            (eq, "$sneaked_into_town",1),
            (set_jump_mission,"mt_town_disguised"),
          (else_try),
            (eq, "$town_entered", 0),
            (assign, "$town_entered", 1),
            (set_jump_mission,"mt_visit_town_horseback"),
            (set_jump_entry,1),
          (try_end),
          (jump_to_scene,reg(11)),
          (change_screen_mission),
        ],"Door to the town centre."),
      ("castle_attack_walls",
      [
          (party_slot_eq,"$g_encountered_party", slot_party_type,spt_castle),
          (store_faction_of_party,reg(3),  "$g_encountered_party"),
          (store_relation, reg(5), reg(3), "fac_player_faction"),
          (lt, reg(5), 0),
          (lt, "$g_encountered_party_2", 1),
          (call_script, "script_party_count_fit_regulars","p_main_party"),
          (gt, reg(0), 0),
        ],
        "Attack the walls.",
        [
            (jump_to_menu, "mnu_castle_attack_walls_begin"),
          ]),[/color]
and wen i run mudule.bat everything works good but in the game nothing hapen for what?????
 
DarkAnd said:
hi every one i want to know how to make citys atacable i want to place the siege and conquer of citys to my mod (maybe pilage and destruction)
but to begin i need the code to atack citys in the menu i copy and paste the  folowing code:
      ("castle_attack_walls",
      [
          (party_slot_eq,"$g_encountered_party", slot_party_type,spt_castle),
          (store_faction_of_party,reg(3),  "$g_encountered_party"),
          (store_relation, reg(5), reg(3), "fac_player_faction"),
          (lt, reg(5), 0),
          (lt, "$g_encountered_party_2", 1),
          (call_script, "script_party_count_fit_regulars","p_main_party"),
          (gt, reg(0), 0),
        ],
        "Attack the walls.",
        [
            (jump_to_menu, "mnu_castle_attack_walls_begin"),
          ]),

to the folowing area
  (
    "town",0,
    "{s1}{s2}. {s3}",
    "none",
    [
#        (display_message, 0),
        (store_encountered_party,"$current_town"),
        (reset_price_rates,0),
        (party_get_slot, reg(10), "$current_town", slot_town_export_good),
        (party_get_slot, reg(11), "$current_town", slot_town_export_rate),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_export_good_2),
        (party_get_slot, reg(11), "$current_town", slot_town_export_rate_2),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_import_good),
        (party_get_slot, reg(11), "$current_town", slot_town_import_rate),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_import_good_2),
        (party_get_slot, reg(11), "$current_town", slot_town_import_rate_2),
        (set_price_rate_for_item,reg(10),reg(11)),
       
        (assign,"$all_doors_locked",0),

        (try_begin),
          (eq, "$g_town_visit_after_rest", 1),
          (assign, "$g_town_visit_after_rest", 0),
          (assign, "$town_entered", 1),
        (try_end),


        (str_store_party_name,2,"$current_town"),
        (try_begin),
          (party_slot_eq,"$current_town",slot_party_type, spt_castle),
          (str_store_string,1,"str_you_are_in_castle"),
        (else_try),
          (eq,"$entry_to_town_forbidden",0),
          (str_store_string,1,"str_you_are_in_town"),
        (else_try),
          (str_store_string,1,"str_you_sneaked_into_town"),
        (try_end),

        #forbidden to enter?
        (try_begin),
          (store_time_of_day,reg(12)),
          (ge,reg(12),5),
          (lt,reg(12),21),
          (assign,"$town_nighttime",0),
          (str_store_string,3,"str_empty_string"),
        (else_try),
          (assign,"$town_nighttime",1),
          (str_store_string,3,"str_town_nighttime"),
        (try_end),


        (assign,"$castle_undefended",0),
        (party_get_num_companions, ":castle_garrison_size","$g_encountered_party"),
        (try_begin),
          (eq,":castle_garrison_size",0),
          (assign,"$castle_undefended",1),
          (party_set_faction,"$g_encountered_party","fac_neutral"),
          (try_begin),
            (party_slot_eq,"$current_town",slot_party_type, spt_castle),
            (str_store_string, 3, "str_castle_is_abondened"),
          (else_try),
            (str_store_string, 3, "str_town_is_abondened"),
          (try_end),
        (else_try),
          (store_faction_of_party,reg(3),  "$g_encountered_party"),
          (eq,reg(3),"fac_player_faction"),
          (str_store_string, 3, "str_place_is_occupied_by_player"),
        (else_try),
          (store_faction_of_party,":encountered_faction",  "$g_encountered_party"),
          (store_relation, ":relation", ":encountered_faction", "fac_player_faction"),
          (try_begin),
            (lt, ":relation", 0),
            (str_store_string, 3, "str_place_is_occupied_by_enemy"),
          (else_try),
            (str_store_string, 3, "str_place_is_occupied_by_friendly"),
          (try_end),
        (try_end),
       
        ],
    [
      ("request_meeting",[(eq,1,0),(eq,"$entry_to_town_forbidden",1),(eq,"$ruler_meeting_denied",0),(eq,"$sneaked_into_town",0)],
      "Request a meeting with the lord.",
      [
          (store_encountered_party,"$last_sneak_attempt_town"),
          (store_current_hours,"$last_sneak_attempt_time"),
          (jump_to_menu,"mnu_lord_meeting_accepted"),
        ]),
      ("disguise_and_sneak",[(eq,1,0),(eq,"$entry_to_town_forbidden",1),(eq,"$sneaked_into_town",0),(eq,"$cant_sneak_into_town",0)],
      "Disguise yourself and try to sneak through the town gates.",[
          (store_random,reg(9),100),
          (try_begin),
            (lt, reg(9), 50),
            (jump_to_menu,"mnu_sneak_into_town_caught"),
          (else_try),
            (assign, "$sneaked_into_town",1),
            (jump_to_menu,"mnu_sneak_into_town_suceeded"),
          (try_end),
          ]),
      ("town_castle",[(party_slot_eq,"$current_town",slot_party_type, spt_town),(eq,"$entry_to_town_forbidden",0)],"Go to the castle.",
      [
          (try_begin),
            (eq,"$all_doors_locked",1),
            (display_message,"str_door_locked",0xFFFFAAAA),
          (else_try),
            (assign, "$town_entered", 1),
            (set_jump_mission,"mt_visit_town_castle"),
            (party_get_slot, ":castle_scene", "$current_town", slot_town_castle),
            (jump_to_scene,":castle_scene"),
            (change_screen_mission),
          (try_end),
        ], "Door to the castle."),
      ("town_center",[
          (party_slot_eq,"$current_town",slot_party_type, spt_town),
          (this_or_next|eq,"$entry_to_town_forbidden",0),
          (eq, "$sneaked_into_town",1)]
      ,"Go to the town square.",
      [
          (try_begin),
            (eq,"$town_nighttime",0),
            (party_get_slot, reg(11), "$current_town", slot_town_center),
          (else_try),
            (party_get_slot, reg(11), "$current_town", slot_town_center),
          (try_end),

          (modify_visitors_at_site,reg(11)),(reset_visitors),
          (store_faction_of_party, reg(20),"$current_town"),
          (try_begin),
            (eq,reg(20),"fac_swadians"),
            (assign,reg(0),"trp_swadian_infantry"),
            (assign,reg(1),"trp_swadian_infantry"),
            (assign,reg(2),"trp_swadian_crossbowman"),
            (assign,reg(3),"trp_swadian_footman"),
          (else_try),
            (assign,reg(0),"trp_vaegir_infantry"),
            (assign,reg(1),"trp_vaegir_infantry"),
            (assign,reg(2),"trp_vaegir_archer"),
            (assign,reg(3),"trp_vaegir_footman"),
          (try_end),
          (shuffle_range,0,4),
          (set_visitor,25,reg(0)),
          (set_visitor,26,reg(1)),
          (set_visitor,27,reg(2)),
          (set_visitor,28,reg(3)),

          (set_jump_mission,"mt_town_default"),
          (try_begin),
            (eq, "$sneaked_into_town",1),
            (set_jump_mission,"mt_town_disguised"),
          (else_try),
            (eq, "$town_entered", 0),
            (assign, "$town_entered", 1),
            (set_jump_mission,"mt_visit_town_horseback"),
            (set_jump_entry,1),
          (try_end),
          (jump_to_scene,reg(11)),
          (change_screen_mission),
        ],"Door to the town centre."),
so they become
[color=red  (
    "town",0,
    "{s1}{s2}. {s3}",
    "none",
    [
#        (display_message, 0),
        (store_encountered_party,"$current_town"),
        (reset_price_rates,0),
        (party_get_slot, reg(10), "$current_town", slot_town_export_good),
        (party_get_slot, reg(11), "$current_town", slot_town_export_rate),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_export_good_2),
        (party_get_slot, reg(11), "$current_town", slot_town_export_rate_2),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_import_good),
        (party_get_slot, reg(11), "$current_town", slot_town_import_rate),
        (set_price_rate_for_item,reg(10),reg(11)),
        (party_get_slot, reg(10), "$current_town", slot_town_import_good_2),
        (party_get_slot, reg(11), "$current_town", slot_town_import_rate_2),
        (set_price_rate_for_item,reg(10),reg(11)),
       
        (assign,"$all_doors_locked",0),

        (try_begin),
          (eq, "$g_town_visit_after_rest", 1),
          (assign, "$g_town_visit_after_rest", 0),
          (assign, "$town_entered", 1),
        (try_end),


        (str_store_party_name,2,"$current_town"),
        (try_begin),
          (party_slot_eq,"$current_town",slot_party_type, spt_castle),
          (str_store_string,1,"str_you_are_in_castle"),
        (else_try),
          (eq,"$entry_to_town_forbidden",0),
          (str_store_string,1,"str_you_are_in_town"),
        (else_try),
          (str_store_string,1,"str_you_sneaked_into_town"),
        (try_end),

        #forbidden to enter?
        (try_begin),
          (store_time_of_day,reg(12)),
          (ge,reg(12),5),
          (lt,reg(12),21),
          (assign,"$town_nighttime",0),
          (str_store_string,3,"str_empty_string"),
        (else_try),
          (assign,"$town_nighttime",1),
          (str_store_string,3,"str_town_nighttime"),
        (try_end),


        (assign,"$castle_undefended",0),
        (party_get_num_companions, ":castle_garrison_size","$g_encountered_party"),
        (try_begin),
          (eq,":castle_garrison_size",0),
          (assign,"$castle_undefended",1),
          (party_set_faction,"$g_encountered_party","fac_neutral"),
          (try_begin),
            (party_slot_eq,"$current_town",slot_party_type, spt_castle),
            (str_store_string, 3, "str_castle_is_abondened"),
          (else_try),
            (str_store_string, 3, "str_town_is_abondened"),
          (try_end),
        (else_try),
          (store_faction_of_party,reg(3),  "$g_encountered_party"),
          (eq,reg(3),"fac_player_faction"),
          (str_store_string, 3, "str_place_is_occupied_by_player"),
        (else_try),
          (store_faction_of_party,":encountered_faction",  "$g_encountered_party"),
          (store_relation, ":relation", ":encountered_faction", "fac_player_faction"),
          (try_begin),
            (lt, ":relation", 0),
            (str_store_string, 3, "str_place_is_occupied_by_enemy"),
          (else_try),
            (str_store_string, 3, "str_place_is_occupied_by_friendly"),
          (try_end),
        (try_end),
       
        ],
    [
      ("request_meeting",[(eq,1,0),(eq,"$entry_to_town_forbidden",1),(eq,"$ruler_meeting_denied",0),(eq,"$sneaked_into_town",0)],
      "Request a meeting with the lord.",
      [
          (store_encountered_party,"$last_sneak_attempt_town"),
          (store_current_hours,"$last_sneak_attempt_time"),
          (jump_to_menu,"mnu_lord_meeting_accepted"),
        ]),
      ("disguise_and_sneak",[(eq,1,0),(eq,"$entry_to_town_forbidden",1),(eq,"$sneaked_into_town",0),(eq,"$cant_sneak_into_town",0)],
      "Disguise yourself and try to sneak through the town gates.",[
          (store_random,reg(9),100),
          (try_begin),
            (lt, reg(9), 50),
            (jump_to_menu,"mnu_sneak_into_town_caught"),
          (else_try),
            (assign, "$sneaked_into_town",1),
            (jump_to_menu,"mnu_sneak_into_town_suceeded"),
          (try_end),
          ]),
      ("town_castle",[(party_slot_eq,"$current_town",slot_party_type, spt_town),(eq,"$entry_to_town_forbidden",0)],"Go to the castle.",
      [
          (try_begin),
            (eq,"$all_doors_locked",1),
            (display_message,"str_door_locked",0xFFFFAAAA),
          (else_try),
            (assign, "$town_entered", 1),
            (set_jump_mission,"mt_visit_town_castle"),
            (party_get_slot, ":castle_scene", "$current_town", slot_town_castle),
            (jump_to_scene,":castle_scene"),
            (change_screen_mission),
          (try_end),
        ], "Door to the castle."),
      ("town_center",[
          (party_slot_eq,"$current_town",slot_party_type, spt_town),
          (this_or_next|eq,"$entry_to_town_forbidden",0),
          (eq, "$sneaked_into_town",1)]
      ,"Go to the town square.",
      [
          (try_begin),
            (eq,"$town_nighttime",0),
            (party_get_slot, reg(11), "$current_town", slot_town_center),
          (else_try),
            (party_get_slot, reg(11), "$current_town", slot_town_center),
          (try_end),

          (modify_visitors_at_site,reg(11)),(reset_visitors),
          (store_faction_of_party, reg(20),"$current_town"),
          (try_begin),
            (eq,reg(20),"fac_swadians"),
            (assign,reg(0),"trp_swadian_infantry"),
            (assign,reg(1),"trp_swadian_infantry"),
            (assign,reg(2),"trp_swadian_crossbowman"),
            (assign,reg(3),"trp_swadian_footman"),
          (else_try),
            (assign,reg(0),"trp_vaegir_infantry"),
            (assign,reg(1),"trp_vaegir_infantry"),
            (assign,reg(2),"trp_vaegir_archer"),
            (assign,reg(3),"trp_vaegir_footman"),
          (try_end),
          (shuffle_range,0,4),
          (set_visitor,25,reg(0)),
          (set_visitor,26,reg(1)),
          (set_visitor,27,reg(2)),
          (set_visitor,28,reg(3)),

          (set_jump_mission,"mt_town_default"),
          (try_begin),
            (eq, "$sneaked_into_town",1),
            (set_jump_mission,"mt_town_disguised"),
          (else_try),
            (eq, "$town_entered", 0),
            (assign, "$town_entered", 1),
            (set_jump_mission,"mt_visit_town_horseback"),
            (set_jump_entry,1),
          (try_end),
          (jump_to_scene,reg(11)),
          (change_screen_mission),
        ],"Door to the town centre."),
      ("castle_attack_walls",
      [
          (party_slot_eq,"$g_encountered_party", slot_party_type,spt_castle),
          (store_faction_of_party,reg(3),  "$g_encountered_party"),
          (store_relation, reg(5), reg(3), "fac_player_faction"),
          (lt, reg(5), 0),
          (lt, "$g_encountered_party_2", 1),
          (call_script, "script_party_count_fit_regulars","p_main_party"),
          (gt, reg(0), 0),
        ],
        "Attack the walls.",
        [
            (jump_to_menu, "mnu_castle_attack_walls_begin"),
          ]),[/color]
and wen i run mudule.bat everything works good but in the game nothing hapen for what?????

All  this!

:shock:

Answered with this:

Highlander said:
because you need (jump_to_scene, <whateverscene>) and (change_screen_mission)

:shock: How... Unnatural... :shock:
 
Back
Top Bottom