A skill that stays Active after battle.

Hello! I'm running because I'd like to drop my demo before Halloween. If any of you is so kind to figure this out for me without having to add another script or cloning my skill:

I have a skill for my hero that turns on a Switch. The skill is called Curiosity and basically is a no-battle skill that helps you see under objects in-map to gather hidden items. When you use it, you look for the item, get it and then the Switch is turned off after so. The issue is this skill can also be used in battle to debuff enemies' DEF.

Whenever I use Curiosity in battle, of course the Switch is turned on and after the battle ends, keeps on being on. I don't want that because the message for items show up when I return to a map as this skill works with a Parallel Process. I want a command to turn this Switch off at the end of every battle just for the hero not to run into the message "There's no item hidden here" or "There's something hidden" when I reappear in map.

If I have to place it in every Troop, how do I use it? In which turn? Or if I can make it a common event, how do I make it? Again, I don't want to clone my skill and avoid adding more scripts to the project. Any idea would be great. Thanks beforehand!!
If it is an on-screen encounter you could just run it in a common event that gets called after every battle. If the encounters are step-based you could flip a switch that will tell a common event to play after battle but it is not optimal. I would think there would be a script to do it, unfortunately, I'm rubbish at Ruby so can't help you there.
If it is an on-screen encounter you could just run it in a common event that gets called after every battle. If the encounters are step-based you could flip a switch that will tell a common event to play after battle but it is not optimal. I would think there would be a script to do it, unfortunately, I'm rubbish at Ruby so can't help you there.
Oh where do I place this common event, right below the battle event command??
This is for MV but the logic is the same in ace.

1697667213991.png
This is for MV but the logic is the same in ace.

View attachment 280588
Oh thanks!! I might have an insight!!
This thread is being closed due to being solved. If you would like it reopened, report it to let us know why. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/a-skill-that-stays-active-after-battle.162136/