Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot, Yahoo!

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Afkmud 1.4 code
Forum Rules | Mark all | Recent Posts

Afkmud 1.4 code
< Newer Topic :: Older Topic > Automatic title removal

Pages:<< prev 1 next >>
Post is unread #1 Mar 27, 2003, 1:59 pm
Go to the top of the page
Go to the bottom of the page

Eminorik

GroupMembers
Posts17
JoinedJan 30, 2003

       
Post is unread #2 Mar 27, 2003, 5:33 pm   Last edited Nov 24, 2007, 4:35 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

grep -n title_table *.c

act_wiz.c:4665:        sprintf( buf, "the %s", title_table [victim->class] [victim->level] [victim->sex == SEX_FEMALE ? 1 : 0] );
act_wiz.c:7243:     pager_printf( ch, "Male: %-30s Female: %s\r\n", title_table[cl][x][0], title_table[cl][x][1] );
act_wiz.c:7288:         title_table[class][i][0] = str_dup( "Not set." );
act_wiz.c:7289:         title_table[class][i][1] = str_dup( "Not set." );
act_wiz.c:7620: DISPOSE( title_table[cl][x][SEX_MALE] );
act_wiz.c:7621: title_table[cl][x][SEX_MALE] = str_dup( argument );
act_wiz.c:7644:         DISPOSE( title_table[cl][x][SEX_FEMALE] );
act_wiz.c:7646:         title_table[cl][x][SEX_FEMALE] = str_dup( argument );
mud_prog.c:4437:    sprintf( buf, "the %s", title_table [victim->class] [victim->level] [victim->sex == SEX_FEMALE ? 1 : 0] );
tables.c:73:char *title_table   [MAX_CLASS]     [MAX_LEVEL+1] [2];
tables.c:243:               title_table[cl][tlev][0] = fread_string_nohash( fp );
tables.c:244:               title_table[cl][tlev][1] = fread_string_nohash( fp );
tables.c:368:   fprintf( fpout, "Title\n%s~\n%s~\n", title_table[cl][x][0], title_table[cl][x][1] );
traxmud_prog.c:6005:    sprintf( buf, "the %s", title_table [victim->class] [victim->level] [victim->sex == SEX_FEMALE ? 1 : 0] );
update.c:125:   sprintf( buf, "the %s", title_table [ch->class] [ch->level] [ch->sex == SEX_FEMALE ? 1 : 0] );

grep -n title_table *.h

mud.h:2498:extern char *title_table[MAX_CLASS][MAX_LEVEL+1][2];


Raw output of the grep command on AFKMud 1.4b1. title_table is what you'd need to deal with, and there's all the spots it's referenced.

What you do with it at this point is up to you. You can either remove anything to do with it, or you can cut it down to 1 title per class, per sex as was suggested by Orion. Either way you'll need to make sure the class load/save routines become aware of the change.
       
Post is unread #3 Apr 2, 2003, 2:35 pm
Go to the top of the page
Go to the bottom of the page

Eminorik

GroupMembers
Posts17
JoinedJan 30, 2003

I read around on the forums, and for all the work you guys do, you don't get a whole lot of praise...

So I would like to say thanks for all the help you guys give out! You do an awesome job and deserve the recognition
       
Post is unread #4 May 5, 2003, 8:12 pm   Last edited Nov 24, 2007, 4:35 pm by Samson
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

I know this post is a little old, but I came across this with the old SMAUG and I had to post something

This won't totally remove auto-titles, but it would definately remove them from ever being set when a player advances in level.

Somewhere on the planet earth, in a code file called update.c, around line 118...

   sprintf( buf, "the %s", title_table [ch->class] [ch->level] [ch->sex == SEX_FEMALE ? 1 : 0] );
   set_title( ch, buf );


Now this is 1.5 code, but I think it's the same. Basically comment out those two lines and you've got a small fix. Hopefully this will help anyone else looking to do this
       
Post is unread #5 May 6, 2003, 12:32 am   Last edited Nov 24, 2007, 4:35 pm by Samson
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

Somewhere on the planet earth, in a code file called update.c, around line 118... 

Sorry planet earth is defunct, Samson and I destroyed it in a minor "argument" over world domination plans and we edged it a bit too close to a dimensional rift (I still say its YOUR fault Samson :P)

The thing you're standing on now or refer to as the "earth" is actually a simulation running on an old bug ridden Pentium chip. If you look closely you should be able to see the rounding errors
       
Pages:<< prev 1 next >>