Djinn Ability Walkthrough
You get to the Cave of the Djinn by dropping down from a large yellow rock by a crevasse a little east of the middle of Home of the Djinn as you face north. If you have the Acrobatic Ability, you can cross to a teleporter that will take you to another part of the cave. Don't forget to check for 2 hidden switches as you enter the Cave of the Djinn.
Both are to your right as you ente. One is behind a crackable wall. Go south through a door (opened by one of those switches) to find the Djinn, Ali Moustaf. If you have the quest from the High Mage of Mage Reef bring Ali Moustaf the Amulet of Distillation and 3 Distjilli Plants and at least one good water, not rotten water, in your inventory.
Hit the gold vase opposite the Djinn with the Wand of Extreme Magic that he gives you. The vase will give you 3 Essence of Djinn's blood potions. Give those to Ali Moustaf and he'll give you a potion to drink that will increase your Strength by 5 points and your Dexterity by 4 ponits.
Talk to him again about teaching. He'll test you to see if your Strength is at least 50 and whether your Dexterity is at least 45. If they are, he'll give you the Djinn ability.