A.G.O.T.I.

The film starts with a street peddler, guiding through the streets of the fictional Arabian city of Agrabah, which is based mainly on a medieval city in the Middle East, the home of the *1001 Arabian Nights*, and there are some inconsistencies in the time period. After trying to sell the viewers on his wares, he pulls out an old oil lamp, claiming it "once changed the course of a young man's life. A young man who like this lamp was more than what he seemed: A diamond in the rough."

The peddler then begins to tell the viewers a tale, beginning on a dark night, where the Selever's vizier, Sunimal, meets with a thief named Vegeta, who hands over half of a gold scarab beetle, of which Sunimal has the second half. Putting them together, the beetle flies off, before causing a giant tiger's head to rise from the sand - the Cave of Wonders.

Sunimal summons Vegeta to enter, instructing him to retrieve a lamp inside. However, upon approaching the Tiger's Head, it speaks that only one may enter: "*One whose worth lies far within: the Diamond in the Rough!*" Vegeta still attempts to enter upon Sunimal's orders, but upon entering the tiger's mouth, it bites down on the thief, closing off the entryway before instructing Sunimal again to seek out the Diamond in the Rough it was referring to. It is then that Sunimal realizes he needs to find the Diamond in the Rough in order to enter. Sunimal seeks to become sultan himself and become the new ruler of Agrabah.

The next day, on the streets of Agrabah, a street urchin named A.G.O.T.I. is struggling to steal a loaf of bread, along with his brother, Aldryx. After outwitting the palace guards led by their captain, Razoul, the two settle down to eat their spoils, but are put off from satisfying their stomachs by a couple of hungry children. A.G.O.T.I. and Aldryx give the two their bread, but are then sidetracked when a royal prince marches through the streets, and claims A.G.O.T.I. to be nothing but "a worthless street rat." A.G.O.T.I. and Aldrtx then retire to their abode, with A.G.O.T.I. promising his friend that someday, things will be better and people will see him for what he really is instead of as a public menace.

The Sultan (Which is Selever), meanwhile, is having problems with finding a prince for his daughter, Princess NANATH, to marry, especially when the last suitor, whom is the same one who insulted A.G.O.T.I. earlier, leaves after NANATH's pet tiger ChihYu bites into his pants. The Sultan talks to NANATH, who claims she is tired of living her life being cooped up behind walls. The Sultan goes to consult with his adviser, Sunimal. By mesmerizing him with his magical snake staff, Sunimal convinces the Sultan that Sunimal needs the Sultan's blue diamond ring to find NANATH a husband. Sunimal actually needs the ring to discover the identity of the "Diamond in the Rough."

NANATH, who does not want to be married off, decides to run away disguised as a peasant girl. However, her act of giving an apple to a hungry little boy lands her in trouble with the street merchant until A.G.O.T.I. (Plus Aldryx) intervenes and leads NANATH away just in time before she can lose a hand as payment for the fruit.

Meanwhile, Sunimal uses the blue diamond ring of the Sultan's and consults The Sands of Time, and discovers the identity of the "Diamond in the Rough": A.G.O.T.I..

A.G.O.T.I. has retreated with NANATH to his and Aldryx's place, and she is rather taken by his kindness. However, A.G.O.T.I. is suddenly set upon by the Royal Guards. It is then that NANATH reveals herself to them, demanding A.G.O.T.I. be released. However, Tabi claims he is acting under orders from Sunimal, so NANATH will need to speak with him to get Tabi to release A.G.O.T.I.. When NANATH confronts Sunimal, he lies to her by saying he had already been executed for "kidnapping the princess." As NANATH runs to the water fountain after confronting Sunimal, she begins weeping over A.G.O.T.I.'s "loss", and ChihYu comforts her.

In actuality, A.G.O.T.I. has been imprisoned in the Royal Dungeon. Aldryx manages to free A.G.O.T.I., but are then met within the dungeon by an older prisoner, in reality a disguised Sunimal, who shows A.G.O.T.I. and Aldryx a hidden passageway out of the dungeon to free and take him to the Cave of Wonders. At the entrance, Sunimal informs A.G.O.T.I. that if he brings back the lamp, he will be rewarded. The Cave's tiger-shaped head allows A.G.O.T.I. to enter, but he is instructed to touch only the lamp and nothing else. A.G.O.T.I. and Aldryx venture deep into the cavern, where they first encounter a magic carpet, that then leads them to the lamp's location. A.G.O.T.I. successfully retrieves the lamp, but Aldryx violates the rule the Cave's guardian imposed, and seizes a large ruby, enraging the tiger guardian, causing the cave to begin to collapse on them. Using the magic carpet, A.G.O.T.I. and Aldryx manage to get to the entrance to the cave, where the disguised Sunimal pleads for A.G.O.T.I. to give him the lamp. A.G.O.T.I. does so, and Sunimal then reveals a dagger, intending to kill him. Luckily, Aldryx bites (Like in pain) Sunimal's arm, and A.G.O.T.I. and Aldryx fall both back into the cavern, as the giant Tiger's Head disappears under the sand. A.G.O.T.I., Aldryx, and Carpet are trapped in the Cave of Wonders. Sunimal then laughingly reaches for the lamp only to find it is gone because Aldryx stole it back.

