Re: 2nd round of the spell affects

From: Edward Ginis (Darkwelder@maelstrommud.com)
Date: 04/05/02


> yes, i can see that, but how does the players, i mean like in some muds,
> type affect to see all the spells in effect and their respective
> durations..

Here is a basic do_affects dropin snippet. Hope it helps.

ACMD(do_affects)
{
  struct affected_type *aff;
  extern char *spells[];
  int mod = 0;


  send_to_char("      &B[&WAffect&B]&n         &k|  &B[&WTicks&B]  &k|  &B
[&WDescription&B]&n\r\n", ch);
  send_to_char("&k--------------------------------------------------------
&n\r\n", ch);

   if (ch->affected)
  {
    for (aff = ch->affected; aff; aff = aff->next)
    {
      mod = 0;
      sprintf(buf, "&B[&W%-20s&B] &k|   &B[&W%-3d&B]   &k|  ", spells[aff-
>type],
                aff->duration + 1);
      if (aff->modifier)
      {
        sprintf(buf, "%s%d to %s", buf, aff->modifier, apply_types[(int)
                aff->location]);
        mod = 1;
      }
      if (aff->bitvector)
      {
        if (mod)
          strcat(buf, ", ");
        strcat(buf, "sets ");
        sprintbit(aff->bitvector, affected_bits, buf1);
        strcat(buf, buf1);
      }
   send_to_char(strcat(buf, "\r\n"), ch);
    }
  }
  send_to_char("&k--------------------------------------------------------
&n\r\n",ch);
}

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT