<?xml version="1.0" encoding="windows-1251"?>
<LevelScripts>

  <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  ИНИЦИАЛИЗАЦИЯ И ВВЕДЕНИЕ -->
  <Thread>
    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Устанавливаем особенную финальную речь. -->
    <SetLevelVar var="GoalsCompletedSpeechCharacter" value="BrentAlexander" />
    <SetLevelVar var="GoalsCompletedSpeechText" value="17.Done" />

    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Велкам от третьего президента Gilbert Davis. -->
    <WaitClick text="17.Intro1" character="BrentAlexander" />
    <WaitClick text="17.Intro2" character="BrentAlexander" />

    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Когда игрок построит первую виллу, нужно тыкать стрелкой на
    закладку с украшениями, а, когда игрок зайдет на нее, то тыкать
    на кнопку с бассейном. -->
    <WaitEvent event="BuildingConstructed.Villa" />

    <If condition="NOT IsFlagSet.SwimmingPoolAlreadyUsed" >
      <WaitCondition condition="TabIsSelected.Scenery" timeout="5" >
        <Arrow target="Hud.ButtonSceneryTab" />
      </WaitCondition>

      <WaitCondition condition="TabIsSelected.Scenery" />
      <WaitCondition condition="TabIsSelected.SceneryLine1 OR NOT TabIsSelected.Scenery" timeout="5" >
        <Arrow target="Hud.ButtonSceneryNext" />
      </WaitCondition>

      <WaitCondition condition="TabIsSelected.SceneryLine1" />
      <WaitCondition condition="IsPlacingBuilding.SwimmingPool OR NOT TabIsSelected.SceneryLine1" timeout="5" >
        <Arrow target="Hud.ButtonSwimmingPool" />
      </WaitCondition>
    </If>
  </Thread>

  <Thread>
    <WaitEvent event="BuildingPlaced.SwimmingPool" />
    <SetFlag flag="SwimmingPoolAlreadyUsed" />
  </Thread>

</LevelScripts>