Change Text/Font color?
Buddywarrior
Member Posts: 62
Is there one built in with EE now, and if not could somebody recommend one?
They used to look like.
SendMessageToPC(oPC, "<LimeGreen>Your pants are on fire.<^c>");
* Is there a way to just search Builders- Scripting? I cant find it if there is.
They used to look like.
SendMessageToPC(oPC, "<LimeGreen>Your pants are on fire.<^c>");
* Is there a way to just search Builders- Scripting? I cant find it if there is.
0
Comments
For searching, I'd search for that closing tag '</c>' but maybe you'd find more searching for something like '<cþ >'.
The built in way is:
Another way to do it is through custom tokens. This works well in conversations. Set these in OnModuleLoad:
SetCustomToken(100, "</c>"); // CLOSE tag SetCustomToken(101, "<cþ >"); // red SetCustomToken(102, "<c þ >"); // green SetCustomToken(103, "<c þ>"); // blue SetCustomToken(104, "<c þþ>"); // cyan SetCustomToken(105, "<cþ þ>"); // magenta SetCustomToken(106, "<cþþ >"); // yellow SetCustomToken(107, "<c >"); // black SetCustomToken(108, "<c¥ >"); // dark red SetCustomToken(109, "<c ¥ >"); // dark green SetCustomToken(110, "<c ¥>"); // dark blue SetCustomToken(111, "<c ¥¥>"); // dark cyan SetCustomToken(112, "<c¥ ¥>"); // dark magenta SetCustomToken(113, "<c¥¥ >"); // dark yellow SetCustomToken(114, "<c¥¥¥>"); // grey SetCustomToken(117, "<cŒŒŒ>"); // dark grey SetCustomToken(115, "<cþ¥ >"); // orange SetCustomToken(116, "<cþŒ >"); // dark orange SetCustomToken(117, "<cÚ¥#>"); // brown SetCustomToken(118, "<c† >"); // dark brownThen of course, you can do it the way you mentioned. Make an include script that defines the colors: I'll let you figure out how to set the colors.
Here are all the symbols used in x3_inc_string going from lowest to highest:
fw®°Ìþþþ
As you can see though, there's a bunch of other symbols that can be used. Maybe I'll look up and see if there's a reference somewhere if I have time.
<c† >Text to be made brown</c>
TR
// Here are SOME of the working color constants... // Skip 1 Line (Go to the line directly after this one!) const string NEW_LINE = "\n"; // 2 Carriage Returns... (Go to the 2nd line after this one) const string SKIP_LINE = "\n\n"; // Skip 2 Lines! (Go to the 3nd line after this one) const string DOUBLE_SKIP_LINE = "\n\n\n"; // YOU MUST CLOSE EACH STRING WITH COLOR WITH THIS! const string CLOSE = "</c>"; const string RED = "<cüL@>"; const string WHITE = "<cüüü>"; const string BLUE = "<c=Tý>"; const string GOLD = "<cæË*>"; const string LIME = "<cOüO>"; const string GREEN = "<c$Ü$>"; const string ORANGE = "<cü¥>"; const string PINK = "<cý±ý>"; const string CYAN = "<c~öö>"; const string LIGHTGREY = "<cññý>"; const string GREY = "<cËÏ×>"; const string PURPLE = "<cçé>"; const string MAGENTA = "<cç)ç>"; const string TURQUOISE = "<c*äÍ>"; const string BLOOD = "<cÍ>"; const string TAN = "<cüá¢>"; const string ROSE = "<cá±Å>"; const string LIGHTPINK = "<cýáý>"; const string BROWN = "<c¯xE>"; const string ARMYGREEN = "<cLs4>"; const string MONEY = "<c6a9>"; const string SLATE = "<c}}©>"; const string DEEPPURPLE = "<c}}©>"; const string DARKPURPLE = "<c}}©>"; const string DARKBROWN = "<cgR3>"; const string ROYALBLUE = "<cQø>"; const string DEEPBLUE = "<cÅ>"; const string NAVYBLUE = "<c¥>"; const string BABYBLUE = "<c¢Ãý>"; const string LIGHTBLUE = "<cOzý>"; const string ICEBLUE = "<cçëü>"; // Here is an example function to use them (YOU NEED TO CODE THE REST) // Returns sMsg in nColor... // 1 = Red / 2 = White / 3 = Blue / etc.... <<< You need to finish this! // Contine # = ????.... string ColorTextMsg(string sMsg, int nColor = 1); string ColorTextMsg(string sMsg, int nColor = 1){ switch(nColor){ case 1: return RED + sMsg + CLOSE; case 2: return WHITE + sMsg + CLOSE; case 3: return BLUE + sMsg + CLOSE; // etc.... (Continue with case 4: ... etc) } return RED + sMsg + CLOSE; // Default return RED }This should be enough code to help you make a custom function for that purpose...
Hope that was helpful. ^.^
TR