Stopping Players entering rooms.

I want to be able to stop a player entering any room if criteria hasnt been met.
Something like:

Before entering a room: if player has less gold than the room's entry fee say "You cannot enter" instead.

I know the code probably wont work but its just to give an idea of what i would like to achieve.

Use a “before going to” rule (see ch. 7.13 Going from, going to). Note that entering is for enterable supporters and containers, not for changing rooms. Something like this should get you started:[code]Lab is a room. “North is the back, the lobby is to the south, east is the office and the closet is west.”
North of Lab is the Back. South of Lab is the Lobby.
East of Lab is the Office. West of Lab is the Closet.

A room can be allowed or forbidden. [default forbidden]
Lab, Lobby and Closet are allowed.

Before going to a forbidden room:
say “You’re not allowed in [the room gone to].” instead.

Instead of jumping:
now the Back is allowed;
now the Office is allowed;
say “You are now permitted entry to the Back and the Office.”

test me with “n/e/s/n/w/e/jump/n/s/e”.[/code]

Ah I see…
The problem was with- you dont enter rooms- you go into them.
Thanks for the help.