Random text color

Platform:  mIRC
Published  Mar 23, 2012
Updated  Mar 23, 2012
i got this from ScarHeart i believe, and the only thing i changed,was the color, i randomised it :] on *:input:#: {
if (%rainbowtexton) && (!$istok(! $chr(47),$left($1,1),32)) {
var %r1 1
var %rainbownupt 1
var %nintext $len($1-) + 1
var %rainboworder  $+ $rand(1,15) $+ , $+ $rand(1,15) $+ , $+ $rand(1,15) $+ , $+ $rand(1,15) $+ , $+ $rand(1,15) $+ , $+ $rand(1,15) $+ , $+ $rand(1,15)
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  $+ $rand(1,15) $+ ,01. $+ $rand(1,15) $+ ,01. $+ $rand(1,15) $+ ,01. $+ $rand(1,15) $+ ,01. $+ $rand(1,15) $+ ,01. $+ $rand(1,15) $+ ,01. $+ $rand(1,15) $+ ,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.
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.