Code: Select all
set col [format "%.02d" [expr {1 + round(rand()*6}]]
set ch "\003${col}"
Code: Select all
bind pub n|n .rcols random:cols
proc random:cols {nick host hand chan text} {
putquick "privmsg $chan \00300,[expr {int(6*rand() + 1)}] $text \017"
}
for background i would like to use:00 08 09 11 15
this is the msl version:01 02 03 04 05 06 07 10 12 14
$+($chr(3),$base($gettok(00 08 09 11 15,$r(1,5),32),10,10,2),$chr(44),$base($gettok(1 2 3 5 6 7 10 12 14,$r(1,9),32),10,10,2))
Code: Select all
set fg {00 08 09 11 15}
set bg {01 02 03 04 05 06 07 10 12 14}
proc colors {} {
set mfg [lindex $::fg [rand [llength $::fg]]]
set mbg [lindex $::bg [rand [llength $::bg]]]
return "\003${mfg},${mbg}"
}