-
Notifications
You must be signed in to change notification settings - Fork 33
Elevators
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.
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. 0 is ground, -1 or lower is B1 etc, positive numbers are those floors (e.g. 3 is floor 3). All floors are numbered incrementally upwards from this number.
Starting with the highest floor first, 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 landing you'd like your elevator to stop at.
- 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.
Remember to orient the elevator with the highest floor at top and the lowest at the bottom.
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 vnum 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 vnums 60530 and 60532 respectively.
#define NORTH 0
#define NORTHEAST 1
#define EAST 2
#define SOUTHEAST 3
#define SOUTH 4
#define SOUTHWEST 5
#define WEST 6
#define NORTHWEST 7