Re: code

From: Phillip A Ames (
Date: 01/29/99

On Fri, 29 Jan 1999 12:23:51 -0600 Brad Scroggins <bscroggins@MEV.NET>
>  Hello, I am attempting to impliment a system to where every x number
>seconds a message (like a global notice or message) would come up giving
>those new to our mud a little help.  The notice needs to just split out
>random messages every so often.  But also impliment a way for those who
>been around the mud a few times to be able to turn it off.
>Any help / suggestions / LOL's are welcome

Define a PRF_NEWBIE in structs.h
Add the name for it in constants.c


char *rnd_help_msg[] = {
        "Newbie Help Message 1\r\n",
        "Newbie Help Message 2\r\n",
        "Newbie Help Message 3\r\n",
        "Newbie Help Message 4\r\n",
        "Newbie Help Message 5\r\n"
#define MAX_RND_HELP_MSG 4 // This is 4 because number() is from 0 to 4

Stick this block of code somewhere in comm.c that is called often(The
only one I can think of might be pulse_violence, but whatever is called

int sendmsg = number(0, 10);
if(sendmsg == 1){
for(d=descriptor_list; d; d=d->next){
if(PRF_FLAGGED(d->character, PRF_NEWBIE))
send_to_char(rnd_help_msg[number(0, MAX_RND_HELP_MSG)], d->character);

This prolly won't work at first, may need a bit of tweaking, but it'll
give you the idea

Phillip Ames    | Satisfaction is not guaranteed. | -Ferengi Rule of Acquisition #19
ICQ: 8778335    | AOL IM: Grathol

You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at
or call Juno at (800) 654-JUNO [654-5866]

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

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