Bear Ascii Pic Text

By Memoli on May 27, 2011

USAGE: !bear

Output:
Image

I tryed it to make the Code as short as possible and clean

PS: People can flood your bot if you dont want that change it to your User Level

on *:TEXT:!bear *:#: {
  if (%FloodBear) { return }
  set -eu60 %FloodBear 1  
  var %bear 1, %bl $len($2)
  while (%bear <= %bl) {
    if ($$2) {
      var %bbear $addtok(%bbear,$upper($mid($2,%bear,1)),32)
    }
    inc %bear
  }
  msg $chan $str(0.....1_0.....1_0.....,%bl) | msg $chan $str(0....1(o).-.(o)0....,%bl) | msg $chan $str(0...1__\( Y )/__0...,%bl) | msg $chan $str(0..1(_.-/'-'\-._)0..,%bl)
  msg $chan $+(0,$str($chr(46),4),01,$str($chr(124),2),0,$chr(46),,$chr(32)) $replace(%bbear,$chr(32),$+($chr(32),0,$chr(46),01,$str($chr(124),2),0,$str($chr(46),8),01,$str($chr(124),2),0,$chr(46),,$chr(32))) $+(0,$chr(46),01,$str($chr(124),2),0,$str($chr(46),4))       
  msg $chan $str(0...1_.´ `-´ `._0...,%bl) | msg $chan $str(0..1(.-./`-´\.-.)0..,%bl)
}

Comments

Sign in to comment.
Memoli   -  May 28, 2011

Added 60 sec Flood Protection

@Jethro_: Timer would be good but as you said if the channel is busy and people will chat there then that Ascii pic would be broken and noone will know whats it.

 Respond  
Jethro   -  May 27, 2011

It'd be best to have a timed delay to gradually output the bear ascii art. This snippet will spit out 8 lines, including the command itself, in a channel at one sitting, and you might get thrown out or probably get banned for text flooding on some networks. If you have a busy channel, using timed delay may not be desirable, as people will talk, along with people coming and going, and cut off in the middle of ascii drawing.

 Respond  
Wade   -  May 27, 2011
on $*:TEXT:/^[!@.]bear/Si:#: {
  if (!$hget(antispam,$network)) {
    hadd -mu60 antispam $network
    var %bear 1, %bl $len($2)
    while (%bear <= %bl) {
      if ($$2) {
        var %bbear $addtok(%bbear,$upper($mid($2,%bear,1)),32)
      }
      inc %bear
    }
    msg $chan $str(0.....1_0.....1_0.....,%bl) | msg $chan $str(0....1(o).-.(o)0....,%bl) | msg $chan $str(0...1__\( Y )/__0...,%bl) | msg $chan $str(0..1(_.-/'-'\-._)0..,%bl)
    msg $chan $+(0,$str($chr(46),4),01,$str($chr(124),2),0,$chr(46),,$chr(32)) $replace(%bbear,$chr(32),$+($chr(32),0,$chr(46),01,$str($chr(124),2),0,$str($chr(46),8),01,$str($chr(124),2),0,$chr(46),,$chr(32))) $+(0,$chr(46),01,$str($chr(124),2),0,$str($chr(46),4))       
    msg $chan $str(0...1_.´ `-´ `._0...,%bl) | msg $chan $str(0..1(.-./`-´\.-.)0..,%bl)
  }
}

my take on it with a 60 second spam protection so it wont flood you/bot off the network.

 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.