Repellent item against battle

I fixed it using the conditional that check if the key was pressed
Spoiler: old post
News : it is not working x.x the disable message show but the engable don't
Spoiler: old edit1
Guys I put a message to display when the repellent is active and when is over so the problem was solved
Spoiler: POST
So guys I am trying to make a repellent using events. My random battles start by events by the way.

So I create a item called Repellent and setup it with a common event, I let it as a parallel event and using a switch = ON then wait 7 seconds then Switch = OFF

the problem with this is that while it is on the character don't move, so there is some suggestion to fix it?

Edit: So guys now I am usign the default enconter settings by map so I can use the event command enable and disable encounter.

I setup the common event counting the steps, while don't reach 30 steps the combat is disable, is this right?
Captura de tela 2024-08-22 123555.png
I edit the post
KSteps2Doom XP can do pretty much all of that with ease. If there's any feature missing, feel free to mention it here.

Original thread: https://forums.rpgmakerweb.com/threads/repellent-item-against-battle.171320/