Author Topic: ASCII codes of paintball special characters (paintball splats, bold letters etc.)  (Read 2588 times)

mRokita

  • Autococker
  • Posts: 598
Hey!
Can somebody post the ASCII codes of paintball special characters (paintball splats, bold letters etc.)?

not_payl_obviously

  • 68 Carbine
  • Posts: 415
You can write numbers from 0 to 255 yourself, those numbers correspond to screen shown on funname name selection.
However there are few more things you need to do to decode/encode name correctly, like colors and bold/etc, check source of serverbrowser for this.

rockitude

  • Committee Member
  • 68 Carbine
  • Posts: 492
I think this is what you are looking for. This is a Java version of the standard serverbrowser function.

Code: [Select]
    public String strip_garbage (String str) {
        String newStr = null;
        char[] char_map = {
            '\0', '-', '-', '-', '_', '*', 't', '.', 'N', '-', '\n', '#', '.', '>', '*', '*',
            '[', ']', '@', '@', '@', '@', '@', '@', '<', '>', '.', '-', '*', '-', '-', '-',
            ' ', '!', '\"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/',
            '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
            '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
            '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
            'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '<',
            '(', '=', ')', '^', '!', 'O', 'U', 'I', 'C', 'C', 'R', '#', '?', '>', '*', '*',
            '[', ']', '@', '@', '@', '@', '@', '@', '<', '>', '*', 'X', '*', '-', '-', '-',
            ' ', '!', '\"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/',
            '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
            '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
            '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', '<'
        };

        if (str != null) {
            char[] c = str.toCharArray();

            for (int i = 0; i < c.length; i++) {
                int number = (int) c[i];
                switch (number) {
                    case 136: // color
                        i++;
                        break;
                    case 135: // italic
                    case 134: // underline
                    case 133: // endformat
                        break;
                    default:
                        newStr = newStr + char_map[number];
                }
            }
        }
        return newStr;
    }

mRokita

  • Autococker
  • Posts: 598
thx Payl :)
Code: [Select]
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„‰Š‹ŚŤŽŹ‘’“”•–—˜™š›śťžźˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢß˙ŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<<=>@i@@@?>@@[]@@@@@@<>@x@---!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<'ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~<
†-underline
‡-italic
ˆ-color

xrichardx

  • 68 Carbine
  • Posts: 295