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)
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))
}
ksolt21, you install the code in your mirc remote. The return command used in the script is for you to utilize it as an identifier to call from it. You can add an echo command like this:> 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
}
$iif($isid,return,echo -a) $+($eval($+,0),$chr(40),$left(%k,-1),$chr(41))
}/now you can enter the command as: /ascii
Then the code will print out mirc character numbers of the characters you've entered.
Pretty good, I made an alternative using binvars:
alias ascii {
bset $iif(!$prop,-t) &ascii 1 $1-
return $bvar(&ascii,1,$bvar(&ascii,0)) [ $+ [ $iif($prop,.text) ] ]
}
Also, a little pointer: $eval(,0) (in your script) can be $!. 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.