User Name:


Forgot your password?
Vote for Us!
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Sogou

Members: 0
Guests: 19
Newest Member
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » A few questions from a newbie...
Forum Rules | Mark all | Recent Posts

A few questions from a newbie coder.
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jun 30, 2003, 3:08 am
Go to the top of the page
Go to the bottom of the page


JoinedApr 13, 2003

1) I was wondering how difficult it would be to change the buy, list, value, and sell commands to be shop buy, shop list, shop value, shop sell.

2) hints to put me on the right path to change the xp modifer from being a racial attribute to a class attribute. (i.e. I want pseudo multiclassing where a player can start the game as a cleric/rogue but would have an exp modifer of 50 to account for exp being split between two classes since that one class would have most of the cleric and rogue skills combined and use the same exp level chart as everyone else)

3) any snippets exist or have been mused about concerning racial maximums. An example would be to expand primary stat scores above 18/18 so that an ogre might be able to get 20/20 strength where a human is limited to 18/18. A halfling might be limited to 16/16. I'd like to allow for one-use magical items that will raise a primary stat one point up to their racial maximum rather than depending on using a -2 strplus on their roll to keep them from getting an 18 if their racial maximum is 16/16. Rolling a 16 would reduce them to a 14/16 and they could find two of those magical one-use items to raise their str to 16/16.
Post is unread #2 Jun 30, 2003, 6:49 am   Last edited Nov 24, 2007, 12:45 am by Samson
Go to the top of the page
Go to the bottom of the page

The Null Value
GroupAFKMud Team
JoinedFeb 23, 2003

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)
   char arg1[MAX_INPUT_LENGTH]

   if ( !argument || argument[0] == '�' )
      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 );

Experience question.

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.

-- X
Pages:<< prev 1 next >>