Increasing a variable with an item without using a common event

Usually when you use an item that calls a common event, the menu closes, and the common event is played.

But I programmed my menu myself in another common event. And I modified the script that calls the menu to call my common event menu instead.

So when I use an item that calls a common event I have to manually exit the menu for it to take effect.

Is there a way to change a variable with an item without going through a common event? Or better. Make it take effect in my personal menu?
Use damage formula to execute a script, like, if you want to increase variable, just use v[100] += 1
Thank you a lot ^^

Original thread: https://forums.rpgmakerweb.com/threads/increasing-a-variable-with-an-item-without-using-a-common-event.116943/