Top Mud Sites Forum Return to TopMudSites.com
  Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Read-only archive
The Top Mud Sites forum is closed.
Posting, registration and logins are disabled.

 
Old 04-27-2002, 09:49 PM   #1
kaylus1
 
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
 



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


All times are GMT -4.


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