Some of my personal favorite moments as the DM have been when I have to compensate for the players deciding to go completely in the opposite direction of the adventure I'd planned. In my early DM days, I did like to write my own adventures and map out dungeons with great detail, or I got some published material and modified it a bit to fit the campaign. One day I had designed an adventure where the PCs were to go and track down a troll they'd previously encountered in the forest who was devouring the local farmers' livestock. Initially they sat down at a tavern to plan and see about finding out more information, but quickly decided that a drinking contest was in order instead. The party rogue managed to win the contest, but ended up horribly drunk, so the rest of the party, who was considerably more sober, decided a fun prank would be to tie the rogue to the minute hand of the clock tower on top of the temple of Pelor. Much Bluffing and some bribery later the rogue is dangling 100' in the air from the minute hand and the guards are on the way to arrest the rascals. The monk uses a large kappa shell to slide down a drainspout and escapes into the temple gardens. The party swashbuckler, however, ends up on the roof of the temple, which is about 60' from the ground with only 45' of rope. He ties one end off on a gargoyle, looks below to make sure there's a large stained glass window, and promptly leaps off the roof with the rope in hand. He crashed through the window, knocked over a priest who was christening a baby, caught the baby before it could hit the ground, announced that the child would be named Tyrus (the PC's name), and then sprinted out the back door. All this resulted because I had to improvise when the players ignored the hooks I'd been dropping and got distracted. Ever since then, I tend to only come up with some very loose ideas for encounters, maps, etc. because my party has a tendency to either steamroll through or neatly avoid my careful planning. I guess you could say I'm a fan of sandbox style play now.