trying to find / remember the name of a game

this is going back a REALLY LONG TIME

most likely a DOS game

all I can remember is that you start in a set of stocks inside some sort of prison / castle and that it was a medieval themed gamed with (I think) magic and stuff

you had to break out and I have a brief memory of an animation where you're sliding down a long wall / tunnel from the first person perspective, this was at the very start

can't remember if you had to rescue the princess, or some beauty of a girl, the name esmeralda rings a bell for some reason

now I think about it, i recall a part where you have to sneak into a house that has a lot of science apparatus and the game was over if you got caught by a patrolling guard

pretty sure it was an adventure / point and click kind of game

any ideas?