What's in the box?

I was wondering, on seeing the present icon, if it's possible to make an item that gives you another, random item. Here's my theory; please tell me whether I've got it right.

The first item calls a common event, which generates a random number. Then there's a conditional branch that checks what number it was and adds something based on it. Last of all, naturally, the first item is removed from your inventory. (Is there a quick and dirty way of doing that regardless of what branch was chosen?)
correct - and you remove the original item after all branches
Thank you, Andar; you're an inspiration to us all.

Original thread: https://forums.rpgmakerweb.com/threads/whats-in-the-box.41355/