Still in the process of figuring out exactly what's going on, but I thought I'd go ahead and share some newer issues. Apparently when I set the PROTOTYPE flag, several flags are set (As I suppose they're supposed to be) - Among them are "sentinel" "scavenger" "r3" and "r3" (it displays twice). The R3 flag is just a placeholder isn't it?
Well, I've tried most of the flags and only prototype neglects to cause a crash. Another curious thing is that after I set the prototype flag on an NPC, I set him to AGGRESSIVE as well. This is what I got;
mset guard flags aggressive
Build: Evre: mset guard flags aggressive
vnum:<#2000> / wizinvis: 0
look
Research Facility Kierkeguard - Foyer {2000[indoors]
The cool, calm ambience of the room accents its mixture of lavish oak and steel furnishings. The room itself is of fair size for a foyer. Paintings of pleasant landscapes dot the light blue walls, perforated with simple half-oval light fixtures that give off a soft white glow toward the smooth white ceiling.
Obvious exits:
North - Research Facility Kierkeguard - Entryway
(Link Dead) (Blue Aura) A security guard stands watch here.
He went /link dead/. o.O A few moments after that the MUD crashed, which is strange as well because there was a delay this time. Is this common behavior for NPCs? And, on that same token, what exactly does the blue aura imply? I had assumed prototype but when I checked my secretary, who doesn't have the prototype flag, she's got a blue aura as well.
- EDIT -
Rather than double post, I'll just add on to what I've already posted... The bug's been there for as long as I can recall, actually, though I don't have any backups dating back before I first starting changing text strings, but I do recall that a few days after I first got the MUD running I logged on and tried to show a friend how to create a "monster" but the MUD kept crashing. I didn't realize it at the time but it was because I was setting the AGGRESSIVE flag.
I tried changing the thirst/hunger code back to normal, but the bug persists. Lacking any other option, I'm going to go through and post anything relevant to flag setting -
In build.c
if( IS_NPC( victim ) )
{
value = get_actflag( arg3 );
if( value < 0 || value >= 31 )
ch_printf( ch, "Unknown flag: %s\n\r", arg3 );
else if( 1 << value == ACT_PROTOTYPE && ch->top_level < sysdata.level_modify_proto )
send_to_char( "You cannot change the prototype flag.\n\r", ch );
else if( 1 << value == ACT_IS_NPC )
send_to_char( "If the NPC flag could be changed, it would cause many problems.\n\r", ch );
else
TOGGLE_BIT( victim->act, value );
}
else
{
value = get_plrflag( arg3 );
if( value < 0 || value >= 31 )
ch_printf( ch, "Unknown flag: %s\n\r", arg3 );
else if( 1 << value == ACT_IS_NPC )
send_to_char( "If the NPC flag could be changed, it would cause many problems.\n\r", ch );
else
{
ftoggle = TRUE;
TOGGLE_BIT( victim->act, value );
}
}
}
if( ftoggle )
send_to_char( "Flags set.\n\r", ch );
if( IS_SET( victim->act, ACT_PROTOTYPE ) || ( value == ACT_PROTOTYPE && protoflag ) )
victim->pIndexData->act = victim->act;
return;
In mud.h (for the TOGGLE_BIT code)
#define SET_BIT(var, bit) ((var) |= (bit))
#define REMOVE_BIT(var, bit) ((var) &= ~(bit))
#define TOGGLE_BIT(var, bit) ((var) ^= (bit))
(ACT flag structure from mud.h is posted earlier in this thread so I won't bother reposting it.)
That's all the relevant code I can think to find at the moment. If I'm spamming with too much of this stuff or if I'm not heading in the right direction, don't hesitate to tell me. Thanks. |