/* This script could convert base10 to any base number system, & in any symbol-set charset can be anything, any symbols, but the frist one should be the zero symbol */ string charset = "01"; string int2chr(integer int) { // convert integer to unsigned charset integer base = llStringLength(charset); string out; integer j; if(int < 0) { j = ((0x7FFFFFFF & int) % base) - (0x80000000 % base); integer k = j % base; int = (j / base) + ((0x7FFFFFFF & int) / base) - (0x80000000 / base); out = llGetSubString(charset, k, k); } do out = llGetSubString(charset, j = int % base, j) + out; while(int /= base); return out; } integer chr2int(string chr) { // convert unsigned charset to integer integer base = llStringLength(charset); integer i = -llStringLength(chr); integer j = 0; while(i) j = (j * base) + llSubStringIndex(charset, llGetSubString(chr, i, i++)); return j; } string pad (string input, integer width) { integer i=llStringLength(input); string zero=llGetSubString(charset,0,0); //first symbol of charset should be for zero // add padding if necessary while(width>i) { i=i+1; input=zero+input; // prepend string and loop } // take away padding if necessary while(width