Dialogues for Chests/Gifts when emptied

You see, I'm making an Undertale fangame. I want to make the following interaction when you get an item, and when you interact with the item chest it says that it's empty.

Example:
- [ Character ] Open the chest.
- [ Character ] obtains Attack Potion

[ Character interacts with the Chest again ]
- Empty chest.

So until it's enough, if anyone has an answer, let me know! (I don't want to get infinite things-)
Make a 2nd page for the chest event that has a condition of switch ON and turn that switch ON in the 1st page after you get item. On that 2nd page you show your dialogue.

Don't know if RM2k3 has self-switches, so you'd need a different switch for all your treasure chests, but if you can't go back to earlier areas, you can recycle the switches used in the earlier chests. Just set them to OFF when you enter a new area and use them in the new map chest events.
Make a 2nd page for the chest event that has a condition of switch ON and turn that switch ON in the 1st page after you get item. On that 2nd page you show your dialogue.

Don't know if RM2k3 has self-switches, so you'd need a different switch for all your treasure chests, but if you can't go back to earlier areas, you can recycle the switches used in the earlier chests. Just set them to OFF when you enter a new area and use them in the new map chest events.
Ok, let me try that Event.

Crea una segunda página para el evento del cofre que tenga una condición de encendido y activa ese interruptor en la primera página después de obtener el objeto. En esa segunda página, muestra tu diálogo.

No sé si RM2k3 tiene interruptores automáticos, por lo que necesitarías un interruptor diferente para todos tus cofres del tesoro, pero si no puedes volver a las áreas anteriores, puedes reciclar los interruptores utilizados en los cofres anteriores. Simplemente configúralos en OFF cuando ingreses a una nueva área y úsalos en los eventos de cofres del nuevo mapa.
Bro, thank you so much. This is what I've been looking to do! Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/dialogues-for-chests-gifts-when-emptied.175339/