i have added my own classes to the mud but i only allow people to remort to them how would i make it so that people do not see the classes when making a new character? i allready baned the classes for newbies that way they are unpickable just need to erase them from the list where they show up. races also. thanks
classes display
Posted by Gorock on Thu 27 Oct 2005 03:23 AM — 7 posts, 27,961 views.
I do remember having to do this for one mud i worked on that used the Xervies of Raffermend remort snippet. I dont remember how i did it all, but it was something like that follows.
Only allow the remort classes to be selected by remort races. This can be done in game in with setclass, or which ever way it goes as i cant remember what comes first in creation races or classes.
To stop it showing the remort races in creation you need to change the loop that displays the races(in nanny) to only show those that do not have the Tier or Remort entry in the race file greater than 0. If i remember right, 0 was mort then you had 1 for remort.
In my hackish sudo:
if (racefile value remort > 0)
continue;
Only allow the remort classes to be selected by remort races. This can be done in game in with setclass, or which ever way it goes as i cant remember what comes first in creation races or classes.
To stop it showing the remort races in creation you need to change the loop that displays the races(in nanny) to only show those that do not have the Tier or Remort entry in the race file greater than 0. If i remember right, 0 was mort then you had 1 for remort.
In my hackish sudo:
if (racefile value remort > 0)
continue;
i didn;t add in a remort snippet i just made the classes with the classes command and then banned them from being picked by new characters but if i could get it out that would be nice
maybe there is a way to edit CON_GET_NEW_CLASS and CON_GET_NEW_RACE so that instead of doing what it does now it just sends a buffer that reads what i want is that possible and if so how would i go about doing that
A realy hackish way to do it would be to take this section of code:
and change it to look something like this
Or you could do it by adding a field to the race/class file, adding that field to the load and saveclass/race functions and then adding in an if check in that above for loop check the field value and no display that race. This way would be more extensible in that you wont have to edit the code if you remove or add in classes or races.
write_to_buffer( d, "\n\rYou may choose from the following races, or type help [race] to learn more:\n\r[", 0 );
buf[0] = '\0';
for ( iRace = 0; iRace < MAX_PC_RACE; iRace++ )
{
if (race_table[iRace]->race_name && race_table[iRace]->race_name[0] != '\0'
&& !IS_SET(race_table[iRace]->class_restriction, 1 << ch->class)
&& str_cmp(race_table[iRace]->race_name,"unused") )
{
if ( iRace > 0 )
{
if ( strlen(buf)+strlen(race_table[iRace]->race_name) > 77 )
{
strcat( buf, "\n\r" );
write_to_buffer( d, buf, 0 );
buf[0] = '\0';
}
else
strcat( buf, " " );
}
strcat( buf, race_table[iRace]->race_name );
}
}
strcat( buf, "]\n\r: " );
write_to_buffer( d, buf, 0 );
and change it to look something like this
write_to_buffer( d, "\n\rYou may choose from the following races, or type help [race] to learn more:\n\r[", 0 );
write_to_buffer( d, "\n\rMexican, Marsian, Mars Bar,:\n\r[", 0 );
Or you could do it by adding a field to the race/class file, adding that field to the load and saveclass/race functions and then adding in an if check in that above for loop check the field value and no display that race. This way would be more extensible in that you wont have to edit the code if you remove or add in classes or races.
ok well i did that but now when someone makes a new player it shows the class list but skips on to the race list
OK, I'm a little more than 'new' to this but....
Couldn't you just make the mud do a level check?
Are remort characters level 1 or 2?
Or perhaps add a flag to check for..
Just seems simpler imho.
Couldn't you just make the mud do a level check?
Are remort characters level 1 or 2?
Or perhaps add a flag to check for..
Just seems simpler imho.