<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Quest SName="tag" RName="tag" LName="tag">
  <ScaleEffect X="75" Y="185" Effect="1" StartScale="0" />

  <MoveX>
    <PosBegin Value="-100" />
    <Type Value="SIN" />
    <Delay Value="0" />
    <IsRandom Value="0" />
    <IsResetCycle Value="0" />
    <Params A="100" B="360" F="90"/>
    <TimeFunction Timer="0" Loop="1" MaxCount="0" K="1" B="0" />
  </MoveX>
  <MoveY>
    <PosBegin Value="0" />
    <Type Value="SIN" />
    <Delay Value="0" />
    <IsRandom Value="0" />
    <IsResetCycle Value="0" />
    <Params A="100" B="360" F="0"/>
    <TimeFunction Timer="0" Loop="1" MaxCount="0" K="1" B="0" />
  </MoveY>
  <MoveS>
    <PosBegin Value="1" />
    <Type Value="LINEAR" />
    <Delay Value="0" />
    <IsRandom Value="0" />
    <IsResetCycle Value="0" />
    <Params A="0" V="0.5" B="0"/>
    <TimeFunction Timer="0" Loop="1" MaxCount="0" K="1" B="0" />
  </MoveS>
  <Tasks>
    <Task Type="REQUEST_TASKS" NameOfRequest="MiniQuestEnter" />
    <Task Type="ADD_MARK" Key="Global" Name="LastMiniQuest" Value="tag" Mode="String"/>
  </Tasks>
  
  <Functionals>

    <Functional>
      <Type Value="ITEM" />
      <Id Name="tag22" Order="1" SubId="356" />
      <Design Key="default" Name="tag22" />
<!--      <Description Key="hint" Name="6" />-->
      <Enable Value="0" />
      <Visible Value="0" />
      <IsOnceAction Value="0" />
      <MoveX>
        <Type Value="STATIC" />
        <PosBegin Value="443" />
      </MoveX>
      <MoveY>
        <Type Value="STATIC" />
        <PosBegin Value="240" />
      </MoveY>
    </Functional>
    
    <Functional>
      <Type Value="ITEM" />
      <Id Name="game-ninths_lost" Order="1" SubId="356" />
      <Mask Key="mask" Name="tag_m" />
<!--      <Description Key="hint" Name="6" />-->
      <Enable Value="0" />
      <Visible Value="0" />
      <IsOnceAction Value="0" />
      <MoveX>
        <Type Value="STATIC" />
        <PosBegin Value="443" />
      </MoveX>
      <MoveY>
        <Type Value="STATIC" />
        <PosBegin Value="240" />
      </MoveY>
      <TasksOnDeny>
          <Task Type="SET_SOUND" Mode="DelayPlay" Name="search_denied2.ogg" Delay="100"/>
          <Task Type="SET_SCENE" Mode="Set" Name="darktomb"/>
          <Task Type="TOPDESCRIPTION" SKey="hint" SName="6" />
          <Task Type="SET_SCENE" Mode="Reset"/>
      </TasksOnDeny>
      <Puzzles>
        <Puzzle Name="scarab_install" X="0" Y="0" W="1" H="1" >
          <Tasks>
            <Task Type="VISIBLE" Param1="tag22" Param2="1" Instant="0" />
            <Task Type="QUEUE" Mode="begin" Name="ninths_install" />
            <Task Type="DELAY" Delay="1500" />
            <Task Type="ADD_MARK" Param1="tag" Param2="State" Param3="4" />
            <Task Type="SET_SCENE" Mode="Set" Name="darktomb"/>
            <Task Type="ADD_MARK" Key="darktomb" Name="lost9_put" Value="1" />
