Nice ncode/dcode script
Posted by HellRaz0r
Monday, September 18, 2006
Description: For example type /testncode sometext.
;only flaw it has is if you put uppercase letters in the string it will make them lower
;i could make it use $replacecs but that is to much hasle
;im working on a better flawless encryption script atm where the character numbers ;dont touch :)
;only flaw it has is if you put uppercase letters in the string it will make them lower
;i could make it use $replacecs but that is to much hasle
;im working on a better flawless encryption script atm where the character numbers ;dont touch :)
;/testncode one two three
alias testncode { var %x 1 | while %x <= 65 { echo -a $+(%x,.) $1- == $ncode(%x,$1-) | inc %x } }
;$ncode(<1-65>,<Text>)
alias ncode {
if ($1 > 65) return
var %tmpc 97, %tmpe = $1
while %tmpc <= 122 { var % $+ $chr(%tmpc) $chr($calc(%tmpc + 70 + %tmpe)) | inc %tmpc }
return $replace($2-,a,%a,b,%b,c,%c,d,%d,e,%e,f,%f,g,%g,h,%h,i,%i,j,%j,k,%k,l,%l,m,%m,n,%n,o,%o,p,%p,q,q,r,%r,s,%s,t,%t,u,%u,v,%v,w,%w,x,%x,y,%y,z,%z)
}
;$dcode(<1-65>,<Text>)
alias dcode {
if ($1 > 65) return
var %tmpc = 97, %tmpe = $1
while %tmpc <= 122 { var % $+ $chr(%tmpc) $chr($calc(%tmpc + 70 + %tmpe)) | inc %tmpc }
return $replace($2-,%a,a,%b,b,%c,c,%d,d,%e,e,%f,f,%g,g,%h,h,%i,i,%j,j,%k,k,%l,l,%m,m,%n,n,%o,o,%p,p,%q,q,%r,r,%s,s,%t,t,%u,u,%v,v,%w,w,%x,x,%y,y,%z,z)
}