Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Character Creation Color
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Malti
USA (55 posts) Bio
|
Date
| Thu 20 Apr 2006 06:29 PM (UTC) |
Message
| I know there was anothe post for this but I am not sure what they were talking about. Basically, I am curious how to add force ANSI color at the character creation. I have tried the folloing code, but nothing happens at all. Any help is greatly appreciated.
sprintf( buf, "\n\rChoosing a name is one of the most important parts of this game...\n\r"
"Make sure to pick a name appropriate to the character you are going\n\r"
"to role play, and be sure that it suits a medieval theme.\n\r"
"If the name you select is not acceptable, you will be asked to choose\n\r"
"another one.\n\r\n\r ^[[1;36mPlease choose a name for your character: ");
write_to_buffer( d, buf, 0 ); | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Thu 20 Apr 2006 08:56 PM (UTC) |
Message
| Are you using the correct character? And not just inserting the ^ symbol? Vi has the correct way to do it. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #2 on Thu 20 Apr 2006 10:10 PM (UTC) |
Message
| Perhaps the connection itself disables ASCII codes and strips out ASCII control characters; it's possible though that color characters are only inserted if ASCII codes are enabled. It's worth checking out the send_to_buffer function and seeing if it sends directly.
And Zeno is right, you have to send the escape character (code 33? don't remember) not just ^[ (which is the common way of saying "escape character" in text form). |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Dace K
Canada (169 posts) Bio
|
Date
| Reply #3 on Thu 20 Apr 2006 10:46 PM (UTC) |
Message
| Unless I'm greatly mistaken, write_to_buffer does not allow color.
Use send_to_desc_color instead; it's included in Samson's color code. |
ASJ Games - .Dimension 2, Resident Evil, and snippets - oh my!
http://asj.mudmagic.com
Drop by the area archives and find something for your mud. http://areaarchives.servegame.com | Top |
|
Posted by
| Malti
USA (55 posts) Bio
|
Date
| Reply #4 on Thu 20 Apr 2006 11:42 PM (UTC) |
Message
| I was editing the code in VC++6 and I didnt realize that when i pasted in the exacpe character it had altered it. So I opened up notepad and edited away. So I got all the colors straight. Thanks to everyone, espescially Zero. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,316 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top