Re: [CODE] > 1 Bulletin Boards in a Room

From: Darkseid (gsi02551@gsaix2.cc.GaSoU.EDU)
Date: 09/17/96


   Pleas do post this

On Tue, 17 Sep 1996, Ashed in Falls wrote:

> The following code is in boards.c:
> 
> /* search the room ch is standing in to find which board he's looking at */
> int find_board(struct char_data * ch)
> {
>   struct obj_data *obj;
>   int i;
> 
>   for (obj = world[ch->in_room].contents; obj; obj = obj->next_content)
>     for (i = 0; i < NUM_OF_BOARDS; i++)
>       if (BOARD_RNUM(i) == GET_OBJ_RNUM(obj))
> 	return i;
> 
>   return -1;
> }
> 
> So, circle simply looks for the first object in the room that is a board.
> All you have to do is pass the actual argument entered to the find_board 
> routine. This way, if user enters write myboard, you can check for 
> "myboard" as an argument in the if statement.
> 
> If you want to allow 1.board and such, you can parse the argument for 
> that too.
> 
> If you want me to supply actual code for this, let me know. I'll write it 
> up and post it.
> 
> It's been a while, Haddixx...
> 
> -valence
> 
> On Tue, 17 Sep 1996, Brian M. Menges wrote:
> 
> > I remember a while back someone on the list mentioned that he/she was going
> > to try to allow more than one bulletin board in a room.  This is a handy
> > porcedure that I would like to implement on my own MUD.  I have around 5
> > different boards and it becomes a pain to move into each bulletin board
> > room or to use 'at <board room> l <board>', etc.  My problem is I don't
> > know how to go about getting started.  I don't have my code in front
> > of me but from what I can remember the special procedure just looks for the
> > first board in the room and all others won't be considered bulletin boards.
> > Any ideas on how I should or could proceed?
> > 
> > Thanks
> > -Haddixx
> >  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> >  | Haddixx             |   -=-=-Implementor of Avalanche MUD-=-=-    |   
> >  + Brian M. Menges     + Running at: 143.207.31.45 8000              +
> >  | haddixx@megamed.com |   Web Page: http://www.megamed.com/~haddixx |
> > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> > 
> > +-----------------------------------------------------------+
> > | Ensure that you have read the CircleMUD Mailing List FAQ: |
> > |   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
> > +-----------------------------------------------------------+
> > 
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> |   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
> +-----------------------------------------------------------+
> 



.............................................................................
                  As the theatre darkened we were seated.                   
                   "The show will start in five minutes"
                         A faceless voice announced.
            "The entertainment you'll see tonight is nothing new,"
                    "You seen it all through and through"
               "You've seen your birth, your life, your death."
          "You may remember all the rest, but all is said and done,"
                   "Is there enough to base a movie on?"

           --Jim Morrison  1963
.............................................................................

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



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