I can’t remember which building this was, but it’s definitely from a building in Istanbul. From what I remember from the tour guide’s explanation, back in the day, soldiers would drop hot oil on invading enemies using the drops on either side of the wall and then set their enemies on fire.
I tried searching for more information on the building and how it was used but I couldn’t find much. I did find that in other parts of Europe, they were referred to as murder holes and Machicolations, and boiling water was probably used, as oil was more expensive and harder to keep ready.