<?xml version="1.0" encoding="windows-1251"?>
<LevelScripts>
  <Script>
    <!--Action type="SetLevelVar" var="MaxBuildingUpgradeLevel" value="1" /-->
    <Action type="SetLevelVar" var="HousesGenerateBonuses" value="false" />
    <Action type="SetLevelVar" var="BuildingsCanGetBroken" value="false" />
    <Action type="SetLevelVar" var="SkipTutorialButtonVisible" value="true" />

    <Action type="ShowSpeechModal" text="Script.04.Intro" character="Assistant" />

    <!--Просим выбрать закладку с УКРАШЕНИЯМИ-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.HudPageScenery" />
    <Action type="ShowArrow" overHudItem="DecorTab" untilSwitch="Switch.DecorationsTabActivated" />
    <Action type="ShowSpeechUntilSwitch" text="Script.04.ConstructFountain1" character="Assistant" switch="Switch.DecorationsTabActivated" posY="550" />
    <Action type="WaitDecorationsTabActivated" />
    <Action type="SetSwitch" switch="Switch.DecorationsTabActivated" />
    <Action type="WaitSpeechTextHidden" />

    <!--Просим нажать кнопку ФОНТАН-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.HudButtonFountain" />
    <Action type="ShowArrow" overHudItem="TabBtn2" untilSwitch="Switch.FountainPlaceStarted" />
    <Action type="ShowSpeechUntilSwitch" text="Script.04.ConstructFountain2" character="Assistant" switch="Switch.FountainPlaceStarted" posY="550" />
    <Action type="WaitStartPlaceBuilding" building="Fountain" />
    <Action type="SetSwitch" switch="Switch.FountainPlaceStarted" />
    <Action type="WaitSpeechTextHidden" />

    <!--Просим поставить фонтан у дома.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.HudButtonFountain+InputMask.Map" mouse2="false" mouse3="false" />
    <Action type="ShowArrow" point="390 410" rotation="270" untilSwitch="Switch.FountainPlaced" />
    <Action type="SetLevelVar" var="FixedConstructionRectangle" value="10 11 1 1" />
    <Action type="ShowSpeechUntilSwitch" text="Script.04.ConstructFountain3" character="Assistant" switch="Switch.FountainPlaced" />
    <Action type="WaitBuildingPlaced" buildingKind="Fountain"/>
    <Action type="SetSwitch" switch="Switch.FountainPlaced" />
    <Action type="SetLevelVar" var="FixedConstructionRectangle" value="0 0 0 0" />

    <Action type="ShowArrow" overBuildingId="BrickHouse" overHudItem="Bonus" untilSwitch="Switch.BonusExplained" />
    <Action type="ShowSpeechModal" text="Script.04.ConstructFountain4" character="Assistant" mood="happy" />
    <Action type="SetSwitch" switch="Switch.BonusExplained" />

    <!--Индикатор внешнего вида.-->
    <Action type="ShowArrow" overHudItem="Appearance" untilSwitch="Switch.AppearanceRating" />
    <Action type="ShowSpeechModal" text="Script.04.AppearanceRating" character="Assistant" pauseGame="false" />
    <Action type="SetSwitch" switch="Switch.AppearanceRating" />

    <!--Просим поставить дерево у дома.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.Map+InputMask.HudButtonTree" mouse2="false" mouse3="false" />
    <Action type="ShowArrow" overHudItem="TabBtn1" untilSwitch="Switch.TreePlaceStarted" />
    <Action type="ShowSpeechUntilSwitch" text="Script.04.ConstructTree" character="Assistant" switch="Switch.TreePlaced" />
    <Action type="WaitStartPlaceBuilding" building="Tree" />
    <Action type="SetSwitch" switch="Switch.TreePlaceStarted" />
    <Action type="SetLevelVar" var="FixedConstructionRectangle" value="10 10 1 1" />
    <Action type="ShowArrow" point="390 370" rotation="270" untilSwitch="Switch.TreePlaced" />
    <Action type="WaitBuildingPlaced" buildingKind="Tree"/>
    <Action type="SetSwitch" switch="Switch.TreePlaced" />
    <Action type="SetLevelVar" var="FixedConstructionRectangle" value="0 0 0 0" />

    <!--Продаем кирпичный дом.-->
    <Action type="ShowArrow" overBuildingId="BrickHouse" overHudItem="Bonus" untilSwitch="Switch.BonusExplained2" />
    <Action type="ShowSpeechModal" text="Script.04.SellHouse1" character="Assistant" mood="happy" />
    <Action type="SetSwitch" switch="Switch.BonusExplained2" />
    <Action type="CancelUserActions" />

    <!--Выбрать дом и нажать продать.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingsOwned" />
    <Action type="ShowArrow" overBuildingId="BrickHouse" rotation="270" untilSwitch="Switch.BrickHouseSelected" />
    <Action type="ShowSpeechUntilSwitch" text="Script.04.SellHouse2" character="Assistant" switch="Switch.HouseSaleStarted" />
    <Action type="WaitBuildingSelected" buildingId="BrickHouse" />
    <Action type="SetSwitch" switch="Switch.BrickHouseSelected" />

    <!--Нажмем кнопку ПРОДАТЬ.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingSell" />
    <Action type="ShowArrow" overBuildingId="BrickHouse" overHudItem="SellBtn" untilSwitch="Switch.HouseSaleStarted" />
    <Action type="WaitBuildingSaleStarted" />
    <Action type="SetSwitch" switch="Switch.HouseSaleStarted" />

    <!--Установить цену.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.SellDialogPlusMinus" />
    <Action type="ShowSpeechUntilSwitch" text="Script.04.SellHouse3" character="Assistant" switch="Switch.SaleOrderSet" />
    <Action type="WaitBuildingSaleOffer" offer="8000" />
    <Action type="SetSwitch" switch="Switch.SaleOrderSet" />

    <!--Нажать ОК.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.SellDialogOK" />
    <Action type="ShowSpeechUntilSwitch" text="Script.04.SellHouse4" character="Assistant" switch="Switch.HouseDisplayedForSale" />
    <Action type="WaitBuildingDisplayedForSale" value="3000" />
    <Action type="SetSwitch" switch="Switch.HouseDisplayedForSale" />

    <Action type="SetLevelVar" var="CanCancelSale" value="false" />

    <Action type="SetInputFilter" active="false" />
    <Action type="ShowSpeechModal" text="Script.04.SellHouse7" pauseGame="false"  character="Assistant" />

    <!--Подождем пока домик будет продан.-->
    <Action type="Wait" untilSwitch="Switch.BrickHouseSelled" />

    <Action type="SetLevelVar" var="CanCancelSale" value="true" />

    <Action type="SetBuildingVar" buildingId="House1" var="IsUnmarketable" value="false" />
    <Action type="SetBuildingVar" buildingId="House2" var="IsUnmarketable" value="false" />
    <Action type="SetBuildingVar" buildingId="BrickHouse" var="IsUnmarketable" value="true" />

    <Action type="ShowSpeechModal" text="Script.04.SellHouse6" character="Assistant" mood="happy" pauseGame="false" />
    <Action type="ShowSpeechModal" text="Script.04.SellHouse8" character="Assistant" pauseGame="false" />

    <Action type="SetSwitch" switch="Switch.HouseSaleExplained" />
  </Script>

  <Script>
    <Action type="WaitBuildingSelled" buildingId="BrickHouse" />
    <Action type="SetSwitch" switch="Switch.BrickHouseSelled" />
  </Script>

  <!--Скрипт по благотворительным чекам.-->
  <Script>
    <Action type="Wait" untilSwitch="Switch.HouseSaleExplained" />

    <!--Ждем Дохода 2800.-->
    <Action type="WaitGoalCompleted" goalId="Goal.Income2800" />

    <!--Генерим чек.-->
    <Action type="DropCheck" buildingKind="Any" setBuildingId="CheckBuilding" />
    <Action type="Wait" duration="1.0" />

    <!--Показываем на дом с чеком.-->
    <Action type="CancelUserActions" />
    <Action type="ShowArrow" overBuildingId="CheckBuilding" untilSwitch="Switch.CheckCollected" />
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingsOwned" />
    <Action type="ShowSpeechModal" text="Script.04.Check1" character="Assistant" 
            posY="600" pauseGame="false"/>
    <Action type="ShowSpeechUntilSwitch" text="Script.04.Check2" character="Assistant"  
            switch="Switch.CheckCollected" posY="600" />
    <Action type="WaitBuildingCheckCollected" buildingId="CheckBuilding" />
    <Action type="SetSwitch" switch="Switch.CheckCollected" />

    <Action type="ShowSpeechModal" text="Script.04.Check3" character="Assistant" posY="600" />

    <Action type="SetInputFilter" active="false" />
    <Action type="SetLevelVar" var="HousesGenerateBonuses" value="true" />
  </Script>
  
</LevelScripts>