Rainbow Text

By Teh Maestro on Mar 19, 2007

This is based off of the same premise of my other rainbow script.

What it does: Automatically changes the color of text that you type into a smooth rainbow.

To use: Copy the script to the clipboard, press alt+r in mIRC, File->New, Edit->Paste. Right-click in a channel to enable/disable it and change whether the rainbow colors will be the foreground or background colors. Unforunately, numbers can obviously cause some problems, so if the text contains any numbers it won't modify it. If you don't like that, remove ' && ($1- isalpha)' from line 10.

on *:LOAD:{
  set %RainbowTextOn 0
  set %RainTxtStatus Enable
  set %RainTxtColK Background
  set %RainTxtColH 0
  halt
}

on *:INPUT:*:{
  if (/* !iswm $1) && (%RainbowTextOn == 1) && ($1- isalpha) {
    set %RainTxtCols 4,7,8,9,11,12,6
    var %RainTxtK = $replace($1-,$chr(32),~)
    var %k = $r(1,7), %l = 1
    while (%l <= $len(%RainTxtK)) {
      if (%k > 7) {
        var %k = 1
        continue
      }
      elseif ($mid(%RainTxtK,%l,1) == ~) {
        inc %l
        var %RainTxt = $+(%RainTxt,~)
        continue
      }
      else {
        var %RainTxtCol = $gettok(%RainTxtCols,%k,44)
        $iif(%RainTxtColH == 0,set -u0 %RainTxt $+(%RainTxt,,%RainTxtCol,$mid(%RainTxtK,%l,1)), $&
          set -u0 %RainTxt $+(%RainTxt,,1,$chr(44),%RainTxtCol,$mid(%RainTxtK,%l,1)))
        inc %l
        inc %k
      }
    }
    msg $target $replace(%RainTxt,~,$chr(32))
    halt
  }
}

menu channel {
  -
  Rainbow Text
  .%RainTxtStatus:{
    $iif(%RainTxtStatus == Enable,set %RainbowTextOn 1,set %RainbowTextOn 0)
    $iif(%RainTxtStatus == Enable,set %RainTxtStatus Disable,set %RainTxtStatus Enable)
    halt
  }
  .Use %RainTxtColK Colors:{
    $iif(%RainTxtColK == Foreground,set %RainTxtColH 0,set %RainTxtColH 1)
    $iif(%RainTxtColK == Foreground,set %RainTxtColK Background,set %RainTxtColK Foreground)
    halt
  }
  -
}

Comments

Sign in to comment.
ShadowTsukasa   -  Jul 08, 2009

Seriously, it works with only one word!

 Respond  
booboo24   -  May 18, 2009

cool script but every time i press spacebar the colour goes any way around this guys im now to all this crap so plz could ya let me know thanks =]

 Respond  
TropicalMeltdown   -  Aug 16, 2008

Creative

 Respond  
RussellReal   -  Sep 26, 2007

alias rainbow {
var %a = 01 03 05 07 09 12 14
return $regsubex($1-,/([^ ])/g,$+($chr(3),$gettok(%a,$iif($calc(\\n % $numtok(%a,32)),$v1,$numtok(%a,32)),32),\\1))
}
sry for double posting but hawkee\'s comment system removes slashes, because in php \n would be a new line, but I don\'t see why he would need to remove slashes but anyways, repost \'escaping\' my slashes

 Respond  
RussellReal   -  Sep 26, 2007

alias rainbow {
var %a = 01 03 05 07 09 12 14
return $regsubex($1-,/([^ ])/g,$+($chr(3),$gettok(%a,$iif($calc(\n % $numtok(%a,32)),$v1,$numtok(%a,32)),32),\1))
}

 Respond  
erry   -  Sep 26, 2007

O.o hi guys.Way more useless and fun scripts!^_^Btw it does work.Just /load it.

 Respond  
Sora-   -  Sep 09, 2007

ROXAS AND CALLUM! xD Rofl.

 Respond  
Calzo   -  Jul 29, 2007

ROXAS >:O

 Respond  
Xemnas   -  Jul 21, 2007

:O CALLUM!

 Respond  
Calzo   -  Jul 18, 2007

Dude, it doesn\'t work :|

 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.