|
|
Unless i somehow missed some these should be all the Server > Client packets there are.
Buffer/"Stream" class used: http://pastie.org/5087157
Packet lengths:
Code:public static final int PACKET_LENGTHS[] = { 0, 0, 4, 6, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 6, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, -2, 0, 0, 0, 0, 0, 6, 0, 0, 0, -1, 0, 0, 0, 4, 0, 0, 0, -2, 0, 0, 0, 2, 23, 0, 9, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 5, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1, 3, 0, 4, 0, 0, 0, 0, 0, -2, -1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, -1, 2, 2, 0, 0, 4, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 15, 3, -2, 0, 0, 8, 6, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 3, 0, 14, 0, 0, -2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 2, 2, 0, 4, 0, 0, 0, -2, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 5, 0, 1, 1, 4, 0, 2, 0 }; }Code:Packet 2 > Interface Animation - Packet 200 in 317 Sets an interface's model animation. int interfaceId = inStream.getLEUShortA(); int animationId = inStream.getShortA(); Packet 3 > ??? - Packet 166 in 317 Something to do with Camera position/cutscenes anInt874 = inStream.getUByte(); // Effects x camera position anInt875 = inStream.getUByte(); // Effects y camera position anInt876 = inStream.getUShort(); // Effects z camera position anInt877 = inStream.getUByte(); anInt878 = inStream.getUByte(); Packet 5 > Logout - 109 in 317 Packet 6 > ??? - Packet 187 in 317 Sets inputDialogState = 2; Packet 10 > Send Siderbar Interface - Packet 71 in 317 int sidebarIcon = inStream.getUByteS(); int interfaceId = inStream.getBEUShortA(); Packet 13 > Player/Npc Animation Reset - Packet 1 in 317 Loops through all players/npcs and sets their animations to -1 Packet 18 > ??? More interface related shit int unknown = inStream.getUShort(); int interfaceId = inStream.getBEUShortA(); int unknown2 = inStream.getLEUShort(); Packet 21 > Interface Item - Packet 246 in 317 Displays an item model inside an interface. int itemScale = inStream.getUShort(); int itemId = inStream.getLEUShort(); int interfaceId = inStream.getLEUShortA(); Packet 26 > Send Sound - Packet 174 in 317 Has some fancy check different to 317 if (delay == 65535) then delay is set to 0, else (delay = delay + Sound.someArray[songId]) - (maybe song lengths? TODO check this) int songId = inStream.getUShort(); int volume = inStream.getUByte(); int delay = inStream.getUShort(); Packet 29 > ??? Some interface related crap. Packet 40 > ??? - Packet 64 in 317 Something related to Global Objects... mass spawning or something. bigRegionY = inStream.getUByteS(); bigRegionX = inStream.getNegUByte(); Packet 41 > ??? - Packet 105 in 317 int offset = stream.getUByte(); int unknown = stream.getUShort(); int offset2 = stream.getUByte(); Packet 49 > Skill level - Packet 134 in 317 int skillId = inStream.getNegUByte(); int skillLevel = inStream.getUByte(); int skillExperience = inStream.getLEInt(); Packet 50 > Send Walkable Interface - Packet 208 in 318 int interfaceId = inStream.getShort(); Packet 53 > Construct Map Region mapRegionY = inStream.getBEUShortA(); mapRegionX = inStream.getBEUShortA(); Packet 58 > ??? - Packet 27 in 317 Sets inputDialogState = 1; Packet 59 > Send Still Graphic - Packet 4 in 317 int offset = stream.getUByte(); int graphicId = stream.getUShort(); int height = stream.getUByte(); int delay = stream.getUShort(); Packet 61 > Reset X Destination (lolnaming) - Packet 78 in 317 Packet 63 > Send Message - Packet 253 in 317 String message = inStream.getStr(); Packet 67 > Camera Shake (or something) - Packet 35 in 317 Often known as the Camera shake/"Eartquake" packet. Need to check all the naming as it doesn't look right... int customCameraSlot = inStream.getUByte(); //"Shake type" ??? int unknown = inStream.getUByte(); //magnitude1 ? int lowestYaw = inStream.getUByte(); //magnitude2 ? int unknown2 = inStream.getUByte(); //magnitude3 ? Packet 71 > Npc Updating/Handling - Packet 65 in 317 Calls a method which updates Npcs/read spawn requests/reads update masks Packet 75 > Set big region/"Send Position" - Packet 85 in 317 bigRegionX = inStream.getNegUByte(); bigRegionY = inStream.getUByteA(); Packet 76 > Send Welcome Screen Info ??? unknown = inStream.getLEUShort(); unknown2 = inStream.getLEUShortA(); inStream.getUShort(); unknown3 = inStream.getUShort(); unknown4 = inStream.getLEUShort(); welcomeScreenUnreadPMCount = inStream.getBEUShortA(); unknown5 = inStream.getBEUShortA(); memberCredit = inStream.getUShort(); lastLoginIP = inStream.getBEInt(); unknown6 = inStream.getLEUShortA(); inStream.getUByteA(); Packet 78 > Send Add Friend long nameAsLong = inStream.getLong(); int world = inStream.getUByte(); //World the player being added is on Packet 82 > Change Interface Hidden State (bad naming) - Packet 171 in 317 Changes an interface's Hidden Until Mouseover state (the interface will not be shown until the player moves his mouse over it) //TODO check this boolean hidden = inStream.getUByte() == 1; int interfaceId = inStream.getUShort(); Packet 88 > ??? Packet 151 (Send Object) or 101 (probably 101) in 317. int xyOffset = stream.getUByteS(); int bits = stream.getUByteS(); (For obj type/rotation). Packet 90 > Update Players - Packet 81 in 317 Updates our player movement/other player movement/current player/refreshes update masks. Packet 106 > ??? - Packet 215 in 217 Something to do with Ground Items. int xyOffset = stream.getUByteA(); int itemCount = stream.getLEUShortA(); int itemId = stream.getBEUShortA(); int playerId = stream.getBEUShortA(); Packet 107 > Send Ground Item - Packet 44 in 317 int id = stream.getUShort(); int xyOffset = stream.getNegUByte(); int count = stream.getBEUShortA(); Packet 109 > Show Interface? - Packet 97 in 317??? TODO check this int interfaceId = inStream.getUShort(); Packet 113 > Reset button state - Packet 68 in 317 Something to do with Session settings/configs..? Packet 115 > ??? - Packet 87 in 317 Something to do with session sittings (often called 'configs') int settingState = inStream.getME2Int(); int settingId = inStream.getLEUShort(); Packet 121 > ??? - Packet 84 in 317 int unknown = stream.getUByte(); int x = bigRegionX + (unknown >> 4 & 7); int y = bigRegionY + (unknown & 7); int unknown2 = stream.getUShort(); (Something to do with Item id - "item.id != (unknown2 & 0x7fff)") int unknown3 = stream.getUShort(); (Something to do with Item count - "item.itemCount != unknown3)") int unknown4 = stream.getUShort(); Packet 125 > Send Run Energy - Packet 110 in 317 playerEnergy = inStream.getUByte(); Packet 126 > Initialize Player - Packet 249 in 317 Sends the player's membership status and their current index on the server's player list. isMember = inStream.getUByte(); playerId = inStream.getLEUShort(); Packet 128 > Display Inventory Overlay - Packet 248 in 317 int interfaceId = inStream.getBEUShortA(); int invOverlayId = inStream.getLEUShortA(); Packet 134 > Send Update Items - Packet 53 in 317 int interfaceId = inStream.getUShort(); int itemAmount = inStream.getSmarts(); int itemId = inStream.getUShort(); int itemCount = inStream.getUByte(); Packet 135 > Send Private Message - Packet 196 in 317 long fromPlayer = inStream.getLong(); //The player the PM is from int chatId = inStream.getLEInt(); int fromPlayersRights = inStream.getUByte(); //The rights of the player the PM is from Packet 142 > ??? - Packet 160 in 317 Something else to do with objects. animation Id = stream.getUShort(); unknown = stream.getUByteA(); xyOffset = stream.getUByte(); Packet 148 > End Cutscene/Reset Camera - Packet 107 in 317 Packet 152 > ??? - 151 (Send Object) or 101 in 317 Something else to do with object spawning. int bits = stream.getNegUByte(); int id = stream.getLEUShortA(); (Needs confirming). int offset = stream.getUByteA(); Packet 156 > Set Minimap State - Packet 99 in 317 int minimapState = inStream.getUByte(); Packet 157 > Send player option?? - Packet 104 in 317 Sends a player option when the player is right clicked. int slotPos = inStream.getNegUByte(); // slot position on the interface String actionString = inStream.getStr(); //The string i.e. "follow" (double check this) int putAtTop = inStream.getUByte(); // Move the slot to the top?? check this Packet 158 > Show dialogue interface?? - Packet 218 in 317 Check this. int id = inStream.getLEShort(); Packet 159 > Show Interface - Packet 97 in 317 int interfaceId = inStream.getLEUShortA(); Packet 162 > Send Interface Media (Type 2) - Packet 75 in 317 (Often called 'send npc head') Sets 'RSInterface.getInterface(entity)' mediaType to '2' and mediaId to 'frame'. int frame = inStream.getBEUShortA(); int entity = inStream.getLEUShort(); Packet 166 > Set Interface Offset - Packet 70 in 317 Sets the offset for drawing of an interface. int yOffset = inStream.getLEShort(); int xOffset = inStream.getLEShort(); int interfaceId = inStream.getUShort(); Packet 167 > ??? - Packet 177 in 317 Something cutscene related. unknown = inStream.getUByte(); unknown2 = inStream.getUByte(); unknown3 = inStream.getUShort(); unknown4 = inStream.getUByte(); unknown5 = inStream.getUByte(); Packet 174 > Send Weight - Packet 240 in 317 userWeight = inStream.getShort(); Packet 181 > ??? - Packet 117 in 317 Projectile spawning or something? int angle = stream.getUByte(); int x = bigRegionX + (angle >> 4 & 7); int y = bigRegionY + (angle & 7); int offsetY = x + stream.getByte(); int offsetX = y + stream.getByte(); int lockOn = stream.getShort(); int id = stream.getUShort(); int startHeight = stream.getUByte() * 4; int endHeight = stream.getUByte() * 4; int delay = stream.getUShort(); nt speed = stream.getUShort(); int slope = stream.getUByte(); int radius = stream.getUByte(); Packet 182 > Set Session setting (retard naming) - Packet 36 in 317 Applies a config change or something. int settingId = inStream.getBEUShortA(); byte sessionValue = inStream.getByteS(); Packet 183 > ??? - Packet 60 in 317 Something to speed up mass object/etc updates or something? bigRegionX = inStream.getUByte(); bigRegionY = inStream.getUByteA(); Then while (inStream.offset < packetSize) int opcode = inStream.getUByte(); parsePacketGroup(inStream, opcode); Packet 186 > Interface Model Rotation - Packet 230 in 317 Changes the zoom and rotation of the interface id's media. int rotation1 = inStream.getBEUShortA(); int interfaceId = inStream.getLEUShortA(); int zoom = inStream.getBEUShortA(); int rotation2 = inStream.getLEUShort(); Packet 190 > System Update - Packet 114 in 317 systemUpdateTime = inStream.getLEUShort() * 30; Packet 199 > ??? Packet 254 in 317 Something to do with head icon drawing headIconDrawType = inStream.getUByte(); Then if headIconDrawType == 1 unknown = inStream.getUShort(); Else if headIconDrawType >= 2 and <= 6 unknown1 = inStream.getUShort(); unknown2 = inStream.getUShort(); unknown3 = inStream.getUByte(); Else if headIconDrawType == 10 otherPlayerId = inStream.getUShort(); Packet 200 > Set Scroll Position - Packet 79 in 317 Sets the scroll position if an Interface. int interfaceId = inStream.getUShort(); int scrollPosition = inStream.getLEUShortA(); Packet 201 > Update Chat Settings - Packet 206 in 317 Updates chat settings (Public/Private/Trade). publicChatMode = inStream.getUByte(); privateChatMode = inStream.getUByte(); tradeMode = inStream.getUByte(); Packet 203 > ??? - Packet 147 in 317 //lol recheck this Something related to object spawning. int objId = stream.getUShort(); int unknown = stream.getUByte(); byte unknown2 = stream.getNegByte(); int xyOffset = stream.getUByteA(); byte unknown4 = stream.getByteA(); int unknown5 = stream.getBEUShortA(); int playerId = stream.getLEUShort(); byte unknown6 = stream.getByte(); byte unknown7 = stream.getByteA(); int playerId = stream.getUShort(); Packet 206 > Send Update Items int interfaceId = inStream.getUShort(); int itemAmount = inStream.getUShort(); int itemCount = inStream.getNegUByte(); Then if (itemCount == 255) itemCount = inStream.getBEInt(); Packet 208 > Remove Ground Item - Packet 156 in 317 int id = stream.getBEUShortA(); int xyOffset = stream.getUByteA(); Packet 216 > Send Interface Media (Type 1) - Packet 8 in 317 Changes the interface's media type to 1, and the media id to (specified id). int mediaId = inStream.getLEUShortA(); int interfaceId = inStream.getLEUShortA(); Packet 218 > Set Interface Colour - Packet 122 in 317 Changes the colour of an interface. int interfaceId = inStream.getUShort(); int colour = inStream.getBEUShortA(); Packet 220 > Play Song - Packet 74 in 317 Plays a song if (song != currentSong && musicEnabled && !lowMem && prevSong == 0) - prevSong == 0... Send Initial song?? TODO int song = inStream.getLEUShortA(); Packet 222 > Load Map Region mapRegionX = inStream.getUShort(); mapRegionY = inStream.getLEUShortA(); Packet 226 > Send Add Ignore - Packet 214 in 317 userIgnoreCount = packetSize / 8; for (int k8 = 0; k8 < userIgnoreCount; k8++) { ignoreListAsLongs[k8] = inStream.getLong(); } Packet 232 > Set Interface Text - Packet 126 in 317 int interfaceId = inStream.getLEUShortA(); String interfaceText = inStream.getStr(); Packet 233 > ??? TODO play around with this for a while, see what it is. unknown = inStream.getUByte(); Packet 238 > Flash Sidebar - Packet 24 in 317 Causes a sidebar icon to start flashing. flashingSidebarId = inStream.getUByte(); Packet 246 > Send Inventory Overlay Interface - Packet 142 in 317 int interfaceId = inStream.getLEUShortA(); Packet 249 > Play Song 2 (TODO) - Packet 121 in 317 Identical to Packet 220 except it also sets the previous song id int song = inStream.getLEUShort(); int prevSong = inStream.getMediumInt(); Packet 251 > Send Friend List Status - Packet 221 in 317 networkFriendServerStatus = inStream.getUByte(); Packet 252 > Change Tab - Packet 106 in 316 tabId = inStream.getNegUByte(); Packet 253 > Open SomeInterface - (Doesn't exist in 317, I think - Could be fullscreen related?) int interfaceId = inStream.getLEUShort(); int interfaceId2 = inStream.getBEUShortA(); Packet 255 > Send Interface Media (Type 3) (often called 'Send player head') int interfaceId = inStream.getLEUShortA(); Packet 41, 59, 88, 106, 107, 121, 142, 152, 181, 203, 208 parsePacketGroup(inStream, opcode);
Last edited by Major; 10-20-2012 at 04:33 AM.
Good Job.

