Top

Turn text into ascii


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  4.0 (of 1 scores)
Date Added  May 12, 2008
Last Updated  May 12, 2008
Tags  asc  ascii  chr 

Introduction

This snippet will turn text to ascii marks like this:

I use leet as an example and this is a result:

$+($chr(108),$chr(101),$chr(101),$chr(116))

This script might help scripters. :)

Ah and the usage is: $ascii(text)


Grab the Code

alias ascii {
  var %i = 1
  while (%i <= $len($1-)) {
    var %k = $+(%k,$eval($chr,0),$chr(40),$asc($mid($1-,%i,1)),$chr(41),$chr(44))
    inc %i
  }
  return $+($eval($+,0),$chr(40),$left(%k,-1),$chr(41))
}
 

Comments

  (3)  RSS
foobar
Comments: 6
 
mIRC Snippet:  Turn text into ascii
Posted on May 12, 2008 6:26 pm
Pretty good, I made an alternative using binvars:
Code:
alias ascii {
  bset $iif(!$prop,-t) &ascii 1 $1-
  return $bvar(&ascii,1,$bvar(&ascii,0)) [ $+ [ $iif($prop,.text) ] ]
}


Also, a little pointer: $eval(<blah>,0) (in your script) can be $!<blah>. So: $eval($chr,0) can be $!chr and $eval($+,0) can be $!+.

Perhaps try adding a way to do the opposite and convert asc values to actual characters? As I did in mine.
juhapuha
Comments: 73
 
mIRC Snippet:  Turn text into ascii
Posted on May 12, 2008 6:50 pm
Yeah :) but atleast that's good for my use because it returns those ascii values like $+($chr(number),$chr(number)) :)
baseballer790
Comments: 19
 
mIRC Snippet:  Turn text into ascii
Posted on Mar 9, 2009 5:16 pm
What is it?

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom