Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RSProt

[![GitHub Actions][actions-badge]][actions] [![MIT license][mit-badge]][mit]
[![OldSchool - 221 - 240 (Alpha)](https://img.shields.io/badge/OldSchool-221--240_(Alpha)-9a1abd)](https://github.com/blurite/rsprot/tree/master/protocol/osrs-240/osrs-240-api/src/main/kotlin/net/rsprot/protocol/api)
[![OldSchool - 221 - 241 (Alpha)](https://img.shields.io/badge/OldSchool-221--241_(Alpha)-9a1abd)](https://github.com/blurite/rsprot/tree/master/protocol/osrs-241/osrs-241-api/src/main/kotlin/net/rsprot/protocol/api)

## Status
> [!NOTE]
Expand All @@ -16,7 +16,7 @@ In order to add it to your server, add the below line under dependencies
in your build.gradle.kts.

```kts
implementation("net.rsprot:osrs-240-api:1.0.0-ALPHA-20260912")
implementation("net.rsprot:osrs-241-api:1.0.0-ALPHA-20261001")
```

An in-depth tutorial on how to implement it will be added into this read-me
Expand All @@ -32,12 +32,12 @@ other revisions are welcome, but will not be provided by default.
- Java 11

## Supported Versions
This library currently supports revision 221-240 OldSchool desktop clients.
This library currently supports revision 221-241 OldSchool desktop clients.

## Quick Guide
This section covers a quick guide for how to use the protocol after implementing
the base API. It is not a guide for the base API itself, that will come in the
future. This specific quick guide refers to revision 240. Revisions older
future. This specific quick guide refers to revision 241. Revisions older
than 235 have a significantly different API and will not be explored here.
It is recommented you upgrade to latest, or view an older readme in history.

Expand Down
46 changes: 41 additions & 5 deletions WHATSNEW.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
## What's New?

### Revision 241

#### Additions
- VARP_LONG: A way to send a 64 bit value to the client.
- UPDATE_TRADINGPOST_V2: Changed price to a long.
- UPDATE_STOCKMARKET_SLOT_V2: Changed price and completedGold to a long.
Furthermore, supports a section for extra info, but because the packet is
a fixed size, that extra info must always be empty.
- OBJUNLOCK_RESET: Originally intended for bronzeman mode, but it failed the polls.
The packet will likely be removed in the future. The packet clears existing
unlocked obj tracking.
- OBJUNLOCK_UPDATE: Originally intended for bronzeman mode, but it failed the polls.
The packet will likely be removed in the future. The packet tells the client which
objs to mark as unlocked.
- OBJ_CUSTOMISE_SPECIFIC_V2: Adds the ability to apply more than one
recolour or retexture, as well as the ability to set all triangles to a specific
colour.
- NPC body customisation V4: Adds support for recolouring all triangles of a
NPC's model to a specific colour.
- Player obj type customisation: Adds the ability to recolour/retexture up to 256 values,
up from 2. Additionally adds support for recolouring all triangles to a specific
colour.

#### Removals
- CAM_LOOKAT_V2
- CAM_MOVETO_ARC_V2
- CAM_MOVETO_CYCLES_V2
- CAM_MOVETO_V2
- CAM_ROTATETO_COORDINATE_V2
- NPC_INFO_LARGE_V5
- NPC_INFO_SMALL_V5
- OPNPC 1-5 V1
- OPLOC 1-5 V1
- OPOBJ 1-5 V1

### Revision 240

#### Additions
Expand All @@ -16,10 +51,11 @@ zero on Java.

> [!NOTE]
> Four packets were renamed in a breaking manner with the release of
> 1.0.0-ALPHA-20260624. These packets are:
> PlayerAnimSpecific → AnimSpecific
> CamLookAtEasedCoord → CamRotateToCoordinate
> IfCrmViewClick → IfCrmViewOp
> 1.0.0-ALPHA-20260624.\
> These packets are:\
> PlayerAnimSpecific → AnimSpecific\
> CamLookAtEasedCoord → CamRotateToCoordinate\
> IfCrmViewClick → IfCrmViewOp\
> OculusLeave → ExitFreecam

#### Additions
Expand Down Expand Up @@ -99,7 +135,7 @@ and the ability to face a world entity.
> WorldEntityInfo, you should be fine as-is.

#### Additions
- RESUME_P_COUNTDIALOG_LONG added.
- RESUME_P_LONGDIALOG added.
- RUNCLIENTSCRIPT supports `long` data type via 'Ï' char code.
- IF_SETMODEL_V2 added, supporting g4() for models.
- Obj customisation section in appearance extended info uses g4() for models.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {

allprojects {
group = "net.rsprot"
version = "1.0.0-ALPHA-20260912"
version = "1.0.0-ALPHA-20261001"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package net.rsprot.protocol.game.incoming.codec.resumed

import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprot.protocol.game.incoming.prot.GameClientProt
import net.rsprot.protocol.game.incoming.resumed.ResumePLongDialog
import net.rsprot.protocol.message.codec.MessageDecoder
import net.rsprot.protocol.metadata.Consistent

@Consistent
public class ResumePLongDialogDecoder : MessageDecoder<ResumePLongDialog> {
override val prot: ClientProt = GameClientProt.RESUME_P_LONGDIALOG

override fun decode(buffer: JagByteBuf): ResumePLongDialog {
val count = buffer.g8()
return ResumePLongDialog(count)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ import net.rsprot.protocol.game.incoming.codec.players.OpPlayer7Decoder
import net.rsprot.protocol.game.incoming.codec.players.OpPlayer8Decoder
import net.rsprot.protocol.game.incoming.codec.players.OpPlayerTDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePCountDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePCountDialogLongDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePLongDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePNameDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePObjDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePStringDialogDecoder
Expand Down Expand Up @@ -200,7 +200,7 @@ public object DesktopGameMessageDecoderRepository {
bind(ResumePNameDialogDecoder())
bind(ResumePStringDialogDecoder())
bind(ResumePCountDialogDecoder())
bind(ResumePCountDialogLongDecoder())
bind(ResumePLongDialogDecoder())
bind(ResumePObjDialogDecoder())

bind(FriendChatKickDecoder())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public enum class GameClientProt(
RESUME_P_NAMEDIALOG(GameClientProtId.RESUME_P_NAMEDIALOG, Prot.VAR_BYTE),
RESUME_P_STRINGDIALOG(GameClientProtId.RESUME_P_STRINGDIALOG, Prot.VAR_BYTE),
RESUME_P_COUNTDIALOG(GameClientProtId.RESUME_P_COUNTDIALOG, 4),
RESUME_P_COUNTDIALOG_LONG(GameClientProtId.RESUME_P_COUNTDIALOG_LONG, 8),
RESUME_P_LONGDIALOG(GameClientProtId.RESUME_P_LONGDIALOG, 8),
RESUME_P_OBJDIALOG(GameClientProtId.RESUME_P_OBJDIALOG, 2),

// Friend chat packets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal object GameClientProtId {
const val FRIENDCHAT_JOIN_LEAVE = 34
const val OPPLAYER8 = 35
const val OPOBJ1_V2 = 36
const val RESUME_P_COUNTDIALOG_LONG = 37
const val RESUME_P_LONGDIALOG = 37
const val OPPLAYER5 = 38
const val IDLE = 39
const val OPWORLDENTITY4 = 40
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import net.rsprot.protocol.message.IncomingGameMessage
* long to the input box. It has no uses as of writing this.
* @property count the count entered.
*/
public class ResumePCountDialogLong(
public class ResumePLongDialog(
public val count: Long,
) : IncomingGameMessage {
override val category: ClientProtCategory
Expand All @@ -19,12 +19,12 @@ public class ResumePCountDialogLong(
if (this === other) return true
if (javaClass != other?.javaClass) return false

other as ResumePCountDialogLong
other as ResumePLongDialog

return count == other.count
}

override fun hashCode(): Int = count.hashCode()

override fun toString(): String = "ResumePCountDialogLong(count=$count)"
override fun toString(): String = "ResumePLongDialog(count=$count)"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package net.rsprot.protocol.game.incoming.codec.resumed

import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprot.protocol.game.incoming.prot.GameClientProt
import net.rsprot.protocol.game.incoming.resumed.ResumePLongDialog
import net.rsprot.protocol.message.codec.MessageDecoder
import net.rsprot.protocol.metadata.Consistent

@Consistent
public class ResumePLongDialogDecoder : MessageDecoder<ResumePLongDialog> {
override val prot: ClientProt = GameClientProt.RESUME_P_LONGDIALOG

override fun decode(buffer: JagByteBuf): ResumePLongDialog {
val count = buffer.g8()
return ResumePLongDialog(count)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import net.rsprot.protocol.game.incoming.codec.players.OpPlayer7Decoder
import net.rsprot.protocol.game.incoming.codec.players.OpPlayer8Decoder
import net.rsprot.protocol.game.incoming.codec.players.OpPlayerTDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePCountDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePCountDialogLongDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePLongDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePNameDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePObjDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePStringDialogDecoder
Expand Down Expand Up @@ -170,7 +170,7 @@ public object DesktopGameMessageDecoderRepository {
bind(ResumePNameDialogDecoder())
bind(ResumePStringDialogDecoder())
bind(ResumePCountDialogDecoder())
bind(ResumePCountDialogLongDecoder())
bind(ResumePLongDialogDecoder())
bind(ResumePObjDialogDecoder())

bind(FriendChatKickDecoder())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public enum class GameClientProt(
RESUME_P_NAMEDIALOG(GameClientProtId.RESUME_P_NAMEDIALOG, Prot.VAR_BYTE),
RESUME_P_STRINGDIALOG(GameClientProtId.RESUME_P_STRINGDIALOG, Prot.VAR_BYTE),
RESUME_P_COUNTDIALOG(GameClientProtId.RESUME_P_COUNTDIALOG, 4),
RESUME_P_COUNTDIALOG_LONG(GameClientProtId.RESUME_P_COUNTDIALOG_LONG, 8),
RESUME_P_LONGDIALOG(GameClientProtId.RESUME_P_LONGDIALOG, 8),
RESUME_P_OBJDIALOG(GameClientProtId.RESUME_P_OBJDIALOG, 2),

// Friend chat packets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ internal object GameClientProtId {
const val FRIENDCHAT_JOIN_LEAVE = 67
const val MESSAGE_PUBLIC = 69
const val OPLOC3_V2 = 70
const val RESUME_P_COUNTDIALOG_LONG = 72
const val RESUME_P_LONGDIALOG = 72
const val NO_TIMEOUT = 73
const val OPOBJT = 74
const val SOUND_JINGLEEND = 76
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import net.rsprot.protocol.message.IncomingGameMessage
* long to the input box. It has no uses as of writing this.
* @property count the count entered.
*/
public class ResumePCountDialogLong(
public class ResumePLongDialog(
public val count: Long,
) : IncomingGameMessage {
override val category: ClientProtCategory
Expand All @@ -19,12 +19,12 @@ public class ResumePCountDialogLong(
if (this === other) return true
if (javaClass != other?.javaClass) return false

other as ResumePCountDialogLong
other as ResumePLongDialog

return count == other.count
}

override fun hashCode(): Int = count.hashCode()

override fun toString(): String = "ResumePCountDialogLong(count=$count)"
override fun toString(): String = "ResumePLongDialog(count=$count)"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package net.rsprot.protocol.game.incoming.codec.resumed

import net.rsprot.buffer.JagByteBuf
import net.rsprot.protocol.ClientProt
import net.rsprot.protocol.game.incoming.prot.GameClientProt
import net.rsprot.protocol.game.incoming.resumed.ResumePLongDialog
import net.rsprot.protocol.message.codec.MessageDecoder
import net.rsprot.protocol.metadata.Consistent

@Consistent
public class ResumePLongDialogDecoder : MessageDecoder<ResumePLongDialog> {
override val prot: ClientProt = GameClientProt.RESUME_P_LONGDIALOG

override fun decode(buffer: JagByteBuf): ResumePLongDialog {
val count = buffer.g8()
return ResumePLongDialog(count)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import net.rsprot.protocol.game.incoming.codec.players.OpPlayer7Decoder
import net.rsprot.protocol.game.incoming.codec.players.OpPlayer8Decoder
import net.rsprot.protocol.game.incoming.codec.players.OpPlayerTDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePCountDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePCountDialogLongDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePLongDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePNameDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePObjDialogDecoder
import net.rsprot.protocol.game.incoming.codec.resumed.ResumePStringDialogDecoder
Expand Down Expand Up @@ -170,7 +170,7 @@ public object DesktopGameMessageDecoderRepository {
bind(ResumePNameDialogDecoder())
bind(ResumePStringDialogDecoder())
bind(ResumePCountDialogDecoder())
bind(ResumePCountDialogLongDecoder())
bind(ResumePLongDialogDecoder())
bind(ResumePObjDialogDecoder())

bind(FriendChatKickDecoder())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public enum class GameClientProt(
RESUME_P_NAMEDIALOG(GameClientProtId.RESUME_P_NAMEDIALOG, Prot.VAR_BYTE),
RESUME_P_STRINGDIALOG(GameClientProtId.RESUME_P_STRINGDIALOG, Prot.VAR_BYTE),
RESUME_P_COUNTDIALOG(GameClientProtId.RESUME_P_COUNTDIALOG, 4),
RESUME_P_COUNTDIALOG_LONG(GameClientProtId.RESUME_P_COUNTDIALOG_LONG, 8),
RESUME_P_LONGDIALOG(GameClientProtId.RESUME_P_LONGDIALOG, 8),
RESUME_P_OBJDIALOG(GameClientProtId.RESUME_P_OBJDIALOG, 2),

// Friend chat packets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ internal object GameClientProtId {
const val SEND_SNAPSHOT = 60
const val MEMBERSHIP_PROMOTION_ELIGIBILITY = 61
const val OPLOCT = 62
const val RESUME_P_COUNTDIALOG_LONG = 63
const val RESUME_P_LONGDIALOG = 63
const val RESUME_P_STRINGDIALOG = 64
const val FRIENDLIST_DEL = 65
const val EVENT_MOUSE_CLICK_V1 = 66
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import net.rsprot.protocol.message.IncomingGameMessage
* long to the input box. It has no uses as of writing this.
* @property count the count entered.
*/
public class ResumePCountDialogLong(
public class ResumePLongDialog(
public val count: Long,
) : IncomingGameMessage {
override val category: ClientProtCategory
Expand All @@ -19,12 +19,12 @@ public class ResumePCountDialogLong(
if (this === other) return true
if (javaClass != other?.javaClass) return false

other as ResumePCountDialogLong
other as ResumePLongDialog

return count == other.count
}

override fun hashCode(): Int = count.hashCode()

override fun toString(): String = "ResumePCountDialogLong(count=$count)"
override fun toString(): String = "ResumePLongDialog(count=$count)"
}
Loading
Loading