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

From: Ashed in Falls (
Date: 09/17/96

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


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: 8000              +
>  | |   Web Page: |
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> |   |
> +-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

From Tue, 17 Sep 96 14:53:10 EDT
X-SystemInfo: MyE-Mail: EMail
X-Message-No: 4428 (database)
From: goamkows <>
To: circle <>
Subject:  summons
Date: Tue, 17 Sep 96 19:53:00
Message-ID: <>
Reply-To: (goamkows)
X-POP3-Rcpt: lk4150@per
Return-Path: <>
Received: from QUCDN.QueensU.CA (QUCDN.QueensU.CA []) by (8.6.12/8.6.12) with SMTP id TAA06328 for <>; Tue, 17 Sep 1996 19:54:48 +0200
Received: from by QUCDN.QueensU.CA (IBM VM SMTP V2R2) with TCP;Tue, 17 Sep 96 15:06:10 EDT
Received: by (SMI-8.6/SMI-SVR4)id OAA15766; Tue, 17 Sep 1996 14:53:32 -0500
Received: from by (SMI-8.6/SMI-SVR4)
Received: from by (4.1/SMI-4.1)
Received: from by (4.1/SMI-4.1)
Precedence: bulk

uh, correct me if i'm wrong, but in the mag_summons function, should
not the act(mag_summon_msgs[fmsg], FALSE, ch, 0, mob, TO_ROOM) line
be mag_summon_msgs[msg]  (i.e. msg, not fmsg, as the array index).

and the example for animate dead doesn't assign anything to fmsg...

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

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