Re: how do i make level restricted rooms.

From: Patrick Dughi (dughi@IMAXX.NET)
Date: 04/30/98


> One method would be to create a room flag called ROOM_IMP_ONLY and
> add the check in perform_move() (I think that isit, it has been awhile).
>
        Its just as easy to add another sbyte or int (or whatever your
level is set to) to the room data structure, and within db.c;parse_room()
simply initilize it to zero if it doesn't exist, else set it to a value.
Make sure you write a function to edit that value, as well as save it with
oasis, and then as has been said, examine the GOD_ROOM or IMMORTAL_ROOM
above and put in the checks in all the movement commands (act.movement.c,
act.wizard.c).  I had a good idea where everything was, and it took me
about 6 and a half minutes to do, barring two spelling mistakes, and
testing.

        I'd say you should look at how the sector type for rooms is put
in, and try to duplicate that, and then grep for ROOM_GODROOM and put in a
check where each one of those are (in the relevant movement functions).
Then add a little something to your stat room function, and maybe
roomflags.

                                                        PjD


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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