Turn off switch automaticaly

Hey I'm using yanfly extra enemy drops to drop some quest item from enemy (using the switch plugin command in enemy page).
<Conditional Item x Drop>
SWITCH X ON: +100%
</Conditional Item x Drop>
How do I make the enemy stop drop the item quest after I reach a certain of number or is it possible turn off switch automaticaly ?
Auto-run an event after combat that checks if the quest is active, and then checks if the number of items is met, and if so, turns off the item drop switch.
Alternatively it looks like the plugin also has an item x count condition, so something like this might work (won't automatically turn off the switch, though):
Code:
<Conditional Item 23 Drop>
Switch 1 ON: +100%
Item 23 Count >= 5: -100%
</Conditional Item 23 Drop>
Just change the numbers as needed~

I've moved this thread to Plugin Support. Thank you.

Alternatively it looks like the plugin also has an item x count condition, so something like this might work (won't automatically turn off the switch, though):
Code:
<Conditional Item 23 Drop>
Switch 1 ON: +100%
Item 23 Count >= 5: -100%
</Conditional Item 23 Drop>
Just change the numbers as needed~

Thank you, it works.

Original thread: https://forums.rpgmakerweb.com/threads/turn-off-switch-automaticaly.106172/