From the Super Mario Wiki
The Sultan, while taking a bath in his jacuzzi, causes oil to come gushing out of the faucet. To deal with the problem, the Sultan calls Mario and Luigi over to fix his palace's plumbing. It turns out that his palace's plumbing had been sabotaged by Cheatsy and Kootie Pie Koopa, so that they could steal his oil for the Doomship.
His palace gets destroyed by the end of the episode, but Mario uses a Magic Wand left by the Koopa Kids to rebuild it.