HELP! How do I prevent items with common events to not close/open up a new window?

Every time I use an item without a common event, it closes the menu. I've tried using scripts within the common event to call the last item but that didn't work out. This has been a huge pain in the ass, so any help will be greatly appreciated.

Tsukihime managed to do this perfecting in VX, I'm just looking for something that does this in MV

https://forums.rpgmakerweb.com/inde...iggers-event-when-used-exits-inventory.17329/
If you have Yanfly's Passive States plugin you can use lunatic mode within state.
For example... Book of exp - Give 100XP to user.

and you type following code in state note field.
Code:
<Custom Apply Effect>
user.gainExp(100);
user.removeState(x); //where x is ID of state you typing code
</Custom Apply Effect>

and change item parameter to give that state to user.
You did not tell what does do that common event you run with item.
Thanks! That solved my issue

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/help-how-do-i-prevent-items-with-common-events-to-not-close-open-up-a-new-window.115160/