napa182 commented on a Page, Random bot slap  -  Feb 02, 2010

you could do something ez like this.. plus it would be a good idea to add a bit of flood control to ur snippet.

 on $*:TEXT:/^!slap\s(\S+)$/iS:#: { 
  if ($regml(1) ison # && !$hget(slap,flood)) {
    .hadd -mu3 slap flood yes
    if ($regml(1) == $me) { msg # No! }
    else { 
      var %slap large trout|large pig|large horse|large cat|Big Mac|large dog|computer|stolen car
      describe # slaps $regml(1) around a bit with a $gettok(%slap,$r(1,8),124)
    }
  }
}

or take out that msg # No!

on $*:TEXT:/^!slap\s(\S+)$/iS:#: { 
  if ($regml(1) ison # && !$hget(slap,flood) && $regml(1) != $me) {
    .hadd -mu3 slap flood yes
    var %slap large trout|large pig|large horse|large cat|Big Mac|large dog|computer|stolen car
    describe # slaps $regml(1) around a bit with a $gettok(%slap,$r(1,8),124)
  }
}
 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.