ID:149963
 
In order to make it easier for players to use color, I want to use a system similar to a popular color code for rom 2.4 muds. The player need only type {r and it will fill in the entirity of font color = "red" for them... basically just a proc to replace the { strings with the proper colour.
proc/DoColor(txt)
var/stars
var/s_amount
var/mem
var/find_t
var/txtLen
var/Words[]
Words = new /list/
Words = list("{r","{b","{g","{y")//you can add words here to filter
if(Words.len)
memo:
for(mem = 1,mem < Words.len + 1,mem++)
find_t = findtext(txt,Words[mem])
if(find_t)
txtLen = length(Words[mem])
stars = null
s_amount = null
//for(s_amount = 0,s_amount < txtLen,s_amount++)
stars += "\FONT COLOR = \"red\"\"
txt = copytext(txt,1,find_t) + stars + copytext(txt,find_t+txtLen,0)
if(findtext(txt,Words[mem])) goto memo
return txt

I have of course modified the font color's to not having brackets, to prevent color bleeding. This is obviously taken from SGS, so credits to the creators there, all I need this to do is decipher the correct colours, and replace them with the correct color code.

Polatrite, Assassin of the Sun

P.S. Interested in coding for the Trinity Star? Click this link for more information! -id:58965-
I made an awesome system for this a long time ago! And then I was rideculed because you can just use \red and stuff so I took it off =(. I even added a color change thing to it similar to what yahoo IM has, so that you could make it fade from red to blue and stuff. hehehe. I plan on reimplementing something like this for the mudlib I am working on.
Ok, lets just revive ALL my old Trinty Star related posts! :P No, but honestly, has anyone created anything like this, or Ebonshadow, have you re-implemented this?