Mr. Ernst is outside trying to paint a sign that points to the craft hut, but is interrupted by Danny. Then Brad interrupts him. She leaves and Ted and Melody interrupt him. Mr. E starts yelling that he doesn't need any help. Melody gives him a flower which makes him sneeze messing up the sign.
Cleaning out the garbage in the back, Ted finds an old map. He brings it over to Lucy. He reads the cryptic clues to her:
On Bar None ground, I write these clues.
You won't believe your eyes.
Where many feet travel but no one walks, I've hidden a surprise.
When sunlight shines on Cactus Flat,
Take steps of even measure.
Start beneath the gilded steps,
Count three and find my treasure!
Ted's rich! He's found the treasure, or, as Lucy reminds him, the map to find the treasure. But Lucy isn't even very sure of that. She tells Ted that that note could be who knows how old. The treasure, if it existed, may have been found long ago. Maybe the whole thing is a joke. In any event, Lucy reminds Ted that he has chores to do, and he shouldn't waste his time or anybody else's on a wild goose chase. She firmly tells Ted to drop the subject.
But dropping it isn't in Ted's nature. He's shown the map to the other kids. They're a little skeptical, but Ted tells them the clues must be genuine because of its age. Brad, of course, is the hold out. To her it's just a smelly piece of paper. But Danny points out that somebody worked very hard to make the poem. Melody's excited by the puzzle mystery.
Ted cuts them in. They balk at the 10%, so Ted gives in and gives them all equal shares.
But Brad remains unconvinced. First, why would anybody write stupid clues like that? Any why bury money when you can spend it instead? Brad chastises them for thinking there'll be jewels or ancient treasure, when in fact there is no treasure. Brad's out. Don't ask her to dig any holes in the desert.
"Guys, don't quit now!" Brad has caught gold fever, and she's furiously excavating a pit with her shovel. The other kids are lying around, tools thrown aside in frustration. But Brad has visions of jewels and ancient coins in swimming in her head. Danny and Mel say give it up. They've been digging for hours with no luck. Even Ted admits that the idea was pretty stupid.
Buddy happens onto the scene and after seeing the damage they've done, he makes a joke about digging for treasure. Buddy offers his help as a "great detective". Because everybody else is tired of digging, they agree to cut him in for an equal share of the loot. They let their new partner start by filling in all the holes.
Mr. Ernst calls Ted to his office. Mr. E asks Ted to take some cartons out to the trash so he can resume his sign painting. But when Mr. Ernst leaves, Ted notices that he forgot his paintbrush. Chasing after him, he trips on the floor and bangs into some gold horseshoes nailed on the wall. He picks up one that has fallen onto the floor, and he's about to angrily throw it out the door.
Suddenly, Ted realizes what he is holding in his hands. A golden horseshoe. Could it be a gilded step? He turns around and sees a cactus tapestry. Of course! A cactus woven onto fabric is "Cactus Flat!" Now the last part..."Where many feet travel but no one walks"...under the floor! Ted has figured it out. The treasure is buried beneath the floor in Mr. Ernst's office!
Back in the boys' bunk, Ted convinces the others that he has solved the puzzle. Melody suggests telling Mr. Ernst, but Ted balks at that idea. Danny and Brad think that it's only fair. After all, it is his office. But Ted tells them all how Mr. E loves publicity. He'll call in the media, and then donate all their loot to some museum.
Since Mr. Ernst is already outside, they decide that now is the time to act. Ted and Danny will do the digging, and it's up to the rest to keep the boss out of the office.
Outside, Mr. Ernst is set to get going. But his paint can is empty. Grumbling, he starts back to his office. Buddy frantically intercepts him and tells him he has to look at the...cactus! After some desperate stalling, Mr. Ernst tells Buddy the cactus is fine and heads for his office.
Then Brad tries to distract Mr. Ernst by asking if she can switch chores with Danny, and so on and so forth. Mr. Ernst doesn't really care. He's more interested in the sawing noises he's hearing.
Melody stops Mr. Ernst from going into his office by trying to confuse him. She talks in circles, saying that it's easier to see outside. Mr. Ernst gets impatient, and when he hears a buzz saw, he makes a move for the door.
He finds Ted and Danny sitting in his office. Ted is "playing" the handsaw, and Danny is keeping beat by snapping his fingers. They fool Mr. Ernst into thinking his musical skill is legitimate. Ted must practice Mr. Ernst's office because, until recently, most people found his saw music annoying. Mr. Ernst tells the kids to clear out of his office.
But the distraction seems to have worked. Mr. Ernst can't remember why he even came to his office. Encouraged by the kids, he leaves the office to retrace his steps. As soon as he leaves, Ted hurriedly pulls up the floorboards and pulls out an old steel box. He lifts the lid to reveal...
Poetry. Mr. E pokes his head into the office and tells the kids those are his poems. He writes them to relax at night. He wrote the clues thinking it would be nice if someone someday read them, but he changed his mind and threw them away. The kids all apologize, but Buddy is distraught that his dad writes poetry.
Mr. Ernst comes up with some creative punishment. As Ted refills the holes, he and the other kids are tasked with writing a poem of their own.