Rainbow text colourer

By FRISH on May 27, 2007

This can colour you text in a rainbow sequence. Just load into your remotes (Alt+R).

When loaded right click and then select under "rainbow" one of for options.

"text On" will colour the font in a rainbow sequence

"text background On" will colour the font and background colour in a rainbow sequence.

"Colour Off" turns both of these colours off.

note that "text On" and "text background On" can only colour a certain number of characters and will uncolour the text if it is too much.

*Updates
Slightly recoded
Changed some global to local variables
Corrected a mistake where a variable wudnt be unset (this also corrected the rainbow glitch where it would miss a space and colour after the 6th colour in the pattern)
Just improved efficiency

on *:INPUT:*:{
  if (%rainbowtexton == 1) && ($left($1,1) != /) {
    var %r1 1
    var %nintext $len($1-) + 1
    while (%r1 < %nintext) {
      if ($mid($1-,%r1,1) != $chr(32)) { var %msgrbw $addtok(%msgrbw,04 $+ $mid($1-,%r1,1),0) }
      else { var %msgrbw %msgrbw $chr(32) }
      inc %r1

      if ($mid($1-,%r1,1) != $chr(32)) { var %msgrbw $addtok(%msgrbw,07 $+ $mid($1-,%r1,1),0) }
      else { var %msgrbw %msgrbw $chr(32) }
      inc %r1

      if ($mid($1-,%r1,1) != $chr(32)) { var %msgrbw $addtok(%msgrbw,08 $+ $mid($1-,%r1,1),0) }
      else { var %msgrbw %msgrbw $chr(32) }
      inc %r1

      if ($mid($1-,%r1,1) != $chr(32)) { var %msgrbw $addtok(%msgrbw,09 $+ $mid($1-,%r1,1),0) }
      else { var %msgrbw %msgrbw $chr(32) }
      inc %r1

      if ($mid($1-,%r1,1) != $chr(32)) { var %msgrbw $addtok(%msgrbw,12 $+ $mid($1-,%r1,1),0) }
      else { var %msgrbw %msgrbw $chr(32) }
      inc %r1

      if ($mid($1-,%r1,1) != $chr(32)) { var %msgrbw $addtok(%msgrbw,06 $+ $mid($1-,%r1,1),0) }
      else { var %msgrbw %msgrbw $chr(32) }
      inc %r1

      if ($mid($1-,%r1,1) != $chr(32)) { var %msgrbw $addtok(%msgrbw,13 $+ $mid($1-,%r1,1),0) }
      else { var %msgrbw %msgrbw $chr(32) }
      inc %r1
    }
    say %msgrbw
    haltdef
  }

  elseif (%rainbowtextandbackgroundon == 1)  && ($left($1,1) != /) {
    var %r2 1
    var %nintext2 $len($1-) + 1
    while (%r2 < %nintext2) {

      if ($mid($1-,%r2,1) != $chr(32)) { var %msgrbw2 $addtok(%msgrbw2,6 $+ $chr(44) $+ 04 $+ $mid($1-,%r2,1),0) }
      else { var %msgrbw2 %msgrbw2 $+ 6,04 $chr(32) }
      inc %r2

      if ($mid($1-,%r2,1) != $chr(32)) { var %msgrbw2 $addtok(%msgrbw2,13 $+ $chr(44) $+ 07 $+ $mid($1-,%r2,1),0) }
      else { var %msgrbw2 %msgrbw2 $+ 13,07 $chr(32) }
      inc %r2

      if ($mid($1-,%r2,1) != $chr(32)) { var %msgrbw2 $addtok(%msgrbw2,12 $+ $chr(44) $+ 08 $+ $mid($1-,%r2,1),0) }
      else { var %msgrbw2 %msgrbw2 $+ 12,08 $chr(32) }
      inc %r2

      if ($mid($1-,%r2,1) != $chr(32)) { var %msgrbw2 $addtok(%msgrbw2,3 $+ $chr(44) $+ 09 $+ $mid($1-,%r2,1),0) }
      else { var %msgrbw2 %msgrbw2 $+ 3,09 $chr(32) }
      inc %r2

      if ($mid($1-,%r2,1) != $chr(32)) { var %msgrbw2 $addtok(%msgrbw2,8 $+ $chr(44) $+ 12 $+ $mid($1-,%r2,1),0) }
      else { var %msgrbw2 %msgrbw2 $+ 8,12 $chr(32) }
      inc %r2

      if ($mid($1-,%r2,1) != $chr(32)) { var %msgrbw2 $addtok(%msgrbw2,7 $+ $chr(44) $+ 13 $+ $mid($1-,%r2,1),0) }
      else { var %msgrbw2 %msgrbw2 $+ 7,13 $chr(32) }
      inc %r2

      if ($mid($1-,%r2,1) != $chr(32)) { var %msgrbw2 $addtok(%msgrbw2,4 $+ $chr(44) $+ 06 $+ $mid($1-,%r2,1),0) }
      else { var %msgrbw2 %msgrbw2 $+ 4,06 $chr(32) }
      inc %r2
    }
    say %msgrbw2
    haltdef
  }

}

