Jump to content
Existing user? Sign In

Sign In



Sign Up

OSRS Protocol & Packets explained


acesucks

Recommended Posts

Welcome

Foreword

Feel free to contribute to this thread. I hope we can bring this revision and the RSPS community as a whole to a new level by documenting as much as possible.

Downloads

This is the hidden content, please

Item List (id, name)

Object List (id, name)

Login Breakdown

Stage 0 (Client)

This stage is called for disconnecting, for example when in Stage 6 a response code of 23 (No reply from loginserver) is received.

Stage 1 (Client)

The Client creates the connection

Stage 2 (Client -> Server)

The client writes 1 byte with value 14.

Stage 3 (Server -> Client)

The server sends 1 byte. If this byte is 0, the client proceeds to Stage 5

Stage 4

Stage 5 (Client -> Server)

Part 1: Plain

Data Type Value
byte opcode (16/18)
short login packet size
int revision
short RSA Block Size

Part 2: RSA Encrypted

Get bytes to an array the size of "RSA Block Size". Create a BigInteger from this Array. Decrypt that BigInt with modPow and wrap its ByteArray in a new ByteBuffer.

Data Type Value
byte Magic Value (always 1)
byte authenticator type
int xtea[0]
int xtea[1]
int xtea[2]
int xtea[3]
byte[8] authenticator code
string password
Authenticator Type Description Payload
0 TrustedComputer Input Int: Trusted Computer

pointer_index + 4

1 Authenticator Code input. Medium_Int: Code

pointer_index + 5

2 Indicates nothing will be received. pointer_index + 8
3 Authenticator Code input. Medium_Int: Code

pointer_index + 5

*Note Type 0 isn't 100% known.

*Note: Assuming Types 1 & 3 are for new inputs and 'trust this computer for 30 days' inputs

Part 3: xtea Encrypted

Data Type Value
string username
byte bitpacked of low memory and client resizability
short width
short height
byte[24] random.dat data
string key client parameter
int affiliate id
byte hardware details version(6)
byte OS Type
byte Architecture
byte OS Version
byte Vendor
byte[4] ?
short Max Memory
byte Available Processors
tribyte ?
GJ2String[4] 4 empty GJ2 Strings?
byte ?
short ?
GJ2String[2] ? (I use these for MAC & PCName)
byte[2] ?
int[4] 3 ints in a for loop & 1 seperate
byte client parameter #2
int[16] crcs

Stage 6 (Server -> Client)

The server sends a response code. This value can be any of the following:

  1. Unexepected server responce please try using a different world.
  2. login to the game
  3. Invalid name/password
  4. banned username
  5. Account is already logged in try agian in 60 secs...
  6. Client has been updated! Please reload this page.
  7. This world is full. Please use a different world.
  8. Unable to connect. login server offline.
  9. Login limit exceeded. Too many connections from you address.
  10. Unable to connect. Bad session id.
  11. We suspect someone knows your password. Press 'change your password' on the front page.
  12. You need a members account to login to this world. Please subscribe, or use a different world.
  13. Could not complete login. Please try using a different world.
  14. The server is being updated. Please wait 1 minute and try again.
  15. See here
  16. Too many incorrect longs from your address. Please wait 5 minutes before trying again.
  17. You are standing in a members-only area. To play on this world move to a free area first.
  18. Account locked as we suspect it has been stolen. Press 'recover a locked account' on front page.
  19. This world is running a closed beta. sorry invited players only. please use a different world.
  20. Invalid loginserver requested please try using a different world.
  21. You have only just left another world. your profile will be transferred in xxx seconds.
  22. Malformed login packet. Please try agian.
  23. No reply from loginserver. Please wait 1minute and try again.
  24. Error loading your profile. please contact customer support.
  25. Unexepected loginserver response
  26. This computers address has been blocked as it was used to break our rules.
  27. Service unavailable.

56. Authenticator Login.

As you can see this is a response to the data gathered in from Stage 5.

Most of the response codes will lead to going to Stage 0 and thus disconnecting from the server. The only exceptions are:

  • when the response code is 2, the client will immediately go to Stage 9. This is the normal flow when someone logs in 100% correctly.
  • when the response code is 21, the client will go to Stage 7

Stage 7 (Server -> Client)

When the player just left another world.

The server sends a byte containing the time for the client to wait to reconnect. The client then proceeds to Stage 8

Stage 9

Data Type Description
Byte Trusted Computer ? (0,1)
Byte Trusted 1
Byte Trusted 2
Byte Trusted 3
Byte Trusted 4
Byte Player Rights (0,1,2)
Byte some boolean?
Short Player Index
Byte members ? dunno
"Packet" Packet ID (Load map region)
Ushort Packet Size

Stage 10

Game Packets

Server -> Client

14

Set skill level & exp

Data Type Description
UByte Level
UByteA Skill ID
UByteS Experience

25

Object Spawn?

Data Type Description
UShortA  
UShort  
UByteS Object Type

95

?

Data Type Description
ByteS  
ByteA  
ULEShort  
UShortA  
ULEShort  
ByteS  
method_ap_byte  
ULEShort  
UShortA  
UShort  

113

Camera

Data Type Description
UByte X
UByte Y
UShort Zmodifier
UByte  
UByte Distance? >=100

 

127

Ground item...

Data Type Description
UByte  
UShort  
UShort  
UShort  

239

Data Type Description
UByte  
UShort  
UByte  
UShort  

200

Spawn ground item

Data Type Description
UByte  
UByte  
   

239

Data Type Description
UByte  
UShort  
UByte  
UShort  

Cache

Index Files

There are 16 index files [0-15] and one reference file [255].

Value Data
0 Skeleton
1 Skins
2 Config
3 Interfaces
4 Sound Effects (1)
5 Landscape
6 Music (1)
7 Models
8 Sprites
9 Textures
10 Huffman
11 Music (2)
12 Client Scripts
13 Fonts Parent
14 Sound Effects (2)
15 Sound Effects (3)

Config

The config index file contains data on the following:

Config File # Data
1 Underlay Definitions
2  
3 IdentityKit
4 Overlay Definitions
5 Inv Definitions
6 Object Definitions
8 Enum Definitions
9 NPC Definitions
10 Item Definitions
12 Animation (Sequence) Definitions
13 AnimatedGraphics (SpotAnim/GFX) Definitions
14 VarpBit Definitions
15  
16 Varp Definitions
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 3 weeks later...
  • 1 month later...
  • 1 year later...
  • 2 weeks later...
  • 2 months later...
  • 2 weeks later...
  • 4 weeks later...
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Contact

[email protected]

astra.security

What is a RSPS?

A RSPS, also known as RuneScape private server, is an online game based on RuneScape, and controlled by independent individuals.

Popular RSPS Servers

Runewild Ikov RedemptionRSPS

Disclaimer

Runesuite is not affiliated with runescape, jagex in any way & exists solely for educational purposes.

×
×
  • Create New...