Exits

Making Exits & Doors

(direction) DIG (vnum) :      - this creates a room with the vnum specified, and
                                links it in a two-way exit in that direction.

(direction) ROOM (vnum) :     - this makes a one-way exit to the room with the
                                vnum specified..however the room needs to be
                                created already.

(direction) LINK (vnum) :     - this makes a two-way exit to the room with the
                                vnum specified.. Only IF the room is already created.

(direction) DELETE :          - deletes this exit (not the room)

MAKING DOORS:

(In this order)

(direction) FLAG DOOR:        - makes this exit have a door.

(direction) NAME (string) :   - sets the name of the door. If you want the door to be
                                closed upon reset/crash/reboot, make the NAME of the
                                door something besides "door"

(direction) (flags) :    - sets the door flags, type ? EXIT for a list of
                                flags. These can be: closed, open, etc.

Door Flags

    door           closed   locked  pickproof          
    secret         nopass   easy    hard               
    infuriating    noclose  nolock  key

EXAMPLE:
of building a room with doors, exits, extended descriptions

edit room create 20323          - This creates room 20323 and takes me to it
name {mEntrance to the Mines{x  - This sets the name of the room
heal 100                        - Automatically set to 100
mana 100                        - Automatically set to 100
safe no_recall newbies_only     - This makes the room safe (you cannot
                                  attack in this room),  no recall, and only 
                                  lets in players under level 5 (inclusive)
air                             - Makes the room sector AIR, which means 
                                  PC's need to fly to enter
desc                            - enters the description editor
A boring boring room.           - sets the first line of the description editor

NOTE
There is a maximum oh how much you can type without hitting enter, somewhere between 3 and 4 lines. You may enter anywhere (don’t enter in the middle of a word) and use .f to format the whole description.

.f                               - formats the description
.s                               - shows me what the description is so far
.r "room" "room with a single mirror and a desk"  - replaces the text
.f                               - formats the description
@                                - takes me from the desc editor into
                                   the room editor
ed add mirror                    - makes a keyword "mirror" and takes me into
                                   the ED DESC editor
This mirror is broken.           - sets the first line of the ED desc
@                                - takes me back into the room editor
NORTH DIG 20324                  - makes a two way exit north to room 20324
NORTH FLAG DOOR                  - makes the north exit a door
NORTH FLAG CLOSED                - makes the gate closed
NORTH NAME gate                  - makes the exit keyword "gate"
NORTH KEY 20324                  - makes the key to the door object vnum 20324 use or create 
                                   any key, just reference the vnum)
EDIT ROOM create 20325           - creates room 20325 and takes you to it
GOTO 20323                       - takes you to the first room
EAST ROOM 20325                  - makes a one way link east to room 20325
EAST name desk                   - makes "desk" the name of the exit.
asave area                       - saves the changes to this area.
done                             - exits editor into regular gameplay

EXIT DIRECTIONS ETC

Set up your exits to logically travel along straight north-south, east-west, and up-down paths.

You also have the option to randomize the exits of a room, or a series of rooms every time the area upsets. You presently have an option of two types of random areas: a 2D (n,s,w,e) random area, and a 3D (n,s,w,e,u,d) random area. The basic recipe is as follows:

(1) Lay out your rooms on a piece of paper and connect them such that all of the exit paths are straight (n-s, w-e, u-d)
Say you have room “A” exiting south to room “B”. If room “B” has a north exit (IE the reverse exit), it MUST go back to room “A” (IE it must reverse). If “B” exits north to a different room, you get a crash.

For a complex random area, creating the grid is not as trivial as it may seem. I found it best to work under a wrap-around principal.
Consider:

                                   E----F
              A----B    E----F     |\   |\                 U N
              |    |    |    |     | \  | \                 \|
              |    |    |    |     G----H  \              W--+--E
              C----D    G----H      \  A-\--B                |\
                                     \ |  \ |                S D
              Level1    Level2        \|   \|
                                       C----D

Where ABCD is level 1 and EFGH is level 2 in a 3D random area. To make it more complex, I would have A exit west to B, and from B back east to A. Then from A north to C, and from C back south to A. This is a ‘wraparound’ within the plane of the level. The same is done to the second level:

              ,---------.    ,--.
              |         |    |  |                            N
              `--A---B--'    |  A---B                        |
                 |   |       |  |   |                     W--+--E
                 C---D       |  C---D                        |
                             |  |                            S
                             `--'

Between levels, A goes up to E, and E goes down to A. The between levels wraparound would be: E goes up to A, and A goes down to E:

               _
              / \
              \  E--F                                      U
               \  \  \                                      \
                \  A--B                                   W--+--E
                 \  \                                         \
                  \_/                                          D

Now lets say you want to connect into the above zone. Lets say room X is not random and you want it to connect to room C. If X connected north to C, you would need C to go back south to X. Now here is the hitch. Because A wraps north to C, stupid merc wants C to reverse south to A, not X. So you would have to connect X to another room, or eliminate the north-south wrap exit from A to C. (boy all those diagrams for nothing?) So the point is, lay out your exits carefully.

(2) Declare your exits random with the random set for the room. Remember a 2D maze will have a random 3 reset (since exits N,E,S,W are numbers 0-3), and a 3D maze will have a random 5 reset (since N,E,S,W,U,D are numbers 0-5)

NOTE: For random exits, use in a small area such as a maze.