Trying to trigger event dialogue if a condition is met

At the start of my game, I have a store with a back room casino.  In it is a woman who is at the roulette wheel who has lost her rent.  She notifies you of this.  I also have a chest that you can open that gives you 250 gold.  I'm trying to get an event triggered from the opening of the chest that if you talk to her again, triggers a different dialogue about "Oh, you were able to open the chest?!"  "Wow, 250 gold?!  That must be where they put my rent money" and then you are given the option to give her the gold or wish her luck.  If you give her the gold, you are given a weapon.


I'm just not sure how to get the new dialogue to be triggered by the event of the player opening the chest.  Would i need to write the script myself or is there something in game that could do this?


[IMG]http://i.imgur.com/2e4jG7I.jpg[/IMG]
you'll use switches for this


On opening the chest, add a control switch command for a new switch "rent dialogue", and then have the NPC get an additional event page conditioned on that switch with the dialogue that should happen if the chest is opened.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-trigger-event-dialogue-if-a-condition-is-met.60739/