The best route is NW, NE, S, get the lamp, N, SW, S, get twigs, W, get coin, N, up, down - and you are ready to enter the castle. Save because you will die often. There are 50 ways to die - well 49 really, but one way is worse than death.
Haha, reminds me of my old Atari. I had this book with thousands of lines of code you had to overtype. Then, after inserting all that code you got an adventure game just like this one. It was all text and no graphics. You had to choose your direction by choosing N, W, E, S. And you always had to note down on a paper what steps you had taken. Otherwise you got lost. Or killed.
I forgot to take notes on this one :-D So I got lost. I did find the lamp, the branches and the coin though...
Loved what happened if you rubbed the lamp and climbed a tree.
That lamp is tricky. It needs recharging. You can do that at the fountain of youth but that can also destroy it completely. There's a second lamp more like the one you were thinking about. It's broken though and has a bullet hole through it. The fountain of youth will repair it BUT having a functioning genie lamp is not quite the advantage you expect because the genie is an ex-lawyer. He will grant your wishes but not the way you are thinking of.