mirror of
https://github.com/moparisthebest/rswiki-book
synced 2024-11-22 00:52:15 -05:00
94 lines
2.1 KiB
Plaintext
94 lines
2.1 KiB
Plaintext
[[Category RS2]]
|
|
|
|
|
|
== '''Packet structure''' ==
|
|
When the client sends a packet to the server, the first byte encapsulates its opcode. This specific opcode is encrypted with a value generated by the ISAAC PRNG seeded with a dynamically server generated key during the login block. The server decrypts it and associates the opcode to the packet's respective predefined size. If the packet does not contain a fixed size, the opcode will be followed by either a byte or a word - varying per packet - for its proper size. This is then followed by the payload.
|
|
|
|
== '''Login''' ==
|
|
Every connection to the main 'gateway' server sends a single byte of data, mostly well known as the connection type. The connection type tells the main server which type of connection you wish to initiate. The old engine list consists of:
|
|
|
|
* Login initiation - connection type 14
|
|
* JAGGRAB - connection type 15
|
|
* Create account - connection type 28
|
|
* Facebook login - connection type 29
|
|
* Potentially more...
|
|
|
|
<pre>
|
|
Needs documentation on how to login
|
|
</pre>
|
|
|
|
===Server -> Client Packets===
|
|
{| border=2
|
|
|-
|
|
! Opcode
|
|
! Type
|
|
! Length (bytes)
|
|
! Name
|
|
! Description
|
|
|-
|
|
| 8
|
|
| FIXED
|
|
| 2
|
|
| [[508 System update|System update]]
|
|
| Displays the system update counter on the player's client.
|
|
|-
|
|
| 93
|
|
| FIXED
|
|
| 7
|
|
| [[508 Send interface|Send interface]]
|
|
|
|
|
|-
|
|
| 99
|
|
| FIXED
|
|
| 1
|
|
| [[508 Run energy|Run energy]]
|
|
| Sets the players run energy.
|
|
|-
|
|
| 104
|
|
| FIXED
|
|
| 0
|
|
| [[508 Logout|Logout]]
|
|
| Logs the player out.
|
|
|-
|
|
| 217
|
|
| FIXED
|
|
| 6
|
|
| [[508 Send skill levels|Send skill levels]]
|
|
| Sends the player's skill levels to the client to be drawn on the skill tab.
|
|
|-
|
|
| 218
|
|
| VARIABLE BYTE
|
|
| N/A
|
|
| [[508 Send message|Send message]]
|
|
| Writes a string to the client's chat box.
|
|
|-
|
|
| 239
|
|
| FIXED
|
|
| 3
|
|
| [[508 Set window pane|Set window pane]]
|
|
|
|
|
|-
|
|
| 252
|
|
| VARIABLE BYTE
|
|
| N/A
|
|
| [[508 Send player option|Send player option]]
|
|
|
|
|
|}
|
|
|
|
===Client -> Server Packets===
|
|
|
|
{| border=2
|
|
|-
|
|
! Opcode
|
|
! Type
|
|
! Length (bytes)
|
|
! Name
|
|
! Description
|
|
|-
|
|
| 63
|
|
| FIXED
|
|
| 6
|
|
| [[508 Dialogue Options|Dialogue Options.]]
|
|
| Sent when a player clicks an dialogue button. The data sent is InterfaceId, buttonId, and something yet not discovered.
|
|
|-
|
|
|} |