Some things for Hyperion:
Spoiler for Code:
Or if I missed any: http://www.rune-server.org/runescape...7-packets.html
Or you could just use: http://www.rune-server.org/runescape...ion-377-a.html
Nice job, may use these later on.
Nice job Cyberus.

Some more server->client packets not in the original post/without good descriptions:
packet 40 = reset items and objects in an 8x8 region, sets current 'placement' 8x8 region
packet 183 = set current 'placement' 8x8 region, also optionally allows grouping of item,object,projectile,etc. packets within this one
packet 75 = set current 'placement' 8x8 region
packet 219 = reset items on interface

I've no idea other than something obviously related to Object Spawning.
Try messing around with it and seeing what happens.
Code:if (opcode == 203) { //317 - 147 int objId = stream.getUShort(); int i = stream.getUByte(); int objType = i >> 2; int face = i & 3; int type = anIntArray1032[objType]; byte b = stream.getNegByte(); int offset = stream.getUByteA(); int regionX = bigRegionX + (offset >> 4 & 7); int regionY = bigRegionY + (offset & 7); byte b2 = stream.getByteA(); int j = stream.getBEUShortA(); int playerId = stream.getLEUShort(); byte b3 = stream.getByte(); byte b4 = stream.getByteA(); int k = stream.getUShort(); Player player; if (playerId == this.playerId) { player = sessionPlayer; } else { player = sessionPlayers[playerId]; } if (player != null) { ObjectDefinition objectDef = ObjectDefinition.forId(objId); int current = intGroundArray[plane][regionX][regionY]; int right = intGroundArray[plane][regionX + 1][regionY]; int diagonal = intGroundArray[plane][regionX + 1][regionY + 1]; int up = intGroundArray[plane][regionX][regionY + 1]; Model model = objectDef.renderObject(objType, face, current, right, diagonal, up, -1); if (model != null) { createObjectSpawnRequest(regionX, regionY, plane, -1, 0, 0, j + 1, k + 1, type); player.anInt1764 = k + currentTime; player.anInt1765 = j + currentTime; player.aModel_1746 = model; int objSizeX = objectDef.sizeX; int objSizeY = objectDef.sizeY; if (face == 1 || face == 3) { objSizeX = objectDef.sizeY; objSizeY = objectDef.sizeX; } player.anInt1743 = regionX * 128 + objSizeX * 64; player.anInt1745 = regionY * 128 + objSizeY * 64; player.anInt1744 = getFloorDrawHeight(player.anInt1743, player.anInt1745, plane); if (b2 > b) { byte byte4 = b2; b2 = b; b = byte4; } if (b4 > b3) { byte byte5 = b4; b4 = b3; b3 = byte5; } player.anInt1768 = regionX + b2; player.anInt1770 = regionX + b; player.anInt1769 = regionY + b4; player.anInt1771 = regionY + b3; } } }
| « 377 Update Masks | [Release] Chinchompa Anims » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |