Just something me and Kirby threw together. I know it's a huge mess but since it's a joke script I didn't think it had to be neat.
Usage: /spam [-ucb]
Underline/Colour/Bold
alias spam {
if ($1 == -c) {
set %spam 2
while (%spam <= $calc($0)) {
set %fg $rand(0,15)
set %bg %fg
while (%bg == %fg) { set %bg $rand(0,15) }
set %msg $addtok(%msg, $+ %fg $+ $chr(44) $+ %bg $+ [ $chr(36) $+ [ %spam ] ],32)
inc %spam
}
msg $chan $str(%msg $+ $chr(32),$floor($calc(350/$len($2- $+ $chr(32)))))
unset %msg
}
elseif ($1 == -b) { msg $chan $+ $str($2- $+ $chr(32),$floor($calc(400/$len($2- $+ $chr(32))))) }
elseif ($1 == -u) { msg $chan $+ $str($2- $+ $chr(32),$floor($calc(400/$len($2- $+ $chr(32))))) }
elseif ($1 == -bu) || ($1 == -ub) { msg $chan $+ $str($2- $+ $chr(32),$floor($calc(400/$len($2- $+ $chr(32))))) }
elseif ($1 == -bc) || ($1 == -cb) {
set %spam 2
while (%spam <= $calc($0)) {
set %fg $rand(0,15)
set %bg %fg
while (%bg == %fg) { set %bg $rand(0,15) }
set %msg $addtok(%msg, $+ %fg $+ $chr(44) $+ %bg $+ [ $chr(36) $+ [ %spam ] ],32)
inc %spam
}
msg $chan $str(%msg $+ $chr(32),$floor($calc(350/$len($2- $+ $chr(32)))))
unset %msg
}
elseif ($1 == -uc) || ($1 == -cu) {
set %spam 2
while (%spam <= $calc($0)) {
set %fg $rand(0,15)
set %bg %fg
while (%bg == %fg) { set %bg $rand(0,15) }
set %msg $addtok(%msg, $+ %fg $+ $chr(44) $+ %bg $+ [ $chr(36) $+ [ %spam ] ],32)
inc %spam
}
msg $chan $str(%msg $+ $chr(32),$floor($calc(350/$len($2- $+ $chr(32)))))
unset %msg
}
elseif ($1 == -cub) || ($1 == -cbu) || ($1 == -ucb) || ($1 == -ubc) || ($1 == -buc) || ($1 == -bcu) {
set %spam 2
while (%spam <= $calc($0)) {
set %fg $rand(0,15)
set %bg %fg
while (%bg == %fg) { set %bg $rand(0,15) }
set %msg $addtok(%msg, $+ %fg $+ $chr(44) $+ %bg $+ [ $chr(36) $+ [ %spam ] ],32)
inc %spam
}
msg $chan $str(%msg $+ $chr(32),$floor($calc(350/$len($2- $+ $chr(32)))))
unset %msg
}
else {
msg $chan $str($1- $+ $chr(32),$floor($calc(400/$len($1- $+ $chr(32)))))
}
}
you could make it abit shorter
alias spam {
if ($regex($1,/^-([cbu]{1,3})$/) && $2) {
var %^ = $numtok($2-,32), %& = 1, %$
while (%& <= %^) {
if ($+(*,c,*) iswm $regml(1)) %$ = $addtok(%$,$+(,$r(8,15),$chr(44),$r(0,7),$gettok($2-,%&,32)),32)
inc %&
}
msg $chan $iif($+(*,u,*,b,*) iswm $regml(1),,$iif($+(*,b,*,u,*) iswm $regml(1),,$iif(b isin $regml(1),,$iif(u isin $regml(1),)))) $str($+($iif(!%$,$2-,%$),$chr(32)),$floor($calc(400/$len($iif(!%$,$2-,%$) $+ $chr(32)))))
}
}