if flags.vedro then
  speciale_action(2,9)
  speciale_action(2,10)
end

if flags.kran then
  speciale_action(2,7)
  speciale_action(2,8)
  setCursor(17,4)
end

if flags.voda then
  speciale_action(2,4)
  del_object_from_game(17)
  setCursor(17,3)
end

function gameinput (sender,obj_id,attachedID)
  MiniInterfaceHandler(sender, obj_id);
  sendersProcessing(sender, obj_id, attachedID);
  if wrongItemWarning(sender, obj_id, attachedID, "tryapka_6_1", "vedro_3_0", "kran_8_0") then
    return
  end
  if sender==1 then
    if obj_id == 19 then
      if flags.vedro then
        if flags.voda then
          if obj.tryapka_6_1 and attachedID == obj.tryapka_6_1.id then
            Block_Show_Cur(true)
            removeFromMouse()
            playeffect("tryapka")
            UnStoreObj(obj.tryapka_6_1.id)
            StartTimer(timerID,0.55,"frame5")
            speciale_action(2,3,true,0.5)
            setCursor(19,3)
          else
            CreatePlashechka("620")
          end
        else
          CreatePlashechka("635")
        end
      else
        if obj.vedro_3_0 and attachedID == obj.vedro_3_0.id then
          removeFromMouse()
          UnStoreObj(obj.vedro_3_0.id)
          playeffect("vedro")
          flags.vedro = true
          speciale_action(2,9,true,0.5)
          speciale_action(2,10,true,0.5)
        else
          CreatePlashechka("618")
        end
      end
    end
    if obj_id == 17 then
      if flags.kran then
        if flags.vedro then
          Block_Show_Cur(true)
          playeffect("vent_rot")
          speciale_action(2,6,true,0.4)
          speciale_action(2,7,true,0.4)
          StartTimer(timerID,0.41,"frame1")
          flags.voda = true
          setCursor(17,3)
        else
          CreatePlashechka("618")
        end
      else
        if obj.kran_8_0 and attachedID == obj.kran_8_0.id then
          removeFromMouse()
          UnStoreObj(obj.kran_8_0.id)
          playeffect("ventil")
          flags.kran = true
          Block_Show_Cur(true)
          StartTimer(timerID,0.6,"unBlock_Show_Cur")
          speciale_action(2,7,true,0.5)
          speciale_action(2,8,true,0.5)
          setCursor(17,4)
        else
          CreatePlashechka("619")
        end
      end
    end
  end
  if sender == 26 then
  --  CloseSatelite()
  end
end

function frame1()
  speciale_action(2,6,true,0.4)
  speciale_action(2,5,true,0.4)
  StartTimer(timerID,0.41,"frame2")
end

function frame2()
  speciale_action(2,7,true,0.4)
  speciale_action(2,5,true,0.4)
  StartTimer(timerID,0.41,"frame3")
end

function frame3()
  speciale_action(2,7,true,0.4)
  speciale_action(2,6,true,0.4)
  playeffect("water")
  StartEmiter("water_5_0");
  StartTimer(timerID,3,"frame4")
end

function frame4()
  speciale_action(2,4,true,1)
  StopEmiter("water_5_0",true)
  StartTimer(timerID,1.1,"unBlock_Show_Cur")
end

function frame5()
  StartTimer(timerID,0.55,"frame6")
  speciale_action(2,4,true,0.5)
  speciale_action(2,3,true,0.5)
  speciale_action(2,2,true,0.5)
end

function frame6()
  StartTimer(timerID,0.55,"frame7")
  speciale_action(2,1,true,0.5)
  speciale_action(2,2,true,0.5)
end

function frame7()
  Block_Show_Cur(false)
    speciale_action(2,1,true,0.5)

  StoreObj(obj.tryapkaMokraya_5_14.id)
  neighbors.Kranik.lock = true
  neighbors.MuzeyHidden.lock = false
end