"Bot ascii"

By Lindrian on Jun 05, 2008

This is pretty much alike my old ascii snippet, but I remade this one a bit. A friend asked for a script which will output the ascii in this way (output idea taken from TCLbot and "Scripting" @ Undernet).

Enjoy.

alias -l ascii {
  if ($1) && ($isid) {
    var %x = 1
    while ($mid($1,%x,1) != $null) {
      var %z = $v1
      if (!$istok(%i,$asc(%z),32)) {
        var %y %y $qt(04 $+ $replace(%z,$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space) $+ ) 12 $+ $asc(%z), $&
          %i = %i $asc(%z)
      }
      inc %x
    }
    return %y
  }
}
on $*:TEXT:/[!.@]asc(?>ii)?/Si:#: {
  if (!%asc.block. [ $+ [ $chan ] ]) && ($2) {
    msg $chan Converted (ascii) -> $ascii($2-)
    set -u10 %asc.block. $+ $chan 1
  }
}

Comments

Sign in to comment.
Lindrian   -  Jun 06, 2008

You can just change the \"-u10\" line to \"-u5\" =)

rebel9  -  Oct 17, 2013

You can also just type //say $asc(@) and that will give you the @ ascii number out loud.

Sign in to comment

Bahamut   -  Jun 05, 2008

Mmm, not bad. The script works properly as it should. My only suggestion would be to decrease the interval between usage; it seems far too great to me. Perhaps a five second interval? The reason why is: if you have this script available for use in a large (for example, scripting channel), then I\'m sure you\'ll have a few users that\'ll want to use it for those forgetful ascii numbers.

Nice script.

 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.