item common event help (solved)

Let's say the player has this item,and it's a lamp.
And I want that item to be usable from the menu,if the player uses it,their sprite changes
to the same character now holding said lamp. And if they use it again from the menu the sprite
changes back to the one not holding the lamp.
Is there any way to do this as a common event or is there a script for this?
I know how to set the first part but I have no idea how to change the sprite back after using it twice.
In the common event, make a condition. This condition should say the following:

"In switch X is off"
- Change sprite to holding the light
- Turn Switch X on
"Else"
- Change sprite back
- Turn switch X off
"End"

This way, when you use the item when the switch is off, it will change the sprite into the lamp holding one, and turn the switch off. When using it again, the effect is reversed.
In the common event, make a condition. This condition should say the following:

"In switch X is off"
- Change sprite to holding the light
- Turn Switch X on
"Else"
- Change sprite back
- Turn switch X off
"End"

This way, when you use the item when the switch is off, it will change the sprite into the lamp holding one, and turn the switch off. When using it again, the effect is reversed.
I tried it and it worked perfectly! tysm!!

Original thread: https://forums.rpgmakerweb.com/threads/item-common-event-help-solved.158816/