mIRC Home    About    Download    Register    News    Help

Print Thread
#15813 17/03/03 09:40 PM
Joined: Feb 2003
Posts: 43
K
Kazz Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Feb 2003
Posts: 43
Yeah, this question may come across as pretty basic BUT I am still hoping someone will reply. The question is:
how do I get multiple colored letters without the hassle of the popup boxes?
Any help would be appreciated
Thanx


smirk Mr.Newb smirk
A.K.A Kazz
#15814 17/03/03 10:39 PM
Joined: Mar 2003
Posts: 34
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Mar 2003
Posts: 34
Do you mean to say it in the active window? If thats what your saying, you can always hold Ctrl + K (color#,bgc#)
If thats not what youre asking, then i cant help wink But at least i tried heh heh heh.......

or... /help smile


Heh..
#15815 18/03/03 01:40 PM
Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
I don’t know if this is what you are looking for, it is a simple text manipulator (if that’s the correct word?).

[*]Type a sentence into a channel/custom window and hit enter.
[*]All the text is then converted into random colours (colour codes between 0 and 15)
[*]If the active window is a channel, the text is sent to the channel (/msg).
[*]If the active window is a custom window, the text is echo’d to the window.

Code:
on *:INPUT:*:{
  if ($left($1-,1) !== /) {
    [color:green];Simple error check to see if the length of sentence is too long[/color]
    if ($len($1-) > 185) { echo -a Message too long ( $+ $calc($len($1-) - 185) characters over the limit of 185). | halt }
    var %i = 1
    [color:green];Clear the variable[/color]
    set %TextLine
    while %i <= $len($1-) {
      [color:green];Select a random colour[/color]
      set %TextColour $rand(0,15)
      [color:green];The length of the colour code needs to be 2 characters long to avoid:[/color]
      [color:green];12 - I wanted to say the number 2 with colour code 1 (black)[/color]
      [color:green];40this - I wanted to say [/color]"[color:red]0this[/color]"[color:green] (colour code 4 - red) not [/color][color:yellow]this[/color][color:green] (colour code 40 - yellow)[/color]
      set %TextColour $+(,$iif($len(%TextColour) == 2,%TextColour,$+(0,%TextColour)))
      [color:green];Add the coloured letter to the rest of the file[/color]
      set %TextLine $+(%TextLine,%TextColour,$right($left($1-,%i),1),)
      unset %TextColour
      inc %i
    }
    [color:green];if the active window is a channel, send the text then halt[/color]
    if ($active ischan) { msg $chan %TextLine | unset %TextLine | halt }
    [color:green];otherwise echo it in the active window[/color]
    [color:green];I'm not sure if you will have to echo it to the channel window too, or will it show up (Can't test it)[/color]
    echo -a %TextLine
    unset %TextLine
    halt
  }
}


If it is what you are after, don't forget that variables can only hold 929 characters (including control codes). Therefore, the maximum length you can say (before control codes), in one sentence is 185 characters including spaces, commas, slashes etc. I have included a check for this.

Delete all the rows beginning with ; they are only for information (comments)

If it’s not what you want, sorry wink


Aubs.
cool


Link Copied to Clipboard