Getting a Suitable Lamp
Night Mare will take you back to the Isle of the Crown, where King Caliphim and Queen Allaria will head off to rally their supporters. In the meantime, it's time for you to get into the castle. But you have a couple of things you need to do first.
For one thing, you have a white rose that you've been meaning to send to Cassima for a while now, but you've been a little busy. Now that you're finally back on the Isle of the Crown, go to the tree at the fork in the road and USE the white rose on Sing Sing [1]. Sing Sing will fly off, and a brief cutscene will play where Cassima tells Sing Sing not to return to Alexander so as not to endanger him. Hmm, nothing else from Cassima? Well, hopefully you'll be seeing her soon enough. You have everything you need for the Magic Paint spell except for a paintbrush, and you know just where to get that. Head to the village and enter the pawn shop.
It looks like the genie is hanging around, disguised as an old man again. Wait, didn't Jollo suggest that you try to convince the vizier that you'd died? You know the Drink Me potion from the Isle of Wonder will allow you to fake your own death, and with the genie here, this is a golden opportunity. USE the Drink Me potion on yourself in the pawn shop [3]. Alexander will very dramatically announce that he's killing himself with poison, drink the potion, and seemingly "die". The genie will be delighted, and head straight off to tell Alhazred the good news. Play close attention to the cutscene that follows, as it'll tell you something very important, namely what the genie's lamp looks like.
After the cutscene, Alexander will come to, leaving the pawn shop owner somewhat bemused at what just happened. The only thing left to do here is to get the paintbrush for the Magic Paint spell. USE the tinderbox on the pawn shop owner, and take the paintbrush. Leave the shop.
By happy coincidence, the lamp seller from the beginning of the game has returned to town, and just when you're ready to trade him an old lamp for a new one. You already made good use of your lamp as a mock teapot for the Make Rain spell, so you don't need it anymore. USE the lamp on the lamp seller, and he'll give you a selection of lamps to choose from. You now know that the genie's lamp is blue, with a round base and a tall, thin neck. Use the HAND on the lamp that fits that description (it's the second one from the right) to take it [1]. The lamp seller will walk off, but not before rubbing the lamp you gave him. That one's a dud, but yours isn't: with a lamp that's an exact replica of the genie's, Jollo can help you acquire the genie's lamp and become his master.
Magic Paint
At long last, it's time to enter the castle. Walk back to the castle entrance. Of course, you can't use the magic paint here in front of the guards: they're not that stupid. Walk one screen west to the side wall of the castle.
Your teacup now contains the appropriate mix of swamp ooze and River Styx water: the next step is to stir the mixture with a long black feather. Bet you wondered if you'd ever use the feather you found on the Isle of the Sacred Mountain, didn't you? Well, wonder no more: it's finally going to come in handy. Go to the inventory screen, and USE the feather on the teacup [1]. Alexander will stir the mixture with the feather, which in retrospect was clearly from Night Mare, and the black color will run into the mixture. Now you're ready to do some painting. USE the paintbrush on the wall [1], and Alexander will paint a door there.
Once you've finished painting, go to the inventory screen and USE the hand on the spell book to read it. Use the page turn icon to go to the page with the Magic Paint spell, and use the CAST icon to cast the spell [4]. Once Alexander casts the spell, the painted door will turn into a real door. Use the HAND icon to enter the door [2]. Finally, Alexander has made it into the castle!
The Castle Basement
Once Alexander enters the castle, the doorway created by the spell will immediately disappear. Looks like Alexander will have to find another way out of the castle. But first, you need to do some exploring. You're in a hallway with three doors on the right-hand side: use the HAND on the middle one to enter it.
Inside, you'll find a little boy ghost crying for his mother. You just met a mother ghost who was lamenting that her son was lost: could this be her son? USE the handkerchief the mother ghost gave you on the little boy ghost [3], and it'll become clear that he is indeed her son, and can finally join his mother in the Realm of the Dead. Before he leaves, though, he'll tell you something very important: the suit of armor in the north hallway has a secret passage behind it. You'll put that to use very soon, but you have one more stop to make while you're down here. Leave the dungeon cell and walk one screen east. You'll find yourself in a hallway with a door in the right-hand wall, and a door up a flight of stairs. Do not go up the stairs: that door leads to the main hallway, which is crawling with guards. You do want to try the other door, though, as that leads to Jollo's room. Use the HAND on the door in the right-hand wall to enter his room.
Jollo will be in his room as you enter, and he'll be confused as to how you got in, but very pleased to see you. He'll tell you that the princess is upstairs, but you can't just go up there openly: there are guard dogs everywhere, and without proof of Alhazred's evil intentions, they're your enemies, not his. Maybe you can find that proof elsewhere in the castle. He'll also remind you that he might be able to steal the genie's lamp if he had an exact replica. Now would be a good time to mention the exact replica you just happen to have. USE the lamp seller's lamp on Jollo [3], and he'll delightedly tell you that it's a near-perfect replica. With that, Jollo will head off to swap the lamps.
Now it's time for you to use that secret passage the little boy ghost told you about. Go north one screen to the north hallway. Do not try the door: it's the guard dogs' room. Instead, use the HAND on the outstretched right arm of the suit of armor [2]. The secret passage will open: go inside when it does.
Inside the Castle Walls
You're now inside the castle walls, and right next to the guards' room. LOOK at the hole in the wall here to spy on the guards [2]. From the sound of their conversation, they're not comfortable keeping Cassima locked in her room against her will, but don't dare disobey the vizier. They'll also mention a magic room with an enchanted door: no one except the vizier is allowed in there, not even the treasurer. One of the guards will note that he heard the vizier saying "Ali" to the door, but before he can continue, Captain Saladin will cut him off and order the guards to their posts. Climb the stairs to the second floor.
There's another hole in the wall here, and you can hear crying from it. LOOK at the hole in the wall [1]; it's Cassima! You'll automatically talk to her, and she'll reassure you that she doesn't want to marry the vizier. She refuses to try and escape with you, though: she won't leave her people in the vizier's hands. She also thinks that if she had a weapon, she might have the opportunity to use it. And it just so happens that you have a weapon which would be perfect for her: after all, you got it from another maiden. USE the dagger that Lady Celeste gave you on Cassima [3], and Cassima will take it. After a few more seconds, Cassima will hear someone coming, and you'll have to break off your conversation. Hopefully you'll get to continue it later.
Walk one screen west and one screen north through the interior passages behind the castle walls. You'll come across another hole in the wall, and hear scratching behind it. Assuming you survive this, you'll really need to have someone patch up all these holes, but in the meantime, it's working out well for you. LOOK at the hole in the wall [1], and you'll see the vizier writing a letter. As he talks to himself, you'll quickly figure out that he plans to murder Cassima after the wedding and seize absolute power over the land. Of course, he didn't reckon with you, but you have more work to do before you can put a stop to his plans once and for all.
Walk one more screen north, and you'll see that the passage comes to an end. You'll also see an oddly colored outline on the left-hand side of the passage. Use the HAND on that outline, and you'll enter a secret passage into the vizier's bedroom.