First off, I'm using Smaugfuss 1.9
Secondly I have a limited understanding of C coding, though I did just start school for programming yesterday, and hopefully wont be too bothersome in the future :)
Basically I decided to use a mobprog to set the sex/class/race for new players as they progress through the learning area for my mud. I'm confident in my building skills with doing the mobprog's, the real question I have is:
I want the game to automatically choose a generic race and class for the character without showing them the choose class/race buffer during the input selection.
I've messed around in Comm.c and managed absolute frustration with my level of understanding. At first I thought it would be simple, I edited the nanny functions after
void nanny_confirm_new_password( DESCRIPTOR_DATA * d, char *argument )
{
CHAR_DATA *ch;
ch = d->character;
write_to_buffer( d, "\r\n", 2 );
if( str_cmp( sha256_crypt( argument ), ch->pcdata->pwd ) )
{
write_to_buffer( d, "Passwords don't match.\r\nRetype password: ", 0 );
d->connected = CON_GET_NEW_PASSWORD;
return;
}
write_to_buffer( d, echo_on_str, 0 );
write_to_buffer( d, "\r\nWhat is your sex (M/F/N)? ", 0 );
d->connected = CON_GET_NEW_SEX;
}
and changed the
write_to_buffer( d, "\r\nWhat is your sex (M/F/N)? ", 0 );
d->connected = CON_GET_NEW_SEX;
simply to
write_to_buffer( d, "\r\nWould you like RIP, ANSI or no graphic/color support, (R/A/N)? ", 0 );
d->connected = CON_GET_WANT_RIPANSI;
and removed the
case CON_GET_NEW_SEX:
nanny_get_new_sex( d, argument );
break;
case CON_GET_NEW_CLASS:
nanny_get_new_class( d, argument );
break;
case CON_GET_NEW_RACE:
nanny_get_new_race( d, argument );
break;
Which compiles now, and sets a new player to a
neutral/human/warrior
Why? and how can I change that to my generic race/class?
I suppose the neutral sex is fine, after all I'll make a mobprog to let the player change that if they wish.
If some one could point me in the right direction, show a working example, slap me for being stupid, or just laugh mercilessly... either way. Thanks in advance.
P.S. if I'm forgetting to give any information, just ask. I really would like to get this to work. |