Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Simple local text encoder/decoder
- ; Syntax: $tcode(TEXT[,0|*])
- ; Encodes TEXT if second parameter is 0 or $null. Else attempts to decode.
- ; SHOULD be able to decode properly when used in a single small script. May fail on large scripts.
- alias tcode {
- tokenize 32 $1 $calc($2)
- var %i 1, %e $ticks
- bset -t &x 1 $1
- while $bvar(&x,%i) {
- bset -t &y 1 $+($bvar(&y,1-).text,$chr($calc($v1 $iif($2,/,*) %e)))
- inc %i
- }
- return $bvar(&y,1-).text
- }
- ; Reminder: Look up /bcopy syntax and use in while loop.
- ; -- Should allow for longer lines.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement