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

From: Ashed in Falls (vasile@WOLVERINE.CIS.fordham.edu)
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...

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


From goamkows@kirk.geog.sc.edu Tue, 17 Sep 96 14:53:10 EDT
X-SystemInfo: MyE-Mail: EMail
X-Message-No: 4428 (database)
From: goamkows <goamkows@kirk.geog.sc.edu>
To: circle <circle@cspo.queensu.ca>
Subject:  summons
Date: Tue, 17 Sep 96 19:53:00
Message-ID: <CMM.0.90.0.842986390.goamkows@scotty.geog.sc.edu>
Reply-To: goamkows@kirk.geog.sc.edu (goamkows)
X-POP3-Rcpt: lk4150@per
Return-Path: <@QUCDN.QueensU.CA:owner-circle@cspo.queensu.ca>
Received: from QUCDN.QueensU.CA (QUCDN.QueensU.CA [130.15.126.2]) by per.cybercity.dk (8.6.12/8.6.12) with SMTP id TAA06328 for <lk4150@krull.dk>; Tue, 17 Sep 1996 19:54:48 +0200
Received: from cspo.queensu.ca by QUCDN.QueensU.CA (IBM VM SMTP V2R2) with TCP;Tue, 17 Sep 96 15:06:10 EDT
Received: by cspo.queensu.ca (SMI-8.6/SMI-SVR4)id OAA15766; Tue, 17 Sep 1996 14:53:32 -0500
Received: from otis.cla.sc.edu by cspo.queensu.ca (SMI-8.6/SMI-SVR4)
Received: from kirk.geog.sc.edu by otis.cla.sc.edu (4.1/SMI-4.1)
Received: from scotty.geog.sc.edu by kirk.geog.sc.edu (4.1/SMI-4.1)
Sender: owner-circle@cspo.queensu.ca
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: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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