naruto7 commented on a Page, Binary text converter  -  Jun 25, 2010

its still not working just give me the full script with the part u edited
mine is set like this

on $*:text:$(/^!binary ( $+ $2- $+ )/iS):*:{
  msg $iif(#,#,$nick) $binary($2-)
}
alias binary {
  if ($regex($$1-,/^([01]{8})+$/)) {
    .noop $regex(bin,$1-,/([01]{8})/g)
    var %a = 1,%b = 128 64 32 16 8 4 2 1,%bin
    while ($regml(bin,%a) != $null) { var %bin = $+(%bin,$iif($chr($calc($regsubex($v1,/(\d)/g,$+($calc($gettok(%b,\n,32) * \t),+)))) == $chr(32),$v1),$v1) | inc %a }
  }
  else {
    var %chr = $regsubex($$1-,/(.)/g,$+($asc(\t),$chr(32))),%a = $numtok(%chr,32),%bin
    while (%a) {
      var %b = $gettok(%chr,%a,32),%c = 1,%d,%e
      while (%c <= 8) { var %d = $floor($calc(%b /2)),%e = $+($calc(%b % 2),%e),%b = %d | inc %c }
      %bin = $+(%e,%bin)
      dec %a
    }
  }
  $iif($isid,return,echo -a) %bin
}
 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.