Re: Adding entries to ASCII pfiles

From: Dust (dustlos@hotmail.com)
Date: 08/14/01


Well, a good thing to look at would be poofin saving or the name
saving or any other char * type of thing. Make sure it is cleared,
freed, saved and loaded in db.c

If you want really customizable slays, you will need a way to have the
name of the killer and the victim appear, this is what I did for my
poofins:

ACMD(do_poofset)
{
  char **msg;
  int counter, poofok = 0;

  switch (subcmd) {
  case SCMD_POOFIN:    msg = &(POOFIN(ch));    break;
  case SCMD_POOFOUT:   msg = &(POOFOUT(ch));   break;
  default:    return;
  }

  skip_spaces(&argument);

  if (*msg)
    free(*msg);

  if (!*argument)
    *msg = NULL;
  else {
    delete_doubledollar(argument);
    *msg = str_dup(argument);
     for (counter = 0; *argument != '\0'; argument++) {
        if (*argument == '$' && *argument != '\0' && *argument != 'n')
{
           poofok = 1;
        }
     }
  }
  if (!poofok) {
    *msg = NULL;
    send_to_char("Your poofin/out must include a $n.\r\n", ch);
    return;
  }

  send_to_char(OK, ch);
}

What changes you would want to add in is the $N for the victim, make
sure the slay message uses act though, etc. Good luck.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST