|
musishun00 Wanderer
Joined: 16 Dec 2003 Posts: 77 Location: USA
|
Posted: Fri Dec 19, 2003 9:46 am
storing colored text to a string |
I know that I can store a single line of text to a string. That's easy. The hard question follows: is there any way that I can store a single line of text to a string and still keep the ansi colors of everything? I want to keep variables of everything that I have on my body, but I want the ansi to stay like it is when the MUD sends it to me.
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Dec 19, 2003 6:39 pm |
Yup. Here is an example that grabs all lines and stores the ansi inforamtion into a variable. Depending on what you plan to do with the information after storing, you might want to replace the ansi codes with your mud color codes.
#TRIGGER {^(*)$} {#ADDITEM ansitest {%1}} "" {color}
#VAR ansitest {[31mHP[1;33m:[1;31m749[1;33m/[0;31m749 [1;34mMV[1;33m:[1;36m1990/[0;36m1990 [1;33mGP:359622[0;32m Sound:loud [0m[32mTone:soft Day:night Users:6[0m} |
|
|
|
|
|