How the Coder can help the Builder. Automatically setting Room Parents.

Submitted by MrWigggles on Wed, 2011-10-12 19:53

Building, will probably always be one of the more tedious and time consuming aspects for a mush. Though, much to Penn's credit, they've taken great strides to reduce the amount of commands that you have to type in, in order to build.

However, the very important parents, still need to be set per room built, and thats a separate command.

Its a separate command, that can be done automatically however.


With the Event System.

The Event System, allow for soft code to happen, trigger by hardcode events in penn. Its quite a marvelous system they've recently introduce into Penn.

@create Event Handler
@config/set event_handler=[num(Event Handler)]
&object`create Event Handler=@switch type(%0)=room,[parent(%0,[xget(%#,rparent)])]

Now, what that &object`create will do is, at every instance a room created, that it'll set the room parent, as the attribute on the builder, rparent.

Now on the Builder, you'll want to include the attribute &rparent which will hold the DB# of the room parent you want to use.

As the Builder, digs the grid, the room parent will be set atomically, reducing the work load of the builder, removing a little bit more of the tedium.