In the palace, a weeping NANATH is comforted by the Sultan and informs him that Sunimal has done something terrible. The Sultan comforts NANATH and gets her to tell him what happened. When Sunimal comes back, the Sultan confronts him for having an innocent person beheaded and informs him that he must discuss sentencing prisoners with him from now on.

Deep within the cave, A.G.O.T.I. begins to examine the lamp, finding a worn inscription on the side of it. A.G.O.T.I. discovers that the lamp is home to a wisecracking yellow duck simply named "Kale", who will grant him any three wishes, excluding wishes to force a person to fall in love, kill someone, bring someone back from the dead, or give his master extra wishes.

A.G.O.T.I. tricks Kale into getting them out of the cave without technically wishing for him to do so. Once out of the cave, and in a small oasis, A.G.O.T.I. and Aldryx gets to know Kale and asks him what he would wish for if he had the chance; Kale says he would wish for freedom (as he is a prisoner of the lamp), but that can only be granted if his master is benevolent enough to free him with a wish. A.G.O.T.I. promises to set Genie free with his last wish.

A.G.O.T.I., who has fallen in love with NANATH, is disappointed that he could not wish to make her fall in love with him. However, the law states that only a prince can marry a princess, so he wishes to become a prince. Therefore, as his first wish, Kale turns A.G.O.T.I. into a fabulously rich prince, and Aldryx is transformed into a large purple elephant to become A.G.O.T.I.'s mount, while Kale then goes further to make A.G.O.T.I.'s entrance into the palace one that will impress all of Agrabah.

Meanwhile, Sunimal, who is worried that NANATH might have him beheaded as punishment for supposedly having AA.G.O.T.I. executed, comes up with the idea to convince the Sultan to let him become her husband with the help of his talking parrot and main assistant, EmperorDaFirst. He later tries to mesmerize the Sultan into granting this request with his staff. However, his plans are interrupted when a large and noisy royal procession enters the kingdom, proclaiming the arrival of "Prince A.G.O.T.I.Y" (aka A.G.O.T.I. in his new persona). The procession is huge, with riches, exotic animals, hundreds of servants, and A.G.O.T.I. himself. A.G.O.T.I.'s entourage bounds into the palace, impressing the Sultan. Sunimal appears suspicious and cold toward the new suitor. A.G.O.T.I. is taken to NANATH, who is unimpressed and rebuffs A.G.O.T.I.'s charms, thinking him to be another arrogant prince like the previous ones. However, when A.G.O.T.I. removes his turban to shoo away ChihYu, NANATH is reminded of the street rats she met in the marketplace.

A.G.O.T.I. tries to gain NANATH's interest again by telling her how rich and powerful he is, but she remains steadfastly ambivalent. A.G.O.T.I. decides to leave NANATH and steps off on his magic carpet. NANATH chooses instead to ride with him. Afterwards, the carpet takes them to China, and NANATH tricks A.G.O.T.I. into admitting he's the street rat she met. Naturally wishing to impress her, A.G.O.T.I. instead lies to her by convincing her that he really is a prince and had often pretended to be a commoner to escape the restrictions of palace life, much like what NANATH did she relates to. A.G.O.T.I. brings NANATH back to the palace, and the two of them share their first kiss together.

Sunimal is afraid that "Prince Abooboo", as he incorrectly calls him, may win NANATH over, ruining his own scheme to marry her, but orders A.G.O.T.I. out of the way. He orders Tabi and the guards to capture and kidnap A.G.O.T.I.. The guards end up having A.G.O.T.I. gagged with a white handkerchief over his mouth and tied up in metal manacles on his ankles and on his wrists behind his back (which is not a problem, as Tabi, the chief guard, is plagued with a lust for killing). He informs him that he has "worn out his welcome," and a guard clubs A.G.O.T.I. unconscious, then drops A.G.O.T.I. over a cliff into the sea. They have attached to his ankles a large metal ball-and-chain, so that a tied-up-and-gagged A.G.O.T.I. is underwater and sinks faster. He hits the bottom, and his turban floats down. The lamp tumbles out, and he begins to struggle towards it (which is difficult as the ball-and-chain attached to his ankles pulls him back), but passes out from the lack of oxygen before he can reach it. A.G.O.T.I., tied up and gagged, slides down towards the lamp while underwater and rolls over, causing it to rub against his fingers. Kale appears (though apparently interrupted in the midst of taking a bath), and rescues A.G.O.T.I., using up his second wish. Kale unties and ungags Aladdin and takes him back from the sea and back to dry land. A soaking wet A.G.O.T.I. thanks Kale for saving his life as his second wish.

