Gammon Forum
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.
8,994 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.