De Lannoy built the Nedumkotta, a line of fortifications in the North of the Kingdom, known as the Travancore Lines. This fortification proved immensely useful in defending the kingdom against the attacks of Tipu Sultan and other marauders. It was erased by Tipu Sultan in an act of revenge for having been defeated in his attempt to subdue Travancore in 1789. It had a length of 40 km and extended from the sea near Vypeen Island to the Ghats. Just before returning to Mysore after his failed attempt, he spent six days to demolish the Lines which he called 'the Contemptible Wall'. He had sworn to demolish it earlier after his failed attempt to breach it on 28 December 1789, and lost 2000 soldiers in that single night, due to the spirited defence by the Cadres, for the loss of just a few soldiers of Travancore.