new exit flag, nofollow, has it been done?

Posted by Kamen on Tue 27 Dec 2005 12:40 AM — 2 posts, 12,785 views.

#0
One of my imms raised an issue with following and grouping being abused to drag players into PK areas, then attack them. I'm sure youve all seen it before...
"Hi there newbie, I know a great place to level you, group up and I'll take you there", etc.

I had an idea to stomp on this, a new exflag NOFOLLOW. If this flag is set, no one who is following another player may pass the exit until they 'fol self'. It seems a fairly simple fix, so my question is, has it been done before? Does anyone know of a snippet I can grab somewhere for it? TIA
USA #1
#define EX_NOFOLLOW BV(open number)

my part of the move_char function might differ slighlty from yours, i can't remember, but you will get the general idea:


    if ( !fall )
    {
      CHAR_DATA *fch;
      CHAR_DATA *nextinroom;
      int chars = 0, count = 0;

      if ( !IS_SET( pexit->exit_info, EX_NOFOLLOW ) )
      {
          for ( fch = from_room->first_person; fch; fch = fch->next_in_room )
        chars++;

          for ( fch = from_room->first_person; fch && ( count < chars ); fch = nextinroom )
          {
            nextinroom = fch->next_in_room;
            count++;
            if ( fch != ch          /* loop room bug fix here by Thoric */
            && fch->master == ch
            && fch->position == POS_STANDING )
            {
            act( AT_ACTION, "You follow $N.", fch, NULL, ch, TO_CHAR );
                move_char( fch, pexit, 0 );
            }
          }
        }
      }