;============== Скрипт прихода Вильяма Уоллеса ================
declare_counter wallace_spawned
monitor_event FactionTurnStart FactionType scotland
and I_TurnNumber = 380
and I_NumberOfSettlements scotland < 4
set_counter wallace_spawned 1
terminate_monitor
end_monitor
monitor_event FactionTurnStart FactionType scotland
and I_NumberOfSettlements scotland < 2
set_counter wallace_spawned 1
terminate_monitor
end_monitor
monitor_event GeneralCaptureSettlement FactionType england
and TargetFactionType scotland
set_counter wallace_spawned 1
terminate_monitor
end_monitor
monitor_event FactionTurnEnd FactionType scotland
and I_CompareCounter wallace_spawned = 1
if I_IsFactionAIControlled scotland
spawn_army
faction scotland
character William Wallace, named character, age 20, x 55, y 253, direction SE, battle_model Wallace_General, portrait wallace, label scotland4wallace
traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , ScotlandHero 1 , LoyaltyStarter 1 , BattleChivalry 2 , Loyal 2 , Just 2 , Rabblerouser 3 , Hardened 1 , HighPersonalSecurity 3 , Script 1
unit NE Bodyguard exp 9 armour 0 weapon_lvl 0
unit Highland Nobles exp 2 armour 0 weapon_lvl 1
unit Highlanders exp 9 armour 1 weapon_lvl 1
unit Highland Nobles exp 8 armour 1 weapon_lvl 1
unit Highlanders exp 3 armour 1 weapon_lvl 1
unit Urban Spear Militia exp 9 armour 0 weapon_lvl 1
unit Urban Spear Militia exp 5 armour 0 weapon_lvl 1
unit Noble Swordsmen exp 3 armour 1 weapon_lvl 0
unit Noble Swordsmen exp 3 armour 1 weapon_lvl 0
unit Feudal Knights exp 9 armour 0 weapon_lvl 1
unit Feudal Knights exp 5 armour 0 weapon_lvl 1
unit Merchant Cavalry Militia exp 9 armour 0 weapon_lvl 1
unit Merchant Cavalry Militia exp 9 armour 1 weapon_lvl 1
unit Dismounted Feudal Knights exp 9 armour 1 weapon_lvl 0
unit Noble Highland Archers exp 9 armour 1 weapon_lvl 0
unit Noble Highland Archers exp 1 armour 1 weapon_lvl 0
unit Border Horse exp 9 armour 0 weapon_lvl 0
unit Border Horse exp 9 armour 0 weapon_lvl 0
unit Dismounted Feudal Knights exp 9 armour 1 weapon_lvl 1
unit Dismounted Mailed Knights exp 9 armour 1 weapon_lvl 1
end
spawn_army
faction scotland
character random_name, named character, age 26, x 55, y 253, label Helper_Of_Wallace
traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , LoyaltyStarter 1 , BattleChivalry 2 , Loyal 2 , Just 2 , Rabblerouser 3 , Hardened 1 , HighPersonalSecurity 3 , Script 1
unit NE Bodyguard exp 1 armour 0 weapon_lvl 0
unit Highland Nobles exp 2 armour 0 weapon_lvl 1
unit Highlanders exp 9 armour 1 weapon_lvl 1
unit Highland Nobles exp 8 armour 1 weapon_lvl 1
unit Highlanders exp 3 armour 1 weapon_lvl 1
unit Urban Spear Militia exp 9 armour 0 weapon_lvl 1
unit Urban Spear Militia exp 5 armour 0 weapon_lvl 1
unit Noble Swordsmen exp 3 armour 1 weapon_lvl 0
unit Noble Swordsmen exp 3 armour 1 weapon_lvl 0
unit Feudal Knights exp 9 armour 0 weapon_lvl 1
unit Feudal Knights exp 5 armour 0 weapon_lvl 1
unit Merchant Cavalry Militia exp 9 armour 0 weapon_lvl 1
unit Merchant Cavalry Militia exp 9 armour 1 weapon_lvl 1
unit Noble Highland Archers exp 9 armour 1 weapon_lvl 0
unit Noble Highland Archers exp 9 armour 1 weapon_lvl 0
unit Noble Highland Archers exp 1 armour 1 weapon_lvl 0
unit Border Horse exp 9 armour 0 weapon_lvl 0
unit Border Horse exp 9 armour 0 weapon_lvl 0
unit Dismounted Feudal Knights exp 9 armour 1 weapon_lvl 1
unit Dismounted Mailed Knights exp 9 armour 1 weapon_lvl 1
end
end_if
if not I_IsFactionAIControlled scotland
spawn_army
faction scotland
character William Wallace, named character, age 20, x 55, y 253, direction SE, battle_model Wallace_General, portrait wallace
traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , ScotlandHero 1 , LoyaltyStarter 1 , BattleChivalry 2 , Loyal 2 , Just 2 , Rabblerouser 3 , Hardened 1 , HighPersonalSecurity 3
unit NE Bodyguard exp 1 armour 0 weapon_lvl 0
unit Highland Nobles exp 1 armour 0 weapon_lvl 1
unit Highlanders exp 1 armour 1 weapon_lvl 1
unit Highland Nobles exp 2 armour 1 weapon_lvl 1
unit Highlanders exp 3 armour 1 weapon_lvl 1
unit Urban Spear Militia exp 2 armour 0 weapon_lvl 1
unit Urban Spear Militia exp 3 armour 0 weapon_lvl 1
unit Noble Swordsmen exp 3 armour 1 weapon_lvl 0
unit Noble Swordsmen exp 3 armour 1 weapon_lvl 0
unit Dismounted Mailed Knights exp 2 armour 1 weapon_lvl 1
end
end_if
set_counter wallace_spawned 2
historic_event scotland_wallace event/william_wallace.bik
terminate_monitor
end_monitor
;=============Edinburgh================================================================
declare_counter attack_Edinburgh
declare_counter attack_FailEdinburgh
declare_counter attack_NotFailEdinburgh
declare_counter England_not_Local
monitor_event FactionTurnStart FactionType england
and IsFactionAIControlled
set_counter England_not_Local 1
terminate_monitor
end_monitor
monitor_event FactionTurnEnd FactionIsLocal
and I_IsFactionAIControlled scotland
and I_CompareCounter attack_NotFailEdinburgh = 2
and I_CharacterExists scotland4wallace
if I_SettlementOwner Edinburgh = scotland
console_command remove_trait scotland4wallace Script
terminate_monitor
end_if
if I_CharacterTypeNearTile scotland, named_character, 0, 58, 248
and I_CompareCounter attack_Edinburgh = 2
and I_SettlementUnderSiege Edinburgh
if I_SettlementOwner Edinburgh = england
and I_CompareCounter England_not_Local = 1
console_command auto_win attacker
end_if
siege_settlement scotland4wallace, Edinburgh, attack
set_counter attack_Edinburgh 5
end_if
if I_CharacterTypeNearTile scotland, named_character, 0, 59, 247
and I_CompareCounter attack_Edinburgh = 4
and I_SettlementUnderSiege Edinburgh
if I_SettlementOwner Edinburgh = england
and I_CompareCounter England_not_Local = 1
console_command auto_win attacker
end_if
siege_settlement scotland4wallace, Edinburgh, attack
set_counter attack_Edinburgh 5
end_if
end_monitor
;=====================ОСАДА===========================================
monitor_event PreFactionTurnStart FactionType scotland
and I_IsFactionAIControlled scotland
and I_CharacterExists scotland4wallace
and not I_SettlementUnderSiege Edinburgh
and I_CompareCounter wallace_spawned = 2
if I_SettlementOwner Edinburgh = scotland
console_command remove_trait scotland4wallace Script
terminate_monitor
end_if
if I_SettlementOwner Edinburgh = england
console_command diplomatic_stance scotland england war
end_if
if I_SettlementOwner Edinburgh = norway
console_command diplomatic_stance scotland norway war
end_if
if I_SettlementOwner Edinburgh = france
console_command diplomatic_stance scotland france war
end_if
if I_SettlementOwner Edinburgh = denmark
console_command diplomatic_stance scotland denmark war
end_if
if not I_CharacterTypeNearTile scotland, named_character, 0, 58, 248
reposition_character scotland4wallace, 58, 248
set_counter attack_Edinburgh 1
set_counter attack_FailEdinburgh 1
end_if
if I_CharacterTypeNearTile scotland, named_character, 0, 58, 248
and I_CompareCounter attack_Edinburgh = 1
and not I_SettlementOwner Edinburgh = scotland
console_command remove_trait scotland4wallace Script
siege_settlement scotland4wallace, Edinburgh, maintain
set_counter attack_Edinburgh 2
end_if
if not I_CharacterTypeNearTile scotland, named_character, 0, 58, 248
and I_CompareCounter attack_FailEdinburgh > 0
reposition_character scotland4wallace, 59, 247
set_counter attack_Edinburgh 3
end_if
if I_CharacterTypeNearTile scotland, named_character, 0, 59, 247
and I_CompareCounter attack_Edinburgh = 3
and not I_SettlementOwner Edinburgh = scotland
console_command remove_trait scotland4wallace Script
siege_settlement scotland4wallace, Edinburgh, maintain
set_counter attack_Edinburgh 4
end_if
if I_SettlementUnderSiege Edinburgh
set_counter attack_NotFailEdinburgh 2
end_if
end_monitor
;=============Aberdeen================================================================
declare_counter attack_Aberdeen
declare_counter attack_FailAberdeen
declare_counter attack_NotFailAberdeen
monitor_event FactionTurnEnd FactionIsLocal
and I_IsFactionAIControlled scotland
and I_CompareCounter attack_NotFailAberdeen = 2
and I_CharacterExists Helper_Of_Wallace
if I_SettlementOwner Aberdeen = scotland
console_command remove_trait Helper_Of_Wallace Script
terminate_monitor
end_if
if I_CharacterTypeNearTile scotland, named_character, 0, 61, 251
and I_CompareCounter attack_Aberdeen = 2
and I_SettlementUnderSiege Aberdeen
siege_settlement Helper_Of_Wallace, Aberdeen, attack
set_counter attack_Aberdeen 5
end_if
if I_CharacterTypeNearTile scotland, named_character, 0, 62, 252
and I_CompareCounter attack_Aberdeen = 4
and I_SettlementUnderSiege Aberdeen
siege_settlement Helper_Of_Wallace, Aberdeen, attack
set_counter attack_Aberdeen 5
end_if
end_monitor
;=====================ОСАДА===========================================
monitor_event PreFactionTurnStart FactionType scotland
and I_IsFactionAIControlled scotland
and I_CharacterExists Helper_Of_Wallace
and not I_SettlementUnderSiege Aberdeen
and I_CompareCounter wallace_spawned = 2
if I_SettlementOwner Aberdeen = scotland
console_command remove_trait Helper_Of_Wallace Script
terminate_monitor
end_if
if I_SettlementOwner Aberdeen = england
console_command diplomatic_stance scotland england war
end_if
if I_SettlementOwner Aberdeen = norway
console_command diplomatic_stance scotland norway war
end_if
if I_SettlementOwner Aberdeen = france
console_command diplomatic_stance scotland france war
end_if
if I_SettlementOwner Aberdeen = denmark
console_command diplomatic_stance scotland denmark war
end_if
if not I_CharacterTypeNearTile scotland, named_character, 0, 61, 251
reposition_character Helper_Of_Wallace, 61, 251
set_counter attack_Aberdeen 1
set_counter attack_FailAberdeen 1
end_if
if I_CharacterTypeNearTile scotland, named_character, 0, 61, 251
and I_CompareCounter attack_Aberdeen = 1
and not I_SettlementOwner Aberdeen = scotland
console_command remove_trait Helper_Of_Wallace Script
siege_settlement Helper_Of_Wallace, Aberdeen, maintain
set_counter attack_Aberdeen 2
end_if
if not I_CharacterTypeNearTile scotland, named_character, 0, 61, 251
and I_CompareCounter attack_FailAberdeen > 0
reposition_character Helper_Of_Wallace, 62, 252
set_counter attack_Aberdeen 3
end_if
if I_CharacterTypeNearTile scotland, named_character, 0, 62, 252
and I_CompareCounter attack_Aberdeen = 3
and not I_SettlementOwner Aberdeen = scotland
console_command remove_trait Helper_Of_Wallace Script
siege_settlement Helper_Of_Wallace, Aberdeen, maintain
set_counter attack_Aberdeen 4
end_if
if I_SettlementUnderSiege Aberdeen
set_counter attack_NotFailAberdeen 2
end_if
end_monitor