MZ [HELP]Check if any event is happening?

Hello guys!
I'm using IgnisTouchPictures to call an event.
The problem is that when I talk to some npc or some automatic event is happening, the picture can be clicked and the event happens.
I know there is a way to disable the function, but it would be too much work and sometimes I might forget to manually disable each npc with automatic texts or events.
So I would like to know if anyone knows a code that checks if some event is happening, so that when I click on the image I put it to cut the event from the picture.
I've tried using this code, but it's not accurate: $gameMap.events().some(ev => ev._interpreter?.isRunning())
I've tried using this code, but it's not accurate: $gameMap.events().some(ev => ev._interpreter?.isRunning())
That is true if any Parallel event is running.

To check for a non-Parallel event, try this instead:
JavaScript:
$gameMap.isEventRunning()
That is true if any Parallel event is running.

To check for a non-Parallel event, try this instead:
JavaScript:
$gameMap.isEventRunning()
I tried, but nothing happens even if any event is not running.
Do you know the code to check if any message box is being showed?
$gameMessage.isBusy() - returns true if any message is on screen
$gameMessage.isBusy() - returns true if any message is on screen
Thank you so much

Original thread: https://forums.rpgmakerweb.com/threads/help-check-if-any-event-is-happening.147014/