Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 05-06-2003, 03:06 PM   #1
Verboden Faction
 
Posts: n/a
When I change someone's title using string title, or any other means, the title resets when they level up. I have looked at the code, and can't seem to find where it does that. I still want it to change when they level up if it's not a custom title, but if an immortal changes the title, i want it to stay.

[code]
[60 HUM INV] [KNIGHT] Sir Veratio L'Anel the Invoker
[/quote]
but I changed the title to
[code]
[60 HUM INV] [KNIGHT] Sir Veratio L'Anel the
[/quote]
but when I level, it changes to the title of the next level, and doesn't keep the one I set. But if I don't change my title, i want it to change with the levels, but not reset when I set it myself.
  Reply With Quote
Old 05-06-2003, 03:19 PM   #2
Yui Unifex
Senior Member
 
Join Date: Apr 2002
Location: Florida
Posts: 323
Yui Unifex is on a distinguished road
Send a message via ICQ to Yui Unifex Send a message via AIM to Yui Unifex
Question

Grep for 'title' or whatever the variable that contains the title is called in your sources. Excluding the database operations, look where it is set. Bonus points if you see a reference to a table that contains 'the Invoker' or whatever level-based titles your mud has. Simply jump around setting the title in this place if their title is not one that was set by them levelling up (i.e., it's not in the table of level titles).
Yui Unifex is offline   Reply With Quote
Old 05-11-2003, 08:50 PM   #3
Verboden Faction
 
Posts: n/a
yea, couldn't find that
  Reply With Quote
Old 05-12-2003, 07:09 AM   #4
Yui Unifex
Senior Member
 
Join Date: Apr 2002
Location: Florida
Posts: 323
Yui Unifex is on a distinguished road
Send a message via ICQ to Yui Unifex Send a message via AIM to Yui Unifex
Question

You couldn't find grep? Or were you unable to do grep title *.c? Is the title named something differently? You can easily find the exact name in whatever command sets it (do_title?), of course. If you are indeed grepping for the correct variable name, then your being unable to find it is simply a result of your not trying hard enough =). You can probably cross-reference your search by grepping for a string that is only output to the player when he levels up.
Yui Unifex is offline   Reply With Quote
Old 05-15-2003, 10:33 PM   #5
karlan
Member
 
Join Date: Apr 2002
Location: Brisbane Australia
Posts: 74
karlan is on a distinguished road
Unhappy

Assuming you find the location in code where it sets the title...

a bit of a hack, but you could have a plr flag that toggles if their title is set by an immortal, or not, then you could use the same data in the struct to store it, but if it is set by an immortal, then handle it differently (maybe a control code to mark the end of the static part of the title?)

alternatively you could write a parser for their title string, if they have a string set, look for control codes and replace them with appropriate information (same as is done for colour codes) eg: &sC -> class
[code] title L'Anel the &sC[/quote]
could then pase that string and when it finds an occurance of &s (I use & for colour codes, but do not have a code for s, but the control code is up to you) look at the next char and react based on that, ie: [code] case 'C';
  // insert into string (possibly the middle so there are some extra issues here) class_title[GET_CLASS(ch)];[/quote]

resulting in...
[code] 60 HUM INV] [KNIGHT] Sir Veratio [B]L'Anel the Invoker[/B][/quote]

You just have to remember that string operations can be computationaly(sp?) expensive.
karlan is offline   Reply With Quote
Reply


Thread Tools


Title reset - Similar Threads
Thread Thread Starter Forum Replies Last Post
OtherSpace: Arc XVIII title announced Brody Advertising for Players 0 12-03-2003 09:15 AM
Next reset time Cogline Bugs and Suggestions 1 10-02-2002 12:57 PM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 08:31 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014