Shoutbox

Help With a Text Plug-In - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Help With a Text Plug-In (/showthread.php?tid=29099)

Help With a Text Plug-In by manuelnaranjo on 07-25-2004 at 08:14 PM

I want to make a plug-in that changes the colour of the text that i pass to the command.
I know that there are plug-ins that all ready do this, but there is nothing like a plug made at home.
My problem is that i canīt use the (!fcxx) tag, i know that i must use the sCCColor constant, but i donīt know how to.
Please if anyone can help me, i would be glad
Manuel


pd: Sorry for my english


RE: Help With a Text Plug-In by RaceProUK on 07-25-2004 at 08:19 PM

In VB, just use the normal string concatenation. You may need to use Char() as well, I can't remember.
In C++, you'll have to use strcat() to get the same effect.

Follow the sCCColor by two comma separated numbers. The first is foreground, the second background. Any number from 0 to 63 can be used (0 to 15 for Plus 2). I recommend using a leading zero on single digits: it will limit possible bugs.


RE: Help With a Text Plug-In by manuelnaranjo on 07-25-2004 at 08:29 PM

Thanks, it really worked out


RE: Help With a Text Plug-In by Choli on 07-25-2004 at 09:22 PM

quote:
Originally posted by raceprouk
You may need to use Char() as well, I can't remember.
true (Y)
quote:
Originally posted by raceprouk
Any number from 0 to 63 can be used
the formats (RRR,GGG,BBB) and #RRGGBB are also allowed for colors. In the 1st format, the letters are 3-ditigs decimal numbers (like (054,005,255)) and in the 2nd format they're hexadecimal digits (like in #3366cc)
RE: Help With a Text Plug-In by manuelnaranjo on 07-26-2004 at 05:38 PM

How do you say i can use that????
I concat that colour with the text i want to send???


RE: Help With a Text Plug-In by Choli on 07-26-2004 at 07:34 PM

quote:
Originally posted by manuelnaranjo
I concat that colour with the text i want to send???
yes. You have to create a string that has the sCCColor character followed by the color code and followed by the text you want in that color. For example:
"Hello X#3366ccWorld"
^in that string, suppose that the X is the sCCColor character. Well, that string will be displayed like this:
Hello World

RE: Help With a Text Plug-In by (CyBeRDuDe) on 07-26-2004 at 08:12 PM

if your using VB the example would be like this:
' Replace 3366cc with the color code...

sResult = "Hello " & Char(sCCColor) & "#3366ccWorld"



If I'm mistaking then please correct me... :P


RE: Help With a Text Plug-In by Choli on 07-26-2004 at 10:06 PM

quote:
Originally posted by (CyBeRDuDe)
Char(sCCColor)
In fact it'd be Chr$(sCCColor) instead of that Char function, but the idea is right ;)

In C it'd be

strcpy(sResult, "Hello ");
strcat(sResult, sCCColor);
strcat(sResult, "#3366ccWorld");

:banana:
RE: Help With a Text Plug-In by manuelnaranjo on 07-27-2004 at 01:44 AM

Thanks folk, i will try it