menu channel {
  -
  Rainbow
  .text On:{
  unset %rainbowtextandbackgroundon
  set %rainbowtexton 1
  ;echo -a Rainbow text turned on
  }
  .text + background On:{
  unset %rainbowtexton
  set %rainbowtextandbackgroundon 1
  ;echo -a Rainbow text and background colour turned on
  }
  .Colour Off:{
  unset %rainbowtexton
  unset %rainbowtextandbackgroundon
  ;echo -a Rainbow text, and Rainbow text with background colour turned off
  }
  -
}

Comments

Sign in to comment.
Jethro   -  Jun 21, 2011

chachin, when that happens, odds are you have more than one input event that causes the conflict. Try place the snippet in a new remote or combine them in one.

 Respond  
chachin   -  Jun 21, 2011

this script double posts in "color and non color" its anoying D:

 Respond  
  -  Nov 11, 2009

.

 Respond  
FRISH   -  Sep 10, 2007

@DarkRaviel ye i get that to when i realize ive messed something up wit other scripts in my remotes, my advice is to probably put this in a new script file \"alt+r, file, new\" and all should work fine ;)

 Respond  
T7Davey   -  Sep 01, 2007

Not bad!

 Respond  
DarkRaviel   -  Sep 01, 2007

when text mode is on:

  • Invalid format: $mid (line 7, rainbow_text.mrc)
    when text and backround mode is on:
  • Invalid format: $mid (line 45, rainbow_text.mrc)
    any idea?the updated code is used
 Respond  
FRISH   -  Jun 02, 2007

Thats weird, the \"halt\" should stop it saying the normal text.
But maybe your mirc is different than mine as yours seems to
enter the normal text then the rainbow text, which then halts,
mine does the other way round. So sorry about that.

 Respond  
AHBARAR   -  Jun 02, 2007

It Works To Make Words Rainbow And Its Lovly But Its Repeating Same Words Twice look :
2[14:09] ([[AHBARAR]]): ??? whts wrong
02[14:09] ([[AHBARAR]]): 06,04?13,07?12,08?03,09 08,12w07,13h04,06t06,04s13,07 12,08w03,09r08,12o07,13n04,06g06,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,0606,0413,0712,0803,0908,1207,1304,06

some thing like tht 1 normal 1 coloured

 Respond  
FRISH   -  May 29, 2007

ok kewl, i only use mirc so would only know on that

 Respond  
Chevy   -  May 29, 2007

On mIRC it will show PERFECTLY Fine but using a Java/mIRC Server Client And The Java Users See It ...Well umm it looks AWFUL! lmao but you can fix that to make it look perfectly fine on Java And mIRC
I Will Comment This Back Showing How.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.