What treaty ended the war in which the Battle of Vác was fought?
Battle of Vác (1684): The Battle of Vác was fought on June 27, 1684, near the city of Vác in central Hungary, between the forces of the Ottoman Empire, and the forces of the Holy Roman Empire as part of the Great Turkish War. Great Turkish War:  Intensive fighting began in 1683 and ended with the signing of the Treaty of Karlowitz in 1699.
Treaty of Karlowitz