Rainbow Text

Platform:  mIRC
Published  Feb 20, 2012
Updated  Mar 05, 2012
This is a code I found here. I can't remember the original creator, but I made some changes. It gives a ROYGBIV pattern and turning the background on gives it a black background, to see the colors better. I have now fixed the color problem :) on *:input:#: {
if (%rainbowtexton) && (!$istok(! $chr(47),$left($1,1),32)) {
var %r1 1
var %rainbownupt 1
var %nintext $len($1-) + 1
var %rainboworder 04,07,08,09,11,12,06
while (%r1 < %nintext) {
if ($mid($1-,%r1,1) != $chr(32)) { var %msgrbw $addtok(%msgrbw,$gettok(%rainboworder,%rainbownupt,44) $+ $mid($1-,%r1,1),0) | inc %rainbownupt $iif(%rainbownupt = 7,-6,1) }
else { var %msgrbw %msgrbw $chr(32) }
inc %r1
}
say %msgrbw
haltdef
}
elseif (%rainbowtextandbackgroundon) && (!$istok(! $chr(47),$left($1,1),32)) {
var %r1 1
var %rainbownupt 1
var %nintext $len($1-) + 1
var %rainboworder 04,01.07,01.08,01.09,01.11,01.12,01.06,01
while (%r1 < %nintext) {
if ($mid($1-,%r1,1) != $chr(32)) { var %msgrbw $addtok(%msgrbw,$gettok(%rainboworder,%rainbownupt,46) $+ $mid($1-,%r1,1),0) }
else { var %msgrbw %msgrbw $+ $gettok(%rainboworder,%rainbownupt,46) $chr(32) }
inc %r1
inc %rainbownupt $iif(%rainbownupt = 7,-6,1)
}
say %msgrbw
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.
Abcdefmonkey   -  Mar 05, 2012
@Zohaib make sure you're using haltdef.
 Respond  
Scarheart33   -  Mar 05, 2012
Thanks @napa182 and Wader I didn't see that before :)
 Respond  
Zohaib   -  Feb 25, 2012
it writes two lines when i try to chat on main like this:

[21:31:18] <@Zohaib> HOW ARE YOU
[21:31:18] <@Zohaib> 04H07O08W09 11A12R02E06 13Y04O07U
 Respond  
Abcdefmonkey   -  Feb 24, 2012
Here's an easier way... it's what I use that I made.. I threw in my reverse text and reverse rainbow text.. for no reason honestly..

Alias:
Code
 


Input:
Code
 


Just my input.. I had to strip it down heavily due to a custom theme.. but I tested this and it worked as far as what it's intended for.. :S I know this could be shortened and what not, but it's just something I made long ago and I just haven't felt the need to shorten it. Anyways, hope this helps someone.
 Respond  
SalvadorCampos   -  Feb 24, 2012
* Formato no válido: $addtok (línea 9, script12.ini)
* Formato no válido: $addtok (línea 22, script12.ini)
 Respond  
Wader   -  Feb 20, 2012
What napa said.

However you should easily be able to fix that by using 2 digit colour codes.

i.e: 4 becomes 04. 7 becomes 07, etc.
 Respond  
napa182   -  Feb 20, 2012
it makes the numbers disappear cuz it's trying to read them as color codes.
 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.