Thread: 464 Server > Client Packets

Results 1 to 4 of 4
  1. #1 464 Server > Client Packets 
    Registered Member

    Join Date
    Jul 2012
    Posts
    157
    Thanks given
    7
    Thanks received
    66
    Rep Power
    93
    I hope this helps individuals to expand on other revisions that lack resources within this community.

    This isn't ALL Server > Client packets, but I will continue to add more when I have more time.

    Here's the Buffer class used: [Only registered and activated users can see links. ]

    Packet lengths:
    Code:
    public static final int[] PACKET_LENGTHS = new int[] {
    	  // 0---1---2---3---4---5---6---7---8---9
    		-3, -3, -3, -3, -3, -3, -3, 1, -3, -3, // 0
    		-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, // 10
    		-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, // 20
    		-3, -3, -3, -3, -3, -3, -1, 6, -3, -3, // 30
    		-3, -3, -3, -1, 6, -3, -3, -3, -3, 13, // 40
    		-1, -3, -3, -3, -3, -3, -3, -3, -3, -3, // 50
    		-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, // 60
    		-3, -3, -3, -3, -3, -3, -3, -3, 4, -3, // 70
    		-3, -3, -3, -3, 2, -3, 8, -3, -3, -3, // 80
    		-3, -3, -3, -3, -3, -3, -3, -3, -3, 4, // 90
    		-3, 8, -3, -3, -3, -3, -3, -3, -3, -3, // 100
    		-3, -3, -3, 6, -3, -1, -3, -3, -3, 6, // 110
    		-3, 9, 8, 8, -3, -3, -3, -3, -3, 2, // 120
    		9, -3, -3, -3, 6, -3, -3, 6, -3, -3, // 130
    		 6, -3, -3, -1, -3, -3, -3, -3, -3, -3, // 140
    		-3, -3, -3, 4, -3, -3, -3, -3, -3, -3, // 150
    		-3, -3, -3, 14, -3, -1, 16, -3, -3, -3, // 160
    		-3, -3, -3, -3, 5, -3, 2, 8, -3, -3, // 170
    		-3, -3, -3, 2, -3, 1, -3, 10, -3, -3, // 180
    		-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, // 190
    		-3, -3, 0, -3, -3, 2, -3, -3, -3, -3, // 200
    		-3, -3, 8, -3, -3, 8, -3, -3, -3, -3, // 210
    		-3, -3, -3, -3, 8, -3, -3, -3, -3, -3, // 220
    		0, -3, -3, -3, -3, -3, -3, -3, -1, -3, // 230
    		4, -3, -3, -3, -3, -3, -3, 8, -3, -3, // 240
    		-3, -3, -3, -3, -3, -3 // 250
    };
    Code:
    Packet 167 > Logout
    Sends the logout packet
    
    Packet 30 > System Update
    int time = packet.putShort(time);
    
    Packet 238 > Display Interface
    -Sending an interface to the user
    int windowId = packet.putInt((position << 16) + windowId);
    int interfaceId = putShort(interfaceId);
    
    Packet 72 > Sending Player Option
    String option = packet.putRS2String(option);
    int slot = packet.putByteS((byte) slot);
    boolean onTop = packet.putByteC(top ? (byte) 1 : (byte) 0);
    
    Packet 190 > Send Player Skills
    int skill = packet.putByteS((byte) skill);
    
    Packet 8 > Send Interface Media
    -Used to send player's head (for dialogues)
    The var "childId" is the line Id of the interfacel
    int interfaceId = packet.putLEInt(interfaceId << 16 | childId);
    
    Packet 63 > Animate Interface Media
    int interfaceId = packet.putInt2(interfaceId << 16 | child);
    int animation = packet.putLEShort(val);
    
    Packet 114 > Set Interface Text
    -Used to modify text on an interface
    int interfaceId = packet.putInt1(interfaceId << 16 | child);
    String text = packet.putRS2String(string);
    
    Packet 142 > Send Interface Config (Bad naming)
    -Used to modify an interface
    boolean send = packet.putByteS((byte) (!send ? 1 : 0));
    
    Packet 152 > Setting the status of the user's friend's list.
    network status = packet.put((byte) 2);
    
    Packet 23 > Send Private Message
    long name = packet.putLong(name);
    byte[] message = packet.put(message);
    
    Packet 100 > Send Add Friend
    long name = packet.putLong(name);
    int worldId = packet.putShort(world);
    
    Packet 75 > Send Ignores
    long[] usersIgnored
    for (long name : usersIgnored) {
    	packet.putLong(name);
    }
    
    Packet 221 > Send Region
    packet.putShortA(RegionY);
    		for (int xCalc = (RegionX - 6) / 8; xCalc <= (RegionX + 6) / 8; xCalc++) {
    			for (int yCalc = (RegionY - 6) / 8; yCalc <= (RegionY + 6) / 8; yCalc++) {
    				packet.putInt1(0);
    				packet.putInt1(0);
    				packet.putInt1(0);
    				packet.putInt1(0);
    			}
    		}
    packet.putLEShort(RegionX);
    packet.putShort(LocalX);
    packet.put((byte) z); // Being the height level
    packet.putShort(LocalY);
    
    Packet 112 > Send Ground Item
    int itemId = packet.putShort(itemId);
    int amount = packet.putLEShort(amount);
    
    Packet 39 > Clear Ground Item
    int itemId = packet.putShortA(itemId);
    
    Packet 90 > Send Player Updating
    
    Packet 174 > Send NPC Updating
    
    Packet 132 > Send Current Player Region?
    int regionX = player.getLastKnownRegion().getRegionX();
    int regionY = player.getLastKnownRegion().getRegionY();
    packet.put((byte) ((location.getY() - ((regionY - 6) * 8)) + 0));
    packet.put((byte) ((location.getX() - ((regionX - 6) * 8)) + 0));
    Credits:
    Leanbow
    Nando
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Номер 1

    Leanbow's Avatar
    Join Date
    Feb 2008
    Posts
    5,910
    Thanks given
    1,548
    Thanks received
    2,577
    Rep Power
    5000
    Credits to nando/me for finding
    Reply With Quote  
     

  4. #3  
    REGISTERED MEMBER RAT DONOR MORE COMING

    Major's Avatar
    Join Date
    Jan 2011
    Posts
    3,006
    Thanks given
    1,292
    Thanks received
    3,490
    Rep Power
    5000
    tyvm will contribute if i get the chance
    Reply With Quote  
     

  5. #4  
    Registered Member

    Join Date
    Jul 2012
    Posts
    157
    Thanks given
    7
    Thanks received
    66
    Rep Power
    93
    Updated.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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

Similar Threads

  1. Server Reading Client Packets
    By SGPK in forum Help
    Replies: 5
    Last Post: 03-02-2013, 10:14 PM
  2. Server to Client Packets
    By Omoshu in forum Configuration
    Replies: 13
    Last Post: 11-04-2011, 07:08 AM
  3. Server to Client Packets
    By Cjay00091 in forum Requests
    Replies: 2
    Last Post: 05-03-2011, 02:50 AM
  4. All Server to Client Packets
    By Linux in forum Snippets
    Replies: 4
    Last Post: 07-17-2010, 06:09 AM
  5. Replies: 58
    Last Post: 01-22-2010, 06:30 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
  •