<?xml version="1.0" encoding="windows-1251"?>
<LevelScripts>
  <Script>
    <Action type="ShowSpeechModal" text="Script.07.Intro3" character="Assistant" />

    <!--Ждем фургонов и бабок.-->
    <Action type="WaitGoalCompleted" goalId="Goal.50K, Goal.Vans" />
    <Action type="SetGoalActive" active="false" goalId="Goal.50K" />

    <!--Расскажем про мост, если еще не.-->
    <Action type="SetSwitch" switch="Switch.ExplainBridgeGoal" />
    <Action type="Wait" untilSwitch="Switch.BridgeGoalExplained" />

    <!--Попросим выбрать мост.-->
    <Action type="CancelUserActions" />
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingsOwned" />
    <Action type="ShowArrow" overBuildingId="Bridge" untilSwitch="Switch.BridgePicked" />
    <Action type="ShowSpeechUntilSwitch" text="Script.07.ConstructBridge1" character="Assistant" switch="Switch.BridgePicked" />
    <Action type="WaitBuildingSelected" buildingKind="Bridge" />
    <Action type="SetSwitch" switch="Switch.BridgePicked" />

    <Action type="SetInputFilter" active="false" />

    <!--Попросим кликнуть по кнопке.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingBuy" />
    <Action type="ShowArrow" overBuildingId="Bridge" overHudItem="ConstructBtn" untilSwitch="Switch.BridgeConstructionOrdered" />
    <Action type="ShowSpeechUntilSwitch" text="Script.07.ConstructBridge2" character="Assistant" switch="Switch.BridgeConstructionOrdered" />
    <Action type="WaitSpecialConstructionStarted" buildingKind="Bridge" />
    <Action type="SetSwitch" switch="Switch.BridgeConstructionOrdered" />

    <Action type="SetInputFilter" active="false" />
    <Action type="ShowSpeechSimple" text="Script.07.ConstructBridge3" character="Assistant" duration="4" />

    <!--Ждем пока будет построен мост.-->
    <Action type="WaitGoalCompleted" goalId="Goal.Bridge" />

    <Action type="ShowSpeechModal" text="Script.07.MakeIncome" character="Assistant" />
  </Script>

  <!--Когда у игрока будет 3 дуплекса попросим купить третий фургон.-->
  <Script>
    <Action type="WaitGoalCompleted" goalId="Goal.Duplexes,Goal.10K" />
    <Action type="SetGoalActive" active="false" goalId="Goal.10K" />

    <!--Расскажем про мост, если еще не.-->
    <Action type="SetSwitch" switch="Switch.ExplainBridgeGoal" />
    <Action type="Wait" untilSwitch="Switch.BridgeGoalExplained" />

    <!--Пауза, чтобы триггер мог отрубить тутор по фургонам, если они куплены.-->
    <Action type="Wait" duration="1.0" />

    <Action type="Wait" untilSwitch="Switch.ShowVansMessage" />
    <Action type="SetGoalVisible" goalId="Goal.Vans" visible="true" />
    <Action type="CancelUserActions" />

    <!--Попросим выбрать офис.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingsOwned" />
    <Action type="ShowArrow" overBuildingId="Office" untilSwitch="Switch.OfficePicked" />
    <Action type="ShowSpeechUntilSwitch" text="Script.07.BuyWorkers1" character="Assistant" switch="Switch.OfficePicked" />
    <Action type="WaitBuildingSelected" buildingKind="Office" />
    <Action type="SetSwitch" switch="Switch.OfficePicked" />

    <!--Попросим кликнуть по кнопке.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapOfficeBuyVan" />
    <Action type="ShowArrow" overBuildingId="Office" overHudItem="BuyVanBtn" untilSwitch="Switch.VanOrdered" />
    <Action type="ShowSpeechUntilSwitch" text="Script.07.BuyWorkers2" character="Assistant" switch="Switch.VanOrdered" />
    <Action type="WaitOfficeVanOrderingStarted" />
    <Action type="SetSwitch" switch="Switch.VanOrdered" />

    <Action type="SetInputFilter" active="false" />
  </Script>

  <!--Когда у игрока будет 3 фургона попросим накопить 50К.-->
  <Script>
    <Action type="WaitGoalCompleted" goalId="Goal.Duplexes,Goal.Vans" />
    <Action type="Wait" untilSwitch="Switch.Show50KMessage" />

    <Action type="ShowArrow" OverHudItem="BankAccount" untilSwitch="Switch.MessageMake50KHidden" />
    <Action type="ShowSpeechModal" text="Script.07.Make50K" character="Assistant" />
    <Action type="SetSwitch" switch="Switch.MessageMake50KHidden" />
  </Script>

  <!--Ждем когда игрок ляпнет дом на правом берегу.-->
  <Script>
    <Action type="WaitBuildingPlacedWithoutRoadOnEastCoast" setBuildingId="BuildingWithoutRoad" />

    <!--Расскажем про мост, если еще не.-->
    <Action type="SetSwitch" switch="Switch.ExplainBridgeGoal" />
    <Action type="Wait" untilSwitch="Switch.BridgeGoalExplained" />

    <!--Расскажем про кнопку ОТМЕНА.-->
    <Action type="CancelUserActions" />
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingsOwned" />
    <Action type="ShowArrow" overBuildingId="BuildingWithoutRoad" untilSwitch="Switch.BuildingWithoutRoadSelected" />
    <Action type="ShowSpeechUntilSwitch" text="Script.07.Cancel1" character="Assistant" switch="Switch.BuildingWithoutRoadCanceled"/>
    <Action type="WaitBuildingSelected" buildingId="BuildingWithoutRoad" />
    <Action type="SetSwitch" switch="Switch.BuildingWithoutRoadSelected" />

    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingCancel" />
    <Action type="ShowArrow" overBuildingId="BuildingWithoutRoad" overHudItem="CancelBtn" untilSwitch="Switch.BuildingWithoutRoadCanceled" />
    <Action type="WaitBuildingActionCanceled" buildingId="BuildingWithoutRoad" />
    <Action type="SetSwitch" switch="Switch.BuildingWithoutRoadCanceled" />
    <Action type="ShowSpeechModal" text="Script.07.Cancel2" character="Assistant" />
    <Action type="SetInputFilter" active="false" />
  </Script>

  <!--Вся история с мостом.-->
  <Script>
    <Action type="Wait" untilSwitch="Switch.ExplainBridgeGoal" />
    <Action type="ShowSpeechModal" text="Script.07.Bridge1" character="PaulEvans" />
    <Action type="ShowSpeechModal" text="Script.07.Bridge2" character="PaulEvans" />

    <Action type="SetGoalActive" active="true" goalId="Goal.Bridge" />

    <Action type="SetSwitch" switch="Switch.BridgeGoalExplained" />

    <!--Теперь мона и про фургоны и про 50К.-->
    <Action type="SetSwitch" switch="Switch.Show50KMessage" />
    <Action type="SetSwitch" switch="Switch.ShowVansMessage" />
  </Script>

  <!--Отменим сообщение о трех фургонах, если юзер их купил до постройки дуплексов.-->
  <Script>
    <Action type="WaitGoalCompleted" goalId="Goal.Vans" />
    <Action type="WaitGoalCompleted" goalId="Goal.Duplexes" />
    <Action type="Wait" untilSwitch="Switch.BridgeGoalExplained" />
    <Action type="ClearSwitch" switch="Switch.ShowVansMessage" />
  </Script>

  <!--Отменим сообщение о 50К, если юзер их накопил до покупки фургона.-->
  <Script>
    <Action type="WaitGoalCompleted" goalId="Goal.50K" />
    <Action type="WaitGoalCompleted" goalId="Goal.Vans" />
    <Action type="Wait" untilSwitch="Switch.BridgeGoalExplained" />
    <Action type="ClearSwitch" switch="Switch.Show50KMessage" />
  </Script>
  
</LevelScripts>