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