Thread: Hello, Elvarg Loading 206 Packet help.

Results 1 to 4 of 4
  1. #1 Hello, Elvarg Loading 206 Packet help. 
    Registered Member
    Join Date
    Mar 2018
    Posts
    18
    Thanks given
    0
    Thanks received
    2
    Rep Power
    27
    I am specifically using this source and client. Elvarg Loading #206 data...


    I have multiple packet issues, does anyone have the correct Encoder and Decoder values? It would be highly appreciated. Or any help for that matter would be extremely appreciated.


    Packets I have issues with:
    -Dropping items
    -Second click object
    -Examine npc
    -Pickup item
    -Probably some more.

    Spoiler for Decoder:
    private final static int[] PACKET_SIZES = { 0, 0, 6, 1, -1, -1, 2, 4, 4, 4, // 0
    4, -1, -1, -1, 8, 0, 6, 2, 2, 0, // 10
    0, 2, 0, 6, 0, 12, 0, 0, 0, 0, // 20
    9, 0, 0, 0, 0, 8, 4, 0, 0, 2, // 30
    2, 6, 0, 8, 0, -1, 0, 0, 0, 1, // 40
    0, 0, 0, 12, 0, 0, 0, 8, 0, 0, // 50
    -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, // 60
    6, 0, 2, 2, 8, 6, 0, -1, 0, 6, // 70
    -1, 0, 0, 0, 0, 1, 4, 6, 0, 0, // 80
    0, 0, 0, 0, 0, 3, 0, 0, -1, 0, // 90
    0, 13, 0, -1, -1, 0, 0, 0, 0, 0, // 100
    0, 0, 0, 0, 0, 0, 0, 8, 0, 0, // 110
    1, 0, 6, 0, 0, 0, -1, 0, 2, 8, // 120
    0, 4, 8, 8, 0, 8, 0, 0, 6, 2, // 130
    0, 0, 0, 0, 0, 8, 0, 0, 0, 0, // 140
    0, 0, 1, 2, 0, 2, 6, 0, 0, 0, // 150
    0, 0, 0, 0, -1, -1, 5, 0, 0, 0, // 160
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 170
    0, 8, 0, 2, 4, 4, 5, 6, 8, 1, // 180
    0, 0, 14, 0, 0, 0, 0, 0, 0, 0, // 190
    2, 0, 0, 0, 2, 0, 0, 0, 4, 0, // 200
    4, 0, 0, 0, 9, 8, 8, 0, 10, 0, // 210
    0, 0, 3, 2, 0, 0, -1, 0, 8, 1, // 220
    1, 0, 0, 0, 8, 0, 6, 8, 1, 0, // 230
    0, 4, 0, 0, 0, 0, -1, 0, -1, 4, // 240
    0, 0, 8, 8, 0, 0 // 250
    };



    Spoiler for Encoder:

    public static final int[] CLIENT_PACKET_SIZES = { 0, 0, 0, 1, 6, 0, 0, 0, 4, 4, // 0
    6, 2, -1, 1, 1, -1, 1, 0, 0, 0, // 10
    0, 0, 0, 0, 1, 0, 0, -1, 1, 1, // 20
    0, 0, 0, 0, -2, 4, 3, 0, 2, 0, // 30
    0, 0, 0, 0, 7, 8, 0, 6, 0, 0, // 40
    9, 8, 0, -2, 4, 1, 0, 0, 0, 0, // 50
    -2, 1, 0, 0, 2, -2, 0, 0, 0, 0, // 60
    6, 3, 2, 4, 2, 4, 0, 0, 0, 4, // 70
    0, -2, 0, 0, 7, 2, 1, 6, 6, 0, // 80
    0, 0, 0, 0, 0, 0, 0, 2, 0, 1, // 90
    2, 2, 0, 1, -1, 8, 1, 0, 8, 0, // 100
    1, 1, 1, 1, 2, 1, 5, 15, 0, 0, // 110
    0, 4, 4, -1, 9, -1, -2, 2, 0, 0, // 120 // 9
    -1, 0, 0, 0, 13, 0, 0, 1, 0, 0, // 130
    3, 10, 2, 0, 0, 0, 0, 14, 0, 0, // 140
    0, 4, 5, 3, 0, 0, 3, 0, 0, 0, // 150
    4, 5, 0, 0, 2, 0, 6, 0, 0, 0, // 160
    0, 5, -2, -2, 5, 5, 10, 6, 0, -2, // 170
    0, 0, 0, 1, 1, 2, 1, -1, 0, 0, // 180
    0, 0, 0, 0, 0, 2, -1, 0, -1, 0, // 190
    4, 0, 0, 0, 0, 0, 3, 0, 4, 0, // 200
    0, 0, 0, 0, -2, 7, 0, -2, 2, 0, // 210
    0, 1, -2, -2, 0, 0, 0, 0, 0, 0, // 220
    8, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 230
    2, -2, 0, 0, -1, 0, 6, 0, 4, 3, // 240
    -1, 0, 0, -1, 6, 0, 0// 250
    };
    Reply With Quote  
     

  2. #2  
    Registered Member derpscape's Avatar
    Join Date
    Jul 2011
    Posts
    212
    Thanks given
    37
    Thanks received
    19
    Discord
    View profile
    Rep Power
    43
    Quote Originally Posted by moneynewxbl View Post
    I am specifically using this source and client. Elvarg Loading #206 data...


    I have multiple packet issues, does anyone have the correct Encoder and Decoder values? It would be highly appreciated. Or any help for that matter would be extremely appreciated.


    Packets I have issues with:
    -Dropping items
    -Second click object
    -Examine npc
    -Pickup item
    -Probably some more.

    Spoiler for Decoder:
    private final static int[] PACKET_SIZES = { 0, 0, 6, 1, -1, -1, 2, 4, 4, 4, // 0
    4, -1, -1, -1, 8, 0, 6, 2, 2, 0, // 10
    0, 2, 0, 6, 0, 12, 0, 0, 0, 0, // 20
    9, 0, 0, 0, 0, 8, 4, 0, 0, 2, // 30
    2, 6, 0, 8, 0, -1, 0, 0, 0, 1, // 40
    0, 0, 0, 12, 0, 0, 0, 8, 0, 0, // 50
    -1, 8, 0, 0, 0, 0, 0, 0, 0, 0, // 60
    6, 0, 2, 2, 8, 6, 0, -1, 0, 6, // 70
    -1, 0, 0, 0, 0, 1, 4, 6, 0, 0, // 80
    0, 0, 0, 0, 0, 3, 0, 0, -1, 0, // 90
    0, 13, 0, -1, -1, 0, 0, 0, 0, 0, // 100
    0, 0, 0, 0, 0, 0, 0, 8, 0, 0, // 110
    1, 0, 6, 0, 0, 0, -1, 0, 2, 8, // 120
    0, 4, 8, 8, 0, 8, 0, 0, 6, 2, // 130
    0, 0, 0, 0, 0, 8, 0, 0, 0, 0, // 140
    0, 0, 1, 2, 0, 2, 6, 0, 0, 0, // 150
    0, 0, 0, 0, -1, -1, 5, 0, 0, 0, // 160
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 170
    0, 8, 0, 2, 4, 4, 5, 6, 8, 1, // 180
    0, 0, 14, 0, 0, 0, 0, 0, 0, 0, // 190
    2, 0, 0, 0, 2, 0, 0, 0, 4, 0, // 200
    4, 0, 0, 0, 9, 8, 8, 0, 10, 0, // 210
    0, 0, 3, 2, 0, 0, -1, 0, 8, 1, // 220
    1, 0, 0, 0, 8, 0, 6, 8, 1, 0, // 230
    0, 4, 0, 0, 0, 0, -1, 0, -1, 4, // 240
    0, 0, 8, 8, 0, 0 // 250
    };



    Spoiler for Encoder:

    public static final int[] CLIENT_PACKET_SIZES = { 0, 0, 0, 1, 6, 0, 0, 0, 4, 4, // 0
    6, 2, -1, 1, 1, -1, 1, 0, 0, 0, // 10
    0, 0, 0, 0, 1, 0, 0, -1, 1, 1, // 20
    0, 0, 0, 0, -2, 4, 3, 0, 2, 0, // 30
    0, 0, 0, 0, 7, 8, 0, 6, 0, 0, // 40
    9, 8, 0, -2, 4, 1, 0, 0, 0, 0, // 50
    -2, 1, 0, 0, 2, -2, 0, 0, 0, 0, // 60
    6, 3, 2, 4, 2, 4, 0, 0, 0, 4, // 70
    0, -2, 0, 0, 7, 2, 1, 6, 6, 0, // 80
    0, 0, 0, 0, 0, 0, 0, 2, 0, 1, // 90
    2, 2, 0, 1, -1, 8, 1, 0, 8, 0, // 100
    1, 1, 1, 1, 2, 1, 5, 15, 0, 0, // 110
    0, 4, 4, -1, 9, -1, -2, 2, 0, 0, // 120 // 9
    -1, 0, 0, 0, 13, 0, 0, 1, 0, 0, // 130
    3, 10, 2, 0, 0, 0, 0, 14, 0, 0, // 140
    0, 4, 5, 3, 0, 0, 3, 0, 0, 0, // 150
    4, 5, 0, 0, 2, 0, 6, 0, 0, 0, // 160
    0, 5, -2, -2, 5, 5, 10, 6, 0, -2, // 170
    0, 0, 0, 1, 1, 2, 1, -1, 0, 0, // 180
    0, 0, 0, 0, 0, 2, -1, 0, -1, 0, // 190
    4, 0, 0, 0, 0, 0, 3, 0, 4, 0, // 200
    0, 0, 0, 0, -2, 7, 0, -2, 2, 0, // 210
    0, 1, -2, -2, 0, 0, 0, 0, 0, 0, // 220
    8, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 230
    2, -2, 0, 0, -1, 0, 6, 0, 4, 3, // 240
    -1, 0, 0, -1, 6, 0, 0// 250
    };

    So when you drop an item on the ground on Elvarg 3.2 and it tells you:

    Code:
    {PacketEncoder} Opcode 44 has defined size 5 but is actually 7.
    Opcode "44" is here in PacketEncoder.java server sided:
    Code:
    public static final int[] CLIENT_PACKET_SIZES = {
                0, 0, 0, 1, 6, 0, 0, 0, 4, 4, //0
                6, 2, -1, 1, 1, -1, 1, 0, 0, 0, // 10
                0, 0, 0, 0, 1, 0, 0, -1, 1, 1, //20
                0, 0, 0, 0, -2, 4, 3, 0, 2, 0, //30
                0, 0, 0, 0, 5, 8, 0, 6, 0, 0, //40
                9, 8, 0, -2, 0, 1, 0, 0, 0, 0, //50
                -2, 1, 0, 0, 2, -2, 0, 0, 0, 0, //60
                6, 3, 2, 4, 2, 4, 0, 0, 0, 4, //70
                0, -2, 0, 0, 7, 2, 1, 6, 6, 0, //80
                0, 0, 0, 0, 0, 0, 0, 2, 0, 1, //90
                2, 2, 0, 1, -1, 8, 1, 0, 8, 0, //100
                1, 1, 1, 1, 2, 1, 5, 15, 0, 0, //110
                0, 4, 4, -1, 9, -1, -2, 2, 0, 0, //120 // 9
                -1, 0, 0, 0, 13, 0, 0, 1, 0, 0, // 130
                3, 10, 2, 0, 0, 0, 0, 14, 0, 0, //140
                0, 4, 5, 3, 0, 0, 3, 0, 0, 0, //150
                4, 5, 0, 0, 2, 0, 6, 0, 0, 0, //160
                0, 5, -2, -2, 5, 5, 10, 6, 0, -2, // 170
                0, 0, 0, 1, 0, 2, 1, -1, 0, 0, //180
                0, 0, 0, 0, 0, 2, -1, 0, -1, 0, //190
                4, 0, 0, 0, 0, 0, 3, 0, 4, 0,  //200
                0, 0, 0, 0, -2, 7, 0, -2, 2, 0, //210
                0, 1, -2, -2, 0, 0, 0, 0, 0, 0, // 220
                8, 0, 0, 0, 0, 0, 0, 0, 0, 0,//230
                2, -2, 0, 0, -1, 0, 6, 0, 4, 3,//240
                -1, 0, 0, -1, 6, 0, 0//250
            };
    }
    and also client sided in PacketConstants.java.

    Now before you go off and change that to a 7 and fix it, it would help to understand where the "7" comes from.

    in PacketConstants.java client sided you can see that Opcode 44 is:
    Code:
    public static final int SEND_GROUND_ITEM = 44;
    so now lets navigate to the SEND_GROUND_ITEM method and count the bytes the payload will us using and add them up and then you get your "7" (the correct packet size for the method)

    The method can be found in client.java client sided.
    Code:
    if (packetType == PacketConstants.SEND_GROUND_ITEM) {
                int itemId = stream.readLEUShortA();
                int itemCount = stream.readInt();
                int offset = stream.readUnsignedByte();
                int xLoc = localX + (offset >> 4 & 7);
                int yLoc = localY + (offset & 7);
                if (xLoc >= 0 && yLoc >= 0 && xLoc < 104 && yLoc < 104) {
                    Item groundItem = new Item();
                    groundItem.ID = itemId;
                    groundItem.itemCount = itemCount;
                    if (groundItems[plane][xLoc][yLoc] == null)
                        groundItems[plane][xLoc][yLoc] = new Deque();
                    groundItems[plane][xLoc][yLoc].insertHead(groundItem);
                    updateGroundItems(xLoc, yLoc);
                }
                return;
            }
    Quote Originally Posted by Spooky View Post

    byte - 1
    short - 2
    int - 4
    long - 8
    double - 8


    example

    Code:
            out.writeShort(column); // 2
            out.writeByte(4); // 1
            out.writeShort(slot); // 2
            out.writeShort(id + 1); // 2
            out.writeByte(1); // 1
    packet size will be 8
    Using the above method to count the bytes in the SEND_GROUND_ITEM method , we have a short, an int, and a byte. 2 + 4 + 1 = 7.

    Hope this helps. I am still learning myself and I have fixed most of the packets on 3.2 but I am having trouble with a few like the clan chat and ::yell.
    Reply With Quote  
     

  3. Thankful users:


  4. #3  
    Registered Member Sheddy's Avatar
    Join Date
    Jul 2009
    Age
    29
    Posts
    1,053
    Thanks given
    56
    Thanks received
    89
    Discord
    View profile
    Rep Power
    69
    There's also issues when you try and ::yell and / I know derp is working on those now.
    Reply With Quote  
     

  5. #4  
    Registered Member derpscape's Avatar
    Join Date
    Jul 2011
    Posts
    212
    Thanks given
    37
    Thanks received
    19
    Discord
    View profile
    Rep Power
    43
    Quote Originally Posted by Sheddy View Post
    There's also issues when you try and ::yell and / I know derp is working on those now.
    According to this thread: https://www.rune-server.ee/runescape...izes-help.html

    chat packet should be -1 but that still throws an error for me, i also tried -2. It asks for 54 but I know that cant be right? I tried 54 and it lets me type ::yell lol but it bugs out if i type it more than once and then it asks for 58 so its a variable length packet but how come -1 and -2 don't work? >.<

    Code:
    if (opcode == PacketConstants.SEND_SPECIAL_MESSAGE) {
                	int type = incoming.readUnsignedByte();
                	String name = incoming.readString();
                    String message = incoming.readString();
                    sendMessage(message, type, name);
                    opcode = -1;
                    return true;
                }
    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

Similar Threads

  1. [317] Elvarg Loading (#206) [HD & GPU]
    By Mark. in forum Downloads
    Replies: 76
    Last Post: Today, 03:07 AM
  2. Error Parsing Incoming Packets [HELP]
    By digistr in forum Help
    Replies: 2
    Last Post: 03-24-2009, 01:27 AM
  3. new packet help
    By Colby in forum Help
    Replies: 0
    Last Post: 03-16-2009, 03:28 AM
  4. Replies: 3
    Last Post: 03-16-2009, 02:57 AM
  5. hello now i need some help
    By uberpker in forum Help
    Replies: 6
    Last Post: 10-26-2008, 04:53 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •