Skip to content

Elevators

luciensadi edited this page Jan 11, 2021 · 9 revisions

Elevators are processed at startup from the flat file located at lib/etc/elevator. This file is formatted as follows:

First number: The total number of elevator blocks in the file.

Elevator Line:

Each elevator has a single Elevator Line at the top of its entry that describes the car and the elevator's settings.

  • First number is the elevator car room vnum.
  • Second number is (probably) the number of columns on the elevator button panel.
  • Third number is the number of floors.
  • Fourth number is the lowest elevator floor available; -# for basement. All floors are counted up incrementally from here.)

Floor Line:

Each two-number line below the elevator code designates a floor. Make sure the number of lines matches the number of floors in the elevator heading.

  • First number is the room vnum of the room you'd like your elevator attached to.
  • Second number is the vnum of the shaft that corresponds with this floor.
  • Third number is the numerical direction code that the door opens in (starts at 0 and goes clockwise). See bottom of this page for the list of directions.

Example elevator file:

4
60531 1 2 4
60530 60621 4
60532 60622 4
17122 2 7 0
17127 17181 0   
17137 17182 4   
17135 17183 4
17133 17184 4
17131 17185 4
17128 17186 4
17121 17187 4
70317 1 1 0
70302 70331 4
10031 1 3 -1
10029 10034 0
10028 10033 0
10030 10032 0

In the above file, we can see that we have three elevators. The first elevator's car is rnum 60531, which has 1 row of buttons on its panel and goes to a total of 2 floors. It starts on floor 4, so the floors available are 4 and 5. (You may recognize this as the chargen elevator). Its two floors let out to to the south (direction 4) to rnums 60530 and 60532 respectively.

List of directions:

#define NORTH          0
#define NORTHEAST      1
#define EAST           2
#define SOUTHEAST      3
#define SOUTH          4
#define SOUTHWEST      5
#define WEST           6
#define NORTHWEST      7
Clone this wiki locally