When it comes to eventing, there are multiple way to handle that. You can wrap all your commands inside conditional branch !$gameMap.isEventRunning(). It's entirely up to your knowledge.