Imaculata
Hero
Some great advice here. I'll drop in again with some more advice regarding improvising.
Don't write the outcome, think up character motivations
When I write an adventure, I don't write the outcome. But I do try to think about, is what the various outcomes could be. See, if I understand the motivation of all the people involved, then it is pretty logical to come up an outcome based on what the players do. So understand the characters that you write, and then their reaction seems simple. If an adventure does not turn out how you thought it would, embrace it. Just run with it. So the players decide that they don't want to help the village besieged by orcs, great! So what would be the logical outcome of that? Most likely the orcs take over the village, killing everyone... perhaps they even establish a base of operations there, because there's an orc chieftain who wants control of the region for his evil master! Ah, but who is this evil master? Now we're getting somewhere. Once you start thinking about these questions, the story writes itself.
Always escalate the situation
My personal rule is that things never go as planned. When the players go on a quest, they always have incomplete information. Things never turns out the way they seemed at first. There are always twists and unexpected turns of events. This is how you keep your adventure lively and exciting! Good guys turn out to be villains, villains turn out to be good guys, and even the most well laid plans never go according to plan.
Why is the dragon attacking a local town? Maybe he has a really good reason? Maybe the king who hired the adventurers to slay the beast, is really a complete bastard, and the dragon asks the players to aid him in his fight against the king instead? Always keep your players guessing!
Don't just tell them what happens, but offer them opportunities to react
The key to any good D&D campaign is not just in a good story, but in the players to be a part OF that story. So don't just spoon feed them pre written cut scenes. But give them things to respond to. You want to involve them in what is going on.
"While player 1 is playing a game of cards, player 2 can see one of the npc's cheating, but she is kind of hot! What do you do?"
"You suspect that the baron may not be giving you all the relevant information, but it would be very rude to demand him to reveal his secrets. What do you do?"
"While player 1 strikes a deal with the innkeeper to return his stolen horses, player 2 notices that a mysterious stranger seems to be listening in on the conversation."
I like giving my players extra things to react to. While one thing is happening, another player will notice something that adds extra complexity to the situation. This is not all that difficult to improvise. Because most likely you were already planning to introduce a new character for this "horse-fetching-quest" anyway, and this is simply a more interesting way to introduce him.
Even unfinished quests can continue to affect the story
Sometimes the players may choose to ignore an obvious dungeon, or ignore a specific quest. Don't feel bad! I know you were looking forward to serving them a delicious monster and trap-filled maze with an epic boss at the end. But players can decide for themselves if their characters would take that bait. Instead, try to think what the likely outcome could be of ignoring said dungeon or quest. If the merchant can't convince the players to help him get back his stolen painting, then maybe he'll hire some bad guys to do it for him. Maybe the city guards trace the crime back to him, and he ends up in jail! Maybe that ignored dungeon slowly becomes a much bigger problem for the nearby town, and it escalates the situation, leading to far more interesting turns of events? Maybe the zombies of the nearby catacombs drive all the people out of town, and leave it to the undead, thanks to the lack of interest of the players? And maybe a quest to rid the town of undead is far more exciting to them then wandering into an underground undead infested maze?
Don't write the outcome, think up character motivations
When I write an adventure, I don't write the outcome. But I do try to think about, is what the various outcomes could be. See, if I understand the motivation of all the people involved, then it is pretty logical to come up an outcome based on what the players do. So understand the characters that you write, and then their reaction seems simple. If an adventure does not turn out how you thought it would, embrace it. Just run with it. So the players decide that they don't want to help the village besieged by orcs, great! So what would be the logical outcome of that? Most likely the orcs take over the village, killing everyone... perhaps they even establish a base of operations there, because there's an orc chieftain who wants control of the region for his evil master! Ah, but who is this evil master? Now we're getting somewhere. Once you start thinking about these questions, the story writes itself.
Always escalate the situation
My personal rule is that things never go as planned. When the players go on a quest, they always have incomplete information. Things never turns out the way they seemed at first. There are always twists and unexpected turns of events. This is how you keep your adventure lively and exciting! Good guys turn out to be villains, villains turn out to be good guys, and even the most well laid plans never go according to plan.
Why is the dragon attacking a local town? Maybe he has a really good reason? Maybe the king who hired the adventurers to slay the beast, is really a complete bastard, and the dragon asks the players to aid him in his fight against the king instead? Always keep your players guessing!
Don't just tell them what happens, but offer them opportunities to react
The key to any good D&D campaign is not just in a good story, but in the players to be a part OF that story. So don't just spoon feed them pre written cut scenes. But give them things to respond to. You want to involve them in what is going on.
"While player 1 is playing a game of cards, player 2 can see one of the npc's cheating, but she is kind of hot! What do you do?"
"You suspect that the baron may not be giving you all the relevant information, but it would be very rude to demand him to reveal his secrets. What do you do?"
"While player 1 strikes a deal with the innkeeper to return his stolen horses, player 2 notices that a mysterious stranger seems to be listening in on the conversation."
I like giving my players extra things to react to. While one thing is happening, another player will notice something that adds extra complexity to the situation. This is not all that difficult to improvise. Because most likely you were already planning to introduce a new character for this "horse-fetching-quest" anyway, and this is simply a more interesting way to introduce him.
Even unfinished quests can continue to affect the story
Sometimes the players may choose to ignore an obvious dungeon, or ignore a specific quest. Don't feel bad! I know you were looking forward to serving them a delicious monster and trap-filled maze with an epic boss at the end. But players can decide for themselves if their characters would take that bait. Instead, try to think what the likely outcome could be of ignoring said dungeon or quest. If the merchant can't convince the players to help him get back his stolen painting, then maybe he'll hire some bad guys to do it for him. Maybe the city guards trace the crime back to him, and he ends up in jail! Maybe that ignored dungeon slowly becomes a much bigger problem for the nearby town, and it escalates the situation, leading to far more interesting turns of events? Maybe the zombies of the nearby catacombs drive all the people out of town, and leave it to the undead, thanks to the lack of interest of the players? And maybe a quest to rid the town of undead is far more exciting to them then wandering into an underground undead infested maze?