|
|||||||
This is a discussion on "Color Codes in LPC" in the Top Mud Sites MUD Coding forum : Currently using MudOS driver (newest) and a self created mudlib. I was implementing the "standard" color codes you usually find in MudOS mudlibs (%^RED%^, etc). I created an ansi.h include file with a small function called do_ansi that returns a mapping of all colors with their corresponding ansi (colors["white"] is "\033[37m"). After creating this I caught myself wondering where to put the code to interpret these. I finally placed them in the receive_message function on our user object. I have it test the termtype, check if there is one at ... |
|
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
|
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Posts: n/a
|
Currently using MudOS driver (newest) and a self created mudlib.
I was implementing the "standard" color codes you usually find in MudOS mudlibs (%^RED%^, etc). I created an ansi.h include file with a small function called do_ansi that returns a mapping of all colors with their corresponding ansi (colors["white"] is "\033[37m"). After creating this I caught myself wondering where to put the code to interpret these. I finally placed them in the receive_message function on our user object. I have it test the termtype, check if there is one at the beginning of the text, then while-loop sscanf the rest of the text. It works just fine. Out of curiousity though I was wondering if there was in fact a more viable solution than this, or if anyone had any other suggestions on how to implement this. I also wish to add a user-configurable terminal daemon, allowing them to change certain mud colors based on the class passed through message(). The only way I can think of doing this is through the receive_message as well, any ideas? Kaylus@Solice |
|
![]() |
| Thread Tools | |
Color Codes in LPC - Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MUDs with no color | DarkOzma | Tavern of the Blue Hand | 22 | 08-03-2006 12:50 PM |
| Color Obsession | Rathik | Tavern of the Blue Hand | 19 | 08-03-2006 02:27 AM |
| To color or not to color | rockcrusher_sargon | MUD Builders and Areas | 12 | 01-24-2004 02:18 AM |
| Staff of a different color... | Sally | Advertising for Staff | 0 | 03-24-2003 10:00 PM |
| This ikonboard color scheme | crymerci | Bugs and Suggestions | 0 | 01-16-2003 06:02 PM |
|
|