A.G.O.T.I. and Kale return to the palace, and A.G.O.T.I. confronts Sunimal over having him almost killed. Sunimal uses his cobra staff to try and brainwash the Sultan into believing A.G.O.T.I. is lying, but A.G.O.T.I., seeing what he is doing, grabs the staff and shatters it. He then shows the Sultan that Sunimal has been controlling him and plotting against him. The Sultan calls for the guards to arrest Sunimal, but Sunimal manages to escape and, before doing so, witnesses the lamp in A.G.O.T.I.'s possession. The Sultan is convinced that his troubles are over as his daughter has finally chosen a suitor and dubs A.G.O.T.I. as the heir to his throne. However, unbeknownst to the both, A.G.O.T.I., though casually happy, is suddenly struck with guilt, feeling unworthy of such a honor, as well as a future with NANATH, because of the fact that he lied to her.

The next day, A.G.O.T.I. expresses his frustration to the Kale and considers going back on his promise to free the latter out of fear of losing NANATH if the truth is revealed and uncertainty of keeping up the facade on without Kale's help. Feeling betrayed, a heartbroken Kale goes back inside the lamp, but not before pointing out how much A.G.O.T.I. has lied to get where he is. Chastened, especially after taking his anger at Kale out on Aldryx and Carpet, A.G.O.T.I. decides to tell NANATH the whole truth of the matter. Unfortunately, A.G.O.T.I. leaves the lamp in his chamber, and Sunimal summons EmperorDaFirst to steal it. With the lamp in hand, Sunimal becomes Kale's next master, giving him three wishes. His first wish is to become sultan. When the former Sultan and NANATH refuse to bow to him, he wishes to be the world's most powerful sorcerer. Now Sunimal forces them to bow to him.

Sunimal then uses his magic to expose A.G.O.T.I. and then banish him with a makeshift rocket to "the ends of the earth", in one of the palace towers. "The ends of the earth" appear to be Antarctica, the mountains of Austria, the Arctic or possibly the Himalayas. Luckily, Aldryx and Carpet are banished with him, and A.G.O.T.I. is able to fly back to Agrabah, intent on reclaiming the lamp, stopping Sunimal and fixing the mistakes he'd made.

Meanwhile, Sunimal, who is angry that NANATH does not wish to become his queen, makes a wish for Kale to cause her to fall in love with him, so he *can* make her his queen. Kale tries to inform him that he could not grant that wish, but this only frustrates Sunimal. NANATH, who witnesses A.G.O.T.I. sneaking into the palace, pretends that the wish has been granted, much to Kale's surprise, in order to distract Sunimal. She even goes so far as to kiss him, causing A.G.O.T.I., Aldryx, Kale, and even EmperorDaFirst to nearly vomit in disgust. At first, it seems to be working; Sunimal however, looks at A.G.O.T.I.'s reflection in NANATH's crown (made from her shackles via a performance of sorcery) and, realizing he'd been tricked, confronts him before he can reach the lamp.

After trapping NANATH in an hourglass, turning Aldryx into a Digidevil toy, and unraveling Carpet, all of whom had attempted to retrieve the lamp, Sunimal eventually turns himself into a giant cobra and fights A.G.O.T.I.. When A.G.O.T.I. appears to be defeated, Sunimal informs A.G.O.T.I. he was a fool for thinking he could defeat "the most powerful being on earth." A.G.O.T.I. informs Sunimal he is not the most powerful being on earth and that honor belongs to Kale since he gave Sunimal his power in the first place and can therefore take Sunimal's power away.

Realizing what Aladdin is saying, Sunimal decides to use his final wish to become the most powerful genie in the world. As A.G.O.T.I. frees NANATH from the hourglass and revives her, Sunimal is at first convinced that his new powers will allow him to rule the universe, but he realizes too late that A.G.O.T.I. tricked him since being a genie comes with a price. Sunimal is suddenly shackled and is sucked into the new lamp created by his wish and is trapped (along with EmperorDaFirst, who tries to flee, but he's dragged by the villain). Not long after, Kale throws the lamp across Agrabah to the desert, left to be banished to the Cave of Wonders for 100,000 years.

Of course, since A.G.O.T.I. is no longer a prince, he is not eligible to marry NANATJ. Kale, however, insists that A.G.O.T.I. use his final wish to make himself a prince again, but nevertheless, he keeps his promise and uses his final wish for Kale's freedom. When all seems lost for A.G.O.T.I. and NANATH, the Sultan decides that, between his loyalty to Kale and his courage in defeating Sunimal, A.G.O.T.I. has proven his worth; the Sultan, therefore, changes the law so that his daughter shall marry whomever she deems worthy, meaning A.G.O.T.I. and NANATH can be married. NANATH runs to A.G.O.T.I. and chooses him. Kale flies away to see the world while A.G.O.T.I. and NANATH begin their new life together.

At night, while the fireworks begin exploding, A.G.O.T.I. and NANATH share another kiss and fly off with Carpet near the moon. As "The End" writes in the sky, the moon laughs and turns around to show that it was really Kale. Kale then pulls up the scene and says, "made you look," while the film ends.