Exit Functions for Mocha
Note that linked exits cannot be modified.
- exit find_exit (person pc, string name);
- Attempts to find an exit with the given name in the room of the
person pc. Returns none if no exit in the room matches
the name.
- room ex.in_room;
- Returns the room from which the exit ex exits.
- room ex.to_room;
- integer ex.to_vnum;
- void set_exit_to_room (exit ex, room rm);
- void set_exit_to_vnum (exit ex, integer vnum);
- Determine or set the room to which the exit ex goes, either
as a room or as a virtual number.
- exit ex.opposing;
- Returns the exit opposite the exit ex if ex is linked
to another exit, or none otherwise.
- integer ex.key;
- void set_exit_key (exit ex, integer key);
- Determine or set the virtual number of the key used to lock and unlock
the exit ex.
- integer ex.size;
- void set_exit_size (exit ex, integer size);
- Determine or set the size of the exit ex in inches. A value of
anything indicates that anything can pass through the exit.
- string ex.name;
- Returns the name of the exit ex (e.g., "north," "into the
fountain").
- string ex.towards;
- Returns a string meaning "in the direction of" the exit ex.
- string ex.from;
- Returns a string meaning "from the direction of" the exit ex.
- string ex.door_name;
- Returns the name of the door for exit ex (e.g., "oak door").
- string ex.description;
- Returns the description of the exit ex.
- boolean ex.is_pickable;
- integer ex.pick_modifier;
- void set_exit_pickable (exit ex, boolean pickable, integer modifier);
- Determine or set the ability and modifiers for picking an exit door.
The modifier is applied to the skill of anyone attempting to pick the lock
on the exit door and must fall in the range -200 to 0. Note that pickable
doors are incompatible with climbing and falling exits.
- boolean ex.is_hidden;
- void set_exit_hidden (exit ex, boolean hidden);
- boolean ex.is_falling;
- integer ex.fall_damage;
- void set_exit_falling (exit ex, boolean falling, integer damage);
- Determine or set whether or not an exit is a falling exit and the
amount of damage received when falling through the exit. The damage is
expressed as a number of D8's and must fall in the range 0 to 200.
Note that falling exits are incompatible with climbing exits and pickable
doors.
- boolean ex.is_climbable;
- integer ex.climb_modifier;
- void set_exit_climbable (exit ex, boolean climbable, integer modifier);
- Determine or set the necessity and modifiers for climbing through an
exit. The modifier is applied to the skill of anyone attempting the climb
and must fall in the range -200 to 0. Note that climbing exits are
incompatible with pickable doors and falling exits.
- integer ex.state;
- void set_exit_state (exit ex, integer state);
- Determine or set the state of the exit ex. The state must be one
of the following constants:
- closed_door -- a closed door
- doubly_locked_door -- a closed, locked, and wizlocked door
- locked_door -- a closed and locked door
- non_door -- not a door
- open_door -- an open door
- wizlocked_door -- a closed and wizlocked door
- integer ex.trap;
- void set_exit_trap (exit ex, integer trap);
- Determine or set the type of trap on the exit ex. The type must
appear in the following list of constants:
- trap_darts
- trap_exploding
- trap_falling_block
- trap_needles
- trap_none
- trap_poison_gas
- trap_shock
- trap_sleep_gas
- trap_teleport
- trap_trapdoor
Return to Mocha's Main Page