Pokemon type event

Hey guys/gals, I need a bit of help with something. I am trying to make an event that does about the same thing as the counter person in pokemon emerald version in the slateport town. When you enter the place and walk in front of the clerk you have to pay a specific amount of gold to get in. How would I do this in an event? Thanks for the help. Sorry if this seems like a stupid question.
the person itself is a fake event, the real event will be one on the floor where the player will pass.
Im unfamiliar with VX ace commands so ill just put an overall idea:
>on touch trigger:
>Text: "Hello entrance fee is xG"
Show choice: Yes/No
Yes: -xG
erase event* (so it respawns on map exit but doesnt re-charge if you backtrack to the exit)
No: 1 step back.


*In case of multiple floors you would need to turn on a switch which will be turned off when leaving the building.
Thread closed a

Original thread: https://forums.rpgmakerweb.com/threads/pokemon-type-event.130478/