Re: adding race, class to hit

From: Rasdan (rasdan@PEAK.ORG)
Date: 11/23/97


>Can anyone recommend a quick place to add race and class to the list of
>keywords you can use to attack a player? I've mucked about in
>handler.h: get_char_room_vis, but don't want to have to change that
>prototype and then change it everywhere it shows up..
>
>An ++Anarchist++ Clone is standing here.
>
>>k anarc
> They aren't here.
>>k clone
> They aren't here.
>

Well, is the ++ surrounding added when it is displayed or is it an actual
part of the race name?

If it's not a part of the race name, then you can use get_char_room_vis
without modifying any prototypes, no additional argument is required.

This is from my code, not sure what stock circle is, though I don't think
we changed this function any:

I'm going to assume your race array is pc_race_types.

  for (i = world[ch->in_room].people; i && j <= number; i = i->next_in_room)
    if (isname(tmp, i->player.name) || \
      /* These two lines should be all you need to add */
       !str_cmp(name, pc_race_types[GET_RACE(i)]) || \
        !str_cmp(name, pc_class_types[GET_CLASS(i)]))
      if (CAN_SEE(ch, i))
        if (++j == number)
          return i;

                                  /   \
        _                 )      ((   ))     (
       (@)               /|\      ))_((     /|\                 _
       |-|`\            / | \    (/\|/\)   / | \               (@)
       | | ------------/--|-voV---\`|'/--Vov-|--\--------------|-|
       |-|                  '^`   (o o)  '^`                   | |
       | |  James C. Thomas Jr.   `\Y/'  Founder of Finality   |-|
       |-|                 rasdan@finality.com                 | |
       | |                  finality.com 4000                  |-|
       |_|_____________________________________________________| |
       (@)       l   /\ /         ( (       \ /\   l         `\|-|
                 l /   V           \ \       V   \ l           (@)
                 l/                _) )_          \I
                                   `\ /'
                                     `


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



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