Re: CODE FAQ: Restricting Movement (was Re: Level Resticted Room)

From: Billy H. Chan (bhchan@po.EECS.Berkeley.EDU)
Date: 07/08/96

> On Mon, 8 Jul 1996, Linebacker wrote:
> > I am wanting to prevent characters over a certain level from entering
> > certain rooms and characters under a certain level from entering other
> > rooms. I have seen muds with mud schools that allowed only levels 0 - 5
> > into the school.
> >  
> > Has anyone done anything like this? What is the best method for doing this?
> > 

Another way would be to set it up in the zone file the range of levels and
in the same place as I wrote before, act.movement.c, do the checks.

Add these to zone_data (in db.h):
	int lvl_low;	/* lower level limit */
	int lvl_high;   /* upper level limit */

Then, check those two values in act.movement.c and prevent movement into
rooms in zones in which GET_LEVEL(ch) < lvl_low || GET_LEVEL(ch) > lvl_high

This assumes you know how to add values to .zon files and read them back
in db.c, (and maybe fixing olc's)

On LL1.5.1, our level limits are not requirements but suggestions.  Thus,
a player can type 'show areas' and see who built which area and what levels
should go there.

This archive was generated by hypermail 2b30 : 12/07/00 PST