Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ classes display

classes display

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Gorock   (149 posts)  Bio
Date Thu 27 Oct 2005 03:23 AM (UTC)
Message
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
Top

Posted by Robert Powell   Australia  (367 posts)  Bio
Date Reply #1 on Thu 27 Oct 2005 09:36 AM (UTC)

Amended on Thu 27 Oct 2005 09:39 AM (UTC) by Robert Powell

Message
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;


Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by Gorock   (149 posts)  Bio
Date Reply #2 on Sat 29 Oct 2005 06:59 PM (UTC)
Message
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
Top

Posted by Gorock   (149 posts)  Bio
Date Reply #3 on Tue 01 Nov 2005 05:19 AM (UTC)
Message
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
Top

Posted by Robert Powell   Australia  (367 posts)  Bio
Date Reply #4 on Tue 01 Nov 2005 08:45 AM (UTC)
Message
A realy hackish way to do it would be to take this section of code:

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.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by Gorock   (149 posts)  Bio
Date Reply #5 on Tue 01 Nov 2005 09:56 PM (UTC)
Message
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
Top

Posted by Alvryn   (6 posts)  Bio
Date Reply #6 on Fri 11 Nov 2005 11:29 AM (UTC)
Message
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.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


20,343 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.