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


This is a discussion on "Race Restring" in the Top Mud Sites MUD Coding forum :

ok, I need help. I need a snippet for race restring. I use rom2b4. I have color and OLC already in it if that helps. But I need race restring for some major RP. Thanks....



You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our MUD community today!

If you have any problems with the registration process or your account login, please contact us.

If you are a registered member of the old TMS forums, please click here
Reply
 
LinkBack Thread Tools
Old 01-06-2003, 02:05 AM   #1
Verboden Faction
 
Posts: n/a
Unhappy

ok, I need help. I need a snippet for race restring. I use rom2b4. I have color and OLC already in it if that helps. But I need race restring for some major RP. Thanks.
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-06-2003, 11:37 PM   #2
jornel
Member
 
Join Date: Sep 2002
Location: Canada
Posts: 73
jornel is on a distinguished road
What exactly do you mean by 'race restring'? What's it supposed to do?

Are you trying to change all the members of one race into another? Or just one member? How is it different from just creating a new race, and then having certain characters change to the new race (for a while maybe).

Sorry for dumping so many questions on you, but I think better to come up with correct answers to the right questions.

jornel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-07-2003, 12:24 AM   #3
Verboden Faction
 
Posts: n/a
race restring, what it does is make the race that is read in the who list different from the race a person really is. it's a command in a lot of muds. in score, a person is still elf, but on the who list, it'll say Boogie if I set it to that and it fits in the maximum string on the list. but only that person has it restrung.
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-07-2003, 11:58 AM   #4
Yuki
Member
 
Join Date: Jun 2002
Location: My laptop, my apt, Columbus, Ohio, USA
Posts: 42
Yuki is on a distinguished road
Send a message via ICQ to Yuki
Put a new char pointer into pcdata, or chardata, depending which you know to do better.

char *raceRestring;

Then in the do_who method, if your raceRestring isn't NULL and isn't "", have it print that instead of the actual race.

Make a command to change it, and add raceRestring into save.c and recycle.c where needed.

Fairly simple.
Yuki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-07-2003, 05:45 PM   #5
Verboden Faction
 
Posts: n/a
yes, i am a loser.  I am having issues with putting it in the do_who and do_whois.  What line would I put in?  tried using if's, but that didn't compile right, and then...grr..help? Also, where do I put it in recycle?  that confuses me a little lot.  that is why i need help     *ish a newbie coder*  still working on some things..
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-08-2003, 12:07 AM   #6
Verboden Faction
 
Posts: n/a
rar, ok, i did it all, but i need help with the line in the do_who function, otherwise I got it. I need it to read what is in the pfile for raceR and put that in the place for race in the who list. But if that field is blank or doesn't exist, then it just uses the real race of the person.
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-08-2003, 12:57 AM   #7
Yuki
Member
 
Join Date: Jun 2002
Location: My laptop, my apt, Columbus, Ohio, USA
Posts: 42
Yuki is on a distinguished road
Send a message via ICQ to Yuki
do_who I'm sure goes something like this:

sprintf(buf, "[%13s] %s%s", ...)

or something like that. Of course, my do_who code is far-modified, so what you do is find the thing that is producing the string in the brackets, and change it.

I can't remember what the name of it was, but I recall it being something like class or something, it's been years.

Anyhow, it's what all the immortal titles are set to, so find that, then at the end where it is being added in... say the name of the variable is whoString... and your raceString is called raceString...

put something akin to this right into the code...

raceString == NULL || raceString[0] = '\0' ? ch->pcdata->raceString : whoString

If that makes no sense to you, you shouldn't be coding yet. Grab a book on C++, read the first 4-5 chapters, don't bother reading about classes (stop right before it) then go back to mud coding. Get a book for reference. There's a snippet for this out there too, I'm sure. Kyndig.org I think has tons of snippets.

I can't actually code it for you without looking at the stock rom code, which I really don't want to do...

as for recycle.c, whenever you add in a string you should free the memory for it.
Yuki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-08-2003, 01:00 AM   #8
Verboden Faction
 
Posts: n/a
thanks, I got it
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Thread Tools


Race Restring - Similar Threads
Thread Thread Starter Forum Replies Last Post
Most interesting race you've played? Brody Roleplaying and Storytelling 16 07-31-2005 05:45 PM
Alternative race system KaVir Advanced MUD Concepts 3 12-04-2004 08:00 AM
Favourite race? Santrilla Tavern of the Blue Hand 9 09-29-2002 12:45 AM
It's a race! It's a race! Enzo Tavern of the Blue Hand 15 08-24-2002 10:03 AM
What race do you prefer? Dionae Tavern of the Blue Hand 24 08-02-2002 10:40 AM

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
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 02:26 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Style based on a design by Essilor
Copyright Top Mud Sites.com 2007