So, story line quests/triggered events...
These usually have a lot more detail than randomly generated quests. You might have several independent quest chains scattered about in various towns, and a main story line quest with several acts. It would probably do you some good to take a look at some big existing games like Skyrim or Fallout: New Vegas. Looking at the hint books can help you see how they decided to break down the data. If you don't have a hint book for one of these games, I'm sure the wiki's might help as well. You might also take a look at their construction sets, especially the quest editors. This could be helpful, but it may be overwhelming too. :) I don't mean that you should try to build something as complex as these multi-million dollar games, but just seeing how they lay out a quest in a hint book can really help you visualize what's going on under the hood.
Anyway, these hand written quests will be very similar to the randomly generated quests. They'll have quest givers, names, objectives, quest text etc. But they'll also have state tracking, and possibly triggered events. You can hardcode everything like you said. You called it lazy, but I call it research! :) It's a lot easier to solve a concrete problem (specifically what quests/events are you supporting), than the nebulous abstract problem (an all inclusive, robust, quest system that can handle whatever we can think of). After you see a few hardcoded quests in action spend a little time to refactor it.
I think you're most interested in the triggered events so I'll gloss over the details of a Quest Chain and state management. You'll need a way of keeping track of what a player decided. It could be as simple as an integer like Fallout's "Quest Stage" that gets set based on dialog options.
Anyway, back to triggered events. There are lots of different "whens": Player moves into a certain area, player loots an item, player chooses dialogue option b, etc. And lots of different "whats": spawn monsters, npc says something, play sound effect, shake screen, etc. So let's make up a little triggered event. When the user walks into the room, play an explosion sound, shake the screen, and then spawn 2 zombies.
To do that in code, well... you write the code... But I think you want to do this through something like data files. For this trigger, I'd call this trigger type Location and for Location triggers, we would specify a zone(level/area), an x,y coordinate and a radius. This data could be part of some quest data file, or part of a level data file. It could be stored in some personal format you come up with. Or it could be stored in XML with a Trigger element and several Event child elements. Or a lot of people use a scripting language like Lua which can call functions directly that you expose to it. You could create a trigger and attach a Lua function (also defined in your script) to be called when the trigger takes place. On a given level, loop through the active Location triggers any time the player moves, and then fire off their events if the condition is met.
For the events, again, it's all about the data and then mapping the data to actual calls into code. You basically have to come up with an API into your game. Specify a data format for quests, dialogues, and events. Expose functionality that you want to be able to be used by the outside world. And make your game aware of these things.
Sometimes it feels like making data-driven applications is harder work, but other times it doesn't. When it's done properly, it's VERY cool. When everything is hardcoded, you have to make code changes, recompile, run the application, and come up with a way to get back into that same state to retest it. When it's data driven, you can make changes to the triggered event data file while the game is still running and try again. Just put in a feature that reloads the file.
Couple of Lua posts:
http://www.gamedev.net/topic/650341-should-i-use-a-lua-wrapper-class-in-my-engine/
http://www.gamedev.net/page/resources/_/technical/game-programming/using-lua-with-c-r2275
This is a very complex problem to solve with tons of decisions to make along the way. Start small and just keep building on that. And every once in a while take a step back and tweak the design.
If you have more specific questions, I can take another stab at it. :)
- Eck