IC Global Channel [by Quinn]
Snippet Posted Wednesday, August 12th @ 11:28:47 PM, by George Greer in the Commands dept.
Added Apr 27, 1998. Click the link below to read it or download it.

From: Matthew Roach <af237@pgfn.bc.ca>
Subject: IC Channel

Ok for those of you who want a In Charater Channel (i.E. IC Channel)
here it is, please put me and Andy Dirk in your credits (Im Matt Roach)
so EnJoY!

1.  In structs.h
Add
#define PRF_NOIC        (1 << 22) /* Can't hear ic channel      */
This can be found by searching for PRF_ROOMFLAGS or PRF_NOGOSS

2.  act.comm.c
In the function do_gen_comm, add another line to in channels so it looks
like
static int channels[] = {
   0,
   PRF_DEAF,
   PRF_NOGOSS,
   PRF_NOAUCT,
   PRF_NOGRATZ,
   PRF_NOIC,
   0
};

If you go a little further down in the function you will see some
statements about the channels.  Add this to the end of the statments so it
looks like

    {"You cannot IC!\r\n",
      "IC",
      "You aren't even on this channel!\r\n",
    KYEL}

3.  act.informative.c
Find the function do_toggle. Find the section where it lists Gossip
Channel, auction channle, ect and fill it out like

" Gossip Channel: %-3s    "
"Auction Channel: %-3s    "
"  Grats Channel: %-3s\r\n"

"     IC Channel: %-3s    "
"    Color Level: %s",

After this struct are a bunch of ONOFF macros.  Look for the last one
ctypes[COLOR_LEV] and make the following change.

ONOFF(!PRF_FLAGGED(ch, PRF_NOGRATZ)),

ONOFF(!PRF_FLAGGED(ch, PRF_NOIC)),
ctypes[COLOR_LEV(ch)]);

4.  act.other.c
in the function do_gen_tog add the following line to the end of the
*tog_messages table

"Autoexits enabled.\r\n"},   /// this is only a comma being added
{"You can now hear IC-channel\r\n",
"You are now deaf to IC-channel.\r\n"}

further down in this function under switch(subcmd) add
case SCMD_NOIC:
  result = PRF_TOG_CHK(ch, PRF_NOIC);
  break;

I added this just before the default.

5.  interpreter.h
Under /* do_gen_tog */ Add
#define SCMD_NOIC               16

under /* do_gen_com */ Add
#define SCMD_IC                 5
6.  interpreter.c
find noauction in the list and add the following line after it
{ "noic"      , POS_DEAD    , do_gen_tog,  0, SCMD_NOIC }

find hug ( or inventory ) in the list and add the following line
{ "ic"        , POS_RESTING , do_gen_comm, 0, SCMD_IC },

Ok well I think thats it enjoy and if you have any problems just email me
at af237@frodo.pgfn.bc.ca :)



<< How To Add Wear Bits [by WhiteDemon] | Reply | View as text | Flattened | Identify (Minor) Spell [by Soren P. Skou] >>

 


Related Links
  download
Related Articles
More by greerga
 
 

CircleMUD Snippets
 
Note: Not all of these snippets will work perfectly with your version of code, so be prepared to fix one or two bugs that may arise, and please let me know what you needed to do to fix it. Sending a corrected version is always welcome.
Finally, if you wish to use any of the snippets from this page, you are more than welcome, just mention the authors in your credits. If you wish to release any of these snippets to the public on another site, contact me FIRST.