Re: how do i make level restricted rooms.

From: Matt McLaughlin (mattm@SATYRS.ENGR.CSUFRESNO.EDU)
Date: 04/30/98


how do i make a room so only lvl 110 (IMPL) on my mud can get in>??

                 [Bosstone]:The ska king


________________________________ SNIP______________________________


  well.. how about doing something like this..

  if (ROOM_NUMBER(GET_IN_ROOM(ch)) == ROOM_NUMBER_IN_QUESTION) {
    if (GET_LEVEL(ch) < 110)  // OR  substitue 110 for  LVL_IMPL
      send_to_char("You can not enter that room.\n", ch);
  }



    umm..  just one thing..   you want to have it question the room your trying
to move.. so you probably want it to do something like this:

  #define EXIT   // To the room you want to move into.. something like
  #define EXIT(room_number, direction)     (ROOM_NUMBER(GET_IN_ROOM(ch), dir)

  if (EXIT(room_num.number, direction) == (room_num->next).number)
    if (GET_LEVEL(ch) < LVL_IMPL)
      send_to_char("You can not enter that room.\n", ch);


  now.. assuming you have your db cached as a linked list.. and assuming your
not using stock circlemud code.  This is just an example.. of how you might
go about it..   I havent used circlemud code in ages.. and im not about to
start dowload its source to find out the EXACT definitions for this...

  Some of the definitions are similar.. if i recall.. so that you should get
the idea...  Hope this helps dude!..

-DarkLord


     +------------------------------------------------------------+
     | 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