Spam alias

By Blitzjager on Dec 05, 2008

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)))))
  }
}

Comments

Sign in to comment.
napa182   -  Dec 07, 2008

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))))) 
  }           
}
 Respond  
Blitzjager   -  Dec 06, 2008

It's meant to be annoying. :)
Also /spam -c test didn't dc me it just gave me an input line too long.

 Respond  
napa182   -  Dec 05, 2008

it's more of a text flood then anything..
and abit annoying with all the diff colors for each word

 Respond  
deejay8   -  Dec 05, 2008

its not even spam

 Respond  
deejay8   -  Dec 05, 2008

Okay.... this fails...

it didconnected my bot
/spam -c test

see what happeneds

:o
o:
:o
o:
o:o
:o

 Respond  
guest598594   -  Dec 05, 2008

I'd make the variables local, use /var instead of /set.

 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.