Assuming you got a bug free event system, making an Eventinig System for more than 10 will also be a hell right?
How to optimize this then?
Well you got a game. You should at least know the quantity of the quests.
Let's say it is 40 ok?
You use Switches to Enable Quests.
You also use Swithces to set a Quest coompleted.
Now when you talk to someone for a quest, you call a Common Event.
Each quest should really be as complex as it can easily be maintained.
Oh man! How about quests with three or five steps then?
Break it into five Common Events.
Each will execute, after a conditional Branch, that will be on a main common event. The NPC will call this main common Event. The common event then, according to what is going on, will call other common events, that will be the phases according to the various switches turned on each time you complete the previous.
That means that a five phases quest is 6 common events. The main and 5 more for all the phases.
What will you earn if you do that?
1] More modular events means easier debug:
If a bug happens in phase 3, you don't have to roll down one massive huge gargantuan event to find out what is going on. You go straight to the common event that contains the bug.
2] Smaller code event fragments, will help you out organize things more.
Note that this is a global suggestion for anything you are gonna make.
This is a first step to optimize it.
The rest is more like optimizing procedural programming.
But here is the limit! You can not optimize this thing more without array manipulation.
To make things more simple, you have to use data structures, thus arrays, thus you will need FOR loops, thus this exeeds Simple Eventing.
So you are stuck on huge Conditional Branches inside other Conditional branches blah blah blah...
so the answer to your question, is this:
Break the Event in as small parts as possible and call them.
Common Events is what you need to use.