rswiki-book/668-Protocol.mediawiki

53 lines
1.5 KiB
Plaintext
Raw Normal View History

2012-04-29 19:38:44 -04:00
[[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
2012-04-29 19:42:06 -04:00
* JAGGRAB - connection type 15
* Create account - connection type 28
* Facebook login - connection type 29
2012-04-29 19:38:44 -04:00
* Potentially more...
<pre>
2012-04-29 19:42:06 -04:00
Needs documentation on how to login
2012-04-29 19:38:44 -04:00
</pre>
===Server -> Client Packets===
{| border=2
|-
! Opcode
! Type
! Length (bytes)
! Name
! Description
|-
2012-04-29 19:46:26 -04:00
| 69
| VARIABLE_SHORT
| -
| [[668 System update|System update]]
2012-04-29 19:38:44 -04:00
| Displays the system update counter on the player's client.
|-
|}
===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.
|-
|}