<!--            <Task Type="REQUEST_TASKS" Param1="lost9" />-->
            <Task Type="SET_SCENE" Mode="Reset"/>
            <Task Type="QUEUE" Mode="end" />
          </Tasks>
        </Puzzle>
      </Puzzles>
      <Cursor Key="default" Name="mechanic" />
      <Tasks>
      </Tasks>
    </Functional>
 </Functionals>
 
 
 <RequestTasks>

    <RequestTask Name="QuestOnBegin">
      <Condition>
        <Var Key="tag" Name="State" Value="0" />
      </Condition>
      <Tasks>
        <Task Type="ADD_MARK" Param1="tag" Param2="State" Param3="2" />
      </Tasks>
    </RequestTask>

    <RequestTask Name="GameOnBegin">
      <Condition>
        <Var Key="tag" Name="State" Value="2" />
      </Condition>
      <Tasks>
      </Tasks>
    </RequestTask>

    <RequestTask Name="GameOnWinOrPass">
      <Condition>
        <Var Key="tag" Name="State" Value="3" />
      </Condition>
      <Tasks>
        <Task Type="REQUEST_TASKS" NameOfRequest="manual_hide" />
        <Task Type="ADD_MARK" Key="darktomb" Name="game-ninths_disable" Value="1" />
        <Task Type="ADD_MARK" Key="darktomb" Name="game-ninths_end" Value="1" />
          <Task Type="SET_SCENE" Mode="Set" Name="darktomb"/>
          <Task Type="TOPDESCRIPTION" SKey="hint" SName="6" />
          <Task Type="SET_SCENE" Mode="Reset"/>
        <!--<Task Type="QUEUE" Mode="begin" Name="game-ninths_ready" />-->
<!--        <Task Type="DELAY" Delay="10" />
        <Task Type="SET_SCENE" Mode="Set" Name="darktomb"/>
        <Task Type="REQUEST_TASKS" Param1="game-ninths_finished" />
        <Task Type="SET_SCENE" Mode="Reset"/>-->
        <!--<Task Type="DELAY" Delay="1500" />-->
        <!--<Task Type="QUEUE" Mode="end" />-->
        <Task Type="ENABLE" Param1="game-ninths_lost" Param2="1" Param3="0" />
        <Task Type="EMULATE_HINT" Action="UsrEvt" Name="game-ninths_win"/>
        <!--<Task Type="SET_SCENE" Mode="Set" Name="darktomb"/>

        <Task Type="ENABLE" Param1="game-ninths" Param2="0" Param3="0" />
        <Task Type="ENABLE" Param1="game-ninths_lost" Param2="1" Param3="0" />
        <Task Type="VISIBLE" Param1="game-ninths" Param2="0" />
        <Task Type="VISIBLE" Param1="game-ninths_lost" Param2="1" Param3="0" Param4="200"/>
        <Task Type="ADD_MARK" Key="darktomb" Name="game-ninths_disable" Value="1" />

        <Task Type="SET_SCENE" Mode="Reset"/>

        <Task Type="SCENE" Mode="Exit" Name="tag"/>-->
      </Tasks>
    </RequestTask>

    <RequestTask Name="GameOnLose">
      <Condition>
        <Var Key="no" Name="no" Value="0" />
      </Condition>
      <Tasks>
        <Task Type="REQUEST_TASKS" NameOfRequest="close" />
      </Tasks>
    </RequestTask>

    <RequestTask Name="GameOnCancel">
      <Condition>
        <Var Key="no" Name="no" Value="0" />
      </Condition>
      <Tasks>
        <Task Type="REQUEST_TASKS" NameOfRequest="close" />
      </Tasks>
    </RequestTask>

    <RequestTask Name="QuestOnEnd">
      <Condition>
        <Var Key="tag" Name="State" Value="4" />
      </Condition>
      <Tasks>
        <Task Type="REQUEST_TASKS" NameOfRequest="close" />
      </Tasks>
    </RequestTask>
    <RequestTask Name="manual_show">
      <Condition>
        <Var Key="no" Name="no" Value="0" />
      </Condition>
      <Tasks>
        <Task Type="SET_ANIMATIONTOOL" ResName="tag" AKey="default" AName="manual" CtrlName="manual" RX="512" RY="315" SX="207" SY="10" SW="610" SH="610" RequestName="manual_hide" Angle="0" IsFlickr="0"/>
      </Tasks>
    </RequestTask>
  </RequestTasks>
</Quest>
