Quote: I don't know the class system in SMAUG as well as I do in SWR, but I beleive that it SHOULDN'T make a difference if it has no name, you just won't be able to see it, but I'm not quite sure. You can't compile the code? If you can compile, you can do something like this:
for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )
{
if ( class_table[iClass]->who_name &&
class_table[iClass]->who_name[0] != '\0' &&
str_cmp(class_table[iClass]->who_name, "theif") &&
str_cmp(class_table[iClass]->who_name, "cleric"))
{
if ( iClass > 0 )
{
if ( strlen(buf)+strlen(class_table[iClass]->who_name) > 77 )
{
strcat( buf, "\n\r" );
write_to_buffer( d, buf, 0 );
buf[0] = '\0';
}
else
strcat( buf, " " );
}
}
strcat( buf, class_table[iClass]->who_name );
}
and a little further down:
if ( iClass == MAX_PC_CLASS
|| !class_table[iClass]->who_name
|| class_table[iClass]->who_name[0] == '\0'
|| !str_cmp(class_table[iClass]->who_name,"unused")
|| !str_cmp(class_table[iClass]->who_name,"theif")
|| !str_cmp(class_table[iClass]->who_name,"cleric"))
{
write_to_buffer( d, "That's not a class.\n\rWhat IS your class? ",0);
return;
}
That should let you exclude being able to pick certain classes based on the name of the class, but still have it available throughout your mud. |