Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ new exit flag, nofollow, has it been done?

new exit flag, nofollow, has it been done?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Kamen   (5 posts)  Bio
Date Tue 27 Dec 2005 12:40 AM (UTC)
Message
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
Top

Posted by Gohan_TheDragonball   USA  (183 posts)  Bio
Date Reply #1 on Wed 28 Dec 2005 03:17 AM (UTC)
Message
#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 );
            }
          }
        }
      }
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,598 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.