Re: [CODE] - need a little help

From: Del Minturn (caminturn@earthlink.net)
Date: 04/02/99


>
> if(GET_GUARDIAN(vict)) {
>           if(GET_GUARDIAN(vict)->in_room == vict->in_room) {
>                   set_fighting(ch, GET_GUARDIAN(vict));
>           } else {
>                   sprintf(buf, "%s is being attacked!\r\n", GET_NAME(vict));
>                   send_to_char(buf, GET_GUARDIAN(vict));

It looks like here you change vict to the person being guarded, then
attact vict.. hence you get the murder message. Try switching it to
check the player (ch) if they are being guarded then set guardian
fighting vict (in this case would be the mob)
Please if anyone see's a better way.. correct me!


     +------------------------------------------------------------+
     | 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