Hi, Im looking a script for emoting chat colors:
If the PC write: (I'm tired)
On the pcchat appear in red color -> (I'm tired)
If the PC write: (I'm tired) *close your eyes*
On the pcchat appear in red color (I'm tired) & in green color *close your eyes*
With the parentheses & asterisk and // functions
I've seen it on multiple servers
I supose that the functions must be GetPCChatSpeaker, GetPCChatMessage
I have this code:
// ***************************************************
string sColors = " !!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~â‚¬â€šÆ’â€žâ€¦â€ â€¡Ë â€°Å â€¹Å’Å½â€˜â€™â€œâ€â€¢â€“—˜™š›œžŸ¡¢£¤¥§©©ª«¬Â®¯°±²³´µ¶·¸¸º»¼½¾¿ÀÃÂÃÄÅà ÇÈÉà ËÌÃÃŽÃÃÑÒÓÔÕÖ×ØÙÚÛÜÃÞßà áâãäåæçèéêëìÃîïñòóôõö÷øùúûüýþþþ";
string ASCII(int iAsciiCode) // 0 - 255
{
int ASCIIReturn = iAsciiCode;
if (ASCIIReturn<0) ASCIIReturn = 0;
else if (ASCIIReturn>255) ASCIIReturn = 255;
return GetSubString(sColors,iAsciiCode+1,1);
}
int ASCIIToInt(string sLookup)
{
return FindSubString(sColors, sLookup)-1;
}
string RGB(int iR, int iG, int iB) // 0-255
{
return "<c"+ASCII(iR)+ASCII(iG)+ASCII(iB)+">";
}
const string TEXT_COLOR_RED = "þ ";
const string TEXT_COLOR_ORANGE = "þœ ";
const string TEXT_COLOR_YELLOW = "þþ ";
const string TEXT_COLOR_GREEN = " þ ";
const string TEXT_COLOR_BLUE = " þ";
const string TEXT_COLOR_CYAN = " þþ";
const string TEXT_COLOR_PURPLE = "þ þ";
const string TEXT_COLOR_WHITE = "þþþ";
const string TEXT_COLOR_GREY = "~~~";
const string TEXT_COLOR_CRIMSON = "‘ ";
const string TEXT_COLOR_EMERALD = " ~ ";
const string TEXT_COLOR_BROWN = "Ç~6";
const string TEXT_COLOR_AZURE = "~~þ";
string RGBColorText(string RGBCode, string sText)
{
return "<c"+ RGBCode +">"+ sText +"</c>";
}
string ColorText(string ColorCode, string sText)
{
if (ColorCode == "crimson") ColorCode = "<c‘ >";
else if (ColorCode == "red") ColorCode = "<cþ >";
else if (ColorCode == "plum") ColorCode = "<cþww>";
else if (ColorCode == "tangerine") ColorCode = "<cÇZ >";
else if (ColorCode == "orange") ColorCode = "<cþœ >";
else if (ColorCode == "peach") ColorCode = "<cþÇ >";
else if (ColorCode == "amber") ColorCode = "<cœœ >";
else if (ColorCode == "yellow") ColorCode = "<cþþ >";
else if (ColorCode == "lemon") ColorCode = "<cþþw>";
else if (ColorCode == "emerald") ColorCode = "<c ~ >";
else if (ColorCode == "green") ColorCode = "<c þ >";
else if (ColorCode == "lime") ColorCode = "<cwþw>";
else if (ColorCode == "midnight") ColorCode = "<c t>";
else if (ColorCode == "navy") ColorCode = "<c ‘>";
else if (ColorCode == "blue") ColorCode = "<c þ>";
else if (ColorCode == "azure") ColorCode = "<c~~þ>";
else if (ColorCode == "skyblue") ColorCode = "<cÇÇþ>";
else if (ColorCode == "violet") ColorCode = "<c¥ ¥>";
else if (ColorCode == "purple") ColorCode = "<cþ þ>";
else if (ColorCode == "lavender") ColorCode = "<cþ~þ>";
else if (ColorCode == "black") ColorCode = "<c >";
else if (ColorCode == "slate") ColorCode = "<c666>";
else if (ColorCode == "darkgrey") ColorCode = "<cZZZ>";
else if (ColorCode == "grey") ColorCode = "<c~~~>";
else if (ColorCode == "lightgrey") ColorCode = "<c¯¯¯>";
else if (ColorCode == "white") ColorCode = "<cþþþ>";
else if (ColorCode == "turquoise") ColorCode = "<c ¥¥>";
else if (ColorCode == "jade") ColorCode = "<c tt>";
else if (ColorCode == "cyan") ColorCode = "<c þþ>";
else if (ColorCode == "cerulean") ColorCode = "<cœþþ>";
else if (ColorCode == "aqua") ColorCode = "<cZǯ>";
else if (ColorCode == "silver") ColorCode = "<c¿¯Ç>";
else if (ColorCode == "rose") ColorCode = "<cÃŽFF>";
else if (ColorCode == "pink") ColorCode = "<cþV¿>";
else if (ColorCode == "wood") ColorCode = "<c‘Z(>";
else if (ColorCode == "brown") ColorCode = "<cÇ~6>";
else if (ColorCode == "tan") ColorCode = "<cß‘F>";
else if (ColorCode == "flesh") ColorCode = "<cû¥Z>";
else if (ColorCode == "ivory") ColorCode = "<cþÎ¥>";
else if (ColorCode == "gold") ColorCode = "<cþ¿6>";
else if (ColorCode == "random")
{
switch (d3())
{
case 1: ColorCode = RGB(Random(128)+128,Random(192)+64,Random(192)+64); break;
case 2: ColorCode = RGB(Random(192)+64,Random(128)+128,Random(192)+64); break;
case 3: ColorCode = RGB(Random(192)+64,Random(192)+64,Random(128)+128); break;
}
}
return ColorCode + sText + "</c>";
}
// ***************************************************
Thanks for the help
'>