Thread: Packets?

Results 1 to 6 of 6
  1. #1 Packets? 
    I Ain't Trippin Motha Fucka Roll A Jay

    Purp's Avatar
    Join Date
    Sep 2008
    Posts
    512
    Thanks given
    1
    Thanks received
    1
    Rep Power
    85
    ok so im not sure but when im on by myself i never drop packets. since i let my friend on i drop connection packets like crazy and my magic system doesnt work. here is a show of one of the drops. i had -46, -40, -37

    Edit: it seems when i talk out loud at all it drops.

    Code:
    Exception encountered while parsing incoming packets from Nate.
    java.lang.ArrayIndexOutOfBoundsException: -46
            at misc.textUnpack(misc.java:261)
            at client.parseIncomingPackets(client.java:12943)
            at client.packetProcess(client.java:17517)
            at PlayerHandler.process(PlayerHandler.java:273)
            at process.run(process.java:16)
            at java.lang.Thread.run(Unknown Source)
    ClientHandler: Client Nate disconnected (localhost)
    Owner of CivilScape
    http://www.rune-server.org/f522/24-7-civilscape-24-7-t110852.html
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Sep 2008
    Posts
    2,219
    Thanks given
    148
    Thanks received
    204
    Rep Power
    1570
    Code:
    	public static String textUnpack(byte packedData[], int size) {
    		int idx = 0, highNibble = -1;
    		for (int i = 0; i < size * 2; i++) {
    			int val = packedData[i / 2] >> (4 - 4 * (i % 2)) & 0xf;
    			if (highNibble == -1) {
    				if (val < 13)
    					decodeBuf[idx++] = xlateTable[val];
    				else
    					highNibble = val;
    			} else {
    				decodeBuf[idx++] = xlateTable[((highNibble << 4) + val) - 195];
    				highNibble = -1;
    			}
    		}
    		return new String(decodeBuf, 0, idx);
    	}
    Code:
    public static char xlateTable[] = {
    	' ', 'e', 't', 'a', 'o', 'i', 'h', 'n',
    	's', 'r', 'd', 'l', 'u', 'm', 'w', 'c', 'y', 'f', 'g', 'p', 'b',
    	'v', 'k', 'x', 'j', 'q', 'z', '0', '1', '2', '3', '4', '5', '6',
    	'7', '8', '9', ' ', '!', '?', '.', ',', ':', ';', '(', ')', '-',
    	'&', '*', '\\', '\'', '@', '#', '+', '=', '\243', '$', '%', '"',
    	'[', ']'
    };



    Reply With Quote  
     

  3. #3  
    I Ain't Trippin Motha Fucka Roll A Jay

    Purp's Avatar
    Join Date
    Sep 2008
    Posts
    512
    Thanks given
    1
    Thanks received
    1
    Rep Power
    85
    where is the xlatetable at? its not in client.java i remember adding it so you can do > symbols and what not. id look back on my posts but i cant cause rune-server thinks i use a fucking proxy when i click show threads or post threads or anything
    Owner of CivilScape
    http://www.rune-server.org/f522/24-7-civilscape-24-7-t110852.html
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Sep 2008
    Posts
    2,219
    Thanks given
    148
    Thanks received
    204
    Rep Power
    1570
    There's your problem. Misc class



    Reply With Quote  
     

  5. #5  
    I Ain't Trippin Motha Fucka Roll A Jay

    Purp's Avatar
    Join Date
    Sep 2008
    Posts
    512
    Thanks given
    1
    Thanks received
    1
    Rep Power
    85
    well here are my methods

    Code:
    public static String textUnpack(byte packedData[], int size) {
    		int idx = 0; //highNibble = -1;
    		for (int i = 0; i < size; i++) {
    		int val = packedData[i];
    		decodeBuf[idx++] = xlateTable[val];
    				//decodeBuf[idx++] = xlateTable[highNibble];
    				//highNibble = -1;
    			}
    		return new String(decodeBuf, 0, idx);
    	}
    }
    Code:
    	public static char xlateTable[] = {         ' ', 'e', 't', 'a', 'o', 'i', 'h', 'n', 's', 'r', 
            'd', 'l', 'u', 'm', 'w', 'c', 'y', 'f', 'g', 'p', 
            'b', 'v', 'k', 'x', 'j', 'q', 'z', '0', '1', '2', 
            '3', '4', '5', '6', '7', '8', '9', ' ', '!', '?', 
            '.', ',', ':', ';', '(', ')', '-', '&', '*', '\\', 
            '\'', '@', '#', '+', '=', '\243', '$', '%', '"', '[', 
            ']', '>', '<', '^', '/' };
    Owner of CivilScape
    http://www.rune-server.org/f522/24-7-civilscape-24-7-t110852.html
    Reply With Quote  
     

  6. #6  
    I Ain't Trippin Motha Fucka Roll A Jay

    Purp's Avatar
    Join Date
    Sep 2008
    Posts
    512
    Thanks given
    1
    Thanks received
    1
    Rep Power
    85
    done works ty sir
    Owner of CivilScape
    http://www.rune-server.org/f522/24-7-civilscape-24-7-t110852.html
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •