racexclude.txt
snippets · 659 B · 2010-03-30
Race exclude: exclude certain classes by race in nanny (post by tchaerlach).
Download « Back to the snippets list
From: tchaerlach@aol.com
I used a check in my nanny function for the multiplier to turn off certain
classes, I made the multiplier in const.c 0 for a class I didn't want that
race to be able to have.
Try this out, it works for me, this is from comm.c in the void nanny function
strcpy( buf, "Select a class [" );
for ( iClass = 0; iClass < MAX_CLASS; iClass++ )
{
if (pc_race_table[ch->race].class_mult[iClass] == 0)
continue;
else
if (iClass > 0)
strcat( buf, " " );
strcat( buf, class_table[iClass].name );
}
strcat( buf, "]: " );
write_to_buffer( d, buf, 0 );
d->connected = CON_GET_NEW_CLASS;
break;