Your first is by far the easiest.
This is NOT tested. It also may need editing for your MUD.
The do_(whatever) are guessed. You'd need to make sure those are the actual do_(whatever) for your shop commands.
This should also be placed at the END of the file that has your shop commands, as it is basically a wrapper and requires those commands to be declared first. It'll throw an error otherwise in some cases.
This also may not be the best way to do it, but it's quick.
void do_shop(CHAR_DATA *ch, char *argument)
if ( !argument || argument == '�' )
send_to_char( "Usage: shop [value]
Where can equal: buy, list, value, or sell
[value] is the object to value/buy/sell\r\n", ch );
argument = one_argument( argument, arg1 )
if (!str_cmp( "list", arg1 ) )
do_list( ch, argument );
if ( !str_cmp( "buy", arg1) )
do_buy( ch, argument );
if ( !str_cmp( "value", arg1) )
do_value( ch, argument );
if ( !str_cmp( "sell", arg1) )
do_sell( ch, argument );
send_to_char( "Invalid shop command!\r\n", ch );
do_shop( ch, NULL );
I'd simply take what the race structure has and copy it to the class structure. It's worth a try, but it could lead to unforseen problems.
The attributes are an interesting idea.
You'd have to add something like:
int max_race_str; // Max Racial Strength
The like for every attribute into the race structure. You'd then need to go into where races are loaded and saved and add the appropriate keys and lines of code to make sure these values are saved. Then, you'd have to go into the racial OLC commands to make sure you can change them. Otherwise you'll be stuck with modifying the flat file
The next thing you'd need to do is either go through and find all references to where the code checks for the max attribute (probably defined in mud.h if I'm not mistaken), and change it to check the player's racial max. Honestly, I'd simply write a macro for this. Search through the code and see if you can find any #define SOME_MACRO() code that refers to player races.
There are other things to consider too. In short though, I'd make use of grep or your favorite find tool and go through the code and search for any places that use or check against the max attribute define.
If you're still in need of help, I could take a closer look later on today.