We present numerical simulations of magnetoacoustic wave propagation from the photosphere to the low chromosphere in a magnetic sunspot-like structure. A thick flux tube, with dimensions typical of a small sunspot, is perturbed by a vertical or horizontal velocity pulse at the photospheric level. The type of mode generated by the pulse depends on the ratio between the sound speed cS and the Alfvén speed vA, on the magnetic field inclination at the location of the driver, and on the shape of the pulse in the horizontal direction. Mode conversion is observed to occur in the region in which both characteristic speeds have similar values. The fast (magnetic) mode in the region cS<vA does not reach the chromosphere and reflects back to the photosphere at a somewhat higher layer than the cS=vA line. This behavior is due to wave refraction, caused primarily by the vertical and horizontal gradients of the Alfvén speed. The slow (acoustic) mode continues up to the chromosphere along the magnetic field lines with increasing amplitude. We show that this behavior is characteristic for waves in a wide range of periods generated at different distances from the sunspot axis. Since an important part of the energy of the pulse is returned back to the photosphere by the fast mode, the mechanism of energy transport from the photosphere to the chromosphere by waves in sunspots is rather ineffective.