[NEWBIE?][CODE]

From: Chris Proper (jproper@erols.com)
Date: 02/09/99


Greetings,

        This is my first post to the list, though I've been lurking on it for
around a month now.  Also let me state that I'm intermediate level C
programmer (heh, I think).  Anyways, on to the problem...

        I'm trying to add implants to a copy of Circle v3bpl14, (the copy
Phooey put up on the circlemud ftp site with dg scripts, oasis olc, and
ported to Win).  I tried to model it after the equipment code, as I
wanted implants to follow the same style.  I want folks to be able to
type implants to see what implants they have, and to have a mob put them
in or remove them.  I also want them to stay through death.  I added all
the #defines into structs.h for the implant positions and I #defined
ITEM_IMPLANT.  I pretty much copied ACMD(do_equipment) to
ACMD(do_implant) and changed it to use the implant stuff I added.

ACMD(do_implants)
{
  int i, found = 0;

  send_to_char("You have implanted:\r\n", ch);
  for (i = 0; i < NUM_IMPLANTS; i++) {
    if (GET_IMPLANTS(ch, i)) {
      if (CAN_SEE_OBJ(ch, GET_IMPLANTS(ch, i))) {
        send_to_char(where_implant[i], ch);
        show_obj_to_char(GET_IMPLANTS(ch, i), ch, 1);
        found = TRUE;
      } else {
        send_to_char(where_implant[i], ch);
        send_to_char("Something.\r\n", ch);
        found = TRUE;
      }
    }
  }
  if (!found) {
    send_to_char(" Nothing.\r\n", ch);
  }
}

I also added this to the char_data structure in utils.h...

#define GET_IMPLANTS(ch, i)  ((ch)->implants[i])

Finally, I tried to add support for implants into Oasis OLC (v1.5) but
that is pretty far from working.  And quite frankly I'd be happy to just
get the implant code working.  Which brings me to the main question
of... what else do I have to do besides make it so you keep implants
through death (I saw a tattoo patch that I can probably figure that out
from)?  As it is now just typing implant on the mud shows that I have
nothing implanted.  Any help on this would be GREATLY appreciated,
thanks!

Chris
jproper@erols.com


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



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