Lose random weapon/armor

I have an event where if the player loses they will have a random weapon or armor lost (not equipped), if they have no extra armor or weapons nothing happens. I am using HIME instance items as well, not sure if that matters but any help would be awesome
Well, any of us could come up with 2 calls to a random number. The first call would pick a weapon or an armor, while the latter would pick one among the weapon / armor IDs available. So do you like this idea?

Actually, the first part you can do it yourself with a simple game variable event command.

The second part would require a script.

Original thread: https://forums.rpgmakerweb.com/threads/lose-random-weapon-armor.172812/