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 . 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 . 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 . 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.
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 . 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 , 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 . Once Alexander casts the spell, the painted door will turn into a real door. Use the HAND icon to enter the door . 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 , 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 , 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 . 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 . 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 ; 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 , 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 , 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.
The Vizier's Bedroom
After making your way through the vizier's wardrobe, you'll find yourself in his bedroom. That trunk by the bed looks important, and the fact that it's locked makes you want to go through it even more. Fortunately, you have a key that'll unlock anything, thanks to your trip through the Realm of the Dead. USE the skeleton key on the trunk to open it .
Inside the trunk is an interesting-looking letter. Use the HAND on the letter to take it . Alexander will read it over: it's from the wizard Shadrack of the Black Cloak Society, congratulating Alhazred on his plans to isolate the islands from one another and seize power. Absolutely fiendish. But this is exactly the proof you need of the vizier's treachery.
There's also an ebony box on the table here: use the HAND on it to open it. LOOK at the piece of paper in the box : it reads "zebu". What could that mean? It's obviously important if Alhazred wrote it down. Could it be the second part of the magical incantation to open the door? The guard said "Ali" was the first part. You'll have to give it a try.
There's nothing else to do here, and you can't exit the vizier's room: the guard dogs will catch you instantly. If you want to explore the main halls of the castle, you'll have to go back and play the short path through the castle. For now, retrace your steps, and go back to the castle basement.
The Enchanted Door
Once you get back down to the basement, go back to the hallway where you first came in, and check out the doorway on the left wall. That's odd: there doesn't seem to be any handle. This must be the magical room the guards mentioned. It's time to see if the two magical words you learned in your explorations through the castle walls will open it up. TALK to the doorway, and spell out the words "ALI ZEBU" using the keypad . Sure enough, the door will open, and Alexander will go inside.
There's a table in the center of the room with a cloth on it. Use the HAND on the cloth to uncover the table, and LOOK at all four items on the table . The four items are the four stolen treasures from the other islands. Once Alexander sees all of them, he'll realize what happened: the vizier must have stolen the most important thing from each island, and spread rumors about the other islands being responsible to turn the islands against each other.
There's nothing else to do in here, so leave.
Stopping the Wedding
Once you leave the magical room, the game should notify you that you can now hear wedding music: if it doesn't, walk around the basement halls until you get the notification. Assuming you got the notification right away, you'll get enough notification that you hear a door opening from the north, and guard dogs coming your way. Now would be a good time to be somewhere else, so head east.
Once you head east, you'll get a notice that guards are coming from all directions. Maybe if they're all down here, it's safe to make a break for the main hallway. WALK up the stairs, and use the HAND on the upper door to exit the basement. There doesn't seem to be anybody upstairs: maybe you're safe here. Or maybe not: Saladin will emerge from the throne room, and confront you in the main hallway. Because you're of royal blood, he'll give you five seconds to explain yourself before he runs you through, but it had better be good.
Quickly USE the letter from the vizier's bedroom on Saladin : if you delay, he'll make good on his threat and kill you. The letter will do a good enough job of convincing Saladin that he'll let you into the wedding instead of killing you. To your astonishment, Cassima appears to be willingly marrying the vizier! But that's not possible, is it? You need to take a closer look and see for yourself. WALK forward to interrupt the wedding ceremony.
Understandably, Alhazred will be very displeased to see you there, and order Saladin to kill you. Saladin will want to hear those orders from Cassima before he obeys, though. Amazingly, Cassima will confirm the order, but what's going on with those glowing eyes of hers?! Zounds: "Cassima" is really the genie in disguise! But how can you prove it?
Fortunately, today is your lucky day, as King Caliphim, Queen Allaria, and their supporters will come in just before Saladin can carry out the order and kill Alexander. In the subsequent confrontation, it'll become very clear to the king and queen that "Cassima" isn't really Cassima at all. Once revealed as an impostor, the genie will automatically transform back into his true self  and start attacking the guards, while the vizier runs off. The guards can take care of themselves: after the vizier! WALK through the door in the back of the room that the vizier escaped from to chase him.
Battling the Vizier
After going through the rear door in the throne room, you'll see the vizier running up the stairs. Follow him until you reach the top of the tower. The vizier will be there, along with Cassima, who's tied up. The vizier will summon the genie, and order him to kill Alexander. The genie will prepare to do so, albeit reluctantly...but then Jollo will automatically burst in with the genie's lamp, toss it to Alexander, and get out of there . Once the cutscene ends, immediately USE the genie's lamp on the genie . Alexander will become the genie's new master, and deprive Alhazred of his most valuable weapon. But Alhazred isn't ready to give up yet: he'll draw a sword and come at you.
Since Alexander is now master of the genie, he can just transport Alhazred directly to the dungeon...er, never mind, I guess that's not sporting or something. The game designers say you have to fight Alhazred one-on-one, so you'd better arm yourself. Use the HAND on the sword on the wall to pick it up . Well, at least try to pick it up: the thing apparently weighs a ton. But it's better than nothing, and you'd better use it before the vizier can run you through. USE the sword on the vizier to fight him .
After a short animated sequence of Alexander and the vizier fighting, the game will display a message that Alexander is nearing exhaustion from the weight of the sword. But before the vizier can kill Alexander, Cassima will cut herself free and stab him with the dagger that Alexander gave her earlier. The wound won't be fatal, but it'll distract the vizier, and give Alexander a chance to act. USE the sword on the vizier to knock him out .
Congratulations! You've beaten King's Quest VI with the maximum 231 out of 231 points. Sit back and enjoy the ending: you're getting the best ending possible.