mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Merge branch 'master' into fist-of-guthix
This commit is contained in:
commit
2acca91c06
392 changed files with 319952 additions and 325287 deletions
|
|
@ -9,11 +9,10 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.Vatuu:discord-rpc:1.6.2'
|
||||
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
|
||||
implementation("com.github.ajalt.mordant:mordant:2.0.0-alpha2")
|
||||
implementation "org.jetbrains:markdown:0.2.4"
|
||||
implementation files('libs/clientlibs.jar')
|
||||
implementation files('libs/clientlibs.jar', 'libs/discord-rpc.jar')
|
||||
}
|
||||
|
||||
jar {
|
||||
|
|
|
|||
BIN
Client/libs/discord-rpc.jar
Normal file
BIN
Client/libs/discord-rpc.jar
Normal file
Binary file not shown.
|
|
@ -1,6 +1,9 @@
|
|||
package org.runite.client;
|
||||
|
||||
import org.rs09.client.Node;
|
||||
import org.rs09.client.rendering.Toolkit;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public abstract class AbstractSprite extends Node {
|
||||
|
||||
|
|
@ -14,6 +17,98 @@ public abstract class AbstractSprite extends Node {
|
|||
public int width;
|
||||
static RSInterface aClass11_3708 = null;
|
||||
|
||||
public static AbstractSprite constructItemSprite(int var0, boolean useHDSprite, int itemID, boolean var4, int outlineType, int itemCount, boolean shrinkInSprite) {
|
||||
try {
|
||||
ItemDefinition item = ItemDefinition.getItemDefinition(itemID);
|
||||
if (itemCount > 1 && item.anIntArray804 != null) {
|
||||
int var9 = -1;
|
||||
|
||||
for (int var10 = 0; var10 < 10; ++var10) {
|
||||
if (item.anIntArray766[var10] <= itemCount && item.anIntArray766[var10] != 0) {
|
||||
var9 = item.anIntArray804[var10];
|
||||
}
|
||||
}
|
||||
|
||||
if (var9 != -1) {
|
||||
item = ItemDefinition.getItemDefinition(var9);
|
||||
}
|
||||
}
|
||||
|
||||
Class140_Sub1_Sub2 var21 = item.method1120();
|
||||
if (null == var21) {
|
||||
return null;
|
||||
} else {
|
||||
SoftwareSprite var22 = null;
|
||||
if (item.anInt791 == -1) {
|
||||
if (item.anInt762 != -1) {
|
||||
var22 = (SoftwareSprite) constructItemSprite(var0, true, item.anInt795, false, outlineType, itemCount, false);
|
||||
if (null == var22) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var22 = (SoftwareSprite) constructItemSprite(0, true, item.noteID, false, 1, 10, true);
|
||||
if (null == var22) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
int[] var11 = Toolkit.JAVA_TOOLKIT.getBuffer();
|
||||
int var12 = Toolkit.JAVA_TOOLKIT.width;
|
||||
int var13 = Toolkit.JAVA_TOOLKIT.height;
|
||||
int[] var14 = new int[4];
|
||||
Class74.method1325(var14);
|
||||
SoftwareSprite var15 = new SoftwareSprite(36, 32);
|
||||
Class74.setBuffer(var15.anIntArray4081, 36, 32);
|
||||
Class51.method1134();
|
||||
Class51.method1145(16, 16);
|
||||
int var16 = item.anInt810;
|
||||
Class51.aBoolean843 = false;
|
||||
if (shrinkInSprite) {
|
||||
var16 = (int) ((double) var16 * 1.5D);
|
||||
} else if (outlineType == 2) {
|
||||
var16 = (int) (1.04D * (double) var16);
|
||||
}
|
||||
|
||||
int var18 = Class51.anIntArray851[item.anInt786] * var16 >> 16;
|
||||
int var17 = Class51.anIntArray840[item.anInt786] * var16 >> 16;
|
||||
var21.method1893(item.anInt799, item.anInt768, item.anInt786, item.anInt792, var17 - (var21.method1871() / 2 + -item.anInt754), item.anInt754 + var18);
|
||||
if (outlineType >= 1) {
|
||||
var15.method657(1);
|
||||
if (outlineType >= 2) {
|
||||
var15.method657(16777215);
|
||||
}
|
||||
|
||||
Class74.setBuffer(var15.anIntArray4081, 36, 32);
|
||||
}
|
||||
|
||||
if (var0 != 0) {
|
||||
var15.method668(var0);
|
||||
}
|
||||
|
||||
if (item.anInt791 != -1) {
|
||||
Objects.requireNonNull(var22).drawAt(0, 0);
|
||||
} else if (-1 != item.anInt762) {
|
||||
Class74.setBuffer(Objects.requireNonNull(var22).anIntArray4081, 36, 32);
|
||||
var15.drawAt(0, 0);
|
||||
var15 = var22;
|
||||
}
|
||||
|
||||
if (var4 && (item.stackingType == 1 || itemCount != 1) && itemCount != -1) {
|
||||
TextureOperation10.aClass3_Sub28_Sub17_Sub1_3440.method681(Class3_Sub7.itemStackColor(1000, itemCount), 0, 9, 16776960, 1);
|
||||
}
|
||||
|
||||
Class74.setBuffer(var11, var12, var13);
|
||||
Class74.setClipping(var14);
|
||||
Class51.method1134();
|
||||
Class51.aBoolean843 = true;
|
||||
return HDToolKit.highDetail && !useHDSprite ? new HDSprite(var15) : var15;
|
||||
}
|
||||
} catch (RuntimeException var20) {
|
||||
throw ClientErrorException.clientError(var20, "na.WA(" + var0 + ',' + useHDSprite + ',' + itemID + ',' + var4 + ',' + outlineType + ',' + itemCount + ',' + shrinkInSprite + ')');
|
||||
}
|
||||
}
|
||||
|
||||
abstract void method635(int var1, int var2);
|
||||
|
||||
abstract void method636(int var1, int var2, int var3, int var4, int var5, int var6);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public final class AudioHandler {
|
|||
try {
|
||||
if (-1 == var1 && !musicEffectPlaying) {
|
||||
GameObject.method1870();
|
||||
} else if (var1 != -1 && (currentTrack != var1 || Class79.method1391(-1)) && musicVolume != 0 && !musicEffectPlaying) {
|
||||
} else if (var1 != -1 && (currentTrack != var1 || CSConfigCachefile.method1391(-1)) && musicVolume != 0 && !musicEffectPlaying) {
|
||||
method2099(var1, CacheIndex.musicIndex, musicVolume);
|
||||
}
|
||||
currentTrack = var1;
|
||||
|
|
@ -117,13 +117,13 @@ public final class AudioHandler {
|
|||
}
|
||||
}
|
||||
|
||||
if (musicEffectPlaying && Class79.method1391(-1)) {
|
||||
if (musicEffectPlaying && CSConfigCachefile.method1391(-1)) {
|
||||
if (0 != musicVolume && currentTrack != -1) {
|
||||
Class70.method1285(CacheIndex.musicIndex, currentTrack, musicVolume);
|
||||
}
|
||||
|
||||
musicEffectPlaying = false;
|
||||
} else if (musicVolume != 0 && currentTrack != -1 && Class79.method1391((byte) -92 + 91)) {
|
||||
} else if (musicVolume != 0 && currentTrack != -1 && CSConfigCachefile.method1391((byte) -92 + 91)) {
|
||||
TextureOperation12.outgoingBuffer.putOpcode(137);
|
||||
TextureOperation12.outgoingBuffer.writeInt(currentTrack);
|
||||
currentTrack = -1;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ public final class CS2Script extends Linkable {
|
|||
static int anInt3775 = 0;
|
||||
static int anInt2440 = 0;
|
||||
static ReferenceCache aReferenceCache_2442 = new ReferenceCache(50);
|
||||
static ReferenceCache aReferenceCache_2450 = new ReferenceCache(64);
|
||||
static byte[][][] aByteArrayArrayArray2452;
|
||||
RSInterface aClass11_2438;
|
||||
RSString aClass94_2439;
|
||||
|
|
@ -58,30 +57,6 @@ public final class CS2Script extends Linkable {
|
|||
}
|
||||
}
|
||||
|
||||
static Class79 method378(int var0, byte var1) {
|
||||
try {
|
||||
Class79 var2 = (Class79) aReferenceCache_2450.get(var0);
|
||||
if (var2 == null) {
|
||||
if (var1 < 126) {
|
||||
return null;
|
||||
} else {
|
||||
byte[] var3 = Class101.aClass153_1420.getFile(Class140_Sub7.method2032(var0), var0 & 1023);
|
||||
var2 = new Class79();
|
||||
if (var3 != null) {
|
||||
var2.method1387(new DataBuffer(var3));
|
||||
}
|
||||
|
||||
aReferenceCache_2450.put(var2, var0);
|
||||
return var2;
|
||||
}
|
||||
} else {
|
||||
return var2;
|
||||
}
|
||||
} catch (RuntimeException var4) {
|
||||
throw ClientErrorException.clientError(var4, "jl.A(" + var0 + ',' + var1 + ')');
|
||||
}
|
||||
}
|
||||
|
||||
static void method379() {
|
||||
try {
|
||||
int var2 = Class146.anInt1904 * 128 - -64;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
package org.runite.client;
|
||||
|
||||
import org.rs09.SystemLogger;
|
||||
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
final class Class79 {
|
||||
final class CSConfigCachefile {
|
||||
|
||||
static int anInt1124 = -1;
|
||||
static int anInt1127 = 0;
|
||||
int anInt1123;
|
||||
int anInt1125;
|
||||
int anInt1128;
|
||||
int lowerBound;
|
||||
int upperBound;
|
||||
int parentVarpIndex;
|
||||
|
||||
|
||||
static void method1385(int var0, int var1) {
|
||||
|
|
@ -182,31 +184,44 @@ final class Class79 {
|
|||
}
|
||||
}
|
||||
|
||||
final void method1387(DataBuffer var1) {
|
||||
static CSConfigCachefile getCSConfigFileFromVarbitID(int varbitID) {
|
||||
try {
|
||||
while (true) {
|
||||
int var3 = var1.readUnsignedByte();
|
||||
if (var3 == 0) {
|
||||
return;
|
||||
CSConfigCachefile cacheFile = (CSConfigCachefile) VarpHelpers.varbitLookup.get(varbitID);
|
||||
if (cacheFile == null) {
|
||||
byte[] fileData = Class101.csConfigFileRAM.getFile(varbitID >>> 10, varbitID & 1023);
|
||||
cacheFile = new CSConfigCachefile();
|
||||
if (fileData != null) {
|
||||
cacheFile.tryParseConfigFile(new DataBuffer(fileData));
|
||||
}
|
||||
|
||||
this.method1389(var1, var3);
|
||||
VarpHelpers.varbitLookup.put(cacheFile, varbitID);
|
||||
}
|
||||
return cacheFile;
|
||||
} catch (RuntimeException var4) {
|
||||
throw ClientErrorException.clientError(var4, "kk.G(" + (var1 != null ? "{...}" : "null") + ',' + -111 + ')');
|
||||
throw ClientErrorException.clientError(var4, "jl.A(" + varbitID + ',' + (byte) 127 + ')');
|
||||
}
|
||||
}
|
||||
|
||||
private void method1389(DataBuffer var1, int var3) {
|
||||
final void tryParseConfigFile(DataBuffer fileData) {
|
||||
try {
|
||||
if (1 == var3) {
|
||||
this.anInt1128 = var1.readUnsignedShort();
|
||||
this.anInt1123 = var1.readUnsignedByte();
|
||||
this.anInt1125 = var1.readUnsignedByte();
|
||||
boolean end = fileData.readUnsignedByte() == 0;
|
||||
while (!end) {
|
||||
this.parseConfigFile(fileData);
|
||||
end = fileData.readUnsignedByte() == 0;
|
||||
}
|
||||
} catch (RuntimeException var4) {
|
||||
throw ClientErrorException.clientError(var4, "kk.G(" + (fileData != null ? "{...}" : "null") + ',' + -111 + ')');
|
||||
}
|
||||
}
|
||||
|
||||
private void parseConfigFile(DataBuffer fileData) {
|
||||
try {
|
||||
this.parentVarpIndex = fileData.readUnsignedShort();
|
||||
this.lowerBound = fileData.readUnsignedByte();
|
||||
this.upperBound = fileData.readUnsignedByte();
|
||||
|
||||
} catch (RuntimeException var5) {
|
||||
throw ClientErrorException.clientError(var5, "kk.B(" + (var1 != null ? "{...}" : "null") + ',' + 1 + ',' + var3 + ')');
|
||||
throw ClientErrorException.clientError(var5, "kk.B(" + (fileData != null ? "{...}" : "null") + ',' + 1 + ')');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ package org.runite.client;
|
|||
|
||||
final class Class101 {
|
||||
|
||||
static CacheIndex aClass153_1420;
|
||||
static CacheIndex csConfigFileRAM;
|
||||
static Class3_Sub24_Sub4 aClass3_Sub24_Sub4_1421;
|
||||
static Class30 aClass30_1422;
|
||||
static CacheIndex aClass153_1423;
|
||||
|
|
@ -65,7 +65,7 @@ final class Class101 {
|
|||
method1607(46, 78, true, null, null);
|
||||
}
|
||||
|
||||
aClass153_1420 = null;
|
||||
csConfigFileRAM = null;
|
||||
} catch (RuntimeException var2) {
|
||||
throw ClientErrorException.clientError(var2, "nj.A(" + var0 + ')');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ final class Class107 {
|
|||
|
||||
static void method1648(CacheIndex var0) {
|
||||
try {
|
||||
Class101.aClass153_1420 = var0;
|
||||
Class101.csConfigFileRAM = var0;
|
||||
|
||||
} catch (RuntimeException var3) {
|
||||
throw ClientErrorException.clientError(var3, "og.B(" + (var0 != null ? "{...}" : "null") + ',' + 255 + ')');
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ final class Class108 {
|
|||
int var2 = Class140_Sub7.canvasHeight;
|
||||
int var3 = var2 * 956 / 503;
|
||||
Objects.requireNonNull(Class40.aAbstractSprite_680).method639((Class23.canvasWidth + -var3) / 2, 0, var3, var2);
|
||||
SequenceDefinition.aClass109_1856 = InterfaceWidget.a(Class79.anInt1124, var0);
|
||||
SequenceDefinition.aClass109_1856 = InterfaceWidget.a(CSConfigCachefile.anInt1124, var0);
|
||||
Objects.requireNonNull(SequenceDefinition.aClass109_1856).method1667(Class23.canvasWidth / 2 + -(SequenceDefinition.aClass109_1856.width / 2), 18);
|
||||
Class140_Sub2.aBoolean2713 = true;
|
||||
if (var1 > -50) {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ final class Class114 {
|
|||
AbstractSprite var10 = (AbstractSprite) Class67.aReferenceCache_1013.get(var8);
|
||||
if (var10 == null) {
|
||||
Class51.aBoolean837 = false;
|
||||
var10 = Unsorted.constructItemSprite(var4, false, var1, var2, var0, var3, false);
|
||||
var10 = AbstractSprite.constructItemSprite(var4, false, var1, var2, var0, var3, false);
|
||||
if (var10 != null && !Class51.aBoolean837) {
|
||||
Class67.aReferenceCache_1013.put(var10, var8);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public final class Class140_Sub7 extends GameObject {
|
|||
|
||||
static boolean method2031(byte var0, boolean var1, int var2, int var3, Class3_Sub2[][][] var4, int var5) {
|
||||
try {
|
||||
byte var6 = !var1?(byte)(255 & Class79.anInt1127):1;
|
||||
byte var6 = !var1?(byte)(255 & CSConfigCachefile.anInt1127):1;
|
||||
if(Class158.aByteArrayArrayArray2008[WorldListCountry.localPlane][var2][var3] == var6) {
|
||||
return false;
|
||||
} else if((Unsorted.aByteArrayArrayArray113[WorldListCountry.localPlane][var2][var3] & 4) == 0) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package org.runite.client;
|
||||
|
||||
import org.rs09.SystemLogger;
|
||||
import org.rs09.client.data.NodeCache;
|
||||
|
||||
import java.util.Objects;
|
||||
|
|
@ -11,26 +12,4 @@ public class Class163 {
|
|||
public static int localNPCCount = 0;
|
||||
|
||||
|
||||
static void method2209(byte var0, int var1, int var2) {
|
||||
try {
|
||||
if (var0 >= -99) {
|
||||
method2209((byte) 57, -14, 120);
|
||||
}
|
||||
|
||||
Class79 var3 = CS2Script.method378(var2, (byte) 127);
|
||||
int var4 = Objects.requireNonNull(var3).anInt1128;
|
||||
int var6 = var3.anInt1125;
|
||||
int var5 = var3.anInt1123;
|
||||
int var7 = Class3_Sub6.anIntArray2288[var6 - var5];
|
||||
if (var1 < 0 || var7 < var1) {
|
||||
var1 = 0;
|
||||
}
|
||||
|
||||
var7 <<= var5;
|
||||
TextureOperation39.method281(var1 << var5 & var7 | ~var7 & Class57.varpArray[var4], var4);
|
||||
} catch (RuntimeException var8) {
|
||||
throw ClientErrorException.clientError(var8, "wd.K(" + var0 + ',' + var1 + ',' + var2 + ')');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ final class Class25 {
|
|||
|
||||
static void method959() {
|
||||
try {
|
||||
CS2Script.aReferenceCache_2450.clear();
|
||||
VarpHelpers.varbitLookup.clear();
|
||||
|
||||
} catch (RuntimeException var2) {
|
||||
throw ClientErrorException.clientError(var2, "ec.B(" + 0 + ')');
|
||||
|
|
|
|||
|
|
@ -346,13 +346,13 @@ public final class Class39 {
|
|||
} else if (Unsorted.incomingOpcode == 17) {
|
||||
var1 = BufferedDataStream.incomingBuffer.readUnsignedByte();
|
||||
var2 = Class65.currentChunkX + (var1 >> 4 & 7);
|
||||
var3 = currentChunkY - -(var1 & 7);
|
||||
var3 = currentChunkY + (var1 & 7);
|
||||
var4 = BufferedDataStream.incomingBuffer.readUnsignedShort();
|
||||
var5 = BufferedDataStream.incomingBuffer.readUnsignedByte();
|
||||
var6 = BufferedDataStream.incomingBuffer.readUnsignedShort();
|
||||
if (var2 >= 0 && var3 >= 0 && var2 < 104 && var3 < 104) {
|
||||
var2 = var2 * 128 - -64;
|
||||
var3 = var3 * 128 - -64;
|
||||
var2 = var2 * 128 + 64;
|
||||
var3 = var3 * 128 + 64;
|
||||
Class140_Sub2 var32 = new Class140_Sub2(var4, WorldListCountry.localPlane, var2, var3, -var5 + Class121.method1736(WorldListCountry.localPlane, 1, var2, var3), var6, Class44.anInt719);
|
||||
TextureOperation17.aLinkedList_3177.method1215(new Class3_Sub28_Sub2(var32));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,8 +289,8 @@ final class Class3_Sub28_Sub20 extends Node {
|
|||
static void method725() {
|
||||
try {
|
||||
if(Class137.method1817() == 2) {
|
||||
byte var2 = (byte)(255 & Class79.anInt1127 + -4);
|
||||
int var3 = Class79.anInt1127 % 104;
|
||||
byte var2 = (byte)(255 & CSConfigCachefile.anInt1127 + -4);
|
||||
int var3 = CSConfigCachefile.anInt1127 % 104;
|
||||
|
||||
int var4;
|
||||
int var5;
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ final class Class3_Sub6 extends Linkable {
|
|||
|
||||
|
||||
static byte[][] softReferenceTestArray;
|
||||
static int[] anIntArray2288 = new int[32];
|
||||
static int[] expectedMinimumValues = new int[32];
|
||||
static int anInt2291;
|
||||
|
||||
static {
|
||||
int var0 = 2;
|
||||
int accumulator = 2;
|
||||
|
||||
for (int var1 = 0; var1 < 32; ++var1) {
|
||||
anIntArray2288[var1] = -1 + var0;
|
||||
var0 += var0;
|
||||
for (int i = 0; i < 32; ++i) {
|
||||
expectedMinimumValues[i] = -1 + accumulator;
|
||||
accumulator += accumulator;
|
||||
}
|
||||
|
||||
anInt2291 = 1;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ final class Class75_Sub3 extends Class75 {
|
|||
Class67.aReferenceCache_1013.sweep(5);
|
||||
Texture.aReferenceCache_1146.sweep(5);
|
||||
Class159.aReferenceCache_2016.sweep(5);
|
||||
CS2Script.aReferenceCache_2450.sweep(5);
|
||||
VarpHelpers.varbitLookup.sweep(5);
|
||||
Class136.aReferenceCache_1772.sweep(5);
|
||||
RenderAnimationDefinition.aReferenceCache_1955.sweep(5);
|
||||
TextureOperation25.aReferenceCache_3412.sweep(5);
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public final class Class97 {
|
|||
static void method1593(int var0, CacheIndex var1) {
|
||||
try {
|
||||
Class154.anInt1966 = var1.getArchiveForName(TextCore.aClass94_3574);
|
||||
Class79.anInt1124 = var1.getArchiveForName(TextCore.aClass94_1341);
|
||||
CSConfigCachefile.anInt1124 = var1.getArchiveForName(TextCore.aClass94_1341);
|
||||
if (var0 <= 108) {
|
||||
method1593(14, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1349,8 +1349,8 @@ public final class Client extends GameShell {
|
|||
} else {
|
||||
try {
|
||||
if (PacketParser.anInt80 == 0) {
|
||||
System.out.println("Trying " + GameConfig.Companion.getJS5_SERVER_PORT());
|
||||
Class17.aClass64_413 = Class38.gameSignlink.method1441((byte) 8, Class38_Sub1.accRegistryIp, GameConfig.Companion.getJS5_SERVER_PORT());
|
||||
System.out.println("Trying " + GameConfig.JS5_SERVER_PORT);
|
||||
Class17.aClass64_413 = Class38.gameSignlink.method1441((byte) 8, Class38_Sub1.accRegistryIp, GameConfig.JS5_SERVER_PORT);
|
||||
++PacketParser.anInt80;
|
||||
}
|
||||
|
||||
|
|
@ -1358,7 +1358,7 @@ public final class Client extends GameShell {
|
|||
|
||||
/* If the connection is null we reset the JS5 port to the backup server JS5 for compatibility reasons */
|
||||
if (2 == Objects.requireNonNull(Class17.aClass64_413).anInt978) {
|
||||
GameConfig.Companion.setJS5_SERVER_PORT(GameConfig.SERVER_PORT + ObjectDefinition.paramWorldID);
|
||||
GameConfig.JS5_SERVER_PORT = GameConfig.SERVER_PORT + ObjectDefinition.paramWorldID;
|
||||
this.method46(1000);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
package org.runite.client;
|
||||
|
||||
|
||||
import org.rs09.SystemLogger;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.net.URI;
|
||||
|
||||
public class ClientCommands {
|
||||
|
|
@ -192,6 +196,29 @@ public class ClientCommands {
|
|||
if (command.equalsStringIgnoreCase(TextCore.COMMAND_SHIFT_DROP_CLICK)) {
|
||||
shiftClickEnabled = !shiftClickEnabled;
|
||||
}
|
||||
|
||||
if (command.startsWith(TextCore.COMMAND_GETBITS)) {
|
||||
System.out.println("Trying to write file...");
|
||||
try {
|
||||
int index = command.substring(10).parseInt();
|
||||
File file = new File("FILE_BITS.txt");
|
||||
FileWriter writer = new FileWriter(file);
|
||||
for(int i = 0; i < 200000; i++){
|
||||
CSConfigCachefile cachefile = CSConfigCachefile.getCSConfigFileFromVarbitID(i);
|
||||
if(cachefile.parentVarpIndex == index){
|
||||
writer.write("ID: " + i + " lowerBound = " + cachefile.lowerBound + " upperBound = " + cachefile.upperBound + " size = " + ((cachefile.upperBound - cachefile.lowerBound) + 1));
|
||||
writer.write("\n");
|
||||
}
|
||||
}
|
||||
writer.flush();
|
||||
writer.close();
|
||||
BufferedDataStream.addChatMessage(null, 0, RSString.parse("Wrote bits to " + file.getAbsolutePath()), -1);
|
||||
} catch (Exception e){
|
||||
SystemLogger.logInfo("Whoopsie");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
TextureOperation12.outgoingBuffer.putOpcode(44);
|
||||
TextureOperation12.outgoingBuffer.writeByte(command.length() + -1);
|
||||
TextureOperation12.outgoingBuffer.writeString(command.substring(2));
|
||||
|
|
@ -220,7 +247,7 @@ public class ClientCommands {
|
|||
Class159.aReferenceCache_2016.clearSoftReferences();//Originally Class133.method1803();
|
||||
Class3_Sub31.aReferenceCache_2604.clearSoftReferences();//Class38.method1025();
|
||||
Class27.aReferenceCache_511.clearSoftReferences();//Class38.method1025();
|
||||
CS2Script.aReferenceCache_2450.clearSoftReferences();//Class40.method1044();
|
||||
VarpHelpers.varbitLookup.clearSoftReferences();//Class40.method1044();
|
||||
Class136.aReferenceCache_1772.clearSoftReferences();
|
||||
RenderAnimationDefinition.aReferenceCache_1955.clearSoftReferences();//Originally: Class158_Sub1.method2192();
|
||||
TextureOperation25.aReferenceCache_3412.clearSoftReferences();//Originally: Class159.method2196();
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class Display {
|
|||
|
||||
}
|
||||
|
||||
public void method918(int var1, int var2, int var3, int var4, Frame var5, int var6) {
|
||||
public void configureDisplayMode(int var1, int var2, int var3, int var4, Frame var5, int var6) {
|
||||
this.displayMode = this.graphicsDevice.getDisplayMode();
|
||||
if (var1 > -6) {
|
||||
this.method919(false);
|
||||
|
|
@ -123,7 +123,7 @@ public class Display {
|
|||
}
|
||||
}
|
||||
|
||||
public void method920() {
|
||||
public void updateDisplayMode() {
|
||||
if (this.displayMode != null) {
|
||||
this.graphicsDevice.setDisplayMode(this.displayMode);
|
||||
if (!this.graphicsDevice.getDisplayMode().equals(this.displayMode)) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package org.runite.client;
|
||||
|
||||
import org.rs09.SlayerTracker;
|
||||
import org.rs09.client.config.GameConfig;
|
||||
|
||||
import javax.media.opengl.*;
|
||||
|
|
@ -431,6 +432,7 @@ public final class HDToolKit {
|
|||
|
||||
Class68.method1273();
|
||||
highDetail = false;
|
||||
SlayerTracker.setSprite();
|
||||
}
|
||||
|
||||
static void method1843(float var0, float var1) {
|
||||
|
|
@ -627,6 +629,7 @@ public final class HDToolKit {
|
|||
gl = glContext.getGL();
|
||||
new GLU();
|
||||
highDetail = true;
|
||||
SlayerTracker.setSprite();
|
||||
System.out.println("Setting high detail to " + highDetail);
|
||||
viewWidth = canvas.getSize().width;
|
||||
viewHeight = canvas.getSize().height;
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ final class KeyboardListener implements KeyListener, FocusListener {
|
|||
try {
|
||||
|
||||
if(TextureOperation33.aClass148_3049 != null) {
|
||||
int var2 = Class79.method1386(var1);
|
||||
int var2 = CSConfigCachefile.method1386(var1);
|
||||
if(var2 >= 0) {
|
||||
int var3 = 1 + Class25.anInt491 & 127;
|
||||
if(var3 != Class3_Sub28_Sub9.anInt3620) {
|
||||
|
|
|
|||
|
|
@ -902,11 +902,11 @@ public final class NPCDefinition {
|
|||
static int method1484(int var1) {
|
||||
try {
|
||||
|
||||
Class79 var2 = CS2Script.method378(var1, (byte)127);
|
||||
int var3 = Objects.requireNonNull(var2).anInt1128;
|
||||
int var5 = var2.anInt1125;
|
||||
int var4 = var2.anInt1123;
|
||||
int var6 = Class3_Sub6.anIntArray2288[var5 + -var4];
|
||||
CSConfigCachefile var2 = CSConfigCachefile.getCSConfigFileFromVarbitID(var1);
|
||||
int var3 = Objects.requireNonNull(var2).parentVarpIndex;
|
||||
int var5 = var2.upperBound;
|
||||
int var4 = var2.lowerBound;
|
||||
int var6 = Class3_Sub6.expectedMinimumValues[var5 + -var4];
|
||||
return ItemDefinition.ram[var3] >> var4 & var6;
|
||||
} catch (RuntimeException var7) {
|
||||
throw ClientErrorException.clientError(var7, "me.B(" + 64835055 + ',' + var1 + ')');
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package org.runite.client;
|
|||
|
||||
import org.rs09.Discord;
|
||||
import org.rs09.SlayerTracker;
|
||||
import org.rs09.SystemLogger;
|
||||
import org.rs09.XPGainDraw;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
|
@ -77,7 +78,7 @@ public final class PacketParser {
|
|||
if (60 == Unsorted.incomingOpcode) {
|
||||
nodeModelId = BufferedDataStream.incomingBuffer.readUnsignedShort128();
|
||||
byte var69 = BufferedDataStream.incomingBuffer.readSignedNegativeByte();
|
||||
TextureOperation39.method281(var69, nodeModelId);
|
||||
VarpHelpers.setVarp(var69, nodeModelId);
|
||||
Unsorted.incomingOpcode = -1;
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -442,7 +443,7 @@ public final class PacketParser {
|
|||
} else if (Unsorted.incomingOpcode == 226) {
|
||||
nodeModelId = BufferedDataStream.incomingBuffer.readInt();
|
||||
var19 = BufferedDataStream.incomingBuffer.readUnsignedShort128();
|
||||
TextureOperation39.method281(nodeModelId, var19);
|
||||
VarpHelpers.setVarp(nodeModelId, var19);
|
||||
Unsorted.incomingOpcode = -1;
|
||||
return true;
|
||||
} else if (Unsorted.incomingOpcode == 21) {
|
||||
|
|
@ -1027,7 +1028,7 @@ public final class PacketParser {
|
|||
var19 = BufferedDataStream.incomingBuffer.readUnsignedShort128();
|
||||
modelId = BufferedDataStream.incomingBuffer.readUnsignedShortLE128();
|
||||
Class146.updateInterfacePacketCounter(var19);
|
||||
Class79.method1385(modelId, nodeModelId);
|
||||
CSConfigCachefile.method1385(modelId, nodeModelId);
|
||||
|
||||
Unsorted.incomingOpcode = -1;
|
||||
return true;
|
||||
|
|
@ -1123,7 +1124,7 @@ public final class PacketParser {
|
|||
} else if (37 == Unsorted.incomingOpcode) {
|
||||
nodeModelId = BufferedDataStream.incomingBuffer.readUnsignedByte128();
|
||||
var19 = BufferedDataStream.incomingBuffer.readUnsignedShortLE();
|
||||
Class163.method2209((byte) -122, nodeModelId, var19);
|
||||
VarpHelpers.setVarbit((byte) -122, nodeModelId, var19);
|
||||
Unsorted.incomingOpcode = -1;
|
||||
return true;
|
||||
} else if (Unsorted.incomingOpcode == 155) {
|
||||
|
|
@ -1400,11 +1401,11 @@ public final class PacketParser {
|
|||
} else if (Unsorted.incomingOpcode == 84) {
|
||||
nodeModelId = BufferedDataStream.incomingBuffer.readIntLE();
|
||||
var19 = BufferedDataStream.incomingBuffer.readUnsignedShortLE128();
|
||||
Class163.method2209((byte) -106, nodeModelId, var19);
|
||||
VarpHelpers.setVarbit((byte) -106, nodeModelId, var19);
|
||||
Unsorted.incomingOpcode = -1;
|
||||
return true;
|
||||
} else {
|
||||
RSInterface var25;
|
||||
RSInterface iface;
|
||||
if (Unsorted.incomingOpcode == 22) {
|
||||
nodeModelId = BufferedDataStream.incomingBuffer.readInt();
|
||||
var19 = BufferedDataStream.incomingBuffer.readUnsignedShort();
|
||||
|
|
@ -1413,9 +1414,9 @@ public final class PacketParser {
|
|||
}
|
||||
|
||||
if (nodeModelId < 0) {
|
||||
var25 = null;
|
||||
iface = null;
|
||||
} else {
|
||||
var25 = Unsorted.getRSInterface(nodeModelId);
|
||||
iface = Unsorted.getRSInterface(nodeModelId);
|
||||
}
|
||||
|
||||
for (; Unsorted.incomingPacketLength > BufferedDataStream.incomingBuffer.index; method2277(var6 + -1, counter, var30, var19, (byte) 46)) {
|
||||
|
|
@ -1429,14 +1430,14 @@ public final class PacketParser {
|
|||
}
|
||||
}
|
||||
|
||||
if (var25 != null && counter >= 0 && counter < var25.itemAmounts.length) {
|
||||
var25.itemAmounts[counter] = var6;
|
||||
var25.itemIds[counter] = var30;
|
||||
if (iface != null && counter >= 0 && counter < iface.itemAmounts.length) {
|
||||
iface.itemAmounts[counter] = var6;
|
||||
iface.itemIds[counter] = var30;
|
||||
}
|
||||
}
|
||||
|
||||
if (var25 != null) {
|
||||
Class20.method909(var25);
|
||||
if (iface != null) {
|
||||
Class20.method909(iface);
|
||||
}
|
||||
|
||||
BufferedDataStream.method819();
|
||||
|
|
@ -1647,15 +1648,15 @@ public final class PacketParser {
|
|||
}
|
||||
|
||||
if (0 <= nodeModelId) {
|
||||
var25 = Unsorted.getRSInterface(nodeModelId);
|
||||
iface = Unsorted.getRSInterface(nodeModelId);
|
||||
} else {
|
||||
var25 = null;
|
||||
iface = null;
|
||||
}
|
||||
|
||||
if (var25 != null) {
|
||||
for (counter = 0; var25.itemAmounts.length > counter; ++counter) {
|
||||
var25.itemAmounts[counter] = 0;
|
||||
var25.itemIds[counter] = 0;
|
||||
if (iface != null) {
|
||||
for (counter = 0; iface.itemAmounts.length > counter; ++counter) {
|
||||
iface.itemAmounts[counter] = 0;
|
||||
iface.itemIds[counter] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1669,16 +1670,16 @@ public final class PacketParser {
|
|||
}
|
||||
|
||||
chatIcon = BufferedDataStream.incomingBuffer.readUnsignedShort();
|
||||
if (null != var25 && var25.itemAmounts.length > var6) {
|
||||
var25.itemAmounts[var6] = chatIcon;
|
||||
var25.itemIds[var6] = var30;
|
||||
if (null != iface && iface.itemAmounts.length > var6) {
|
||||
iface.itemAmounts[var6] = chatIcon;
|
||||
iface.itemIds[var6] = var30;
|
||||
}
|
||||
|
||||
method2277(-1 + chatIcon, var6, var30, var19, (byte) 41);
|
||||
}
|
||||
|
||||
if (var25 != null) {
|
||||
Class20.method909(var25);
|
||||
if (iface != null) {
|
||||
Class20.method909(iface);
|
||||
}
|
||||
|
||||
BufferedDataStream.method819();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package org.runite.client;
|
||||
|
||||
import com.sun.opengl.impl.x11.DRIHack;
|
||||
import org.rs09.SystemLogger;
|
||||
|
||||
import java.applet.Applet;
|
||||
|
|
@ -10,6 +11,7 @@ import java.lang.reflect.Method;
|
|||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
|
||||
|
|
@ -28,7 +30,7 @@ public class Signlink implements Runnable {
|
|||
private static String homeDirectory;
|
||||
private final Thread thread;
|
||||
private final String gameName;
|
||||
private final int anInt1215;
|
||||
private final int cacheSubrevisionNum;
|
||||
public RandomAccessFileWrapper[] cacheIndicesFiles;
|
||||
public RandomAccessFileWrapper cacheDataFile;
|
||||
public EventQueue systemEventQueue;
|
||||
|
|
@ -42,11 +44,13 @@ public class Signlink implements Runnable {
|
|||
private Class64 aClass64_1213 = null;
|
||||
private Interface1 anInterface1_1217;
|
||||
|
||||
private final int STAGE_LOAD_HDLIB = 10;
|
||||
|
||||
|
||||
public Signlink(Applet applet, int var2, String gameName, int cacheIndexes) throws Exception {
|
||||
javaVersion = "1.1";
|
||||
this.gameName = gameName;
|
||||
this.anInt1215 = var2;
|
||||
this.cacheSubrevisionNum = var2;
|
||||
this.gameApplet = applet;
|
||||
javaVendor = "Unknown";
|
||||
|
||||
|
|
@ -105,13 +109,13 @@ public class Signlink implements Runnable {
|
|||
} catch (Exception var10) {
|
||||
}
|
||||
|
||||
this.randomDatFile = new RandomAccessFileWrapper(method1448(null, this.anInt1215, "random.dat"), "rw", 25L);
|
||||
this.cacheDataFile = new RandomAccessFileWrapper(method1448(this.gameName, this.anInt1215, "main_file_cache.dat2"), "rw", 104857600L);
|
||||
this.cacheChecksumFile = new RandomAccessFileWrapper(method1448(this.gameName, this.anInt1215, "main_file_cache.idx255"), "rw", 1048576L);
|
||||
this.randomDatFile = new RandomAccessFileWrapper(getFileFromCacheFolder(null, this.cacheSubrevisionNum, "random.dat"), "rw", 25L);
|
||||
this.cacheDataFile = new RandomAccessFileWrapper(getFileFromCacheFolder(this.gameName, this.cacheSubrevisionNum, "main_file_cache.dat2"), "rw", 104857600L);
|
||||
this.cacheChecksumFile = new RandomAccessFileWrapper(getFileFromCacheFolder(this.gameName, this.cacheSubrevisionNum, "main_file_cache.idx255"), "rw", 1048576L);
|
||||
this.cacheIndicesFiles = new RandomAccessFileWrapper[cacheIndexes];
|
||||
|
||||
for (int i = 0; i < cacheIndexes; ++i) {
|
||||
this.cacheIndicesFiles[i] = new RandomAccessFileWrapper(method1448(this.gameName, this.anInt1215, "main_file_cache.idx" + i), "rw", 1048576L);
|
||||
this.cacheIndicesFiles[i] = new RandomAccessFileWrapper(getFileFromCacheFolder(this.gameName, this.cacheSubrevisionNum, "main_file_cache.idx" + i), "rw", 1048576L);
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
@ -166,11 +170,11 @@ public class Signlink implements Runnable {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static File method1448(String gameName, int var1, String filename) {
|
||||
public static File getFileFromCacheFolder(String gameName, int cacheSubRev, String filename) {
|
||||
File cachedFile = cachedFiles.get(filename);
|
||||
if (cachedFile == null) {
|
||||
String[] basePaths = new String[]{homeDirectory, "c:/rscache/", "/rscache/", "c:/windows/", "c:/winnt/", "c:/", "/tmp/", ""};
|
||||
String[] folders = new String[]{".runite_rs", ".530file_store_" + var1};
|
||||
String[] folders = new String[]{".runite_rs", ".530file_store_" + cacheSubRev};
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
for (String folder : folders) {
|
||||
for (String basePath : basePaths) {
|
||||
|
|
@ -371,58 +375,54 @@ public class Signlink implements Runnable {
|
|||
Frame var5 = new Frame("Jagex Full Screen");
|
||||
var1.anObject974 = var5;
|
||||
var5.setResizable(false);
|
||||
this.display.method918(-56, var1.anInt980 & 65535, var1.anInt980 >> 16, 65535 & var1.anInt979, var5, var1.anInt979 >>> 16);
|
||||
this.display.configureDisplayMode(-56, var1.anInt980 & 65535, var1.anInt980 >> 16, 65535 & var1.anInt979, var5, var1.anInt979 >>> 16);
|
||||
} else if (stage == 7) {
|
||||
this.display.method920();
|
||||
} else if (10 == stage) {
|
||||
Class[] var17 = new Class[]{Class.forName("java.lang.Class"), Class.forName("java.lang.String")};
|
||||
this.display.updateDisplayMode();
|
||||
} else if (stage == STAGE_LOAD_HDLIB) {
|
||||
Class[] declaredMethodFields = new Class[]{Class.forName("java.lang.Class"), Class.forName("java.lang.String")};
|
||||
Runtime runtime = Runtime.getRuntime();
|
||||
Method var7;
|
||||
Method libLoaderMethod;
|
||||
Class<Client> clientClass = (Class<Client>) var1.anObject977;
|
||||
|
||||
if (!osName.startsWith("mac")) {
|
||||
var7 = Class.forName("java.lang.Runtime").getDeclaredMethod("loadLibrary0", var17);
|
||||
var7.setAccessible(true);
|
||||
var7.invoke(runtime, var1.anObject977, "jawt");
|
||||
var7.setAccessible(false);
|
||||
libLoaderMethod = Class.forName("java.lang.Runtime").getDeclaredMethod("loadLibrary0", declaredMethodFields);
|
||||
libLoaderMethod.setAccessible(true);
|
||||
libLoaderMethod.invoke(runtime, clientClass, "jawt");
|
||||
libLoaderMethod.setAccessible(false);
|
||||
}
|
||||
|
||||
boolean is64Bit = osArchitecture.contains("64");
|
||||
boolean isSunOS = osName.startsWith("sunos");
|
||||
var7 = Class.forName("java.lang.Runtime").getDeclaredMethod("load0", var17);
|
||||
var7.setAccessible(true);
|
||||
//load0 is a reflection-based package-private method in Runtime. Not sure why jagex used this, but it's fucky.
|
||||
libLoaderMethod = Class.forName("java.lang.Runtime").getDeclaredMethod("load0", declaredMethodFields);
|
||||
libLoaderMethod.setAccessible(true);
|
||||
|
||||
SystemLogger.logInfo("Signlink - os Name: " + osName);
|
||||
SystemLogger.logInfo("Signlink - os Arch: " + osArchitecture);
|
||||
if (osArchitecture.equals("aarch64"))
|
||||
|
||||
if (osArchitecture.equals("aarch64")) {
|
||||
SystemLogger.logWarn("Going into HD will fail - current libs do not support ARM.");
|
||||
if (osName.startsWith("linux") || isSunOS) {
|
||||
createLibs(isSunOS ? (is64Bit ? 7 : 6) : (is64Bit ? 5 : 4));
|
||||
var7.invoke(runtime, var1.anObject977, method1448(this.gameName, this.anInt1215, "libgluegen-rt.so").toString());
|
||||
Class var8 = ((Class) var1.anObject977).getClassLoader().loadClass("com.sun.opengl.impl.x11.DRIHack");
|
||||
var8.getMethod("begin", new Class[0]).invoke(null);
|
||||
var7.invoke(runtime, var1.anObject977, method1448(this.gameName, this.anInt1215, "libjogl.so").toString());
|
||||
var8.getMethod("end", new Class[0]).invoke(null);
|
||||
var7.invoke(runtime, var1.anObject977, method1448(this.gameName, this.anInt1215, "libjogl_awt.so").toString());
|
||||
|
||||
|
||||
} else if (osName.startsWith("mac")) {
|
||||
createLibs(is64Bit ? 2 : 3);
|
||||
try {
|
||||
var7.invoke(runtime, var1.anObject977, method1448(this.gameName, this.anInt1215, "libjogl.jnilib").toString());
|
||||
var7.invoke(runtime, var1.anObject977, method1448(this.gameName, this.anInt1215, "libjogl_awt.jnilib").toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!osName.startsWith("win")) {
|
||||
throw new Exception();
|
||||
}
|
||||
createLibs(is64Bit ? 1 : 0);
|
||||
// System.out.println("Trying to invoke libs");
|
||||
var7.invoke(runtime, var1.anObject977, method1448(this.gameName, this.anInt1215, "jogl.dll").toString());
|
||||
var7.invoke(runtime, var1.anObject977, method1448(this.gameName, this.anInt1215, "jogl_awt.dll").toString());
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
var7.setAccessible(false);
|
||||
if (osName.startsWith("linux") || isSunOS) {
|
||||
String[] libs = createLibs("linux");
|
||||
libLoaderMethod.invoke(runtime, clientClass, libs[2]);
|
||||
DRIHack.begin();
|
||||
libLoaderMethod.invoke(runtime, clientClass, libs[0]);
|
||||
DRIHack.end();
|
||||
libLoaderMethod.invoke(runtime, clientClass, libs[1]);
|
||||
} else {
|
||||
if(osName.startsWith("mac") && !osArchitecture.equals("ppc")) throw new Exception(); //We only have ppc libs for mac.
|
||||
String[] libs = createLibs(osName.contains("win") ? "windows" : "macppc");
|
||||
//Windows has to load them this way because temporary files are illegal.
|
||||
String jogl = getFileFromCacheFolder(this.gameName, this.cacheSubrevisionNum, libs[0]).toString();
|
||||
String awt = getFileFromCacheFolder(this.gameName, this.cacheSubrevisionNum, libs[1]).toString();
|
||||
libLoaderMethod.invoke(runtime, clientClass, jogl);
|
||||
libLoaderMethod.invoke(runtime, clientClass, awt);
|
||||
}
|
||||
|
||||
libLoaderMethod.setAccessible(false);
|
||||
} else {
|
||||
int var18;
|
||||
if (stage == 11) {
|
||||
|
|
@ -499,38 +499,58 @@ public class Signlink implements Runnable {
|
|||
}
|
||||
}
|
||||
|
||||
public void createLibs(int archive) throws Throwable {
|
||||
String jogl = archive < 2 ? "jogl.dll" : archive < 4 ? "libjogl.jnilib" : "libjogl.so";
|
||||
String joglAwt = archive < 2 ? "jogl_awt.dll" : archive < 4 ? "libjogl_awt.jnilib" : "libjogl_awt.so";
|
||||
byte[] bs = CacheIndex.libIndex.getFile(archive, 0);
|
||||
if (bs == null || bs.length < 1) {
|
||||
System.err.println("Could not create native lib " + joglAwt + ", archive=" + archive + "!");
|
||||
return;
|
||||
/**
|
||||
* Extracts the libs from the client resources
|
||||
* @param os The OS in use: windows, macppc, or linux
|
||||
* @return an array of the created filenames to load.
|
||||
* @author Ceikry
|
||||
*/
|
||||
public String[] createLibs(String os) throws Throwable {
|
||||
ArrayList<String> filenames = new ArrayList<>();
|
||||
String jogl;
|
||||
String awt;
|
||||
String glueGen = "";
|
||||
boolean isGluegenRequired = false;
|
||||
boolean is64Bit = osArchitecture.contains("64");
|
||||
boolean isWindowsOrMac = os.equals("macppc") || os.equals("windows");
|
||||
|
||||
String fileExtension = os.equals("windows") ? ".dll" : os.equals("macppc") ? ".jnilib" : ".so";
|
||||
|
||||
jogl = (os.equals("windows") ? "jogl" : "libjogl") +
|
||||
(is64Bit ? "_64" : "_32") + fileExtension;
|
||||
|
||||
awt = (os.equals("windows") ? "jogl_awt" : "libjogl_awt") +
|
||||
(is64Bit ? "_64" : "_32") + fileExtension;
|
||||
|
||||
if(!isWindowsOrMac) isGluegenRequired = true;
|
||||
if(isGluegenRequired) glueGen = "libgluegen-rt_" + (is64Bit ? "64" : "32") + ".so";
|
||||
|
||||
File joglLib = isWindowsOrMac ? getFileFromCacheFolder(this.gameName, this.cacheSubrevisionNum, "jogl.dll") : File.createTempFile("jogl", "." + jogl.split("\\.")[1]);
|
||||
File awtLib = isWindowsOrMac ? getFileFromCacheFolder(this.gameName, this.cacheSubrevisionNum, "jogl_awt.dll") : File.createTempFile("jogl_awt", "." + awt.split("\\.")[1]);
|
||||
|
||||
try (InputStream in = getClass().getResourceAsStream("/lib/" + jogl); OutputStream out = openOutputStream(joglLib)) {
|
||||
if (in == null) throw new FileNotFoundException("Needed library does not exist: " + jogl);
|
||||
copyFile(in, out);
|
||||
filenames.add(isWindowsOrMac ? joglLib.getName() : joglLib.getAbsolutePath());
|
||||
}
|
||||
FileOutputStream fos = new FileOutputStream(method1448(this.gameName, this.anInt1215, joglAwt));
|
||||
fos.write(bs);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
bs = CacheIndex.libIndex.getFile(archive, 1);
|
||||
if (bs == null || bs.length < 1) {
|
||||
System.err.println("Could not create native lib " + jogl + ", archive=" + archive + "!");
|
||||
return;
|
||||
|
||||
try (InputStream in = getClass().getResourceAsStream("/lib/" + awt); OutputStream out = openOutputStream(awtLib)) {
|
||||
if (in == null) throw new FileNotFoundException("Needed library does not exist: " + awt);
|
||||
copyFile(in, out);
|
||||
filenames.add(isWindowsOrMac ? awtLib.getName() : awtLib.getAbsolutePath());
|
||||
}
|
||||
fos = new FileOutputStream(method1448(this.gameName, this.anInt1215, jogl));
|
||||
fos.write(bs);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
if (archive > 3) {
|
||||
bs = CacheIndex.libIndex.getFile(archive, 2);
|
||||
if (bs == null || bs.length < 1) {
|
||||
System.err.println("Could not create native lib libgluegen-rt.so, archive=" + archive + "!");
|
||||
return;
|
||||
|
||||
if (isGluegenRequired) {
|
||||
File glueLib = File.createTempFile("libgluegen", ".so");
|
||||
try (InputStream in = getClass().getResourceAsStream("/lib/" + glueGen); OutputStream out = openOutputStream(glueLib)) {
|
||||
if (in == null) throw new FileNotFoundException("Needed library does not exist: " + glueGen);
|
||||
copyFile(in, out);
|
||||
filenames.add(glueLib.getAbsolutePath());
|
||||
}
|
||||
fos = new FileOutputStream(method1448(this.gameName, this.anInt1215, "libgluegen-rt.so"));
|
||||
fos.write(bs);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
}
|
||||
|
||||
|
||||
return filenames.toArray(new String[]{});
|
||||
}
|
||||
|
||||
public final Class64 method1444(int var1, Class var2) {
|
||||
|
|
@ -638,4 +658,31 @@ public class Signlink implements Runnable {
|
|||
|
||||
return this.method1435(5, 0, null, 0);
|
||||
}
|
||||
|
||||
private static FileOutputStream openOutputStream(final File file) throws IOException {
|
||||
if (file.exists()) {
|
||||
if (file.isDirectory()) {
|
||||
throw new IOException("File '" + file + "' exists but is a directory");
|
||||
}
|
||||
if (!file.canWrite()) {
|
||||
throw new IOException("File '" + file + "' cannot be written to");
|
||||
}
|
||||
} else {
|
||||
final File parent = file.getParentFile();
|
||||
if (parent != null) {
|
||||
if (!parent.mkdirs() && !parent.isDirectory()) {
|
||||
throw new IOException("Directory '" + parent + "' could not be created");
|
||||
}
|
||||
}
|
||||
}
|
||||
return new FileOutputStream(file);
|
||||
}
|
||||
|
||||
private static void copyFile(final InputStream input, final OutputStream output) throws IOException {
|
||||
byte[] buffer = new byte[1024 * 4];
|
||||
int n;
|
||||
while (-1 != (n = input.read(buffer))) {
|
||||
output.write(buffer, 0, n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,6 +196,7 @@ public class TextCore {
|
|||
*/
|
||||
static RSString COMMAND_HIGHRES_GRAPHICS_RESIZE = RSString.parse("::wm2");
|
||||
static RSString COMMAND_SHIFT_DROP_CLICK = RSString.parse("::shiftclick");
|
||||
static RSString COMMAND_GETBITS = RSString.parse("::getbits");
|
||||
static RSString COMMAND_REPLACE_CANVAS = RSString.parse("::replacecanvas");
|
||||
static RSString COMMAND_HIGHRES_GRAPHICS_WINDOW = RSString.parse("::wm1");
|
||||
static RSString COMMAND_QA_OP_TEST = RSString.parse("::qa_op_test");
|
||||
|
|
|
|||
|
|
@ -346,15 +346,15 @@ public final class Texture {
|
|||
}
|
||||
|
||||
if (6 == anIntArray3331[var7]) {
|
||||
var32 = 10 <= Class79.anInt1127 % 20 ? 16776960 : 16711680;
|
||||
var32 = 10 <= CSConfigCachefile.anInt1127 % 20 ? 16776960 : 16711680;
|
||||
}
|
||||
|
||||
if (anIntArray3331[var7] == 7) {
|
||||
var32 = Class79.anInt1127 % 20 < 10 ? 255 : 65535;
|
||||
var32 = CSConfigCachefile.anInt1127 % 20 < 10 ? 255 : 65535;
|
||||
}
|
||||
|
||||
if (8 == anIntArray3331[var7]) {
|
||||
var32 = Class79.anInt1127 % 20 >= 10 ? 8454016 : '\ub000';
|
||||
var32 = CSConfigCachefile.anInt1127 % 20 >= 10 ? 8454016 : '\ub000';
|
||||
}
|
||||
|
||||
if (9 == anIntArray3331[var7]) {
|
||||
|
|
@ -405,15 +405,15 @@ public final class Texture {
|
|||
}
|
||||
|
||||
if (1 == anIntArray3336[var7]) {
|
||||
FontType.bold.method696(var33, var2 - -Class32.anInt590, anInt2208 + var0, var32, Class79.anInt1127);
|
||||
FontType.bold.method696(var33, var2 - -Class32.anInt590, anInt2208 + var0, var32, CSConfigCachefile.anInt1127);
|
||||
}
|
||||
|
||||
if (anIntArray3336[var7] == 2) {
|
||||
FontType.bold.method695(var33, var2 - -Class32.anInt590, var0 - -anInt2208, var32, Class79.anInt1127);
|
||||
FontType.bold.method695(var33, var2 - -Class32.anInt590, var0 - -anInt2208, var32, CSConfigCachefile.anInt1127);
|
||||
}
|
||||
|
||||
if (anIntArray3336[var7] == 3) {
|
||||
FontType.bold.method692(var33, var2 + Class32.anInt590, anInt2208 + var0, var32, Class79.anInt1127, 150 - anIntArray3318[var7]);
|
||||
FontType.bold.method692(var33, var2 + Class32.anInt590, anInt2208 + var0, var32, CSConfigCachefile.anInt1127, 150 - anIntArray3318[var7]);
|
||||
}
|
||||
|
||||
if (4 == anIntArray3336[var7]) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package org.runite.client;
|
||||
|
||||
import org.rs09.SystemLogger;
|
||||
import org.rs09.client.util.ArrayUtils;
|
||||
import org.rs09.client.filestore.resources.configs.cursors.CursorDefinition;
|
||||
|
||||
|
|
@ -114,12 +115,13 @@ final class TextureOperation3 extends TextureOperation {
|
|||
|
||||
static void method306(int var0, int var2) {
|
||||
try {
|
||||
Class79 var3 = CS2Script.method378(var0, (byte)127);
|
||||
int var6 = Objects.requireNonNull(var3).anInt1125;
|
||||
int var5 = var3.anInt1123;
|
||||
int var4 = var3.anInt1128;
|
||||
int var7 = Class3_Sub6.anIntArray2288[var6 - var5];
|
||||
CSConfigCachefile var3 = CSConfigCachefile.getCSConfigFileFromVarbitID(var0);
|
||||
int var6 = Objects.requireNonNull(var3).upperBound;
|
||||
int var5 = var3.lowerBound;
|
||||
int var4 = var3.parentVarpIndex;
|
||||
int var7 = Class3_Sub6.expectedMinimumValues[var6 - var5];
|
||||
if(var2 < 0 || var7 < var2) {
|
||||
SystemLogger.logInfo(var7 + " < " + var2);
|
||||
var2 = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -166,25 +166,6 @@ class TextureOperation39 extends TextureOperation {
|
|||
}
|
||||
}
|
||||
|
||||
static void method281(int var1, int var2) {
|
||||
try {
|
||||
Class57.varpArray[var2] = var1;
|
||||
if(CustomVars.parse(var2,var1)){
|
||||
return;
|
||||
}
|
||||
Class3_Sub7 var3 = (Class3_Sub7) AtmosphereParser.aHashTable_3679.get(var2);
|
||||
if(null == var3) {
|
||||
var3 = new Class3_Sub7(4611686018427387905L);
|
||||
AtmosphereParser.aHashTable_3679.put(var2, var3);
|
||||
} else if (var3.aLong2295 != 4611686018427387905L) {
|
||||
var3.aLong2295 = TimeUtils.time() + 500L | 4611686018427387904L;
|
||||
}
|
||||
|
||||
} catch (RuntimeException var4) {
|
||||
throw ClientErrorException.clientError(var4, "nh.W(" + (byte) 99 + ',' + var1 + ',' + var2 + ')');
|
||||
}
|
||||
}
|
||||
|
||||
final void method161(byte var1) {
|
||||
try {
|
||||
super.method161(var1);
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ import org.rs09.client.util.ArrayUtils;
|
|||
import org.runite.client.drawcalls.*;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Objects;
|
||||
|
|
@ -407,98 +405,6 @@ public class Unsorted {
|
|||
}
|
||||
}
|
||||
|
||||
static AbstractSprite constructItemSprite(int var0, boolean useHDSprite, int itemID, boolean var4, int outlineType, int itemCount, boolean shrinkInSprite) {
|
||||
try {
|
||||
ItemDefinition item = ItemDefinition.getItemDefinition(itemID);
|
||||
if (itemCount > 1 && item.anIntArray804 != null) {
|
||||
int var9 = -1;
|
||||
|
||||
for (int var10 = 0; var10 < 10; ++var10) {
|
||||
if (item.anIntArray766[var10] <= itemCount && item.anIntArray766[var10] != 0) {
|
||||
var9 = item.anIntArray804[var10];
|
||||
}
|
||||
}
|
||||
|
||||
if (var9 != -1) {
|
||||
item = ItemDefinition.getItemDefinition(var9);
|
||||
}
|
||||
}
|
||||
|
||||
Class140_Sub1_Sub2 var21 = item.method1120();
|
||||
if (null == var21) {
|
||||
return null;
|
||||
} else {
|
||||
SoftwareSprite var22 = null;
|
||||
if (item.anInt791 == -1) {
|
||||
if (item.anInt762 != -1) {
|
||||
var22 = (SoftwareSprite) constructItemSprite(var0, true, item.anInt795, false, outlineType, itemCount, false);
|
||||
if (null == var22) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var22 = (SoftwareSprite) constructItemSprite(0, true, item.noteID, false, 1, 10, true);
|
||||
if (null == var22) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
int[] var11 = Toolkit.JAVA_TOOLKIT.getBuffer();
|
||||
int var12 = Toolkit.JAVA_TOOLKIT.width;
|
||||
int var13 = Toolkit.JAVA_TOOLKIT.height;
|
||||
int[] var14 = new int[4];
|
||||
Class74.method1325(var14);
|
||||
SoftwareSprite var15 = new SoftwareSprite(36, 32);
|
||||
Class74.setBuffer(var15.anIntArray4081, 36, 32);
|
||||
Class51.method1134();
|
||||
Class51.method1145(16, 16);
|
||||
int var16 = item.anInt810;
|
||||
Class51.aBoolean843 = false;
|
||||
if (shrinkInSprite) {
|
||||
var16 = (int) ((double) var16 * 1.5D);
|
||||
} else if (outlineType == 2) {
|
||||
var16 = (int) (1.04D * (double) var16);
|
||||
}
|
||||
|
||||
int var18 = Class51.anIntArray851[item.anInt786] * var16 >> 16;
|
||||
int var17 = Class51.anIntArray840[item.anInt786] * var16 >> 16;
|
||||
var21.method1893(item.anInt799, item.anInt768, item.anInt786, item.anInt792, var17 - (var21.method1871() / 2 + -item.anInt754), item.anInt754 + var18);
|
||||
if (outlineType >= 1) {
|
||||
var15.method657(1);
|
||||
if (outlineType >= 2) {
|
||||
var15.method657(16777215);
|
||||
}
|
||||
|
||||
Class74.setBuffer(var15.anIntArray4081, 36, 32);
|
||||
}
|
||||
|
||||
if (var0 != 0) {
|
||||
var15.method668(var0);
|
||||
}
|
||||
|
||||
if (item.anInt791 != -1) {
|
||||
Objects.requireNonNull(var22).drawAt(0, 0);
|
||||
} else if (-1 != item.anInt762) {
|
||||
Class74.setBuffer(Objects.requireNonNull(var22).anIntArray4081, 36, 32);
|
||||
var15.drawAt(0, 0);
|
||||
var15 = var22;
|
||||
}
|
||||
|
||||
if (var4 && (item.stackingType == 1 || itemCount != 1) && itemCount != -1) {
|
||||
TextureOperation10.aClass3_Sub28_Sub17_Sub1_3440.method681(Class3_Sub7.itemStackColor(1000, itemCount), 0, 9, 16776960, 1);
|
||||
}
|
||||
|
||||
Class74.setBuffer(var11, var12, var13);
|
||||
Class74.setClipping(var14);
|
||||
Class51.method1134();
|
||||
Class51.aBoolean843 = true;
|
||||
return HDToolKit.highDetail && !useHDSprite ? new HDSprite(var15) : var15;
|
||||
}
|
||||
} catch (RuntimeException var20) {
|
||||
throw ClientErrorException.clientError(var20, "na.WA(" + var0 + ',' + useHDSprite + ',' + itemID + ',' + var4 + ',' + outlineType + ',' + itemCount + ',' + shrinkInSprite + ')');
|
||||
}
|
||||
}
|
||||
|
||||
public static RSString method802(int var0) {
|
||||
try {
|
||||
|
||||
|
|
@ -2056,7 +1962,7 @@ public class Unsorted {
|
|||
Class136.method1816(512, -7);
|
||||
TextureOperation19.method257();
|
||||
} else {
|
||||
Class3_Sub5.method112((byte) (-4 + Class79.anInt1127 & 0xFF));
|
||||
Class3_Sub5.method112((byte) (-4 + CSConfigCachefile.anInt1127 & 0xFF));
|
||||
Class136.method1816(2, -7);
|
||||
}
|
||||
|
||||
|
|
@ -2738,7 +2644,7 @@ public class Unsorted {
|
|||
++var2;
|
||||
}
|
||||
|
||||
if (var1.retrieveSpriteFile(Class79.anInt1124)) {
|
||||
if (var1.retrieveSpriteFile(CSConfigCachefile.anInt1124)) {
|
||||
++var2;
|
||||
}
|
||||
|
||||
|
|
@ -4812,7 +4718,7 @@ public class Unsorted {
|
|||
}
|
||||
}
|
||||
|
||||
Class79.method1390(new DataBuffer(var4));
|
||||
CSConfigCachefile.method1390(new DataBuffer(var4));
|
||||
}
|
||||
} catch (Exception var8) {
|
||||
}
|
||||
|
|
@ -5005,7 +4911,7 @@ public class Unsorted {
|
|||
|
||||
static void method338(int var1, boolean var2, int var3, int var4, int var5) {
|
||||
try {
|
||||
++Class79.anInt1127;
|
||||
++CSConfigCachefile.anInt1127;
|
||||
Class124.method1745();
|
||||
if(!var2) {
|
||||
Class3_Sub5.method116(true);
|
||||
|
|
@ -5114,7 +5020,7 @@ public class Unsorted {
|
|||
}
|
||||
|
||||
Class58.method1194();
|
||||
byte var19 = Class137.method1817() != 2 ?1:(byte)Class79.anInt1127;
|
||||
byte var19 = Class137.method1817() != 2 ?1:(byte) CSConfigCachefile.anInt1127;
|
||||
if(HDToolKit.highDetail) {
|
||||
HDToolKit.method1846();
|
||||
HDToolKit.method1831(true);
|
||||
|
|
|
|||
58
Client/src/main/java/org/runite/client/VarpHelpers.java
Normal file
58
Client/src/main/java/org/runite/client/VarpHelpers.java
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
package org.runite.client;
|
||||
|
||||
import org.rs09.CustomVars;
|
||||
import org.rs09.SystemLogger;
|
||||
import org.rs09.client.data.ReferenceCache;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class VarpHelpers {
|
||||
|
||||
static ReferenceCache varbitLookup = new ReferenceCache(64);
|
||||
|
||||
static void setVarbit(byte var0, int valueToSet, int varbitID) {
|
||||
try {
|
||||
if (var0 >= -99) {
|
||||
setVarbit((byte) 57, -14, 120);
|
||||
}
|
||||
|
||||
CSConfigCachefile cacheFile = CSConfigCachefile.getCSConfigFileFromVarbitID(varbitID);
|
||||
int parentVarp = Objects.requireNonNull(cacheFile).parentVarpIndex;
|
||||
int upperBound = cacheFile.upperBound;
|
||||
int lowerBound = cacheFile.lowerBound;
|
||||
int varbitSize = upperBound - lowerBound;
|
||||
SystemLogger.logInfo(parentVarp + " - bitStart: " + lowerBound + " bitEnd: " + upperBound + " bitSize = " + (varbitSize + 1));
|
||||
int expectedMinimumValue = Class3_Sub6.expectedMinimumValues[varbitSize];
|
||||
SystemLogger.logInfo("emv: " + expectedMinimumValue + " || vs: " + (127 + valueToSet));
|
||||
if (valueToSet < 0|| expectedMinimumValue < valueToSet) {
|
||||
SystemLogger.logInfo(expectedMinimumValue + " < " + valueToSet);
|
||||
valueToSet = 0;
|
||||
}
|
||||
|
||||
expectedMinimumValue <<= lowerBound;
|
||||
int modifiedVarpValue = valueToSet << lowerBound & expectedMinimumValue | ~expectedMinimumValue & Class57.varpArray[parentVarp];
|
||||
setVarp(modifiedVarpValue, parentVarp);
|
||||
} catch (RuntimeException var8) {
|
||||
throw ClientErrorException.clientError(var8, "wd.K(" + var0 + ',' + valueToSet + ',' + varbitID + ')');
|
||||
}
|
||||
}
|
||||
|
||||
static void setVarp(int valueToSet, int varpIndex) {
|
||||
try {
|
||||
Class57.varpArray[varpIndex] = valueToSet;
|
||||
if(CustomVars.parse(varpIndex,valueToSet)){
|
||||
return;
|
||||
}
|
||||
Class3_Sub7 var3 = (Class3_Sub7) AtmosphereParser.aHashTable_3679.get(varpIndex);
|
||||
if(null == var3) {
|
||||
var3 = new Class3_Sub7(4611686018427387905L);
|
||||
AtmosphereParser.aHashTable_3679.put(varpIndex, var3);
|
||||
} else if (var3.aLong2295 != 4611686018427387905L) {
|
||||
var3.aLong2295 = TimeUtils.time() + 500L | 4611686018427387904L;
|
||||
}
|
||||
|
||||
} catch (RuntimeException var4) {
|
||||
throw ClientErrorException.clientError(var4, "nh.W(" + (byte) 99 + ',' + valueToSet + ',' + varpIndex + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12,13 +12,13 @@ public final class ContextMenu {
|
|||
int width = Class21.anInt3552;
|
||||
int height = Class21.anInt3537;
|
||||
int contextMenuColor = 6116423; //Context Menu RGB || 6116423 Classic || Old var5 || ColorCore.getHexColors()
|
||||
Toolkit.getActiveToolkit().fillRect(1 + x, y + 18, width + -2, -19 + height, GameConfig.RCM_BG_COLOR, GameConfig.RCM_BG_OPACITY);
|
||||
Toolkit.getActiveToolkit().fillRect(1 + x, y + 18, width + -2, -19 + height, GameConfig.RCM_BG_COLOR, GameConfig.getRCM_BG_OPACITY());
|
||||
if (GameConfig.RS3_CONTEXT_STYLE) {
|
||||
Toolkit.getActiveToolkit().fillRect(1 + x, 2 + y, width + -2, 16, GameConfig.RCM_TITLE_COLOR, GameConfig.RCM_TITLE_OPACITY);
|
||||
Toolkit.getActiveToolkit().drawRect(1 + x, 1 + y, width + -2, height, GameConfig.RCM_BORDER_COLOR, GameConfig.RCM_BORDER_OPACITY);
|
||||
Toolkit.getActiveToolkit().fillRect(1 + x, 2 + y, width + -2, 16, GameConfig.RCM_TITLE_COLOR, GameConfig.getRCM_TITLE_OPACITY());
|
||||
Toolkit.getActiveToolkit().drawRect(1 + x, 1 + y, width + -2, height, GameConfig.RCM_BORDER_COLOR, GameConfig.getRCM_BORDER_OPACITY());
|
||||
} else {
|
||||
Toolkit.getActiveToolkit().fillRect(1 + x, 2 + y, width + -2, 16, GameConfig.RCM_TITLE_COLOR, GameConfig.RCM_TITLE_OPACITY);
|
||||
Toolkit.getActiveToolkit().drawRect(1 + x, y + 18, width + -2, -19 + height, GameConfig.RCM_BORDER_COLOR, GameConfig.RCM_BORDER_OPACITY);
|
||||
Toolkit.getActiveToolkit().fillRect(1 + x, 2 + y, width + -2, 16, GameConfig.RCM_TITLE_COLOR, GameConfig.getRCM_TITLE_OPACITY());
|
||||
Toolkit.getActiveToolkit().drawRect(1 + x, y + 18, width + -2, -19 + height, GameConfig.RCM_BORDER_COLOR, GameConfig.getRCM_BORDER_OPACITY());
|
||||
}
|
||||
|
||||
FontType.bold.method681(RSString.parse(GameConfig.RCM_TITLE), x - -3, y + 14, contextMenuColor, -1);
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@ object CustomVars {
|
|||
true
|
||||
}
|
||||
2502 -> {
|
||||
GameConfig.slayerCountEnabled = (varValue and 1) == 0
|
||||
GameConfig.slayerTaskID = (varValue shr 1) and 127
|
||||
GameConfig.setSlayerAmount((varValue shr 8) and 511)
|
||||
GameConfig.slayerCountEnabled = true
|
||||
GameConfig.slayerTaskID = varValue and 0x7F
|
||||
GameConfig.setSlayerAmount((varValue shr 7) and 0xFF)
|
||||
SlayerTracker.setSprite()
|
||||
SystemLogger.logInfo(varValue.toString())
|
||||
true
|
||||
}
|
||||
else -> false
|
||||
|
|
|
|||
|
|
@ -15,10 +15,9 @@ object Discord {
|
|||
var initialized = false
|
||||
|
||||
@JvmStatic
|
||||
//Removed support for Linux due to the outlined issue on line 37. TODO: Revisit this when the RPC library updates. There's a PR there that *should* fix it.
|
||||
fun checkInitializable() : Boolean{
|
||||
val OS = System.getProperty("os.name")
|
||||
if(OS.toLowerCase().startsWith("windows")){
|
||||
if(OS.toLowerCase().startsWith("windows") || OS.toLowerCase().contains("nux")){
|
||||
val arch = System.getProperty("os.arch")
|
||||
return arch != "aarch64" && !initialized
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package org.rs09
|
|||
import org.rs09.client.config.GameConfig
|
||||
import org.rs09.client.rendering.RenderingUtils
|
||||
import org.rs09.client.rendering.Toolkit
|
||||
import org.runite.client.*
|
||||
import java.lang.Exception
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
object SlayerTracker {
|
||||
|
|
@ -10,23 +12,29 @@ object SlayerTracker {
|
|||
const val posY = 30
|
||||
const val textX = 7
|
||||
const val textY = 50
|
||||
const val spriteY = 30
|
||||
val boxColor = GameConfig.slayerTrackerColor.toIntOrNull(16) ?: 6116423
|
||||
|
||||
@JvmField
|
||||
var lastUpdate = 0L
|
||||
|
||||
var curSprite: AbstractSprite? = null
|
||||
|
||||
|
||||
@JvmStatic
|
||||
fun draw(){
|
||||
val timeSinceUpdate = System.currentTimeMillis() - lastUpdate
|
||||
if(!GameConfig.slayerCountEnabled) return
|
||||
if(GameConfig.slayerTaskAmount == 0) return
|
||||
if(GameConfig.slayerTaskAmount <= 0) return
|
||||
if(timeSinceUpdate >= TimeUnit.MINUTES.toMillis(5L)) return
|
||||
val tk = Toolkit.getActiveToolkit()
|
||||
var rectWidth = 9 * getTask().length
|
||||
var amountPos = textX + (6 * getTask().length)
|
||||
var rectWidth = 60
|
||||
var amountPos = textX + 40
|
||||
if(rectWidth < 90) rectWidth = 90
|
||||
if(amountPos < textX + 60) amountPos = textX + 60
|
||||
tk.fillRect(posX,posY,rectWidth,30,0,64)
|
||||
RenderingUtils.drawText(getTask() + ":", textX, textY,-1,2,false)
|
||||
tk.fillRect(posX,posY,rectWidth,30, boxColor,GameConfig.slayerTrackerOpacity)
|
||||
|
||||
curSprite?.drawAt(textX, spriteY)
|
||||
RenderingUtils.drawText(GameConfig.slayerTaskAmount.toString(),amountPos, textY, -1, 2, false)
|
||||
}
|
||||
|
||||
|
|
@ -38,91 +46,106 @@ object SlayerTracker {
|
|||
lastUpdate = 0
|
||||
}
|
||||
|
||||
fun getTask(): String {
|
||||
return when(GameConfig.slayerTaskID){
|
||||
0 -> "Abby Spectres"
|
||||
1 -> "Abyssal Demons"
|
||||
2 -> "Ankou"
|
||||
3 -> "Aviansies"
|
||||
4 -> "Banshee"
|
||||
5 -> "Basilisks"
|
||||
6 -> "Bats"
|
||||
7 -> "Bears"
|
||||
8 -> "Birds"
|
||||
9 -> "Black Demons"
|
||||
10 -> "Black Dragons"
|
||||
11 -> "Bloodvelds"
|
||||
12 -> "Blue Dragons"
|
||||
13 -> "Brine Rats"
|
||||
14 -> "Bronze Dragons"
|
||||
15 -> "Catablepons"
|
||||
16 -> "Cave Bugs"
|
||||
17 -> "Cave Crawlers"
|
||||
18 -> "Cave Horrors"
|
||||
19 -> "Cave Slimes"
|
||||
20 -> "Cockatrices"
|
||||
21 -> "Cows"
|
||||
22 -> "Crawling Hands"
|
||||
23 -> "Crocodiles"
|
||||
24 -> "Cyclopes"
|
||||
25 -> "Dagannoths"
|
||||
26 -> "Dark Beasts"
|
||||
27 -> "Desert Lizards"
|
||||
28 -> "Dogs"
|
||||
29 -> "Dust Devils"
|
||||
30 -> "Dwarves"
|
||||
31 -> "Earth Warriors"
|
||||
32 -> "Fire Giants"
|
||||
33 -> "Flesh Crawlers"
|
||||
34 -> "Gargoyles"
|
||||
35 -> "Ghosts"
|
||||
36 -> "Ghouls"
|
||||
37 -> "Goblins"
|
||||
38 -> "Goraks"
|
||||
39 -> "Greater Demons"
|
||||
40 -> "Green Dragons"
|
||||
41 -> "Harpie Swarms"
|
||||
42 -> "Hellhounds"
|
||||
43 -> "Hill Giants"
|
||||
44 -> "Hobgoblins"
|
||||
45 -> "Ice Fiends"
|
||||
46 -> "Ice Giants"
|
||||
47 -> "Ice Warriors"
|
||||
48 -> "Infernal Mages"
|
||||
49 -> "Iron Dragons"
|
||||
50 -> "Jellies"
|
||||
51 -> "Jungle Horrors"
|
||||
52 -> "Kalphites"
|
||||
53 -> "Kurasks"
|
||||
54 -> "Lesser Demons"
|
||||
55 -> "Mithril Dragons"
|
||||
56 -> "Minotaurs"
|
||||
57 -> "Monkeys"
|
||||
58 -> "Moss Giants"
|
||||
59 -> "Nechryaels"
|
||||
60 -> "Ogres"
|
||||
61 -> "Otherworldly Beings"
|
||||
62 -> "Pyrefiends"
|
||||
63 -> "Rats"
|
||||
64 -> "Rock Slugs"
|
||||
65 -> "Scorpions"
|
||||
66 -> "Shades"
|
||||
67 -> "Skeletons"
|
||||
68 -> "Spiders"
|
||||
69 -> "Spiritual Mages"
|
||||
70 -> "Spiritual Rangers"
|
||||
71 -> "Spiritual Warriors"
|
||||
72 -> "Steel Dragons"
|
||||
73 -> "Trolls"
|
||||
74 -> "Turoths"
|
||||
75 -> "Tzhaar"
|
||||
76 -> "Vampires"
|
||||
77 -> "Waterfiends"
|
||||
78 -> "Werewolves"
|
||||
79 -> "Wolves"
|
||||
80 -> "Zombies"
|
||||
89 -> "Skeletal Wyverns"
|
||||
else -> "Uhh Report Me?"
|
||||
}
|
||||
@JvmStatic
|
||||
fun setSprite(){
|
||||
try {
|
||||
SystemLogger.logInfo("Getting slayer sprite...")
|
||||
val itemId: Int = when (GameConfig.slayerTaskID) {
|
||||
0 -> 4144
|
||||
1 -> 4149
|
||||
2 -> 560
|
||||
3 -> 10176
|
||||
4 -> 4135
|
||||
5 -> 4139
|
||||
6 -> 14072
|
||||
7 -> 948
|
||||
8 -> 12189
|
||||
9 -> 3098
|
||||
10 -> 1747
|
||||
11 -> 4141
|
||||
12 -> 1751
|
||||
13 -> 11047
|
||||
14 -> 2349
|
||||
15 -> 9008
|
||||
16 -> 4521
|
||||
17 -> 4134
|
||||
18 -> 8900
|
||||
19 -> 4520
|
||||
20 -> 4137
|
||||
21 -> 1739
|
||||
22 -> 7982
|
||||
23 -> 10149
|
||||
24 -> 532
|
||||
25 -> 8141
|
||||
26 -> 6637
|
||||
27 -> 6695
|
||||
28 -> 8132
|
||||
29 -> 4145
|
||||
30 -> 7500
|
||||
31 -> 1422
|
||||
32 -> 1387
|
||||
33 -> 9011
|
||||
34 -> 4147
|
||||
35 -> 552
|
||||
36 -> 6722
|
||||
37 -> 10998
|
||||
38 -> 9016
|
||||
39 -> 2402
|
||||
40 -> 1753
|
||||
41 -> 7050
|
||||
42 -> 8137
|
||||
43 -> 12570
|
||||
44 -> 8133
|
||||
45 -> 4671
|
||||
46 -> 4671
|
||||
47 -> 1159
|
||||
48 -> 4140
|
||||
49 -> 2351
|
||||
50 -> 4142
|
||||
51 -> 7778
|
||||
52 -> 8139
|
||||
53 -> 4146
|
||||
54 -> 2402
|
||||
55 -> 2359
|
||||
56 -> 12079
|
||||
57 -> 12201
|
||||
58 -> 12570
|
||||
59 -> 4148
|
||||
60 -> 4818
|
||||
61 -> 6107
|
||||
62 -> 4138
|
||||
63 -> 14074
|
||||
64 -> 4136
|
||||
65 -> 6297
|
||||
66 -> 10634
|
||||
67 -> 553
|
||||
68 -> 8135
|
||||
69 -> 11732
|
||||
70 -> 10284
|
||||
71 -> 13923
|
||||
72 -> 2353
|
||||
73 -> 8136
|
||||
74 -> 4143
|
||||
75 -> 6528
|
||||
76 -> 10109
|
||||
77 -> 1403
|
||||
78 -> 2952
|
||||
79 -> 958
|
||||
80 -> 7594
|
||||
89 -> 6811
|
||||
else -> -1
|
||||
}
|
||||
|
||||
var sprite = AbstractSprite.constructItemSprite(0, HDToolKit.highDetail, itemId, false, 1, 1, false)
|
||||
if (HDToolKit.highDetail) {
|
||||
if (sprite is Class3_Sub28_Sub16_Sub2_Sub1) {
|
||||
sprite = Class3_Sub28_Sub16_Sub1_Sub1(sprite as SoftwareSprite)
|
||||
} else {
|
||||
sprite = HDSprite(sprite as SoftwareSprite)
|
||||
}
|
||||
}
|
||||
|
||||
curSprite = sprite
|
||||
} catch (ignored: Exception){}
|
||||
}
|
||||
}
|
||||
|
|
@ -11,346 +11,382 @@ import java.util.*
|
|||
* Handles the client's config loading
|
||||
* @author Ceikry
|
||||
*/
|
||||
class GameConfig {
|
||||
companion object {
|
||||
object GameConfig {
|
||||
/**
|
||||
* Debug Booleans
|
||||
*/
|
||||
@JvmField
|
||||
var ITEM_DEBUG_ENABLED = false
|
||||
|
||||
/**
|
||||
* Debug Booleans
|
||||
*/
|
||||
@JvmField
|
||||
var ITEM_DEBUG_ENABLED = false
|
||||
@JvmField
|
||||
var OBJECT_DEBUG_ENABLED = false
|
||||
|
||||
@JvmField
|
||||
var OBJECT_DEBUG_ENABLED = false
|
||||
@JvmField
|
||||
var NPC_DEBUG_ENABLED = false
|
||||
|
||||
@JvmField
|
||||
var NPC_DEBUG_ENABLED = false
|
||||
@JvmField
|
||||
var HD_LOGIN_DEBUG = false
|
||||
|
||||
@JvmField
|
||||
var HD_LOGIN_DEBUG = false
|
||||
@JvmField
|
||||
var HD_LOGIN_VERBOSE = false
|
||||
|
||||
@JvmField
|
||||
var HD_LOGIN_VERBOSE = false
|
||||
@JvmField
|
||||
var CACHE_DEBUG = false
|
||||
|
||||
@JvmField
|
||||
var CACHE_DEBUG = false
|
||||
@JvmField
|
||||
var WORLD_MAP_DEBUG = false
|
||||
|
||||
@JvmField
|
||||
var WORLD_MAP_DEBUG = false
|
||||
/**
|
||||
* Context Menu Presets
|
||||
*/
|
||||
@JvmField
|
||||
var RCM_STYLE_PRESET = "classic"
|
||||
|
||||
/**
|
||||
* Context Menu Presets
|
||||
*/
|
||||
@JvmField
|
||||
var RCM_STYLE_PRESET = "classic"
|
||||
/**
|
||||
* Context Menu Customization
|
||||
*/
|
||||
@JvmField
|
||||
var RCM_BG_COLOR = 6116423
|
||||
|
||||
/**
|
||||
* Context Menu Customization
|
||||
*/
|
||||
@JvmField
|
||||
var RCM_BG_COLOR = 6116423
|
||||
|
||||
@JvmField
|
||||
var RCM_BG_OPACITY = 255
|
||||
|
||||
@JvmField
|
||||
var RCM_TITLE_COLOR = 0
|
||||
|
||||
@JvmField
|
||||
var RCM_TITLE_OPACITY = 255
|
||||
|
||||
@JvmField
|
||||
var RCM_BORDER_COLOR = 0
|
||||
|
||||
@JvmField
|
||||
var RCM_BORDER_OPACITY = 255
|
||||
|
||||
@JvmField
|
||||
var RCM_TITLE = "<col=0>Choose Option</col>"
|
||||
|
||||
@JvmField
|
||||
var RS3_CONTEXT_STYLE = false
|
||||
|
||||
/**
|
||||
* Render distance
|
||||
*/
|
||||
@JvmField
|
||||
var RENDER_DISTANCE_INCREASE = false
|
||||
|
||||
@JvmField
|
||||
var RENDER_DISTANCE_VALUE = 3584f
|
||||
|
||||
@JvmField
|
||||
var RENDER_DISTANCE_TILE_VALUE = 28
|
||||
|
||||
@JvmField
|
||||
var RENDER_DISTANCE_FOG_FIX = 3328.0f
|
||||
|
||||
@JvmField
|
||||
var SKYBOX_COLOR = "float"
|
||||
|
||||
/**
|
||||
* Client Info
|
||||
* Editable
|
||||
*/
|
||||
@JvmField
|
||||
var IP_ADDRESS = "localhost"
|
||||
|
||||
@JvmField
|
||||
var IP_MANAGEMENT = "localhost"
|
||||
|
||||
var JS5_SERVER_PORT = 43593
|
||||
|
||||
@JvmField
|
||||
var SERVER_PORT = 43594
|
||||
|
||||
@JvmField
|
||||
var WL_PORT = 5555
|
||||
|
||||
@JvmField
|
||||
var WORLD = 1
|
||||
|
||||
@JvmField
|
||||
var WORLD_OVERRIDE = -1
|
||||
|
||||
@JvmField
|
||||
var LOGIN_THEME = "scape main"
|
||||
|
||||
@JvmField
|
||||
var xpDropsEnabled = true
|
||||
|
||||
@JvmField
|
||||
var xpDropMode = 0
|
||||
|
||||
@JvmField
|
||||
var xpTrackMode = 0
|
||||
|
||||
@JvmField
|
||||
var slayerCountEnabled = true
|
||||
|
||||
@JvmField
|
||||
var slayerTaskID = 0
|
||||
|
||||
@JvmField
|
||||
var slayerTaskAmount = 0
|
||||
|
||||
@JvmField
|
||||
var VERBOSE_LOGGING = false
|
||||
|
||||
@JvmStatic
|
||||
fun setSlayerAmount(amount : Int){
|
||||
slayerTaskAmount = amount
|
||||
SlayerTracker.lastUpdate = System.currentTimeMillis()
|
||||
@JvmStatic
|
||||
var RCM_BG_OPACITY = 255
|
||||
set(value) {
|
||||
if(value > 255 || value < 0) field = 255
|
||||
else field = value
|
||||
}
|
||||
|
||||
@JvmField
|
||||
var RCM_TITLE_COLOR = 0
|
||||
|
||||
@JvmStatic
|
||||
var RCM_TITLE_OPACITY = 255
|
||||
set(value) {
|
||||
if(value > 255 || value < 0) field = 255
|
||||
else field = value
|
||||
}
|
||||
|
||||
@JvmField
|
||||
var RCM_BORDER_COLOR = 0
|
||||
|
||||
@JvmStatic
|
||||
var RCM_BORDER_OPACITY = 255
|
||||
set(value) {
|
||||
if(value > 255 || value < 0) field = 255
|
||||
else field = value
|
||||
}
|
||||
|
||||
@JvmField
|
||||
var RCM_TITLE = "<col=0>Choose Option</col>"
|
||||
|
||||
@JvmField
|
||||
var RS3_CONTEXT_STYLE = false
|
||||
|
||||
/**
|
||||
* Render distance
|
||||
*/
|
||||
@JvmField
|
||||
var RENDER_DISTANCE_INCREASE = false
|
||||
|
||||
@JvmField
|
||||
var RENDER_DISTANCE_VALUE = 3584f
|
||||
|
||||
@JvmField
|
||||
var RENDER_DISTANCE_TILE_VALUE = 28
|
||||
|
||||
@JvmField
|
||||
var RENDER_DISTANCE_FOG_FIX = 3328.0f
|
||||
|
||||
@JvmField
|
||||
var SKYBOX_COLOR = "float"
|
||||
|
||||
/**
|
||||
* Client Info
|
||||
* Editable
|
||||
*/
|
||||
@JvmField
|
||||
var IP_ADDRESS = "localhost"
|
||||
|
||||
@JvmField
|
||||
var IP_MANAGEMENT = "localhost"
|
||||
|
||||
@JvmField
|
||||
var JS5_SERVER_PORT = 43593
|
||||
|
||||
@JvmField
|
||||
var SERVER_PORT = 43594
|
||||
|
||||
@JvmField
|
||||
var WL_PORT = 5555
|
||||
|
||||
@JvmField
|
||||
var WORLD = 1
|
||||
|
||||
@JvmField
|
||||
var WORLD_OVERRIDE = -1
|
||||
|
||||
@JvmField
|
||||
var LOGIN_THEME = "scape main"
|
||||
|
||||
@JvmField
|
||||
var xpDropsEnabled = true
|
||||
|
||||
@JvmField
|
||||
var xpDropMode = 0
|
||||
|
||||
@JvmField
|
||||
var xpTrackMode = 0
|
||||
|
||||
@JvmField
|
||||
var slayerCountEnabled = true
|
||||
|
||||
@JvmField
|
||||
var slayerTrackerColor = "#635a38"
|
||||
|
||||
@JvmStatic
|
||||
var slayerTrackerOpacity = 180
|
||||
set(value) {
|
||||
if(value > 255 || value < 0) field = 255
|
||||
else field = value
|
||||
}
|
||||
|
||||
@JvmField
|
||||
var slayerTaskID = 0
|
||||
|
||||
@JvmField
|
||||
var slayerTaskAmount = 0
|
||||
|
||||
@JvmField
|
||||
var VERBOSE_LOGGING = false
|
||||
|
||||
@JvmStatic
|
||||
fun setSlayerAmount(amount : Int){
|
||||
slayerTaskAmount = amount
|
||||
if(slayerTaskAmount < 0) slayerTaskAmount = 0
|
||||
SlayerTracker.lastUpdate = System.currentTimeMillis()
|
||||
}
|
||||
|
||||
/**
|
||||
* Json config Parser
|
||||
*/
|
||||
@JvmStatic
|
||||
fun parse(path: String){
|
||||
val reader = FileReader(path)
|
||||
val parser = JSONParser()
|
||||
val data = parser.parse(reader) as JSONObject
|
||||
|
||||
//Networking
|
||||
if(data.containsKey("ip_address")) IP_ADDRESS = data["ip_address"].toString() else IP_ADDRESS = "play.2009scape.org"
|
||||
if(data.containsKey("ip_management")) IP_MANAGEMENT = data["ip_management"].toString() else IP_MANAGEMENT = IP_ADDRESS
|
||||
if(data.containsKey("wl_port")) WL_PORT = data["wl_port"].toString().toInt()
|
||||
if(data.containsKey("server_port")) SERVER_PORT = data["server_port"].toString().toInt()
|
||||
if(data.containsKey("js5_port")) JS5_SERVER_PORT = data["js5_port"].toString().toInt()
|
||||
if(data.containsKey("world")) WORLD = data["world"].toString().toInt()
|
||||
|
||||
//Parse customization options
|
||||
if(data.containsKey("customization")){
|
||||
val custom = data["customization"] as JSONObject
|
||||
if(custom.containsKey("login_theme")) LOGIN_THEME = custom["login_theme"].toString()
|
||||
|
||||
//Right-click menu customizations
|
||||
if(custom.containsKey("right_click_menu")){
|
||||
val rcm = custom["right_click_menu"] as JSONObject
|
||||
|
||||
//background
|
||||
if(rcm.containsKey("background")){
|
||||
val bg = rcm["background"] as JSONObject
|
||||
if(bg.containsKey("color")) RCM_BG_COLOR = bg["color"].toString().replace("#", "").toIntOrNull(16) ?: 6116423//convert hex -> deci
|
||||
if(bg.containsKey("opacity")) RCM_BG_OPACITY = bg["opacity"].toString().toInt()
|
||||
}
|
||||
|
||||
//title bar
|
||||
if(rcm.containsKey("title_bar")){
|
||||
val tb = rcm["title_bar"] as JSONObject
|
||||
if(tb.containsKey("font_color")) RCM_TITLE = RCM_TITLE.replace("0", tb["font_color"].toString().replace("#", ""))
|
||||
if(tb.containsKey("color")) RCM_TITLE_COLOR = tb["color"].toString().replace("#", "").toIntOrNull(16) ?: 6116423//convert hex -> deci
|
||||
if(tb.containsKey("opacity")) RCM_TITLE_OPACITY = tb["opacity"].toString().toInt()
|
||||
}
|
||||
|
||||
//border
|
||||
if(rcm.containsKey("border")){
|
||||
val border = rcm["border"] as JSONObject
|
||||
if(border.containsKey("color")) RCM_BORDER_COLOR = border["color"].toString().replace("#", "").toIntOrNull(16) ?: 6116423 //convert hex -> deci
|
||||
if(border.containsKey("opacity")) RCM_BORDER_OPACITY = border["opacity"].toString().toInt()
|
||||
}
|
||||
|
||||
//styles (changes how things are drawn)
|
||||
if(rcm.containsKey("styles")){
|
||||
val style = rcm["styles"] as JSONObject
|
||||
if(style.containsKey("presets")) RCM_STYLE_PRESET = style["presets"].toString()
|
||||
if(style.containsKey("rs3border")) RS3_CONTEXT_STYLE = style["rs3border"] as Boolean
|
||||
}
|
||||
}
|
||||
|
||||
if(custom.containsKey("xpdrops")){
|
||||
val xpd = custom["xpdrops"] as JSONObject
|
||||
if(xpd.containsKey("enabled")) xpDropsEnabled = xpd["enabled"] as Boolean
|
||||
if(xpd.containsKey("drop_mode")) xpDropMode = xpd["drop_mode"].toString().toInt()
|
||||
if(xpd.containsKey("track_mode")) xpTrackMode = xpd["track_mode"].toString().toInt()
|
||||
}
|
||||
|
||||
if(custom.containsKey("slayer")){
|
||||
val slayer = custom["slayer"] as JSONObject
|
||||
if(slayer.containsKey("enabled")) slayerCountEnabled = slayer["enabled"] as Boolean
|
||||
if(slayer.containsKey("color")) slayerTrackerColor = slayer["color"].toString().replace("#", "")
|
||||
if(slayer.containsKey("opacity")) slayerTrackerOpacity = slayer["opacity"].toString().toInt()
|
||||
}
|
||||
|
||||
if(custom.containsKey("rendering_options")) {
|
||||
val hdoptions = custom["rendering_options"] as JSONObject
|
||||
|
||||
if(hdoptions.containsKey("technical")) {
|
||||
val renderIncrease = hdoptions["technical"] as JSONObject
|
||||
if(renderIncrease.containsKey("render_distance_increase")) RENDER_DISTANCE_INCREASE = renderIncrease["render_distance_increase"] as Boolean
|
||||
}
|
||||
if(hdoptions.containsKey("skybox")) {
|
||||
val skyboxColor = hdoptions["skybox"] as JSONObject
|
||||
if(skyboxColor.containsKey("skybox_color")) SKYBOX_COLOR
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Parse debug options
|
||||
if(data.containsKey("debug")){
|
||||
val debug = data["debug"] as JSONObject
|
||||
if(debug.containsKey("item_debug")) ITEM_DEBUG_ENABLED = debug["item_debug"] as Boolean
|
||||
if(debug.containsKey("npc_debug")) NPC_DEBUG_ENABLED = debug["npc_debug"] as Boolean
|
||||
if(debug.containsKey("object_debug")) OBJECT_DEBUG_ENABLED = debug["object_debug"] as Boolean
|
||||
if(debug.containsKey("hd_login_region_debug")) HD_LOGIN_DEBUG = debug["hd_login_region_debug"] as Boolean
|
||||
if(debug.containsKey("hd_login_region_debug_verbose")) HD_LOGIN_VERBOSE = debug["hd_login_region_debug_verbose"] as Boolean
|
||||
if(debug.containsKey("cache_debug")) CACHE_DEBUG = debug["cache_debug"] as Boolean
|
||||
if(debug.containsKey("world_map_debug")) WORLD_MAP_DEBUG = debug["world_map_debug"] as Boolean
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Json config Parser
|
||||
* Style Overrides (Still working on this system. We should allow for maximum creativity
|
||||
* The way that it will be setup is a style type 1st
|
||||
* ie, classicbox, rs3, rounded, rounded2
|
||||
* Then we introduce color schemes that a user could select
|
||||
* ie, classic, rs3, alternate, alternate2, custom
|
||||
* @author Woah
|
||||
*/
|
||||
@JvmStatic
|
||||
fun parse(path: String){
|
||||
val reader = FileReader(path)
|
||||
val parser = JSONParser()
|
||||
val data = parser.parse(reader) as JSONObject
|
||||
|
||||
//Networking
|
||||
if(data.containsKey("ip_address")) IP_ADDRESS = data["ip_address"].toString() else IP_ADDRESS = "play.2009scape.org"
|
||||
if(data.containsKey("ip_management")) IP_MANAGEMENT = data["ip_management"].toString() else IP_MANAGEMENT = IP_ADDRESS
|
||||
if(data.containsKey("wl_port")) WL_PORT = data["wl_port"].toString().toInt()
|
||||
if(data.containsKey("server_port")) SERVER_PORT = data["server_port"].toString().toInt()
|
||||
if(data.containsKey("js5_port")) JS5_SERVER_PORT = data["js5_port"].toString().toInt()
|
||||
if(data.containsKey("world")) WORLD = data["world"].toString().toInt()
|
||||
|
||||
//Parse customization options
|
||||
if(data.containsKey("customization")){
|
||||
val custom = data["customization"] as JSONObject
|
||||
if(custom.containsKey("login_theme")) LOGIN_THEME = custom["login_theme"].toString()
|
||||
|
||||
//Right-click menu customizations
|
||||
if(custom.containsKey("right_click_menu")){
|
||||
val rcm = custom["right_click_menu"] as JSONObject
|
||||
|
||||
//background
|
||||
if(rcm.containsKey("background")){
|
||||
val bg = rcm["background"] as JSONObject
|
||||
if(bg.containsKey("color")) RCM_BG_COLOR = bg["color"].toString().replace("#", "").toInt(16) //convert hex -> deci
|
||||
if(bg.containsKey("opacity")) RCM_BG_OPACITY = bg["opacity"].toString().toInt()
|
||||
}
|
||||
|
||||
//title bar
|
||||
if(rcm.containsKey("title_bar")){
|
||||
val tb = rcm["title_bar"] as JSONObject
|
||||
if(tb.containsKey("font_color")) RCM_TITLE = RCM_TITLE.replace("0", tb["font_color"].toString().replace("#", ""))
|
||||
if(tb.containsKey("color")) RCM_TITLE_COLOR = tb["color"].toString().replace("#", "").toInt(16) //convert hex -> deci
|
||||
if(tb.containsKey("opacity")) RCM_TITLE_OPACITY = tb["opacity"].toString().toInt()
|
||||
}
|
||||
|
||||
//border
|
||||
if(rcm.containsKey("border")){
|
||||
val border = rcm["border"] as JSONObject
|
||||
if(border.containsKey("color")) RCM_BORDER_COLOR = border["color"].toString().replace("#", "").toInt(16) //convert hex -> deci
|
||||
if(border.containsKey("opacity")) RCM_BORDER_OPACITY = border["opacity"].toString().toInt()
|
||||
}
|
||||
|
||||
//styles (changes how things are drawn)
|
||||
if(rcm.containsKey("styles")){
|
||||
val style = rcm["styles"] as JSONObject
|
||||
if(style.containsKey("presets")) RCM_STYLE_PRESET = style["presets"].toString()
|
||||
if(style.containsKey("rs3border")) RS3_CONTEXT_STYLE = style["rs3border"] as Boolean
|
||||
}
|
||||
}
|
||||
if(custom.containsKey("rendering_options")) {
|
||||
val hdoptions = custom["rendering_options"] as JSONObject
|
||||
|
||||
if(hdoptions.containsKey("technical")) {
|
||||
val renderIncrease = hdoptions["technical"] as JSONObject
|
||||
if(renderIncrease.containsKey("render_distance_increase")) RENDER_DISTANCE_INCREASE = renderIncrease["render_distance_increase"] as Boolean
|
||||
}
|
||||
if(hdoptions.containsKey("skybox")) {
|
||||
val skyboxColor = hdoptions["skybox"] as JSONObject
|
||||
if(skyboxColor.containsKey("skybox_color")) SKYBOX_COLOR
|
||||
}
|
||||
}
|
||||
when (RCM_STYLE_PRESET) {
|
||||
"classic" -> {
|
||||
RS3_CONTEXT_STYLE = false
|
||||
RCM_BG_COLOR = 6116423
|
||||
RCM_BG_OPACITY = 255
|
||||
RCM_TITLE = "<col=5d5447>Choose Option</col>"
|
||||
RCM_TITLE_COLOR = 0
|
||||
RCM_TITLE_OPACITY = 255
|
||||
RCM_BORDER_COLOR = 0
|
||||
RCM_BORDER_OPACITY = 255
|
||||
}
|
||||
|
||||
//Parse debug options
|
||||
if(data.containsKey("debug")){
|
||||
val debug = data["debug"] as JSONObject
|
||||
if(debug.containsKey("item_debug")) ITEM_DEBUG_ENABLED = debug["item_debug"] as Boolean
|
||||
if(debug.containsKey("npc_debug")) NPC_DEBUG_ENABLED = debug["npc_debug"] as Boolean
|
||||
if(debug.containsKey("object_debug")) OBJECT_DEBUG_ENABLED = debug["object_debug"] as Boolean
|
||||
if(debug.containsKey("hd_login_region_debug")) HD_LOGIN_DEBUG = debug["hd_login_region_debug"] as Boolean
|
||||
if(debug.containsKey("hd_login_region_debug_verbose")) HD_LOGIN_VERBOSE = debug["hd_login_region_debug_verbose"] as Boolean
|
||||
if(debug.containsKey("cache_debug")) CACHE_DEBUG = debug["cache_debug"] as Boolean
|
||||
if(debug.containsKey("world_map_debug")) WORLD_MAP_DEBUG = debug["world_map_debug"] as Boolean
|
||||
"rs3" -> {
|
||||
RS3_CONTEXT_STYLE = true
|
||||
RCM_BG_COLOR = 662822
|
||||
RCM_BG_OPACITY = 255
|
||||
RCM_TITLE = "<col=C6B895>Choose Option</col>"
|
||||
RCM_TITLE_COLOR = 1512718
|
||||
RCM_TITLE_OPACITY = 165
|
||||
RCM_BORDER_COLOR = 16777215
|
||||
RCM_BORDER_OPACITY = 255
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Style Overrides (Still working on this system. We should allow for maximum creativity
|
||||
* The way that it will be setup is a style type 1st
|
||||
* ie, classicbox, rs3, rounded, rounded2
|
||||
* Then we introduce color schemes that a user could select
|
||||
* ie, classic, rs3, alternate, alternate2, custom
|
||||
* @author Woah
|
||||
}
|
||||
|
||||
fun extendRenderDistance() {
|
||||
if (RENDER_DISTANCE_INCREASE) {
|
||||
/** **DO NOT CHANGE THESE NUMBERS UNLESS YOU KNOW WHAT YOU ARE DOING**
|
||||
* Render Distance Overrides
|
||||
*
|
||||
* (Simple formula) Tile amount * 512
|
||||
* Default: 7 * 512 = 3584
|
||||
* Extended(max): 56 * 512 = 28672
|
||||
*
|
||||
* Files + methods effected by these values:
|
||||
* HDToolKit METHOD viewport
|
||||
* Class140_Sub1_Sub1 METHOD animate
|
||||
* Class3_Sub22 METHOD method398 * value as short
|
||||
* Class40 METHOD method1046 * using RENDER_DISTANCE_TILE_VALUE
|
||||
*/
|
||||
when (RCM_STYLE_PRESET) {
|
||||
"classic" -> {
|
||||
RS3_CONTEXT_STYLE = false
|
||||
RCM_BG_COLOR = 6116423
|
||||
RCM_BG_OPACITY = 255
|
||||
RCM_TITLE = "<col=5d5447>Choose Option</col>"
|
||||
RCM_TITLE_COLOR = 0
|
||||
RCM_TITLE_OPACITY = 255
|
||||
RCM_BORDER_COLOR = 0
|
||||
RCM_BORDER_OPACITY = 255
|
||||
}
|
||||
"rs3" -> {
|
||||
RS3_CONTEXT_STYLE = true
|
||||
RCM_BG_COLOR = 662822
|
||||
RCM_BG_OPACITY = 255
|
||||
RCM_TITLE = "<col=C6B895>Choose Option</col>"
|
||||
RCM_TITLE_COLOR = 1512718
|
||||
RCM_TITLE_OPACITY = 165
|
||||
RCM_BORDER_COLOR = 16777215
|
||||
RCM_BORDER_OPACITY = 255
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RENDER_DISTANCE_VALUE = if (RENDER_DISTANCE_INCREASE) 28672F else 3584.0f
|
||||
RENDER_DISTANCE_TILE_VALUE = if (RENDER_DISTANCE_INCREASE) 56 else 28
|
||||
RENDER_DISTANCE_FOG_FIX = if (RENDER_DISTANCE_INCREASE) 28672F else 3328.0f
|
||||
}
|
||||
}
|
||||
|
||||
fun extendRenderDistance() {
|
||||
if (RENDER_DISTANCE_INCREASE) {
|
||||
/** **DO NOT CHANGE THESE NUMBERS UNLESS YOU KNOW WHAT YOU ARE DOING**
|
||||
* Render Distance Overrides
|
||||
*
|
||||
* (Simple formula) Tile amount * 512
|
||||
* Default: 7 * 512 = 3584
|
||||
* Extended(max): 56 * 512 = 28672
|
||||
*
|
||||
* Files + methods effected by these values:
|
||||
* HDToolKit METHOD viewport
|
||||
* Class140_Sub1_Sub1 METHOD animate
|
||||
* Class3_Sub22 METHOD method398 * value as short
|
||||
* Class40 METHOD method1046 * using RENDER_DISTANCE_TILE_VALUE
|
||||
*/
|
||||
RENDER_DISTANCE_VALUE = if (RENDER_DISTANCE_INCREASE) 28672F else 3584.0f
|
||||
RENDER_DISTANCE_TILE_VALUE = if (RENDER_DISTANCE_INCREASE) 56 else 28
|
||||
RENDER_DISTANCE_FOG_FIX = if (RENDER_DISTANCE_INCREASE) 28672F else 3328.0f
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Client Info
|
||||
* Not Editable
|
||||
*/
|
||||
@JvmField
|
||||
var CLIENT_BUILD = 530
|
||||
|
||||
/**
|
||||
* Client Info
|
||||
* Not Editable
|
||||
*/
|
||||
@JvmField
|
||||
var CLIENT_BUILD = 530
|
||||
@JvmField
|
||||
var CLIENT_VERSION = 1
|
||||
|
||||
@JvmField
|
||||
var CLIENT_VERSION = 1
|
||||
@JvmField
|
||||
var PACKAGE_NAME = "org.runite.client"
|
||||
|
||||
@JvmField
|
||||
var PACKAGE_NAME = "org.runite.client"
|
||||
@JvmField
|
||||
var RSA = true
|
||||
|
||||
@JvmField
|
||||
var RSA = true
|
||||
@JvmField
|
||||
var ISAAC = false
|
||||
|
||||
@JvmField
|
||||
var ISAAC = false
|
||||
@JvmField
|
||||
var EXPONENT = BigInteger("65537")
|
||||
|
||||
@JvmField
|
||||
var EXPONENT = BigInteger("65537")
|
||||
@JvmField
|
||||
var MODULUS = BigInteger("96982303379631821170939875058071478695026608406924780574168393250855797534862289546229721580153879336741968220328805101128831071152160922518190059946555203865621183480223212969502122536662721687753974815205744569357388338433981424032996046420057284324856368815997832596174397728134370577184183004453899764051")
|
||||
|
||||
@JvmField
|
||||
var MODULUS = BigInteger("96982303379631821170939875058071478695026608406924780574168393250855797534862289546229721580153879336741968220328805101128831071152160922518190059946555203865621183480223212969502122536662721687753974815205744569357388338433981424032996046420057284324856368815997832596174397728134370577184183004453899764051")
|
||||
@JvmField
|
||||
var SERVER_NAME = "2009scape"
|
||||
|
||||
@JvmField
|
||||
var SERVER_NAME = "2009scape"
|
||||
/**
|
||||
* Path to config
|
||||
*/
|
||||
@JvmField
|
||||
var configLocation = "config.json"
|
||||
|
||||
/**
|
||||
* Path to config
|
||||
*/
|
||||
@JvmField
|
||||
var configLocation = "config.json"
|
||||
/**
|
||||
* Holiday Event Toggles
|
||||
*/
|
||||
@JvmField
|
||||
var HOLIDAYS_ENABLED = true
|
||||
|
||||
/**
|
||||
* Holiday Event Toggles
|
||||
*/
|
||||
@JvmField
|
||||
var HOLIDAYS_ENABLED = true
|
||||
@JvmField
|
||||
var EASTER_EVENT_ENABLED = false
|
||||
/**
|
||||
* Halloween event NPC Definitions are handled inside of NPCDefinition.java
|
||||
*/
|
||||
@JvmField
|
||||
var HALLOWEEN_EVENT_ENABLED = false
|
||||
|
||||
@JvmField
|
||||
var EASTER_EVENT_ENABLED = false
|
||||
/**
|
||||
* Halloween event NPC Definitions are handled inside of NPCDefinition.java
|
||||
*/
|
||||
@JvmField
|
||||
var HALLOWEEN_EVENT_ENABLED = false
|
||||
@JvmField
|
||||
var THANKSGIVING_EVENT_ENABLED = false
|
||||
|
||||
@JvmField
|
||||
var THANKSGIVING_EVENT_ENABLED = false
|
||||
@JvmField
|
||||
var CHRISTMAS_EVENT_ENABLED = false
|
||||
|
||||
@JvmField
|
||||
var CHRISTMAS_EVENT_ENABLED = false
|
||||
private val calendar: Calendar = Calendar.getInstance()
|
||||
private val month = calendar.get(Calendar.MONTH)
|
||||
private val day = calendar.get(Calendar.DAY_OF_MONTH)
|
||||
|
||||
private val calendar: Calendar = Calendar.getInstance()
|
||||
private val month = calendar.get(Calendar.MONTH)
|
||||
private val day = calendar.get(Calendar.DAY_OF_MONTH)
|
||||
|
||||
@JvmStatic
|
||||
fun implementHoliday() {
|
||||
if (HOLIDAYS_ENABLED) {
|
||||
when (month) {
|
||||
3 -> {
|
||||
if (day <= 8) {
|
||||
EASTER_EVENT_ENABLED = true
|
||||
}
|
||||
@JvmStatic
|
||||
fun implementHoliday() {
|
||||
if (HOLIDAYS_ENABLED) {
|
||||
when (month) {
|
||||
3 -> {
|
||||
if (day <= 8) {
|
||||
EASTER_EVENT_ENABLED = true
|
||||
}
|
||||
9 -> HALLOWEEN_EVENT_ENABLED = true
|
||||
10 -> THANKSGIVING_EVENT_ENABLED = true
|
||||
11 -> CHRISTMAS_EVENT_ENABLED = true
|
||||
}
|
||||
9 -> HALLOWEEN_EVENT_ENABLED = true
|
||||
10 -> THANKSGIVING_EVENT_ENABLED = true
|
||||
11 -> CHRISTMAS_EVENT_ENABLED = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
Client/src/main/resources/lib/jogl_32.dll
Normal file
BIN
Client/src/main/resources/lib/jogl_32.dll
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/jogl_64.dll
Normal file
BIN
Client/src/main/resources/lib/jogl_64.dll
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/jogl_awt_32.dll
Normal file
BIN
Client/src/main/resources/lib/jogl_awt_32.dll
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/jogl_awt_64.dll
Normal file
BIN
Client/src/main/resources/lib/jogl_awt_64.dll
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/libgluegen-rt_32.so
Normal file
BIN
Client/src/main/resources/lib/libgluegen-rt_32.so
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/libgluegen-rt_64.so
Normal file
BIN
Client/src/main/resources/lib/libgluegen-rt_64.so
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/libjogl.jnilib
Normal file
BIN
Client/src/main/resources/lib/libjogl.jnilib
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/libjogl_32.so
Normal file
BIN
Client/src/main/resources/lib/libjogl_32.so
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/libjogl_64.so
Normal file
BIN
Client/src/main/resources/lib/libjogl_64.so
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/libjogl_awt.jnilib
Normal file
BIN
Client/src/main/resources/lib/libjogl_awt.jnilib
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/libjogl_awt_32.so
Normal file
BIN
Client/src/main/resources/lib/libjogl_awt_32.so
Normal file
Binary file not shown.
BIN
Client/src/main/resources/lib/libjogl_awt_64.so
Normal file
BIN
Client/src/main/resources/lib/libjogl_awt_64.so
Normal file
Binary file not shown.
|
|
@ -10,6 +10,6 @@
|
|||
"WorldTechnicalInformation": {
|
||||
"world_limit": "10",
|
||||
"worldhop_delay": "20000"
|
||||
}
|
||||
|
||||
},
|
||||
"secret_key": "2009scape_development"
|
||||
}
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
package ms;
|
||||
|
||||
import ms.classloader.ClassLoadServer;
|
||||
import ms.net.NioReactor;
|
||||
import ms.net.packet.IoBuffer;
|
||||
import ms.net.packet.PacketHeader;
|
||||
import ms.net.packet.WorldPacketRepository;
|
||||
import ms.system.ShutdownSequence;
|
||||
import ms.system.mysql.SQLManager;
|
||||
|
|
@ -13,8 +14,10 @@ import ms.world.WorldDatabase;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.InetAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
|
|
@ -98,7 +101,6 @@ public final class Management {
|
|||
new Command("-rlcache", "Reloads launcher/client resource cache") {
|
||||
@Override
|
||||
public void run(String... args) {
|
||||
ClassLoadServer.resetResourceCache();
|
||||
System.out.println("Reloaded resource cache!");
|
||||
}
|
||||
},
|
||||
|
|
@ -116,6 +118,27 @@ public final class Management {
|
|||
player.setWorldId(0);
|
||||
System.out.println("Kicked player " + name + "!");
|
||||
}
|
||||
},
|
||||
|
||||
new Command("-say", "Send a message to all worlds") {
|
||||
@Override
|
||||
public void run(String... args) {
|
||||
String message = String.join(" ", args);
|
||||
message = message.substring(4);
|
||||
for(GameServer server : WorldDatabase.getWorlds()){
|
||||
if(server == null) continue;
|
||||
String finalMessage = message;
|
||||
server.getPlayers().forEach((String uname, PlayerSession p) -> {
|
||||
IoBuffer buffer = new IoBuffer(5, PacketHeader.BYTE);
|
||||
buffer.putString(p.getUsername());
|
||||
buffer.putString("Server");
|
||||
buffer.put(2);
|
||||
buffer.put(2);
|
||||
buffer.putString(finalMessage);
|
||||
p.getWorld().getSession().write(buffer);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -134,11 +157,10 @@ public final class Management {
|
|||
SQLManager.init();
|
||||
//NioReactor.configure(ServerConstants.PORT).start();
|
||||
NioReactor.configure(5555).start();
|
||||
new ClassLoadServer().start();
|
||||
Runtime.getRuntime().addShutdownHook(new ShutdownSequence());
|
||||
System.out.println("Status: ready.");
|
||||
System.out.println("Use -commands for a list of commands!");
|
||||
Scanner s = new Scanner(System.in);
|
||||
Scanner s = new Scanner(new InputStreamReader(System.in, StandardCharsets.UTF_8));
|
||||
while (s.hasNext()) {
|
||||
try {
|
||||
String command = s.nextLine();
|
||||
|
|
|
|||
|
|
@ -29,18 +29,6 @@ public final class ServerConstants {
|
|||
*/
|
||||
public static final OperatingSystem OS = System.getProperty("os.name").toUpperCase().contains("WIN") ? OperatingSystem.WINDOWS : OperatingSystem.UNIX;
|
||||
|
||||
/**
|
||||
* The administrators.
|
||||
*/
|
||||
public static final String[] ADMINISTRATORS = {
|
||||
"redsparr0w",
|
||||
};
|
||||
|
||||
public static final String[] DATABASE_NAMES = {
|
||||
"server",
|
||||
"global",
|
||||
};
|
||||
|
||||
/**
|
||||
* Stops from instantiating.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,109 +0,0 @@
|
|||
package ms.classloader;
|
||||
|
||||
import ms.Management;
|
||||
import ms.ServerConstants;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* ClassLoadServer
|
||||
* @author Clayton Williams (Hope)
|
||||
*/
|
||||
public class ClassLoadServer extends Thread {
|
||||
|
||||
/**
|
||||
* Listening port
|
||||
*/
|
||||
private static final int PORT = 5050;
|
||||
|
||||
/**
|
||||
* serverSocket for incoming connections
|
||||
*/
|
||||
private ServerSocket serverSocket = null;
|
||||
|
||||
/**
|
||||
* Holds classes and resources already added in the server
|
||||
*/
|
||||
protected static HashMap<String, byte[]> resourceCache = new HashMap<String, byte[]>();
|
||||
|
||||
/**
|
||||
* New socket
|
||||
* @throws UnknownHostException
|
||||
* @throws IOException
|
||||
*/
|
||||
public ClassLoadServer() {
|
||||
try {
|
||||
serverSocket = new ServerSocket(PORT);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Listen for incoming connections
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
resetResourceCache();
|
||||
// System.out.println("Listening on port " + PORT + "...");
|
||||
while (Management.active) {
|
||||
Socket clientSocket = null;
|
||||
try {
|
||||
clientSocket = serverSocket.accept();
|
||||
//System.out.println("New Connection from : " + clientSocket.getInetAddress());
|
||||
WorkerThread wcs = new WorkerThread(clientSocket);
|
||||
wcs.start();
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads resources recursively from a starting root directory and adds the file bytes to our cache
|
||||
* @param path
|
||||
* @param pathRoot
|
||||
*/
|
||||
private static void loadResources(String path, String pathRoot) {
|
||||
try {
|
||||
path = ServerConstants.fixPath(null, path);
|
||||
pathRoot = ServerConstants.fixPath(null, pathRoot);
|
||||
File root = new File(path);
|
||||
File[] list = root.listFiles();
|
||||
if (list == null) return;
|
||||
for (File f : list) {
|
||||
if (f.isDirectory()) {
|
||||
loadResources(f.getAbsolutePath(), pathRoot);
|
||||
} else {
|
||||
if (f.exists()) {
|
||||
if (!f.getName().startsWith(".")) {
|
||||
byte[] bytes = Files.readAllBytes(f.toPath());
|
||||
String name = ServerConstants.fixPath(null, f.getAbsolutePath().substring(f.getAbsolutePath().lastIndexOf(pathRoot)));
|
||||
//System.out.println("[ClassLoadServer] Loaded resource '" + f.getName() +
|
||||
// "' Size: " + NumberFormat.getInstance().format(bytes.length) + " bytes");
|
||||
resourceCache.put(name, bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Empties the class cache and loads resources
|
||||
*/
|
||||
public static void resetResourceCache() {
|
||||
resourceCache.clear();
|
||||
//loadResources("bin/org/keldagrim/launcher/", "org/arios/launcher/");
|
||||
//loadResources("resources/", "org/keldagrim/launcher/");
|
||||
//System.out.println("Loaded all resources!");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
package ms.classloader;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.net.Socket;
|
||||
import java.util.Map;
|
||||
|
||||
import ms.ServerConstants;
|
||||
import ms.system.OperatingSystem;
|
||||
|
||||
/**
|
||||
* Worker thread for launcher connections
|
||||
* @author Clayton Williams (Hope)
|
||||
*
|
||||
*/
|
||||
public class WorkerThread extends Thread {
|
||||
|
||||
/**
|
||||
* Our launcher connection
|
||||
*/
|
||||
private Socket launcher = null;
|
||||
|
||||
/**
|
||||
* Input stream from launcher
|
||||
*/
|
||||
private ObjectInputStream is = null;
|
||||
|
||||
/**
|
||||
* Output stream to launcher
|
||||
*/
|
||||
private ObjectOutputStream os = null;
|
||||
|
||||
/**
|
||||
* The user's operating system type
|
||||
*/
|
||||
private OperatingSystem operatingSystem = OperatingSystem.WINDOWS;
|
||||
|
||||
/**
|
||||
* Creates a new worker thread to handle the launcher requests
|
||||
* @param socket
|
||||
* @param classesCache
|
||||
* @throws IOException
|
||||
*/
|
||||
public WorkerThread(Socket launcher) throws IOException {
|
||||
super();
|
||||
this.launcher = launcher;
|
||||
try {
|
||||
os = new ObjectOutputStream(new BufferedOutputStream(this.launcher.getOutputStream()));
|
||||
os.flush();
|
||||
is = new ObjectInputStream(new BufferedInputStream(launcher.getInputStream()));
|
||||
} catch (IOException ioe) {
|
||||
this.launcher.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Input Stream handler
|
||||
*/
|
||||
@SuppressWarnings("unused") //saving resource type for later
|
||||
public void run() {
|
||||
byte opcode = -1;
|
||||
try {
|
||||
while (true) {
|
||||
opcode = is.readByte();
|
||||
switch(opcode) {
|
||||
case 1: //requests revision
|
||||
operatingSystem = is.readUTF().contains("UNIX") ? OperatingSystem.UNIX : OperatingSystem.WINDOWS;
|
||||
os.reset();
|
||||
os.writeInt(ClassLoadServer.resourceCache.size());//#customresources
|
||||
for (Map.Entry<String, byte[]> hm : ClassLoadServer.resourceCache.entrySet()) {
|
||||
os.writeUTF(ServerConstants.fixPath(operatingSystem, (String) hm.getKey()));
|
||||
os.writeInt(hm.getValue().length);
|
||||
}
|
||||
os.writeByte(1); //number of custom resources
|
||||
//followed by 2 strings
|
||||
//System.err.println(operatingSystem.name());
|
||||
os.writeUTF(ServerConstants.fixPath(operatingSystem, "ms/launcher/arios-gamepack-530.jar"));
|
||||
os.writeUTF("BINARY");
|
||||
os.flush();
|
||||
break;
|
||||
case 2: //resource request
|
||||
String resourceName = ServerConstants.fixPath(null, is.readUTF());
|
||||
String resourceType = is.readUTF();
|
||||
if (ClassLoadServer.resourceCache.containsKey(resourceName)) {
|
||||
sendResource(ClassLoadServer.resourceCache.get(resourceName));
|
||||
//System.out.println("Sent Resource: " + resourceName);
|
||||
} else {
|
||||
sendOpcode(-1);
|
||||
//System.out.println("Could not send resource '" + resourceName + "'");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
System.out.println("Unhandled opcode=" + opcode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
//System.out.println("Client force disconnect.");
|
||||
} finally {
|
||||
try {
|
||||
is.close();
|
||||
os.close();
|
||||
launcher.close();
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* send a byte array packet to the client
|
||||
* @exception IOException file read error.
|
||||
*/
|
||||
protected void sendResource(byte [] bytes) throws IOException {
|
||||
os.reset();
|
||||
os.writeByte(2);
|
||||
os.writeInt(bytes.length);
|
||||
for (int i = 0; i < bytes.length; i++) {
|
||||
os.writeByte(bytes[i]);
|
||||
}
|
||||
os.flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Send no data opcodes
|
||||
* @param opcode
|
||||
* @throws IOException
|
||||
*/
|
||||
protected void sendOpcode(int opcode) throws IOException {
|
||||
os.reset();
|
||||
os.writeByte(opcode);
|
||||
os.flush();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -67,6 +67,10 @@ public final class IoEventHandler {
|
|||
ByteBuffer buffer = ByteBuffer.allocate(100_000);
|
||||
IoSession session = (IoSession) key.attachment();
|
||||
if (channel.read(buffer) == -1) {
|
||||
if(session == null){
|
||||
key.cancel();
|
||||
return;
|
||||
}
|
||||
if(session.getGameServer() != null){
|
||||
WorldDatabase.unRegister(session.getGameServer());
|
||||
}
|
||||
|
|
@ -87,8 +91,10 @@ public final class IoEventHandler {
|
|||
*/
|
||||
public void write(SelectionKey key) {
|
||||
IoSession session = (IoSession) key.attachment();
|
||||
key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE);
|
||||
session.write();
|
||||
if(session != null) {
|
||||
key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE);
|
||||
session.write();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -137,15 +137,15 @@ public class IoSession {
|
|||
*/
|
||||
public void queue(ByteBuffer buffer) {
|
||||
try {
|
||||
writingLock.tryLock(1000L, TimeUnit.MILLISECONDS);
|
||||
if(writingLock.tryLock(1000L, TimeUnit.MILLISECONDS)){
|
||||
writingQueue.add(buffer);
|
||||
writingLock.unlock();
|
||||
write();
|
||||
}
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
writingLock.unlock();
|
||||
return;
|
||||
}
|
||||
writingQueue.add(buffer);
|
||||
writingLock.unlock();
|
||||
write();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -170,8 +170,9 @@ public class IoSession {
|
|||
}
|
||||
} catch (IOException e) {
|
||||
disconnect();
|
||||
} finally {
|
||||
writingLock.unlock();
|
||||
}
|
||||
writingLock.unlock();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ public final class NioReactor implements Runnable {
|
|||
SelectionKey key = keys.next();
|
||||
keys.remove();
|
||||
try {
|
||||
if(key == null) continue;
|
||||
if (!key.isValid() || !key.channel().isOpen()) {
|
||||
key.cancel();
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import java.nio.ByteBuffer;
|
|||
|
||||
import ms.net.IoReadEvent;
|
||||
import ms.net.IoSession;
|
||||
import ms.system.util.ManagementConstants;
|
||||
import ms.world.WorldDatabase;
|
||||
import ms.system.util.ByteBufferUtils;
|
||||
|
||||
|
|
@ -12,11 +13,6 @@ import ms.system.util.ByteBufferUtils;
|
|||
* @author Emperor
|
||||
*/
|
||||
public final class HSReadEvent extends IoReadEvent {
|
||||
|
||||
/**
|
||||
* The password used to verify
|
||||
*/
|
||||
private static final String PASSWORD = "0x14ari0SSbh98989910";
|
||||
|
||||
/**
|
||||
* Constructs a new {@code HSReadEvent}.
|
||||
|
|
@ -33,7 +29,7 @@ public final class HSReadEvent extends IoReadEvent {
|
|||
switch (opcode) {
|
||||
case 88:
|
||||
String password = ByteBufferUtils.getString(buffer);
|
||||
if (!password.equals(PASSWORD)) {
|
||||
if (!password.equals(ManagementConstants.getSECRET_KEY())) {
|
||||
System.out.println("Password mismatch (attempt=" + password + ")!");
|
||||
session.disconnect();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package ms.net.packet;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import ms.system.util.ByteBufferUtils;
|
||||
|
||||
|
|
@ -301,7 +302,7 @@ public class IoBuffer {
|
|||
* @return
|
||||
*/
|
||||
public IoBuffer putString(String val) {
|
||||
buf.put(val.getBytes());
|
||||
buf.put(val.getBytes(StandardCharsets.UTF_8));
|
||||
buf.put((byte) 0);
|
||||
return this;
|
||||
}
|
||||
|
|
@ -313,7 +314,7 @@ public class IoBuffer {
|
|||
*/
|
||||
public IoBuffer putJagString(String val) {
|
||||
buf.put((byte) 0);
|
||||
buf.put(val.getBytes());
|
||||
buf.put(val.getBytes(StandardCharsets.UTF_8));
|
||||
buf.put((byte) 0);
|
||||
return this;
|
||||
}
|
||||
|
|
@ -546,7 +547,7 @@ public class IoBuffer {
|
|||
long second = getIntB();
|
||||
if (second < 0)
|
||||
second = second & 0xffffffffL;
|
||||
return (first << -41780448) + second;
|
||||
return (first << 32) + second;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -557,18 +558,6 @@ public class IoBuffer {
|
|||
return buf.getLong();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getSmart() {
|
||||
int peek = buf.get(buf.position());
|
||||
if (peek <= Byte.MAX_VALUE) {
|
||||
return buf.get() & 0xFF;
|
||||
}
|
||||
return (buf.getShort() & 0xFFFF) - 32768;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
|
@ -578,7 +567,7 @@ public class IoBuffer {
|
|||
if (peek <= Short.MAX_VALUE) {
|
||||
return buf.getShort() & 0xFFFF;
|
||||
}
|
||||
return (buf.getInt() & 0xFFFFFFFF) - 32768;
|
||||
return buf.getInt() - 32768;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import ms.system.PunishmentStorage
|
|||
import ms.system.communication.ClanRank
|
||||
import ms.system.communication.ClanRepository
|
||||
import ms.system.communication.CommunicationInfo
|
||||
import ms.system.util.ManagementConstants.Companion.WORLD_HOP_DELAY
|
||||
import ms.system.util.ManagementConstants.WORLD_HOP_DELAY
|
||||
import ms.world.GameServer
|
||||
import ms.world.PlayerSession
|
||||
import ms.world.WorldDatabase
|
||||
|
|
@ -42,7 +42,7 @@ object WorldPacketRepository {
|
|||
* @param message The message to send.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun sendPlayerMessage(player: PlayerSession?, message: String?) {
|
||||
fun sendPlayerMessage(player: PlayerSession?, message: String) {
|
||||
if (player == null) {
|
||||
return
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ object WorldPacketRepository {
|
|||
player.world.session.write(buffer)
|
||||
}
|
||||
|
||||
fun sendPlayerMessage(player: PlayerSession?, messages: Array<String?>) {
|
||||
fun sendPlayerMessage(player: PlayerSession?, messages: Array<String>) {
|
||||
if (player == null) {
|
||||
return
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ object WorldPacketRepository {
|
|||
@JvmStatic
|
||||
fun sendContactUpdate(
|
||||
player: PlayerSession,
|
||||
contact: String?,
|
||||
contact: String,
|
||||
block: Boolean,
|
||||
remove: Boolean,
|
||||
worldId: Int,
|
||||
|
|
@ -127,7 +127,7 @@ object WorldPacketRepository {
|
|||
* @param type The message type.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun sendMessage(player: PlayerSession, p: PlayerSession, type: Int, message: String?) {
|
||||
fun sendMessage(player: PlayerSession, p: PlayerSession, type: Int, message: String) {
|
||||
val buffer = IoBuffer(5, PacketHeader.BYTE)
|
||||
buffer.putString(player.username)
|
||||
buffer.putString(p.username)
|
||||
|
|
@ -184,7 +184,7 @@ object WorldPacketRepository {
|
|||
* @param names The names.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun notifyPlayers(server: GameServer, player: PlayerSession, names: List<String?>) {
|
||||
fun notifyPlayers(server: GameServer, player: PlayerSession, names: List<String>) {
|
||||
val buffer = IoBuffer(8, PacketHeader.SHORT)
|
||||
buffer.putString(player.username)
|
||||
buffer.put(player.worldId)
|
||||
|
|
@ -227,7 +227,7 @@ object WorldPacketRepository {
|
|||
* @param duration The duration of the punishment.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun sendPunishUpdate(world: GameServer, key: String?, type: Int, duration: Long) {
|
||||
fun sendPunishUpdate(world: GameServer, key: String, type: Int, duration: Long) {
|
||||
val buffer = IoBuffer(11, PacketHeader.BYTE)
|
||||
buffer.putString(key)
|
||||
buffer.put(type)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public final class PunishmentStorage {
|
|||
return;
|
||||
}
|
||||
long end = Long.MAX_VALUE;
|
||||
if (duration != -1l && duration != 0L) {
|
||||
if (duration != -1L && duration != 0L) {
|
||||
end = System.currentTimeMillis() + duration;
|
||||
} else if (duration == 0L) {
|
||||
end = 0L;
|
||||
|
|
@ -79,8 +79,9 @@ public final class PunishmentStorage {
|
|||
e.printStackTrace();
|
||||
SQLManager.close(connection);
|
||||
return;
|
||||
} finally {
|
||||
SQLManager.close(connection);
|
||||
}
|
||||
SQLManager.close(connection);
|
||||
return;
|
||||
case 2:
|
||||
ban(player.getIpAddress(), type);
|
||||
|
|
@ -152,8 +153,9 @@ public final class PunishmentStorage {
|
|||
e.printStackTrace();
|
||||
SQLManager.close(connection);
|
||||
return false;
|
||||
} finally {
|
||||
SQLManager.close(connection);
|
||||
}
|
||||
SQLManager.close(connection);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -175,8 +177,9 @@ public final class PunishmentStorage {
|
|||
e.printStackTrace();
|
||||
SQLManager.close(connection);
|
||||
return false;
|
||||
} finally {
|
||||
SQLManager.close(connection);
|
||||
}
|
||||
SQLManager.close(connection);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -239,8 +242,9 @@ public final class PunishmentStorage {
|
|||
e.printStackTrace();
|
||||
SQLManager.close(connection);
|
||||
return false;
|
||||
} finally {
|
||||
SQLManager.close(connection);
|
||||
}
|
||||
SQLManager.close(connection);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -252,9 +256,9 @@ public final class PunishmentStorage {
|
|||
private static String getDuration(long end) {
|
||||
String time = "indefinite time";
|
||||
if (end != Long.MAX_VALUE) {
|
||||
int days = (int) ((end -= System.currentTimeMillis()) / (24 * 60 * 60_000));
|
||||
int hours = (int) ((end -= (days * 24 * 60 * 60_000)) / (60 * 60_000));
|
||||
int minutes = (int) ((end -= (hours * (60 * 60_000))) / 60_000);
|
||||
int days = (int) ((System.currentTimeMillis()) / (24 * 60 * 60_000));
|
||||
int hours = (int) (((24L * days * 60 * 60_000)) / (60 * 60_000));
|
||||
int minutes = (int) (((hours * (60 * 60_000))) / 60_000);
|
||||
time = days + "d, " + hours + "h, " + minutes + "m";
|
||||
}
|
||||
return time;
|
||||
|
|
|
|||
|
|
@ -12,10 +12,7 @@ import java.nio.ByteBuffer;
|
|||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
|
|
@ -141,14 +138,20 @@ public final class CommunicationInfo {
|
|||
public void save(PreparedStatement statement) throws SQLException {
|
||||
String contacts = "";
|
||||
String blocked = "";
|
||||
StringBuilder blockedBuilder = new StringBuilder();
|
||||
for (int i = 0; i < this.blocked.size(); i++) {
|
||||
blocked += (i == 0 ? "" : ",") + this.blocked.get(i);
|
||||
String blockline = (i == 0 ? "" : ",") + this.blocked.get(i);
|
||||
blockedBuilder.append(blockline);
|
||||
}
|
||||
blocked = blockedBuilder.toString();
|
||||
int count = 0;
|
||||
StringBuilder contactBuilder = new StringBuilder();
|
||||
for (Entry<String, ClanRank> entry : this.contacts.entrySet()) {
|
||||
contacts += "{" + entry.getKey() + "," + entry.getValue().ordinal() + "}" + (count == this.contacts.size() - 1 ? "" : "~");
|
||||
String contactLine = "{" + entry.getKey() + "," + entry.getValue().ordinal() + "}" + (count == this.contacts.size() - 1 ? "" : "~");
|
||||
contactBuilder.append(contactLine);
|
||||
count++;
|
||||
}
|
||||
contacts = contactBuilder.toString();
|
||||
statement.setString(3, contacts);
|
||||
statement.setString(4, blocked);
|
||||
statement.setString(5, clanName);
|
||||
|
|
@ -178,9 +181,7 @@ public final class CommunicationInfo {
|
|||
String bl = set.getString("blocked");
|
||||
if (bl != null && !bl.isEmpty()) {
|
||||
tokens = bl.split(",");
|
||||
for (String name : tokens) {
|
||||
blocked.add(name);
|
||||
}
|
||||
blocked.addAll(Arrays.asList(tokens));
|
||||
}
|
||||
clanName = set.getString("clanName");
|
||||
currentClan = set.getString("currentClan");
|
||||
|
|
@ -211,6 +212,8 @@ public final class CommunicationInfo {
|
|||
case 3:
|
||||
lootRequirement = rank;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -228,6 +231,9 @@ public final class CommunicationInfo {
|
|||
case 2:
|
||||
tradeSetting = Integer.parseInt(tokens[2]);
|
||||
break;
|
||||
default:
|
||||
System.out.println("Illegal arg count in chatsetting string: " + chatSettings);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -239,9 +245,9 @@ public final class CommunicationInfo {
|
|||
*/
|
||||
public void save(ByteBuffer buffer) {
|
||||
buffer.put((byte) contacts.size());
|
||||
for (String name : contacts.keySet()) {
|
||||
ByteBufferUtils.putString(name, buffer);
|
||||
buffer.put((byte) contacts.get(name).ordinal());
|
||||
for(Entry<String,ClanRank> contact : contacts.entrySet()){
|
||||
ByteBufferUtils.putString(contact.getKey(), buffer);
|
||||
buffer.put((byte) contact.getValue().ordinal());
|
||||
}
|
||||
buffer.put((byte) blocked.size());
|
||||
for (String name : blocked) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package ms.system.mysql
|
||||
|
||||
import ms.system.util.ManagementConstants
|
||||
import ms.system.util.ManagementConstants.Companion.DATABASE_HOST_ADDRESS
|
||||
import ms.system.util.ManagementConstants.Companion.DATABASE_NAME
|
||||
import ms.system.util.ManagementConstants.Companion.DATABASE_PASSWORD
|
||||
import ms.system.util.ManagementConstants.Companion.DATABASE_PORT
|
||||
import ms.system.util.ManagementConstants.Companion.DATABASE_USERNAME
|
||||
import ms.system.util.ManagementConstants.DATABASE_HOST_ADDRESS
|
||||
import ms.system.util.ManagementConstants.DATABASE_NAME
|
||||
import ms.system.util.ManagementConstants.DATABASE_PASSWORD
|
||||
import ms.system.util.ManagementConstants.DATABASE_PORT
|
||||
import ms.system.util.ManagementConstants.DATABASE_USERNAME
|
||||
import java.sql.Connection
|
||||
import java.sql.DriverManager
|
||||
import java.sql.SQLException
|
||||
|
|
|
|||
|
|
@ -52,12 +52,4 @@ public final class SQLTable {
|
|||
return updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the columns.
|
||||
* @return The columns.
|
||||
*/
|
||||
public SQLColumn[] getColumns() {
|
||||
return columns;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -31,12 +31,16 @@ public final class WorldListSQLHandler extends SQLEntryHandler<GameServer> {
|
|||
* Clears the world list.
|
||||
*/
|
||||
public static void clearWorldList() {
|
||||
Connection connection = SQLManager.getConnection();
|
||||
if(connection == null) return;
|
||||
try {
|
||||
Connection connection = SQLManager.getConnection();
|
||||
PreparedStatement statement = connection.prepareStatement("DELETE FROM " + TABLE);
|
||||
statement.executeUpdate();
|
||||
} catch (SQLException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
SQLManager.close(connection);
|
||||
} finally {
|
||||
SQLManager.close(connection);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package ms.system.util;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -30,7 +31,7 @@ public final class ByteBufferUtils {
|
|||
* @param buffer The byte buffer.
|
||||
*/
|
||||
public static void putString(String s, ByteBuffer buffer) {
|
||||
buffer.put(s.getBytes()).put((byte) 0);
|
||||
buffer.put(s.getBytes(StandardCharsets.UTF_8)).put((byte) 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ public class EncryptionManager {
|
|||
* @return the decoded value of x
|
||||
*/
|
||||
private static byte char64(char x) {
|
||||
if ((int)x < 0 || (int)x > index_64.length)
|
||||
if ((int)x > index_64.length)
|
||||
return -1;
|
||||
return index_64[(int)x];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,19 +30,20 @@ class ManagementConfigParser(path: String) {
|
|||
data = parser.parse(reader) as JSONObject
|
||||
parseDatabaseInformation()
|
||||
parseWorldTechnicalSettings()
|
||||
ManagementConstants.SECRET_KEY = data!!["secret_key"].toString()
|
||||
}
|
||||
}
|
||||
|
||||
private fun parseDatabaseInformation(){
|
||||
data ?: return
|
||||
val dbData = data!!["DatabaseInformation"] as JSONObject
|
||||
ManagementConstants().parseDBProp(dbData)
|
||||
ManagementConstants.parseDBProp(dbData)
|
||||
}
|
||||
|
||||
private fun parseWorldTechnicalSettings(){
|
||||
data ?: return
|
||||
val wtiData = data!!["WorldTechnicalInformation"] as JSONObject
|
||||
ManagementConstants().parseWTIProp(wtiData)
|
||||
ManagementConstants.parseWTIProp(wtiData)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,32 +2,31 @@ package ms.system.util
|
|||
|
||||
import org.json.simple.JSONObject
|
||||
|
||||
class ManagementConstants {
|
||||
object ManagementConstants {
|
||||
|
||||
companion object {
|
||||
//MySQL main database name
|
||||
var DATABASE_NAME: String = "global"
|
||||
|
||||
//MySQL main database name
|
||||
var DATABASE_NAME: String = "global"
|
||||
//MySQL database username
|
||||
var DATABASE_USERNAME: String = "root"
|
||||
|
||||
//MySQL database username
|
||||
var DATABASE_USERNAME: String = "root"
|
||||
//MySQL database password
|
||||
var DATABASE_PASSWORD: String = ""
|
||||
|
||||
//MySQL database password
|
||||
var DATABASE_PASSWORD: String = ""
|
||||
//MySQL host
|
||||
var DATABASE_HOST_ADDRESS: String = "127.0.0.1"
|
||||
|
||||
//MySQL host
|
||||
var DATABASE_HOST_ADDRESS: String = "127.0.0.1"
|
||||
//MySQL port
|
||||
var DATABASE_PORT: Int = 3306
|
||||
|
||||
//MySQL port
|
||||
var DATABASE_PORT: Int = 3306
|
||||
//Max amount of worlds supported on the world list
|
||||
var MAX_WORLD_AMOUNT: Int = 10
|
||||
|
||||
//Max amount of worlds supported on the world list
|
||||
var MAX_WORLD_AMOUNT: Int = 10
|
||||
//User world hop delay in seconds
|
||||
var WORLD_HOP_DELAY: Long = 20_000L
|
||||
|
||||
//User world hop delay in seconds
|
||||
var WORLD_HOP_DELAY: Long = 20_000L
|
||||
|
||||
}
|
||||
@JvmStatic
|
||||
var SECRET_KEY: String = ""
|
||||
|
||||
fun parseDBProp(data: JSONObject) {
|
||||
DATABASE_NAME = data["database_name"].toString()
|
||||
|
|
|
|||
|
|
@ -14,26 +14,16 @@ public final class StringUtils {
|
|||
/**
|
||||
* The valid characters to be used in names/messages/...
|
||||
*/
|
||||
public static final char[] VALID_CHARS = {
|
||||
private static final char[] VALID_CHARS = {
|
||||
'_', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
|
||||
'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
|
||||
'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
|
||||
};
|
||||
/**
|
||||
* Character mapping.
|
||||
*/
|
||||
public static char[] mapping = {
|
||||
'\n',
|
||||
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
|
||||
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
|
||||
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ' ' };
|
||||
/**
|
||||
* The an int array241.
|
||||
*/
|
||||
public static int[] anIntArray241 = { 215, 203, 83, 158, 104, 101, 93, 84,
|
||||
private final static int[] anIntArray241 = { 215, 203, 83, 158, 104, 101, 93, 84,
|
||||
107, 103, 109, 95, 94, 98, 89, 86, 70, 41, 32, 27, 24, 23, -1, -2,
|
||||
26, -3, -4, 31, 30, -5, -6, -7, 37, 38, 36, -8, -9, -10, 40, -11,
|
||||
-12, 55, 48, 46, 47, -13, -14, -15, 52, 51, -16, -17, 54, -18, -19,
|
||||
|
|
@ -173,7 +163,7 @@ public final class StringUtils {
|
|||
boolean wasSpace = true;
|
||||
for (int i = 0; i < name.length(); i++) {
|
||||
if (wasSpace) {
|
||||
newName.append((new String() + name.charAt(i)).toUpperCase());
|
||||
newName.append(("" + name.charAt(i)).toUpperCase());
|
||||
wasSpace = false;
|
||||
} else {
|
||||
newName.append(name.charAt(i));
|
||||
|
|
@ -306,9 +296,8 @@ public final class StringUtils {
|
|||
* @return The string value.
|
||||
*/
|
||||
public static String getString(String s) {
|
||||
String string = s.replaceAll("\\<.*?>", "").replaceAll(" ", "")
|
||||
return s.replaceAll("\\<.*?>", "").replaceAll(" ", "")
|
||||
.replaceAll("Discontinued Item:", "");
|
||||
return string;
|
||||
}
|
||||
/**
|
||||
* Characters used to convert a String to a Long.
|
||||
|
|
@ -319,7 +308,7 @@ public final class StringUtils {
|
|||
't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2',
|
||||
'3', '4', '5', '6', '7', '8', '9'
|
||||
};
|
||||
public static int[] anIntArray233 = {
|
||||
private final static int[] anIntArray233 = {
|
||||
0, 1024, 2048, 3072, 4096, 5120,
|
||||
6144, 8192, 9216, 12288, 10240, 11264, 16384, 18432, 17408, 20480,
|
||||
21504, 22528, 23552, 24576, 25600, 26624, 27648, 28672, 29696,
|
||||
|
|
@ -362,7 +351,7 @@ public final class StringUtils {
|
|||
301188096, 301189120, 301190144, 301191168, 301193216, 301195264,
|
||||
301194240, 301197312, 301198336, 301199360, 301201408, 301202432
|
||||
};
|
||||
public static byte[] aByteArray235 = {
|
||||
private final static byte[] aByteArray235 = {
|
||||
22, 22, 22, 22, 22, 22, 21, 22, 22,
|
||||
20, 22, 22, 22, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
|
||||
22, 22, 22, 22, 22, 22, 3, 8, 22, 16, 22, 16, 17, 7, 13, 13, 13,
|
||||
|
|
@ -387,16 +376,16 @@ public final class StringUtils {
|
|||
try {
|
||||
i_27_ += i_25_;
|
||||
int i_29_ = 0;
|
||||
int i_30_ = i_26_ << -2116795453;
|
||||
int i_30_ = i_26_ << 3;
|
||||
for (; i_27_ > i_25_; i_25_++) {
|
||||
int i_31_ = 0xff & is_28_[i_25_];
|
||||
int i_32_ = anIntArray233[i_31_];
|
||||
int i_33_ = aByteArray235[i_31_];
|
||||
int i_34_ = i_30_ >> -1445887805;
|
||||
int i_34_ = i_30_ >> 3;
|
||||
int i_35_ = i_30_ & 0x7;
|
||||
i_29_ &= (-i_35_ >> 473515839);
|
||||
i_29_ &= (-i_35_ >> 31);
|
||||
i_30_ += i_33_;
|
||||
int i_36_ = ((-1 + (i_35_ - -i_33_)) >> -1430991229) + i_34_;
|
||||
int i_36_ = ((-1 + (i_35_ - -i_33_)) >> 3) + i_34_;
|
||||
i_35_ += 24;
|
||||
is[i_34_] = (byte) (i_29_ = (i_29_ | (i_32_ >>> i_35_)));
|
||||
if ((i_36_ ^ 0xffffffff) < (i_34_ ^ 0xffffffff)) {
|
||||
|
|
@ -420,8 +409,9 @@ public final class StringUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
return -i_26_ + ((7 + i_30_) >> -662855293);
|
||||
return -i_26_ + ((7 + i_30_) >> 3);
|
||||
} catch (RuntimeException runtimeexception) {
|
||||
runtimeexception.printStackTrace();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public final class PlayerSession {
|
|||
/**
|
||||
* The time stamp of last disconnection.
|
||||
*/
|
||||
private long disconnectionTime = 0l;
|
||||
private long disconnectionTime = 0L;
|
||||
|
||||
/**
|
||||
* How long the player is banned for.
|
||||
|
|
@ -132,6 +132,8 @@ public final class PlayerSession {
|
|||
ex.printStackTrace();
|
||||
SQLManager.close(connection);
|
||||
return false;
|
||||
} finally {
|
||||
SQLManager.close(connection);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -160,6 +162,8 @@ public final class PlayerSession {
|
|||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
SQLManager.close(connection);
|
||||
} finally {
|
||||
SQLManager.close(connection);
|
||||
}
|
||||
communication.clear();
|
||||
}
|
||||
|
|
@ -201,6 +205,8 @@ public final class PlayerSession {
|
|||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
SQLManager.close(connection);
|
||||
} finally {
|
||||
SQLManager.close(connection);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -457,9 +463,8 @@ public final class PlayerSession {
|
|||
this.disconnectionTime = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return username.equals(((PlayerSession) o).username);
|
||||
public boolean equalsSession(PlayerSession o){
|
||||
return username.equals(o.username);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class WorldDatabase {
|
|||
/**
|
||||
* The game servers.
|
||||
*/
|
||||
public static final GameServer[] DATABASE = new GameServer[ServerConstants.WORLD_LIMIT];
|
||||
private static final GameServer[] DATABASE = new GameServer[ServerConstants.WORLD_LIMIT];
|
||||
|
||||
/**
|
||||
* The update time stamp.
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ public class UIDInfo {
|
|||
case 4:
|
||||
serial = ByteBufferUtils.getString(buffer);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -112,7 +114,7 @@ public class UIDInfo {
|
|||
* @return the string.
|
||||
*/
|
||||
private String parseFormat(String string) {
|
||||
if (string == null || string == "") {
|
||||
if (string == null || string.equals("")) {
|
||||
return null;
|
||||
}
|
||||
StringTokenizer token = new StringTokenizer(string, "|");
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ import java.util.*
|
|||
|
||||
object MSLogger {
|
||||
val t = Terminal()
|
||||
val formatter = SimpleDateFormat("HH:mm:ss")
|
||||
var tradeLog: Writer? = null
|
||||
var tradeLogWriter: BufferedWriter? = null
|
||||
|
||||
|
||||
fun getTime(): String{
|
||||
val formatter = SimpleDateFormat("HH:mm:ss")
|
||||
return "[" + formatter.format(Date(System.currentTimeMillis())) +"]"
|
||||
}
|
||||
|
||||
|
|
|
|||
77
README.md
77
README.md
|
|
@ -7,84 +7,89 @@
|
|||
</a>
|
||||
<h3 align="center">An open source MMORPG emulation server</h3>
|
||||
|
||||
<h1 align="center"><a href="https://github.com/2009scape/2009Scape/releases/latest/download/2009Scape.jar"><strong>Play the live server »</strong></a></h1>
|
||||
<h1 align="center"><a href="https://2009scape.org/"><strong>Play the live server »</strong></a></h1>
|
||||
<p align="center">
|
||||
<br />
|
||||
<br />
|
||||
<a href="https://github.com/2009scape/2009Scape/releases/latest/download/2009Scape.jar">Community Hosted Server</a>
|
||||
<a href="https://2009scape.org/">Community Hosted Server</a>
|
||||
·
|
||||
<a href="https://discord.gg/43YPGND">Discord Invite</a>
|
||||
· <a href="https://github.com/2009scape/2009Scape/issues">Report Bug</a>
|
||||
·
|
||||
<a href="https://github.com/2009scape/2009Scape/projects">Bug Board</a>
|
||||
· <a href="https://gitlab.com/2009scape/2009scape/-/issues">Report Bug</a>
|
||||
</p>
|
||||
<h3>NOTE: Do not report issues if you are running your own server. Chances are, the fault lies in your misconfiguration of the server or the issue has already long been fixed on live. Essentially: Your server. Your issues. We have enough to worry about with our own server.</h3>
|
||||
<h3>ATTENTION: Starting October 5th, 2020 the development team will no longer be providing support for setting up your own server. Do not ping or private message Developers asking how to build the project. This in-depth guide will be continually updated if the building process changes. We are focusing all of our efforts on the development of features and bugfixes for the live server.</h3>
|
||||
<h3>NOTE: Bug reports and support are only accepted by/offered to players of our live hosted server. We will not provide support to those running their own copies.</h3>
|
||||
</p>
|
||||
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Live Server Information](#live-server-information)
|
||||
* [About the Project](#about-the-project)
|
||||
* [History of this Codebase](#history-of-this-codebase)
|
||||
* [Our Core Values](#our-core-values)
|
||||
* [Contributing](#contributing)
|
||||
* [Contributing without Building](#contributing-without-building)
|
||||
* [Video Setup Tutorial](#video-setup-tutorial)
|
||||
* [Getting Started](#getting-started)
|
||||
* [Setup for Content Developers](#content-developers-setting-up-the-project)
|
||||
* [Github Setup](#github-setup)
|
||||
* [Prerequisites](#prerequisites)
|
||||
* [Prereq Installation](#prereq-installation)
|
||||
* [Project Setup](#project-setup)
|
||||
* [Running the project](#running-the-project)
|
||||
* [Project Setup](#project-setup)
|
||||
* [Running the project](#running-the-project)
|
||||
* [License](#license)
|
||||
* [Contact](#contact)
|
||||
|
||||
|
||||
## Live Server Information
|
||||
|
||||
Did you know that the 2009Scape Development Team hosts the main branch of this repo that you can connect to and play? Come join a growing community of people that love to grind out skills, quest, and hangout together. A download link for the launcher can be found <a href="https://github.com/2009scape/2009Scape/releases/latest/download/2009Scape.jar"><strong>here.</strong></a> Connecting to the live server is also one of the easiest ways to identify bugs/typos/missing features. Identifying these issues help developers, whether already on the project, or are even brand new to the project, fix bugs and issues in an expedited rate.
|
||||
Did you know that the 2009Scape Development Team hosts the main branch of this repo that you can connect to and play? Come join a growing community of people that love to grind out skills, quest, and hangout together. A download link for the launcher can be found <a href="https://2009scape.org"><strong>here.</strong></a> Connecting to the live server is also one of the easiest ways to identify bugs/typos/missing features. Identifying these issues help developers, whether already on the project, or are even brand new to the project, fix bugs and issues in an expedited rate.
|
||||
|
||||
## About The Project
|
||||
## History of this Codebase
|
||||
|
||||
The 2009Scape you see today has gone through a magnitude of changes. Originally starting its life as Arios498, this server saw a lot of people playing it daily, unfortunately, it was for profit and closed source. It was later upgraded to Arios530, targeting the build 530 of runescape with content in and around January 1st, 2009. Development came to a halt when a developer of the closed source project released the source code. The original developers of this server went on to create Kratos 530 back in 2015.
|
||||
|
||||
This project was started out of love for the 530 revision. A small group of developers spent hundreds of hours improving on the existing source that was left to the curb. Over the past year, this project has seen many developers coming and going, fixing bugs that they find either through their own server, or bugs that they find in the live game that is currently hosted. We do not accept donations of any kind. The smiles and wonderful compliments are more than enough to keep us going! Content and bugfixes are always number one on our list, and we try our best to answer any questions that you may have, provided you have read through this readme and frequently asked questions on the discord.
|
||||
This project was started out of love for the 530 revision. A small group of developers spent thousands of hours improving on the existing source that was left to the curb. Over the past year, this project has seen many developers coming and going, fixing bugs that they find either through their own server, or bugs that they find in the live game that is currently hosted. We do not accept donations of any kind. The smiles and wonderful compliments are more than enough to keep us going! Content and bugfixes are always number one on our list, and we try our best to answer any questions that you may have, provided you have read through this readme and frequently asked questions on the discord.
|
||||
|
||||
## Our Core Values
|
||||
|
||||
In the current climate of RSPS in general, we believe it's important to wear our core values on our sleeves and defend them with everything we have! Below are what we hold as our core, most important values:
|
||||
|
||||
* **We do NOT believe in profiting off RSPS.** To many of us here at the 2009scape team, what we care about most is preserving the wonderful work of the Gower brothers in the most true-to-spirit manner possible. We do NOT do this to make a profit, and in fact **we outright refuse donations.** This is a labor of love and passion for everyone involved, a love for real RS2! This is perhaps the single most central value we have. If you want to "donate" to us, do so with your time and your dedication. That is what we desire most.
|
||||
|
||||
|
||||
* **Authenticity is central to the work**. As a remake, one of the most important things to us is being true to the Gower spirit. What the Gowers brought to us in our childhood is what we are driven to preserve for the remainder of the world.
|
||||
|
||||
|
||||
* **Open Source Is Crucial**. We believe open source remakes to be crucial to preserving what we loved in our childhood, and we believe for-profit and/or closed-source servers are destined to flounder out and fail.
|
||||
|
||||
|
||||
* **Be Welcoming**. One of our most important goals is to provide a community of friendly and caring people that get along and love to enjoy the game with eachother. For this reason, we do tend to be very strict when it comes to toxicity. We care about quality a whole lot more than quantity!
|
||||
|
||||
## Contributing
|
||||
|
||||
<h4>Note: A live server that the 2009Scape development team runs is the best way to find and report bugs! Any changes made should be pushed to the Development Branch, Any changes that are pushed to the main branch will be denied, and you will have to submit another PR request. We are currently in the process of rewriting the codebase in Kotlin. Any new commits should be written in Kotlin Only.</h4>
|
||||
<h4>Note: A live server that the 2009Scape development team runs is the best way to find and report bugs! We are currently in the process of rewriting the codebase in Kotlin. Any new commits should be written in Kotlin Only.</h4>
|
||||
<h4>More information on Kotlin can be found <a href="https://kotlinlang.org/">here.</a></h4>
|
||||
|
||||
We are always looking for fellow helpers and developers to help preserve history and contribute towards making the most complete emulation server! The beautiful part is you don't even have to download and build the project in order to contribute! Want to make simple edits to NPCs, Items, Music, Shops, Typos? Follow the [Contributing-without-Building](#contributing-without-building) guide below!
|
||||
There are many ways everyone can contribute! From the most seasoned programmers to those who do not have the most remote clue how code works! Below are some things that can always use some love from the community.
|
||||
|
||||
## Contributing without Building
|
||||
|
||||
First create a Github account if you do not have one already. Editing the repository directly is one of the easiest ways to contribute to the project. You will start off in the master/main branch. Switch to the **"Development Branch"** by clicking on the drop down menu which is on the left hand side where it says "Branches" and "Tags". Then navigate to the file you wish to change, for example, All definitions are located in **"Server/data/configs/"**. If you were to edit NPCSpawns.json, you would select NPCSpawns.json, and on the right hand side of the window there will be a screen icon, pencil icon, and trashcan icon. Click on the pencil icon to make changes. When you are finished with your changes, ensure you are in **development** by looking at the branch in the top left. Scroll down until you see "propose changes", and fill out the two info bars at the bottom to describe what you changed/fixed.
|
||||
<br>
|
||||
**More information on repository file editing can be found <a href="https://docs.github.com/en/free-pro-team@latest/github/managing-files-in-a-repository/editing-files-in-another-users-repository">here.</a>**
|
||||
<br>
|
||||
<br>
|
||||
**Editing files that are too large for Github in-browser editing**
|
||||
<br>
|
||||
First follow the [Github-Setup](#github-setup). After you have forked over your copy of the repo, swap over to the **Development branch**, and then download the file that you wish to edit. JSON format can be edited in any notepad program, however it is recommended to use either <a href="https://atom.io/">Atom</a> or <a href="https://notepad-plus-plus.org/">Notepad++</a>. After you are finished editing your file, navigate back to the file you wish to replace on your **Development Branch**. Select it and delete it off your branch. Then go back and on the right hand side click on "Add files" and then "Upload new files". Upload the file you are done editing and then submit a Pull request (PR). To submit a PR navigate to "Pull requests" and then click on "New pull request". On the top of the page you should see "Comparing changes". The left set of options is what you will be pushing to and the right side is where you are pushing from. On the right side, put your repo and compare to **Development**, On the left hand side put the repo as 2009scape/2009scape base: **Development**. If at anytime it tries to pull/push into its own repository, click "Compare across forks" and you should be able to select where you want to push to and from.
|
||||
<br>
|
||||
**More information about submitting PR's can be found <a href="https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests">here.</a>**
|
||||
* **Wiki Editors**: Did you know we have a wiki? Well it's always in need of people to fill it out and stay on top of it. Editing the wiki is one of the easiest ways you can contribute to 2009scape! If you're an active player and have the will, there's so much you could be helping out with over at the wiki. <a href="http://play.2009scape.org/wiki">Click here to go to the wiki.</a>
|
||||
|
||||
|
||||
* **JSON editors**: Did you know that the vast majority of our drop tables, stats, examines, item info, npc info, etc is all stored in a very easy-to-modify format called JSON? This is something almost anyone can help with, especially with the tool made by Ceikry to make it simple and streamlined. If you want to know what can be done to help here, get in touch in the development channel in the discord! **JSON editors are always in need and always appreciated!!**.
|
||||
|
||||
## Getting Started
|
||||
|
||||
* **Auditors**: As a remake, authenticity is central to our core values! We could always use someone to go through the game and create large lists of simple tasks that can be done to bring us closer to the authentic 2009 game! The preferred way to do this is one-area-at-a-time. If you want to see an example of some audits we've done in the past, take a look <a href="https://gitlab.com/2009scape/2009scape/-/issues/46">here.</a>
|
||||
|
||||
|
||||
* **Content Developers**: As a remake, we have massive amounts of content that need to be implemented or corrected. If you know how to program or are willing to learn, this is where you could be extremely helpful! We need everything from quests to dialogue to minigames to skills that still need to be corrected or implemented, and this is perhaps one of the most valuable ways someone could help out the project! If you are interested in developing content, reach out in the development channel of the Discord.
|
||||
|
||||
## Content Developers: Setting Up the Project.
|
||||
### Github Setup
|
||||
|
||||
<h4>Note: This allows you to commit changes to the main repo (with approval)! Also, always stay up to date with the most recent updates by pulling into your copy when 2009Scape updates!</h4>
|
||||
|
||||
1. Create a github account if you haven't done so already
|
||||
1. Create a gitlab account if you haven't done so already
|
||||
|
||||
2. Go to the 2009Scape <a href="https://github.com/2009scape/2009Scape">Github Page</a>
|
||||
3. Click "Fork" in the top right hand side of our gitlab page.
|
||||
|
||||
3. Click "Fork" in the top right hand side of Github
|
||||
|
||||
**If at anytime you have an issue with Github please refer to the** <a href="https://docs.github.com/en/free-pro-team@latest/github">Github help center.</a>
|
||||
**If at anytime you have an issue with gitlab please refer to the** <a href="https://gitlab.com/help">Gitlab help center.</a>
|
||||
|
||||
|
||||
### Prerequisites
|
||||
|
|
@ -92,7 +97,7 @@ First follow the [Github-Setup](#github-setup). After you have forked over your
|
|||
<h4>Note: It is required for a developer submitting a PR to use Intellij IDEA as your integrated development environment.</h4>
|
||||
|
||||
* Intellij IDEA
|
||||
* Java SE Development Kit Version 1.8
|
||||
* Java SE Development Kit Version 1.8/OpenJDK 1.8 (preferred)
|
||||
* Gradle (optional - Installs with Intellij on project build)
|
||||
* Xampp
|
||||
|
||||
|
|
|
|||
|
|
@ -21,16 +21,18 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.github.ajalt.mordant:mordant:2.0.0-alpha2")
|
||||
implementation "org.jetbrains:markdown-jvm:0.2.4"
|
||||
implementation 'com.google.guava:guava:29.0-jre'
|
||||
implementation 'mysql:mysql-connector-java:8.0.21'
|
||||
implementation 'io.github.classgraph:classgraph:4.8.98'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-reflect:1.5.20'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
|
||||
implementation files("libs/ConstLib-1.2.jar")
|
||||
implementation files("libs/PrimitiveExtensions-1.0.jar")
|
||||
|
||||
implementation files(
|
||||
"libs/PrimitiveExtensions-1.0.jar",
|
||||
"libs/ConstLib-1.3.jar",
|
||||
"libs/json-simple-1.1.1.jar",
|
||||
"libs/markdown-jvm-0.2.4.jar",
|
||||
"libs/classgraph-4.8.98.jar",
|
||||
"libs/mysql-connector-java-8.0.21.jar",
|
||||
"libs/mordant-jvm-2.0.0-alpha2.jar",
|
||||
"libs/colormath-jvm-2.0.0.jar"
|
||||
)
|
||||
}
|
||||
|
||||
/*sourceSets {
|
||||
|
|
|
|||
|
|
@ -7863,7 +7863,32 @@
|
|||
"maxAmount": "1"
|
||||
}
|
||||
],
|
||||
"charm": [],
|
||||
"charm": [
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "85.0",
|
||||
"id": "12158",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "7.0",
|
||||
"id": "12159",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "7.0",
|
||||
"id": "12160",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "1.0",
|
||||
"id": "12163",
|
||||
"maxAmount": "1"
|
||||
}
|
||||
],
|
||||
"ids": "117,4689,4690,4691,4692,4693",
|
||||
"description": "",
|
||||
"main": [
|
||||
|
|
@ -26219,16 +26244,10 @@
|
|||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "25.0",
|
||||
"weight": "8.0",
|
||||
"id": "4131",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "1185",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
|
|
@ -26247,63 +26266,45 @@
|
|||
"id": "1353",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "1303",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "1373",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "1319",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "5",
|
||||
"weight": "50.0",
|
||||
"weight": "25.0",
|
||||
"id": "560",
|
||||
"maxAmount": "5"
|
||||
},
|
||||
{
|
||||
"minAmount": "10",
|
||||
"weight": "50.0",
|
||||
"weight": "25.0",
|
||||
"id": "560",
|
||||
"maxAmount": "10"
|
||||
},
|
||||
{
|
||||
"minAmount": "3",
|
||||
"weight": "25.0",
|
||||
"weight": "12.5",
|
||||
"id": "562",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "37",
|
||||
"weight": "25.0",
|
||||
"weight": "12.5",
|
||||
"id": "562",
|
||||
"maxAmount": "37"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"weight": "25.0",
|
||||
"id": "5281",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"weight": "25.0",
|
||||
"id": "5297",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"weight": "25.0",
|
||||
"id": "5280",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
|
|
@ -26339,27 +26340,21 @@
|
|||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"weight": "8.0",
|
||||
"id": "5303",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"weight": "8.0",
|
||||
"id": "5302",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1144",
|
||||
"minAmount": "10",
|
||||
"weight": "50.0",
|
||||
"id": "995",
|
||||
"maxAmount": "1144"
|
||||
},
|
||||
{
|
||||
"minAmount": "132",
|
||||
"weight": "50.0",
|
||||
"id": "995",
|
||||
"maxAmount": "132"
|
||||
"maxAmount": "460"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
|
|
@ -26381,19 +26376,13 @@
|
|||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "2363",
|
||||
"weight": "8.0",
|
||||
"id": "12070",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "2723",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"weight": "16.0",
|
||||
"id": "31",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
|
|
@ -26402,6 +26391,24 @@
|
|||
"weight": "100.0",
|
||||
"id": "0",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "8.0",
|
||||
"id": "5300",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "8.0",
|
||||
"id": "5304",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "25.0",
|
||||
"id": "5295",
|
||||
"maxAmount": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -27393,154 +27400,276 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"default": [],
|
||||
"charm": [],
|
||||
"default": [
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "1.0",
|
||||
"id": "526",
|
||||
"maxAmount": "1"
|
||||
}
|
||||
],
|
||||
"charm": [
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "20.0",
|
||||
"id": "12158",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "70.0",
|
||||
"id": "12159",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "12160",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "12163",
|
||||
"maxAmount": "1"
|
||||
}
|
||||
],
|
||||
"ids": "1622,1623,1626,1627,1628,1629,1630",
|
||||
"description": "",
|
||||
"main": [
|
||||
{
|
||||
"minAmount": "5",
|
||||
"weight": "50.0",
|
||||
"id": "557",
|
||||
"maxAmount": "42"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"id": "1436",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "2",
|
||||
"weight": "25.0",
|
||||
"id": "562",
|
||||
"maxAmount": "25"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"id": "438",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"id": "436",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"id": "2349",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"id": "440",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"id": "2351",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"id": "453",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "25.0",
|
||||
"id": "447",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "4",
|
||||
"weight": "50.0",
|
||||
"id": "5318",
|
||||
"maxAmount": "4"
|
||||
},
|
||||
{
|
||||
"minAmount": "4",
|
||||
"weight": "50.0",
|
||||
"id": "5319",
|
||||
"maxAmount": "4"
|
||||
},
|
||||
{
|
||||
"minAmount": "4",
|
||||
"weight": "50.0",
|
||||
"id": "5324",
|
||||
"maxAmount": "4"
|
||||
},
|
||||
{
|
||||
"minAmount": "3",
|
||||
"weight": "25.0",
|
||||
"id": "5322",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "4",
|
||||
"weight": "25.0",
|
||||
"id": "5305",
|
||||
"maxAmount": "4"
|
||||
},
|
||||
{
|
||||
"minAmount": "3",
|
||||
"weight": "25.0",
|
||||
"id": "5320",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "3",
|
||||
"weight": "25.0",
|
||||
"id": "5308",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "2",
|
||||
"weight": "5.0",
|
||||
"id": "5323",
|
||||
"maxAmount": "2"
|
||||
},
|
||||
{
|
||||
"minAmount": "2",
|
||||
"weight": "5.0",
|
||||
"id": "5321",
|
||||
"maxAmount": "2"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"id": "2347",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "50.0",
|
||||
"id": "1913",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "23",
|
||||
"weight": "25.0",
|
||||
"id": "995",
|
||||
"maxAmount": "23"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "4115",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"weight": "1.0",
|
||||
"id": "31",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "19.0",
|
||||
"id": "1069",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "8.0",
|
||||
"id": "1355",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "3.0",
|
||||
"id": "1197",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "3.0",
|
||||
"id": "1161",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "3.0",
|
||||
"id": "1213",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "1.0",
|
||||
"id": "13290",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "1.0",
|
||||
"id": "4113",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "17.0",
|
||||
"id": "563",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "15",
|
||||
"weight": "14.0",
|
||||
"id": "561",
|
||||
"maxAmount": "15"
|
||||
},
|
||||
{
|
||||
"minAmount": "37",
|
||||
"weight": "3.0",
|
||||
"id": "561",
|
||||
"maxAmount": "37"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "22.0",
|
||||
"id": "199",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "16.0",
|
||||
"id": "201",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "12.0",
|
||||
"id": "203",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "9.0",
|
||||
"id": "205",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "7.0",
|
||||
"id": "207",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "209",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "4.0",
|
||||
"id": "211",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "4.0",
|
||||
"id": "213",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "3.0",
|
||||
"id": "215",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "2.0",
|
||||
"id": "2485",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "2.0",
|
||||
"id": "217",
|
||||
"maxAmount": "3"
|
||||
},
|
||||
{
|
||||
"minAmount": "44",
|
||||
"weight": "77.0",
|
||||
"id": "995",
|
||||
"maxAmount": "44"
|
||||
},
|
||||
{
|
||||
"minAmount": "132",
|
||||
"weight": "32.0",
|
||||
"id": "995",
|
||||
"maxAmount": "132"
|
||||
},
|
||||
{
|
||||
"minAmount": "440",
|
||||
"weight": "3.0",
|
||||
"id": "995",
|
||||
"maxAmount": "440"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "10.0",
|
||||
"id": "5296",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "7.0",
|
||||
"id": "5297",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "7.0",
|
||||
"id": "5281",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "5106",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "5298",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "3.0",
|
||||
"id": "5299",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "2.0",
|
||||
"id": "5300",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "2.0",
|
||||
"id": "5301",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "1.0",
|
||||
"id": "5302",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "1.0",
|
||||
"id": "5303",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "1.0",
|
||||
"id": "5304",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "19.0",
|
||||
"id": "225",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "5280",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "45",
|
||||
"weight": "1.0",
|
||||
"id": "561",
|
||||
"maxAmount": "45"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -37562,7 +37691,7 @@
|
|||
{
|
||||
"minAmount": "1",
|
||||
"weight": "5.0",
|
||||
"id": "13467",
|
||||
"id": "5680",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
|
|
@ -62509,11 +62638,17 @@
|
|||
"weight": "100.0",
|
||||
"id": "526",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "1.0",
|
||||
"id": "1591",
|
||||
"maxAmount": "1"
|
||||
}
|
||||
],
|
||||
"charm": [],
|
||||
"ids": "201",
|
||||
"description": "",
|
||||
"description": "Jailer (Taverley Dungeon, drops Jail key)",
|
||||
"main": []
|
||||
},
|
||||
{
|
||||
|
|
@ -62760,5 +62895,31 @@
|
|||
"maxAmount": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"default": [],
|
||||
"charm": [],
|
||||
"ids": "428,429",
|
||||
"description": "Shade (Stronghold of Security) (So Shade Robes can drop)",
|
||||
"main": [
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "0.1",
|
||||
"id": "546",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "0.1",
|
||||
"id": "548",
|
||||
"maxAmount": "1"
|
||||
},
|
||||
{
|
||||
"minAmount": "1",
|
||||
"weight": "1.0",
|
||||
"id": "0",
|
||||
"maxAmount": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -519,8 +519,24 @@
|
|||
"item_id": "5008",
|
||||
"loc_data": "{1,3230,9609,0,300}"
|
||||
},
|
||||
{
|
||||
"item_id": "7510",
|
||||
"loc_data": "{1,2867,9875,0,300}"
|
||||
},
|
||||
{
|
||||
"item_id": "1913",
|
||||
"loc_data": "{1,2863,9875,0,300}-{1,2861,9878,0,300}"
|
||||
},
|
||||
{
|
||||
"item_id": "4619",
|
||||
"loc_data": "{1,2713,4913,0,2}"
|
||||
},
|
||||
{
|
||||
"item_id": "2964",
|
||||
"loc_data": "{1,3437,3337,0,100}"
|
||||
},
|
||||
{
|
||||
"item_id": "2957",
|
||||
"loc_data": "{1,3443,9742,0,100}-{1,3443,9742,1,100}"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -149,7 +149,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "47",
|
||||
"loc_data": "{3108, 9754, 0, 1, 5}-{3110, 9754, 0, 1, 5}-{3108, 9750, 0, 1, 5}-{3097,3364,0,1,3}-{3102,3363,0,1,5}-{3341,3267,0,1,5}-{3235,3224,0,1,3}-{3229,3220,0,1,4}-{3211,3211,0,1,3}-{3225,3220,0,1,1}-{3237,3215,0,1,5}-{3211,3210,0,1,7}-{3227,3220,0,1,7}-{3233,3227,0,1,5}-{3227,3210,0,1,6}-{3228,3222,0,1,4}-{3229,3226,0,1,0}-{3127,3487,0,1,4}-{3125,3486,0,1,6}-{3127,3486,0,1,4}-{3019,3292,0,1,7}-{3018,3295,0,1,7}-{3001,3202,0,1,5}-{3021,3205,0,1,6}-{3026,3174,0,1,5}-{3019,3176,0,1,7}-{3076,3282,0,1,5}-{3089,3266,0,1,4}-{3091,3266,0,1,4}-{3243,3687,0,1,5}-{3249,3669,0,1,3}-{3252,3675,0,1,4}-{3252,3680,0,1,3}-{3259,3683,0,1,0}-{3276,9871,0,1,1}-{3277,9871,0,1,3}-{3225,9862,0,1,4}-{3222,9861,0,1,6}-{3220,9860,0,1,6}-{3219,9865,0,1,6}-{3237,9862,0,1,4}-{3236,3217,0,1,4}-{3259,3230,0,1,4}-{3158,3226,0,1,5}-{3160,3202,0,1,4}-{3233,3237,0,1,7}-{2821,3170,0,1,1}-{2801,3158,0,1,2}-{2852,9642,0,1,6}-{2858,9632,0,1,3}-{2536,2982,0,1,3}-{2531,2980,0,1,0}-{2522,2981,0,1,4}-{2545,2989,0,1,4}-{2523,2970,0,1,2}-{2603,9480,0,1,1}-{2600,9477,0,1,0}-{2579,9496,0,1,4}-{2580,9508,0,1,0}-{2571,9522,0,1,4}-{2654,9640,0,1,6}-{2655,9637,0,1,4}-{2656,9639,0,1,7}-{2651,9636,0,1,5}-{2648,9637,0,1,4}-{2651,9642,0,1,1}-{2654,9640,0,1,0}-{2654,9635,0,1,6}-{2655,9635,0,1,3}-{2664,9626,0,1,6}-{2664,9624,0,1,1}-{2661,9623,0,1,1}-{2663,9623,0,1,3}-{2664,9626,0,1,6}-{2592,9831,0,1,3}-{2588,9825,0,1,6}-{2583,9829,0,1,4}-{2581,9841,0,1,0}-{2597,9823,0,1,2}-{2579,9805,0,1,3}-{2576,9804,0,1,0}-{2573,9805,0,1,5}-{2571,9808,0,1,3}-{2576,9810,0,1,2}-{2587,9802,0,1,2}-{2592,9800,0,1,4}-{2596,9805,0,1,6}-{2601,9802,0,1,5}-{2585,9801,0,1,7}-{2594,9803,0,1,0}-{2590,9806,0,1,3}-{2612,9808,0,1,6}-{2604,9810,0,1,6}-{2579,9821,0,1,2}-{2576,9812,0,1,6}-{2580,9813,0,1,6}-{2600,9813,0,1,4}-{2599,9809,0,1,4}-{2514,3193,0,1,6}-{2518,3192,0,1,3}-{2507,3181,0,1,3}-{2508,3178,0,1,6}-{2511,3183,0,1,3}-{2515,3182,0,1,1}-{2565,9505,0,1,1}-{2566,9510,0,1,6}-{2594,9497,0,1,4}-{3475,9840,0,1,6}-{3481,9842,0,1,1}-{3486,9843,0,1,7}-{3483,9824,0,1,4}-{3496,9808,0,0,5}-{3490,9815,0,1,1}-{3478,9834,0,0,3}-{3490,9824,0,1,4}"
|
||||
"loc_data": "{3108, 9754, 0, 1, 5}-{3110, 9754, 0, 1, 5}-{3108, 9750, 0, 1, 5}-{2930,9699,0,1,0}-{2933,9697,0,1,0}-{2932,9685,0,1,0}-{2930,9693,0,1,0}-{3097,3364,0,1,3}-{3102,3363,0,1,5}-{3341,3267,0,1,5}-{3235,3224,0,1,3}-{3229,3220,0,1,4}-{3211,3211,0,1,3}-{3225,3220,0,1,1}-{3237,3215,0,1,5}-{3211,3210,0,1,7}-{3227,3220,0,1,7}-{3233,3227,0,1,5}-{3227,3210,0,1,6}-{3228,3222,0,1,4}-{3229,3226,0,1,0}-{3127,3487,0,1,4}-{3125,3486,0,1,6}-{3127,3486,0,1,4}-{3019,3292,0,1,7}-{3018,3295,0,1,7}-{3001,3202,0,1,5}-{3021,3205,0,1,6}-{3026,3174,0,1,5}-{3019,3176,0,1,7}-{3076,3282,0,1,5}-{3089,3266,0,1,4}-{3091,3266,0,1,4}-{3243,3687,0,1,5}-{3249,3669,0,1,3}-{3252,3675,0,1,4}-{3252,3680,0,1,3}-{3259,3683,0,1,0}-{3276,9871,0,1,1}-{3277,9871,0,1,3}-{3225,9862,0,1,4}-{3222,9861,0,1,6}-{3220,9860,0,1,6}-{3219,9865,0,1,6}-{3237,9862,0,1,4}-{3236,3217,0,1,4}-{3259,3230,0,1,4}-{3158,3226,0,1,5}-{3160,3202,0,1,4}-{3233,3237,0,1,7}-{2821,3170,0,1,1}-{2801,3158,0,1,2}-{2852,9642,0,1,6}-{2858,9632,0,1,3}-{2536,2982,0,1,3}-{2531,2980,0,1,0}-{2522,2981,0,1,4}-{2545,2989,0,1,4}-{2523,2970,0,1,2}-{2603,9480,0,1,1}-{2600,9477,0,1,0}-{2579,9496,0,1,4}-{2580,9508,0,1,0}-{2571,9522,0,1,4}-{2654,9640,0,1,6}-{2655,9637,0,1,4}-{2656,9639,0,1,7}-{2651,9636,0,1,5}-{2648,9637,0,1,4}-{2651,9642,0,1,1}-{2654,9640,0,1,0}-{2654,9635,0,1,6}-{2655,9635,0,1,3}-{2664,9626,0,1,6}-{2664,9624,0,1,1}-{2661,9623,0,1,1}-{2663,9623,0,1,3}-{2664,9626,0,1,6}-{2592,9831,0,1,3}-{2588,9825,0,1,6}-{2583,9829,0,1,4}-{2581,9841,0,1,0}-{2597,9823,0,1,2}-{2579,9805,0,1,3}-{2576,9804,0,1,0}-{2573,9805,0,1,5}-{2571,9808,0,1,3}-{2576,9810,0,1,2}-{2587,9802,0,1,2}-{2592,9800,0,1,4}-{2596,9805,0,1,6}-{2601,9802,0,1,5}-{2585,9801,0,1,7}-{2594,9803,0,1,0}-{2590,9806,0,1,3}-{2612,9808,0,1,6}-{2604,9810,0,1,6}-{2579,9821,0,1,2}-{2576,9812,0,1,6}-{2580,9813,0,1,6}-{2600,9813,0,1,4}-{2599,9809,0,1,4}-{2514,3193,0,1,6}-{2518,3192,0,1,3}-{2507,3181,0,1,3}-{2508,3178,0,1,6}-{2511,3183,0,1,3}-{2515,3182,0,1,1}-{2565,9505,0,1,1}-{2566,9510,0,1,6}-{2594,9497,0,1,4}-{3475,9840,0,1,6}-{3481,9842,0,1,1}-{3486,9843,0,1,7}-{3483,9824,0,1,4}-{3496,9808,0,0,5}-{3490,9815,0,1,1}-{3478,9834,0,0,3}-{3490,9824,0,1,4}"
|
||||
},
|
||||
{
|
||||
"npc_id": "48",
|
||||
|
|
@ -249,7 +249,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "82",
|
||||
"loc_data": "{2936,9652,0,1,3}-{2932,9809,0,1,0}-{2929,9803,0,1,2}-{2934,9795,0,1,6}-{2933,9791,0,1,1}-{3052,3117,2,1,1}-{2841,9557,0,1,3}-{2831,9562,0,1,3}-{2838,9605,0,1,3}-{3058,10128,0,1,0}-{3046,10139,0,1,0}-{3110,3157,2,1,5}"
|
||||
"loc_data": "{2936,9652,0,1,3}-{2926,9803,0,1,0}-{2935,9794,0,1,0}-{3052,3117,2,1,1}-{2841,9557,0,1,3}-{2831,9562,0,1,3}-{2838,9605,0,1,3}-{3058,10128,0,1,0}-{3046,10139,0,1,0}-{3110,3157,2,1,5}"
|
||||
},
|
||||
{
|
||||
"npc_id": "83",
|
||||
|
|
@ -348,8 +348,8 @@
|
|||
"loc_data": "{2602,3267,0,1,6}-{2603,3270,0,1,4}-{2607,3268,0,1,5}-{3275,3154,0,1,6}-{3038,9802,0,1,5}-{3041,9804,0,1,6}-{3040,9795,0,1,7}-{3055,9776,0,1,4}-{3039,9769,0,1,6}-{3049,9764,0,1,3}-{3050,9770,0,1,1}-{3039,9765,0,1,1}-{3048,9762,0,1,4}-{3044,9760,0,1,6}-{3048,9779,0,1,1}-{2870,3166,0,1,3}-{2868,3159,0,1,4}-{2867,3172,0,1,5}-{2813,3112,0,1,4}-{2858,3167,0,1,3}-{2846,3153,0,1,3}-{2851,3149,0,1,1}-{2789,2949,0,1,3}-{2787,2943,0,1,3}-{2781,2949,0,1,3}-{3253,9909,0,1,4}-{3300,3312,0,1,1}-{3300,3305,0,1,3}-{3298,3300,0,1,5}-{3298,3294,0,1,0}-{3299,3290,0,1,6}-{2645,9823,0,1,1}-{2641,9819,0,1,7}-{2641,9817,0,1,2}-{2642,9813,0,1,5}-{2639,9809,0,1,2}-{2585,3479,0,1,1}-{2578,3476,0,1,7}-{2588,3485,0,1,3}"
|
||||
},
|
||||
{
|
||||
"npc_id": "108",
|
||||
"loc_data": "{2715,3218,0,1,0}-{2719,3223,0,1,0}-{2720,3212,0,1,0}-{2722,3220,0,1,0}-{2724,3215,0,1,0}-{2729,3224,0,1,0}-{2733,3225,0,1,0}-{2936,9777,0,1,0}-{2934,9765,0,1,0}-{2932,9755,0,1,0}-{2726,3217,0,1,0}-{2728,3218,0,1,0}-{2735,3219,0,1,0}-{2723,3212,0,1,0}-{2721,3216,0,1,0}-{2716,3219,0,1,0}-{2725,3227,0,1,0}"
|
||||
"npc_id": "108",
|
||||
"loc_data": "{2941,9779,0,1,0}-{2934,9776,0,1,0}-{2934,9768,0,1,0}-{2934,9757,0,1,0}-{2930,9752,0,1,0}-{2732,3225,0,1,0}-{2729,3224,0,1,0}-{2719,3223,0,1,0}-{2722,3220,0,1,0}-{2724,3216,0,1,0}-{2721,3213,0,1,0}-{2713,3217,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "109",
|
||||
|
|
@ -385,12 +385,16 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "118",
|
||||
"loc_data": "{3042,3465,0,1,1}-{3035,3443,0,1,6}-{3042,3468,0,1,3}-{3008,3449,0,1,4}-{3000,9842,0,1,2}-{2996,9844,0,1,4}-{3003,9828,0,1,1}-{2995,9811,0,1,3}-{3002,9811,0,1,3}-{2994,9809,0,1,5}-{3004,9813,0,1,6}-{2998,9828,0,1,4}-{3004,9799,0,1,4}-{2997,9809,0,1,0}-{3019,9813,0,1,4}-{2983,9807,0,1,6}-{3012,9812,0,1,3}-{3010,9811,0,1,3}-{2964,9811,0,1,1}-{3025,9801,0,1,4}-{3026,9824,0,1,1}-{3018,9819,0,1,6}-{3028,9815,0,1,3}-{3024,9811,0,1,4}-{3021,9826,0,1,5}-{3022,9832,0,1,1}-{3023,9833,0,1,6}-{3027,9833,0,1,3}-{3028,9828,0,1,6}-{3023,9814,0,1,6}-{3042,9831,0,1,4}-{3024,9824,0,1,6}-{3019,9847,0,1,0}-{3034,9847,0,1,7}-{3021,9851,0,1,5}-{3043,9824,0,1,3}-{3038,9821,0,1,1}-{3044,9818,0,1,4}-{3047,9814,0,1,4}-{3037,9814,0,1,6}-{2603,3056,0,1,0}-{2598,3064,0,1,3}-{2589,3068,0,1,5}"
|
||||
"loc_data": "{2930,9703,0,1,0}-{2933,9702,0,1,0}-{3042,3465,0,1,1}-{3035,3443,0,1,6}-{3042,3468,0,1,3}-{3008,3449,0,1,4}-{3000,9842,0,1,2}-{2996,9844,0,1,4}-{3003,9828,0,1,1}-{2995,9811,0,1,3}-{3002,9811,0,1,3}-{2994,9809,0,1,5}-{3004,9813,0,1,6}-{2998,9828,0,1,4}-{3004,9799,0,1,4}-{2997,9809,0,1,0}-{3019,9813,0,1,4}-{2983,9807,0,1,6}-{3012,9812,0,1,3}-{3010,9811,0,1,3}-{2964,9811,0,1,1}-{3025,9801,0,1,4}-{3026,9824,0,1,1}-{3018,9819,0,1,6}-{3028,9815,0,1,3}-{3024,9811,0,1,4}-{3021,9826,0,1,5}-{3022,9832,0,1,1}-{3023,9833,0,1,6}-{3027,9833,0,1,3}-{3028,9828,0,1,6}-{3023,9814,0,1,6}-{3042,9831,0,1,4}-{3024,9824,0,1,6}-{3019,9847,0,1,0}-{3034,9847,0,1,7}-{3021,9851,0,1,5}-{3043,9824,0,1,3}-{3038,9821,0,1,1}-{3044,9818,0,1,4}-{3047,9814,0,1,4}-{3037,9814,0,1,6}-{2603,3056,0,1,0}-{2598,3064,0,1,3}-{2589,3068,0,1,5}"
|
||||
},
|
||||
{
|
||||
"npc_id": "119",
|
||||
"loc_data": "{3248,3794,0,1,1}-{2925,9766,0,1,7}-{2921,9758,0,1,3}-{2935,9770,0,1,1}-{2935,9761,0,1,0}-{3029,10313,0,1,4}-{3028,10309,0,1,4}-{3033,10311,0,1,6}-{3035,10309,0,1,1}-{3035,10313,0,1,1}-{3244,3797,0,1,3}-{3245,3790,0,1,4}-{3239,3781,0,1,5}-{3253,3791,0,1,1}-{3245,3802,0,1,1}-{3250,3808,0,1,3}-{3246,3800,0,1,6}-{3246,3795,0,1,2}"
|
||||
"loc_data": "{3248,3794,0,1,1}-{2921,9757,0,1,0}-{2915,9759,0,1,0}-{2927,9761,0,1,0}-{2925,9769,0,1,0}-{2931,9784,0,1,0}-{2938,9788,0,1,0}-{3029,10313,0,1,4}-{3028,10309,0,1,4}-{3033,10311,0,1,6}-{3035,10309,0,1,1}-{3035,10313,0,1,1}-{3244,3797,0,1,3}-{3245,3790,0,1,4}-{3239,3781,0,1,5}-{3253,3791,0,1,1}-{3245,3802,0,1,1}-{3250,3808,0,1,3}-{3246,3800,0,1,6}-{3246,3795,0,1,2}"
|
||||
},
|
||||
{
|
||||
"npc_id": "120",
|
||||
"loc_data": "{2874,9880,0,1,0}-{2861,9874,0,1,0}-{2863,9874,0,1,0}-{2866,9874,0,1,0}-{2865,9877,0,1,0}-{2864,9877,0,1,0}-{2861,9877,0,1,0}-{2867,9877,0,1,0}-{2867,9879,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "122",
|
||||
"loc_data": "{2996,9574,0,1,6}-{3007,9579,0,1,7}-{3001,9580,0,1,4}-{3018,9580,0,1,3}-{3021,9585,0,1,4}-{3024,9582,0,1,4}-{2507,3726,0,1,2}-{2523,3724,0,1,3}-{2535,9556,0,1,4}"
|
||||
|
|
@ -413,7 +417,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "127",
|
||||
"loc_data": "{2956,9794,0,0,0}-{2954,9786,0,0,0}-{2966,9790,0,0,0}-{2963,9781,0,0,0}-{3193,3959,0,0,0}-{3188,3960,0,0,0}-{3190,3962,0,0,0}-{3187,3959,0,0,0}-{3192,3961,0,0,0}-{3187,3960,0,0,0}-{3193,3959,0,0,0}-{3187,3961,0,0,0}"
|
||||
"loc_data": "{2955,9795,0,1,0}-{2956,9791,0,1,0}-{2962,9792,0,1,0}-{2966,9788,0,1,0}-{2959,9783,0,1,0}-{2964,9775,0,1,0}-{2954,9776,0,1,0}-{3193,3959,0,0,0}-{3188,3960,0,0,0}-{3190,3962,0,0,0}-{3187,3959,0,0,0}-{3192,3961,0,0,0}-{3187,3960,0,0,0}-{3193,3959,0,0,0}-{3187,3961,0,0,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "128",
|
||||
|
|
@ -517,7 +521,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "181",
|
||||
"loc_data": "{3105,9942,0,1,3}-{3106,9934,0,1,3}-{3109,9930,0,1,1}-{2937,9847,0,0,0}-{2930,9850,0,0,0}-{2934,9846,0,0,0}-{2930,9845,0,0,0}-{2563,3355,0,1,4}-{2561,3355,0,1,3}-{2561,3357,0,1,1}-{2563,3358,0,1,4}"
|
||||
"loc_data": "{2937,9847,0,1,0}-{2934,9846,0,1,0}-{2929,9848,0,1,0}-{2931,9846,0,1,0}-{2937,9849,0,1,0}-{2936,9850,0,1,0}-{3105,9942,0,1,3}-{3106,9934,0,1,3}-{3109,9930,0,1,1}-{2563,3355,0,1,4}-{2561,3355,0,1,3}-{2561,3357,0,1,1}-{2563,3358,0,1,4}"
|
||||
},
|
||||
{
|
||||
"npc_id": "182",
|
||||
|
|
@ -1115,13 +1119,9 @@
|
|||
"npc_id": "425",
|
||||
"loc_data": "{2717,5332,0,1,7}"
|
||||
},
|
||||
{
|
||||
"npc_id": "428",
|
||||
"loc_data": "{2361,5209,0,1,4}-{2359,5213,0,1,1}-{2364,5215,0,1,6}-{2361,5216,0,1,1}-{2361,5212,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "429",
|
||||
"loc_data": "{2363,5214,0,1,6}-{2358,5214,0,1,7}-{2361,5212,0,1,6}"
|
||||
"loc_data": "{2363,5214,0,1,6}-{2358,5214,0,1,7}-{2361,5212,0,1,6}-{2361,5209,0,1,4}-{2359,5213,0,1,1}-{2364,5215,0,1,6}-{2361,5216,0,1,1}-{2361,5212,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "437",
|
||||
|
|
@ -2047,6 +2047,10 @@
|
|||
"npc_id": "797",
|
||||
"loc_data": "{2900,3511,1,1,6}"
|
||||
},
|
||||
{
|
||||
"npc_id": "798",
|
||||
"loc_data": "{2930,9686,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "799",
|
||||
"loc_data": "{2778,3197,0,1,4}-{2777,3194,0,1,4}-{2777,3199,0,1,3}-{2771,3193,0,1,3}-{2761,3192,0,1,5}-{2775,3190,0,1,4}-{2803,3195,0,1,4}"
|
||||
|
|
@ -2484,7 +2488,7 @@
|
|||
"loc_data": "{3409,3489,0,1,4}-{3413,3485,0,1,4}-{3414,3491,1,1,6}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1047",
|
||||
"npc_id": "7690",
|
||||
"loc_data": "{3415,3489,2,0,0}"
|
||||
},
|
||||
{
|
||||
|
|
@ -2492,7 +2496,7 @@
|
|||
"loc_data": "{3437,3486,0,0,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1049",
|
||||
"npc_id": "7707",
|
||||
"loc_data": "{3440,9895,0,0,0}"
|
||||
},
|
||||
{
|
||||
|
|
@ -2961,7 +2965,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "1228",
|
||||
"loc_data": "{3420,3302,0,1,1}-{3424,3296,0,1,4}-{3509,3440,0,1,4}-{3518,3454,0,1,1}-{3504,3406,0,1,4}-{3497,3404,0,1,1}"
|
||||
"loc_data": "{3469,3346,0,1,0}-{3494,3447,0,1,0}-{3530,3440,0,1,0}-{3556,3453,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1229",
|
||||
|
|
@ -2973,7 +2977,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "1231",
|
||||
"loc_data": "{3426,3271,0,1,4}-{3435,3268,0,1,7}-{3443,3266,0,1,7}-{3442,3319,0,1,1}-{3445,3318,0,1,6}-{3518,3397,0,1,4}-{3519,3408,0,1,2}-{3516,3410,0,1,2}-{3489,3391,0,1,2}-{3487,3409,0,1,3}"
|
||||
"loc_data": "{3504,3437,0,1,0}-{3509,3437,0,1,0}-{3498,3419,0,1,0}-{3493,3413,0,1,0}-{3524,3397,0,1,0}-{3438,3354,0,1,0}-{3429,3313,0,1,0}-{3429,3314,0,1,0}-{3437,3312,0,1,0}-{3437,3311,0,1,0}-{3451,3308,0,1,0}-{3447,3268,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1232",
|
||||
|
|
@ -2981,7 +2985,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "1233",
|
||||
"loc_data": "{3432,3285,0,1,4}-{3434,3288,0,1,5}-{3428,3290,0,1,3}-{3440,3295,0,1,4}-{3436,3288,0,1,1}-{3446,3289,0,1,3}-{3514,3415,0,1,6}-{3509,3415,0,1,1}-{3516,3402,0,1,2}-{3492,3393,0,1,7}-{3493,3401,0,1,6}-{3487,3406,0,1,3}"
|
||||
"loc_data": "{3485,3443,0,1,0}-{3516,3441,0,1,0}-{3537,3428,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1234",
|
||||
|
|
@ -3547,29 +3551,29 @@
|
|||
"npc_id": "1621",
|
||||
"loc_data": "{2797,10035,0,1,6}-{2787,10032,0,1,3}-{2802,10031,0,1,3}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1623",
|
||||
"loc_data": "{2725,9999,0,1,6}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1624",
|
||||
"loc_data": "{3179,5522,0,1,6}-{3223,9393,0,1,5}-{3225,9401,0,1,0}-{3222,9375,0,1,6}-{3220,9380,0,1,6}-{3215,9364,0,1,3}-{3213,9361,0,1,1}-{3212,9355,0,1,2}-{3230,9367,0,1,3}-{3240,9350,0,1,5}-{3248,9348,0,1,4}-{3255,9350,0,1,4}-{3256,9392,0,1,4}-{3168,5513,0,1,3}-{3174,5514,0,1,6}-{3178,5517,0,1,4}-{3178,5528,0,1,1}-{3169,5516,0,1,3}-{3179,5524,0,1,4}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1626",
|
||||
"loc_data": "{3165,5537,0,1,3}-{3159,5538,0,1,4}-{3155,5539,0,1,3}-{3158,5537,0,1,4}"
|
||||
"loc_data": "{2723,10005,0,1,0}-{2726,9998,0,1,1}-{2723,10009,0,1,3}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1627",
|
||||
"loc_data": "{2724,10008,0,1,4}"
|
||||
"loc_data": "{2724,10008,0,1,4}-{2721,10005,0,1,1}-{2724,10005,0,1,3}-{2729,10004,0,1,3}-{2724,10012,0,1,4}-{2718,10009,0,1,1}-{2721,10001,0,1,7}-{2720,9996,0,1,7}-{2721,10006,0,1,3}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1628",
|
||||
"loc_data": "{2723,10004,0,1,4}-{2722,9999,0,1,1}-{2729,10002,0,1,1}"
|
||||
"loc_data": "{2723,10004,0,1,4}-{2722,9999,0,1,1}-{2729,10002,0,1,1}-{3155,5536,0,1,4}-{3156,5540,0,1,3}-{3157,5538,0,1,2}-{3166,5537,0,1,1}-{3165,5541,0,1,3}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1629",
|
||||
"loc_data": "{2723,10005,0,1,0}-{2726,9998,0,1,1}-{2723,10009,0,1,3}-{2727,9998,0,1,4}-{2727,10001,0,1,3}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1630",
|
||||
"loc_data": "{2721,10005,0,1,1}-{2724,10005,0,1,3}-{2729,10004,0,1,3}-{2724,10012,0,1,4}-{2718,10009,0,1,1}-{2721,10001,0,1,7}-{2720,9996,0,1,7}-{2721,10006,0,1,3}"
|
||||
"loc_data": "{3162,5538,0,1,2}-{3157,5538,0,1,4}-{3155,5537,0,1,1}-{3164,5538,0,1,2}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1631",
|
||||
|
|
@ -4359,6 +4363,10 @@
|
|||
"npc_id": "2310",
|
||||
"loc_data": "{3025,3312,0,1,4}-{3043,3308,0,1,6}-{3023,3297,0,1,5}-{2928,3282,0,1,1}-{2927,3269,0,1,1}"
|
||||
},
|
||||
{
|
||||
"npc_id": "2311",
|
||||
"loc_data": "{3035,3296,0,0,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "2312",
|
||||
"loc_data": "{3014,3292,0,0,0}"
|
||||
|
|
@ -6281,7 +6289,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "4383",
|
||||
"loc_data": "{2321,5225,0,0,3}-{2321,5223,0,0,4}-{2317,5229,0,0,7}-{2322,5225,0,0,1}-{2325,5231,0,0,6}-{2321,5225,0,0,1}-{2314,5227,0,0,2}-{2312,5229,0,0,2}-{2330,5229,0,0,1}-{2324,5233,0,0,4}-{2320,5232,0,0,3}-{2324,5237,0,0,1}-{2329,5229,0,0,6}-{2315,5227,0,0,7}-{2318,5226,0,0,6}-{2322,5222,0,0,6}"
|
||||
"loc_data": "{2321,5225,0,1,3}-{2321,5223,0,1,4}-{2317,5229,0,1,7}-{2322,5225,0,1,1}-{2325,5231,0,1,6}-{2321,5225,0,1,1}-{2314,5227,0,1,2}-{2312,5229,0,1,2}-{2330,5229,0,1,1}-{2324,5233,0,1,4}-{2320,5232,0,1,3}-{2324,5237,0,1,1}-{2329,5229,0,1,6}-{2315,5227,0,1,7}-{2318,5226,0,1,6}-{2322,5222,0,1,6}"
|
||||
},
|
||||
{
|
||||
"npc_id": "4384",
|
||||
|
|
@ -6793,7 +6801,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "4696",
|
||||
"loc_data": "{3118,3695,0,1,6}-{3010,3851,0,1,1}-{2839,9560,0,1,4}-{2846,9613,0,1,6}-{3062,10131,0,1,0}"
|
||||
"loc_data": "{3118,3695,0,1,6}-{2931,9808,0,1,0}-{2930,9799,0,1,0}-{3010,3851,0,1,1}-{2839,9560,0,1,4}-{2846,9613,0,1,6}-{3062,10131,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "4697",
|
||||
|
|
@ -8523,6 +8531,10 @@
|
|||
"npc_id": "6090",
|
||||
"loc_data": "{2932,3245,0,1,0}-{2934,3246,0,1,3}"
|
||||
},
|
||||
{
|
||||
"npc_id": "6101",
|
||||
"loc_data": "{2932,9811,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "6102",
|
||||
"loc_data": "{1762,5329,0,1,1}"
|
||||
|
|
@ -10730,5 +10742,17 @@
|
|||
{
|
||||
"npc_id": "312",
|
||||
"loc_data": "{2421,3789,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1164",
|
||||
"loc_data": "{2780,3058,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1051",
|
||||
"loc_data": "{3440,9738,1,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "1052",
|
||||
"loc_data": "{3420,3442,0,1,0}-{3429,3436,0,1,0}-{3439,3437,0,1,0}-{3448,3444,0,1,0}-{3458,3433,0,1,0}-{3459,3419,0,1,0}-{3449,3420,0,1,0}-{3441,3421,0,1,0}-{3427,3421,0,1,0}-{3414,3422,0,1,0}-{3411,3423,0,1,0}-{3415,3414,0,1,0}-{3410,3409,0,1,0}-{3422,3405,0,1,0}-{3431,3402,0,1,0}-{3444,3405,0,1,0}-{3453,3397,0,1,0}-{3467,3402,0,1,0}-{3473,3395,0,1,0}-{3470,3385,0,1,0}-{3463,3379,0,1,0}-{3451,3380,0,1,0}-{3445,3374,0,1,0}-{3438,3365,0,1,0}-{3429,3367,0,1,0}-{3417,3367,0,1,0}-{3413,3362,0,1,0}-{3417,3358,0,1,0}-{3426,3352,0,1,0}-{3435,3349,0,1,0}-{3442,3353,0,1,0}-{3448,3358,0,1,0}-{3457,3355,0,1,0}-{3461,3348,0,1,0}-{3457,3343,0,1,0}-{3471,3344,0,1,0}-{3426,3338,0,1,0}-{3423,3335,0,1,0}"
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -114,7 +114,7 @@
|
|||
"general_store": "true",
|
||||
"id": "13",
|
||||
"title": "General Store (Canifis)",
|
||||
"stock": "{1931,30}-{1935,30}-{1735,10}-{1925,10}-{1923,10}-{1887,10}-{590,10}-{1755,10}-{2347,10}-{550,10}-{9003,10}"
|
||||
"stock": "{1931,30}-{1935,30}-{1735,10}-{1925,10}-{1923,10}-{1887,10}-{590,10}-{1755,10}-{2347,10}-{550,10}-{9003,10}-{3377,10}"
|
||||
},
|
||||
{
|
||||
"npcs": "563",
|
||||
|
|
@ -666,7 +666,7 @@
|
|||
"stock": "{5376,10}-{6032,300}-{5418,10}-{6036,10}-{5354,100}-{5341,10}-{5329,10}-{5343,10}-{952,10}-{5325,10}-{1925,100}-{5331,30}-{12622,10}-{5996,0}-{6006,0}-{1965,0}-{5994,0}-{5931,0}-{6000,0}-{1957,0}-{5504,0}-{5986,0}-{1982,0}-{5982,0}-{6002,0}-{5998,0}"
|
||||
},
|
||||
{
|
||||
"npcs": "1783",
|
||||
"npcs": "2306",
|
||||
"high_alch": "0",
|
||||
"currency": "995",
|
||||
"general_store": "false",
|
||||
|
|
@ -1391,8 +1391,8 @@
|
|||
"currency": "995",
|
||||
"general_store": "false",
|
||||
"id": "157",
|
||||
"title": "Draynor Seed Marker",
|
||||
"stock": "{5318,0}-{5319,0}-{5324,0}-{5322,0}-{5320,0}-{5323,0}-{5321,0}-{5305,0}-{5306,5}-{5097,20}-{5096,20}-{5307,20}-{5308,5}-{5310,0}-{5311,0}"
|
||||
"title": "Draynor Seed Market",
|
||||
"stock": "{5318,20}-{5319,10}-{5324,10}-{5322,0}-{5320,0}-{5323,0}-{5321,0}-{5305,20}-{5306,5}-{5097,20}-{5096,20}-{5307,20}-{5308,10}-{5309,5}-{5310,0}-{5311,0}"
|
||||
},
|
||||
{
|
||||
"npcs": "3205",
|
||||
|
|
@ -2122,5 +2122,23 @@
|
|||
"id": "239",
|
||||
"title": "Contraband yak produce.",
|
||||
"stock": "{10818,25}-{10816,50}-{10814,50}-{10820,10}"
|
||||
},
|
||||
{
|
||||
"npcs": "1163,1164",
|
||||
"high_alch": "0",
|
||||
"currency": "995",
|
||||
"general_store": "false",
|
||||
"id": "240",
|
||||
"title": "Tiadeche's Karambwan Stall",
|
||||
"stock": "{3142,10}-{3157,10}"
|
||||
},
|
||||
{
|
||||
"npcs": "",
|
||||
"high_alch": "0",
|
||||
"currency": "995",
|
||||
"general_store": "false",
|
||||
"id": "241",
|
||||
"title": "Wishing Well",
|
||||
"stock": "{12204,10}-{12207,10}-{12210,0}-{12213,0}-{12216,0}-{12219,0}-{12222,0}-{12183,65000}-{12155,5000}"
|
||||
}
|
||||
]
|
||||
|
|
@ -2656,8 +2656,8 @@
|
|||
<offer>
|
||||
<id>379</id>
|
||||
<value>268</value>
|
||||
<uniqueTrades>0</uniqueTrades>
|
||||
<totalValue>0</totalValue>
|
||||
<uniqueTrades>173</uniqueTrades>
|
||||
<totalValue>57782</totalValue>
|
||||
<lastUpdate>0</lastUpdate>
|
||||
</offer>
|
||||
<offer>
|
||||
|
|
|
|||
Binary file not shown.
BIN
Server/libs/classgraph-4.8.98.jar
Normal file
BIN
Server/libs/classgraph-4.8.98.jar
Normal file
Binary file not shown.
BIN
Server/libs/colormath-jvm-2.0.0.jar
Normal file
BIN
Server/libs/colormath-jvm-2.0.0.jar
Normal file
Binary file not shown.
BIN
Server/libs/json-simple-1.1.1.jar
Normal file
BIN
Server/libs/json-simple-1.1.1.jar
Normal file
Binary file not shown.
BIN
Server/libs/kotlin-reflect-1.5.20.jar
Normal file
BIN
Server/libs/kotlin-reflect-1.5.20.jar
Normal file
Binary file not shown.
BIN
Server/libs/markdown-jvm-0.2.4.jar
Normal file
BIN
Server/libs/markdown-jvm-0.2.4.jar
Normal file
Binary file not shown.
BIN
Server/libs/mordant-jvm-2.0.0-alpha2.jar
Normal file
BIN
Server/libs/mordant-jvm-2.0.0-alpha2.jar
Normal file
Binary file not shown.
BIN
Server/libs/mysql-connector-java-8.0.21.jar
Normal file
BIN
Server/libs/mysql-connector-java-8.0.21.jar
Normal file
Binary file not shown.
Binary file not shown.
|
|
@ -15,7 +15,7 @@ import core.cache.misc.buffer.ByteBufferUtils;
|
|||
* The server data storage.
|
||||
* @author Emperor
|
||||
*/
|
||||
public final class ServerStore {
|
||||
public final class AriosStore {
|
||||
|
||||
/**
|
||||
* The storage.
|
||||
|
|
@ -100,10 +100,6 @@ public class BZip2Decompressor {
|
|||
i1++;
|
||||
j1--;
|
||||
} while (true);
|
||||
if (j1 == 0) {
|
||||
i = 1;
|
||||
break;
|
||||
}
|
||||
abyte0[i1] = byte4;
|
||||
i1++;
|
||||
j1--;
|
||||
|
|
|
|||
|
|
@ -139,8 +139,11 @@ public class Definition<T extends Node> {
|
|||
public String getExamine() {
|
||||
if (examine == null) {
|
||||
try {
|
||||
examine = handlers.get("examine").toString();
|
||||
} catch (Exception e){}
|
||||
if(handlers.get("examine") != null)
|
||||
examine = handlers.get("examine").toString();
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(examine == null) {
|
||||
if (name.length() > 0) {
|
||||
examine = "It's a" + (StringUtils.isPlusN(name) ? "n " : " ") + name + ".";
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package core.cache.def.impl;
|
|||
import java.io.BufferedWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -71,7 +73,7 @@ public final class CS2Mapping {
|
|||
*/
|
||||
public static void main(String... args) throws Throwable {
|
||||
GameWorld.prompt(false);
|
||||
BufferedWriter bw = new BufferedWriter(new FileWriter("./cs2.txt"));
|
||||
BufferedWriter bw = Files.newBufferedWriter(Paths.get("./cs2.txt"));
|
||||
for (int i = 0; i < 10000; i++) {
|
||||
CS2Mapping mapping = forId(i);
|
||||
if (mapping == null) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class GraphicDefinition {
|
|||
if (def != null) {
|
||||
return def;
|
||||
}
|
||||
byte[] data = Cache.getIndexes()[21].getFileData(gfxId >>> 735411752, gfxId & 0xff);
|
||||
byte[] data = Cache.getIndexes()[21].getFileData(gfxId >>> 8, gfxId & 0xff);
|
||||
def = new GraphicDefinition();
|
||||
def.graphicsId = gfxId;
|
||||
if (data != null) {
|
||||
|
|
|
|||
|
|
@ -57,10 +57,8 @@ public final class NPCDefinition extends Definition<NPC> {
|
|||
*/
|
||||
public boolean isVisibleOnMap;
|
||||
|
||||
/**
|
||||
* The examine option value
|
||||
*/
|
||||
public String examine;
|
||||
|
||||
/* public String examine;*/
|
||||
|
||||
/**
|
||||
* The drop tables.
|
||||
|
|
@ -201,7 +199,7 @@ public final class NPCDefinition extends Definition<NPC> {
|
|||
NPCDefinition def = DEFINITIONS.get(id);
|
||||
if (def == null) {
|
||||
def = new NPCDefinition(id);
|
||||
byte[] data = Cache.getIndexes()[18].getFileData(id >>> 134238215, id & 0x7f);
|
||||
byte[] data = Cache.getIndexes()[18].getFileData(id >>> 7, id & 0x7f);
|
||||
if (data == null) {
|
||||
if (id != -1) {
|
||||
// System.out.println("Failed loading NPC " + id + ".");
|
||||
|
|
@ -625,6 +623,8 @@ public final class NPCDefinition extends Definition<NPC> {
|
|||
case 4:
|
||||
name = NPCConfigParser.DEATH_ANIMATION;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return getConfiguration(name, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,12 +64,11 @@ public class RenderAnimationDefinition {
|
|||
* @return The render animation definitions.
|
||||
*/
|
||||
public static RenderAnimationDefinition forId(int animId) {
|
||||
RenderAnimationDefinition defs = new RenderAnimationDefinition();
|
||||
if (animId == -1) {
|
||||
return null;
|
||||
}
|
||||
byte[] data = Cache.getIndexes()[2].getFileData(32, animId);
|
||||
defs = new RenderAnimationDefinition();
|
||||
RenderAnimationDefinition defs = new RenderAnimationDefinition();
|
||||
if (data != null) {
|
||||
defs.parse(ByteBuffer.wrap(data));
|
||||
} else {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue