This is just basically a token extension I made, it operates thus:
[b]$randtok(text,C)
Randomizes token sequence of text
$randtok(a.c,46) returns either c.a or a.c
$randtok(a.b.c,46) returns either a.b.c / a.c.b / c.a.b / c.b.a
The C parameter is the ascii value of the character separating the tokens.[/b]
=]
Very simple.
alias randtok {
If (!$2) { echo -s $+(,$gettok($readini(mirc.ini,colors,n0),6,44),*) Invalid format: $ $+ randtok (line $scriptline $+ , $nopath($script) $+ ) | halt }
unset %x %i %t %rand
var %x = $1
while (%x != $null) {
%rand = $rand(1,$numtok(%x,$2))
var %t = $iif(%t,%t $gettok(%x,%rand,$2),$gettok(%x,%rand,$2)), %x = $deltok(%x,%rand,$2)
}
return %t
}