233 Data
Posted: Fri Mar 13, 2026 2:12 am
You must be registered to view this Link
You must be registered to view this Link
You must be registered to view this Link
You must be registered to view this Link
Items opcodes
Object Opcodes
Npc Opcodes
You must be registered to view this Link
You must be registered to view this Link
You must be registered to view this Link
Items opcodes
Code: You must be registered to view this Link
private void readValues(Buffer stream) {
while (true) {
int opcode = stream.readUnsignedByte();
if (opcode == 0)
return;
if (opcode == 1)
modelId = stream.readUShort();
else if (opcode == 2)
name = stream.readString();
else if (opcode == 3)
description = stream.readString();
else if (opcode == 4)
spriteScale = stream.readUShort();
else if (opcode == 5)
spritePitch = stream.readUShort();
else if (opcode == 6)
spriteCameraRoll = stream.readUShort();
else if (opcode == 7) {
spriteTranslateX = stream.readUShort();
if (spriteTranslateX > 32767)
spriteTranslateX -= 0x10000;
} else if (opcode == 8) {
spriteTranslateY = stream.readUShort();
if (spriteTranslateY > 32767)
spriteTranslateY -= 0x10000;
} else if(opcode == 9){
stream.readString();
} else if (opcode == 11)
stackable = true;
else if (opcode == 12)
value = stream.readDWord();
else if(opcode == 13)
this.field2142 = stream.readSignedByte();
else if(opcode == 14)
this.field2157 = stream.readSignedByte();
else if (opcode == 16)
membersObject = true;
else if (opcode == 23) {
primaryMaleModel = stream.readUShort();
maleTranslation = stream.readSignedByte();
if (primaryMaleModel == 65535)
primaryMaleModel = -1;
} else if (opcode == 24)
secondaryMaleModel = stream.readUShort();
else if (opcode == 25) {
primaryFemaleModel = stream.readUShort();
femaleTranslation = stream.readSignedByte();
if (primaryFemaleModel == 65535)
primaryFemaleModel = -1;
} else if (opcode == 26)
secondaryFemaleModel = stream.readUShort();
else if(opcode == 27)
this.field2158 = stream.readSignedByte();
else if (opcode >= 30 && opcode < 35) {
if (groundActions == null)
groundActions = new String[5];
groundActions[opcode - 30] = stream.readString();
if (groundActions[opcode - 30].equalsIgnoreCase("hidden"))
groundActions[opcode - 30] = null;
} else if (opcode >= 35 && opcode < 40) {
if (itemActions == null)
itemActions = new String[5];
itemActions[opcode - 35] = stream.readString();
} else if (opcode == 40) {
int size = stream.readUnsignedByte();
originalModelColors = new int[size];
modifiedModelColors = new int[size];
for (int index = 0; index < size; index++) {
originalModelColors[index] = stream.readUShort();
modifiedModelColors[index] = stream.readUShort();
}
} else if (opcode == 41) {
int size = stream.readUnsignedByte();
originalTextureColors = new short[size];
modifiedTextureColors = new short[size];
for (int index = 0; index < size; index++) {
originalTextureColors[index] = (short) stream.readUShort();
modifiedTextureColors[index] = (short) stream.readUShort();
}
}else if (opcode == 42) {
stream.readSignedByte();
} else if (opcode == 43) {
int var3 = stream.readUnsignedByte();
if (this.subOps == null) {
this.subOps = new String[5][];
}
boolean var7 = var3 >= 0 && var3 < 5;
if (var7 && this.subOps[var3] == null) {
this.subOps[var3] = new String[20];
}
while (true) {
int var5 = stream.readUnsignedByte() - 1;
if (var5 == -1) {
break;
}
String var6 = stream.readString();
if (var7 && var5 >= 0 && var5 < 20) {
this.subOps[var3][var5] = var6;
}
}
} else if (opcode == 65) {
searchable = true;
} else if (opcode == 75){
this.field2182 = stream.readSignedWord();
} else if (opcode == 78)
tertiaryMaleEquipmentModel = stream.readUShort();
else if (opcode == 79)
tertiaryFemaleEquipmentModel = stream.readUShort();
else if (opcode == 90)
primaryMaleHeadPiece = stream.readUShort();
else if (opcode == 91)
primaryFemaleHeadPiece = stream.readUShort();
else if (opcode == 92)
secondaryMaleHeadPiece = stream.readUShort();
else if (opcode == 93)
secondaryFemaleHeadPiece = stream.readUShort();
else if (opcode == 94)
stream.readUShort();
else if (opcode == 95)
spriteCameraYaw = stream.readUShort();
else if (opcode == 97)
certID = stream.readUShort();
else if (opcode == 98)
certTemplateID = stream.readUShort();
else if (opcode >= 100 && opcode < 110) {
if (stackIDs == null) {
stackIDs = new int[10];
stackAmounts = new int[10];
}
stackIDs[opcode - 100] = stream.readUShort();
stackAmounts[opcode - 100] = stream.readUShort();
} else if (opcode == 110)
groundScaleX = stream.readUShort();
else if (opcode == 111)
groundScaleY = stream.readUShort();
else if (opcode == 112)
groundScaleZ = stream.readUShort();
else if (opcode == 113)
ambient = stream.readSignedByte();
else if (opcode == 114)
contrast = stream.readSignedByte() * 5;
else if (opcode == 115)
team = stream.readUnsignedByte();
else if (opcode == 139)
unnotedId = stream.readUShort();
else if (opcode == 140)
notedId = stream.readUShort();
else if (opcode == 148)
placeholderId = stream.readUShort();
else if (opcode == 149)
placeholderTemplateId = stream.readUShort();
else {
// System.out.println("Error loading item " + id + ", opcode " + opcode);
}
}
}Code: You must be registered to view this Link
public void readValues(Buffer stream) {
int flag = -1;
do {
int type = stream.readUnsignedByte();
if (type == 0)
break;
if (type == 1) {
int var3 = stream.readUnsignedByte();
if (var3 > 0) {
if (this.modelIds != null && !lowMem) {
stream.currentOffset += 3 * var3;
} else {
this.models = new int[var3];
this.modelIds = new int[var3];
for(int var4 = 0; var4 < var3; ++var4) {
this.modelIds[var4] = stream.readUShort();
this.models[var4] = stream.readUnsignedByte();
}
}
}
} else if (type == 2)
name = stream.readString();
else if (type == 3)
description = stream.readString();
else if (type == 5) {
int var3 = stream.readUnsignedByte();
if (var3 > 0) {
if (this.modelIds != null && !lowMem) {
stream.currentOffset += 2 * var3;
} else {
this.models = null;
this.modelIds = new int[var3];
for(int var4 = 0; var4 < var3; ++var4) {
this.modelIds[var4] = stream.readUShort();
}
}
}
} else if (type == 14)
xLength = stream.readUnsignedByte();
else if (type == 15)
yLength = stream.readUnsignedByte();
else if (type == 17) {
interactType = 0;
aBoolean757 = false;
} else if (type == 18)
aBoolean757 = false;
else if (type == 19)
hasActions = stream.readUnsignedByte();
else if (type == 21)
aBoolean762 = true;
else if (type == 22)
mergeNormals = true;
else if (type == 23)
aBoolean764 = true;
else if (type == 24) { // Object Animations
animation = stream.readUShort();
if (animation == 65535)
animation = -1;
} else if (type == 27) { // L: 147
interactType = 1;
} else if (type == 28)
anInt775 = stream.readUnsignedByte();
else if (type == 29)
aByte737 = stream.readSignedByte();
else if (type == 39)
aByte742 = stream.readSignedByte();
else if (type >= 30 && type < 39) {
actions[type - 30] = stream.readString();
if (actions[type - 30].equalsIgnoreCase("hidden"))
actions[type - 30] = null;
} else if (type == 40) {
int i1 = stream.readUnsignedByte();
modifiedModelColors = new int[i1];
originalModelColors = new int[i1];
for (int i2 = 0; i2 < i1; i2++) {
modifiedModelColors[i2] = stream.readUShort();
originalModelColors[i2] = stream.readUShort();
}
} else if (type == 41) {
int i1 = stream.readUnsignedByte();
originalTexture = new short[i1];
modifiedTexture = new short[i1];
for (int i2 = 0; i2 < i1; i2++) {
originalTexture[i2] = (short) stream.readUShort();
modifiedTexture[i2] = (short) stream.readUShort();
}
} else if (type == 61)
stream.readUShort();
else if (type == 62)
inverted = true;
else if (type == 64)
clipped = false;
else if (type == 65)
thickness = stream.readUShort();
else if (type == 66)
height = stream.readUShort();
else if (type == 67)
width = stream.readUShort();
else if (type == 68) {
mapSceneId = stream.readUShort();
} else if (type == 69)
anInt768 = stream.readUnsignedByte();
else if (type == 70)
anInt738 = stream.readSignedWord();
else if (type == 71)
anInt745 = stream.readSignedWord();
else if (type == 72)
anInt783 = stream.readSignedWord();
else if (type == 73)
aBoolean736 = true;
else if (type == 74)
aBoolean766 = true;
else if (type == 75)
supportItems = stream.readUnsignedByte();
else if (type == 77 || type == 92) {
varpId = stream.readUShort();
if (varpId == 65535)
varpId = -1;
configId = stream.readUShort();
if (configId == 65535)
configId = -1;
int var3 = -1;
if(type == 92)
var3 = stream.readUShort();
int j1 = stream.readUnsignedByte();
childrenIDs = new int[j1 + 2];
for (int j2 = 0; j2 <= j1; j2++) {
childrenIDs[j2] = stream.readUShort();
if (childrenIDs[j2] == 65535)
childrenIDs[j2] = -1;
}
childrenIDs[j1 + 1] = var3;
} else if(type == 78) {//ambient sound
ambientSoundID = stream.readUShort(); // ambient sound id
anInt2083 = stream.readUnsignedByte();
this.field2130 = ((stream.readUnsignedByte()) * 128);
} else if (type == 79) {
anInt2112 = stream.readUShort();
anInt2113 = stream.readUShort();
anInt2083 = stream.readUShort();
this.field2130 = ((stream.readUnsignedByte()) * 128);
int length = stream.readUnsignedByte();
int[] anims = new int[length];
for (int index = 0; index < length; ++index)
{
anims[index] = stream.readUShort();
}
ambientSoundIds = anims;
} else if(type == 81) {
stream.readUnsignedByte();
} else if(type == 82) {
mapFunctionId = stream.readUShort();
} else if (type == 89) {
this.randomAnimStart = false;
} else if (type == 249) {
int length = stream.readUnsignedByte();
for (int i = 0; i < length; i++) {
boolean isString = stream.readUnsignedByte() == 1;
int key = stream.read24BitInt();
if (isString) {
stream.readOSRSString();
} else {
stream.read24BitInt();
}
}
}
} while (true);
postDecode();
if (aBoolean766) {
interactType = 0;
aBoolean757 = false;
}
}
void postDecode() {
if (this.hasActions == -1) {
this.hasActions = 0;
if (this.modelIds != null && (this.models == null || this.models[0] == 10)) {
this.hasActions = 1;
}
for (int var1 = 0; var1 < 5; ++var1) {
if (this.actions[var1] != null) {
this.hasActions = 1;
}
}
}
if (this.supportItems == -1) {
this.supportItems = this.interactType != 0 ? 1 : 0;
}
}Code: You must be registered to view this Link
private void readValues(Buffer stream) {
while (true) {
int opcode = stream.readUnsignedByte();
if (opcode == 0)
return;
if (opcode == 1) {
int j = stream.readUnsignedByte();
models = new int[j];
for (int j1 = 0; j1 < j; j1++)
models[j1] = stream.readUShort();
} else if (opcode == 2)
name = stream.readString();
else if (opcode == 3)
description = stream.readString();
else if (opcode == 12)
size = stream.readSignedByte();
else if (opcode == 13)
standAnimation = stream.readUShort();
else if (opcode == 14)
walkAnimation = stream.readUShort();
else if (opcode == 17) {
walkAnimation = stream.readUShort();
rotate180Animation = stream.readUShort();
rotate90RightAnimation = stream.readUShort();
rotate90LeftAnimation = stream.readUShort();
if (rotate180Animation == 65535) {
rotate180Animation = -1;
}
if (rotate90RightAnimation == 65535) {
rotate90RightAnimation = -1;
}
if (rotate90LeftAnimation == 65535) {
rotate90LeftAnimation = -1;
}
} else if(opcode == 18){
stream.readUShort();
} else if (opcode >= 30 && opcode < 40) {
if (actions == null)
actions = new String[10];
actions[opcode - 30] = stream.readString();
if (actions[opcode - 30].equalsIgnoreCase("hidden"))
actions[opcode - 30] = null;
} else if (opcode == 40) {
int k = stream.readUnsignedByte();
recolorFrom = new short[k];
recolorTo = new short[k];
for (int k1 = 0; k1 < k; k1++) {
recolorFrom[k1] = (short) stream.readUShort();
recolorTo[k1] = (short) stream.readUShort();
}
} else if (opcode == 41) {
int k = stream.readUnsignedByte();
retextureFrom = new short[k];
retextureTo = new short[k];
for (int k1 = 0; k1 < k; k1++) {
retextureFrom[k1] = (short) stream.readUShort();
retextureTo[k1] = (short) stream.readUShort();
}
} else if (opcode == 60) {
int l = stream.readUnsignedByte();
dialogueModels = new int[l];
for (int l1 = 0; l1 < l; l1++)
dialogueModels[l1] = stream.readUShort();
}else if(opcode == 74) {
this.field2032[0] = stream.readUShort();
} else if(opcode == 75) {
this.field2032[1] = stream.readUShort();
} else if(opcode == 76) {
this.field2032[2] = stream.readUShort();
} else if(opcode == 77) {
this.field2032[3] = stream.readUShort();
} else if(opcode == 78) {
this.field2032[4] = stream.readUShort();
} else if(opcode == 79) {
this.field2032[5] = stream.readUShort();
} else if (opcode == 93)
onMinimap = false;
else if (opcode == 95)
combatLevel = stream.readUShort();
else if (opcode == 97)
anInt91 = stream.readUShort();
else if (opcode == 98)
anInt86 = stream.readUShort();
else if (opcode == 99)
aBoolean93 = true;
else if (opcode == 100)
anInt85 = stream.readSignedByte();
else if (opcode == 101)
anInt92 = stream.readSignedByte();
else if (opcode == 102)
anInt75 = stream.readUShort();
else if (opcode == 103)
getDegreesToTurn = stream.readUShort();
else if (opcode == 106 || opcode == 118) {
anInt57 = stream.readUShort();
if (anInt57 == 65535)
anInt57 = -1;
anInt59 = stream.readUShort();
if (anInt59 == 65535)
anInt59 = -1;
int var3 = -1;
if(opcode == 118)
var3 = stream.readUShort();
int i1 = stream.readUnsignedByte();
childrenIDs = new int[i1 + 2];
for (int i2 = 0; i2 <= i1; i2++) {
childrenIDs[i2] = stream.readUShort();
if (childrenIDs[i2] == 65535)
childrenIDs[i2] = -1;
}
childrenIDs[i1 + 1] = var3;
} else if (opcode == 107){
aBoolean84 = false;
} else if(opcode == 109) {
this.isClickable = false;
} else if(opcode == 114) {
this.field1914 = stream.readUShort();
if(this.field1914 == '\uffff') {
this.field1914 = -1;
}
} else if(opcode == 115) {
this.field1914 = stream.readUShort();
this.field1919 = stream.readUShort();
this.field1918 = stream.readUShort();
this.field1938 = stream.readUShort();
if(this.field1914 == '\uffff') {
this.field1914 = -1;
}
if(this.field1919 == '\uffff') {
this.field1919 = -1;
}
if(this.field1918 == '\uffff') {
this.field1918 = -1;
}
if(this.field1938 == '\uffff') {
this.field1938 = -1;
}
} else if(opcode == 116) {
this.field1920 = stream.readUShort();
if(this.field1920 == '\uffff') {
this.field1920 = -1;
}
} else if(opcode == 117) {
this.field1920 = stream.readUShort();
this.field1933 = stream.readUShort();
this.field1922 = stream.readUShort();
this.field1923 = stream.readUShort();
if(this.field1920 == '\uffff') {
this.field1920 = -1;
}
if(this.field1933 == '\uffff') {
this.field1933 = -1;
}
if(this.field1922 == '\uffff') {
this.field1922 = -1;
}
if(this.field1923 == '\uffff') {
this.field1923 = -1;
}
} else if(opcode == 122) {
lowPriorityFollowerOps = true;
} else if(opcode == 123){
aBool2190 = true;
} else if(opcode == 124) {
field2030 = stream.readUShort();
} else if(opcode == 126){
this.footprintSize = stream.readUShort();
}
}
}