forked from 2009Scape/Server
Server setup work
This commit is contained in:
parent
b457903f02
commit
bb273fd93a
13 changed files with 463 additions and 309 deletions
365
Server/org/crandor/cache/def/impl/test.txt
vendored
Normal file
365
Server/org/crandor/cache/def/impl/test.txt
vendored
Normal file
|
|
@ -0,0 +1,365 @@
|
|||
private void readValues(int i, InputStream stream, int opcode) {
|
||||
if (opcode != 1 && opcode != 5) {
|
||||
if (opcode != 2) {
|
||||
if (opcode != 14) {
|
||||
if (opcode != 15) {
|
||||
if (opcode == 17) {
|
||||
projectileCliped = false;
|
||||
clipType = 0;
|
||||
} else if (opcode != 18) {
|
||||
if (opcode == 19)
|
||||
secondInt = stream.readUnsignedByte();
|
||||
else if (opcode == 21)
|
||||
aByte3912 = (byte) 1;
|
||||
else if (opcode != 22) {
|
||||
if (opcode != 23) {
|
||||
if (opcode != 24) {
|
||||
if (opcode == 27)
|
||||
clipType = 1;
|
||||
else if (opcode == 28)
|
||||
anInt3892 = (stream
|
||||
.readUnsignedByte() << 2);
|
||||
else if (opcode != 29) {
|
||||
if (opcode != 39) {
|
||||
if (opcode < 30 || opcode >= 35) {
|
||||
if (opcode == 40) {
|
||||
int i_53_ = (stream
|
||||
.readUnsignedByte());
|
||||
originalColors = new short[i_53_];
|
||||
modifiedColors = new short[i_53_];
|
||||
for (int i_54_ = 0; i_53_ > i_54_; i_54_++) {
|
||||
originalColors[i_54_] = (short) (stream
|
||||
.readUnsignedShort());
|
||||
modifiedColors[i_54_] = (short) (stream
|
||||
.readUnsignedShort());
|
||||
}
|
||||
} else if (opcode != 41) {
|
||||
if (opcode != 42) {
|
||||
if (opcode != 62) {
|
||||
if (opcode != 64) {
|
||||
if (opcode == 65)
|
||||
anInt3902 = stream
|
||||
.readUnsignedShort();
|
||||
else if (opcode != 66) {
|
||||
if (opcode != 67) {
|
||||
if (opcode == 69)
|
||||
anInt3925 = stream
|
||||
.readUnsignedByte();
|
||||
else if (opcode != 70) {
|
||||
if (opcode == 71)
|
||||
anInt3889 = stream
|
||||
.readShort() << 2;
|
||||
else if (opcode != 72) {
|
||||
if (opcode == 73)
|
||||
secondBool = true;
|
||||
else if (opcode == 74)
|
||||
notCliped = true;
|
||||
else if (opcode != 75) {
|
||||
if (opcode != 77
|
||||
&& opcode != 92) {
|
||||
if (opcode == 78) {
|
||||
anInt3860 = stream
|
||||
.readUnsignedShort();
|
||||
anInt3904 = stream
|
||||
.readUnsignedByte();
|
||||
} else if (opcode != 79) {
|
||||
if (opcode == 81) {
|
||||
aByte3912 = (byte) 2;
|
||||
anInt3882 = 256 * stream
|
||||
.readUnsignedByte();
|
||||
} else if (opcode != 82) {
|
||||
if (opcode == 88)
|
||||
aBoolean3853 = false;
|
||||
else if (opcode != 89) {
|
||||
if (opcode == 90)
|
||||
aBoolean3870 = true;
|
||||
else if (opcode != 91) {
|
||||
if (opcode != 93) {
|
||||
if (opcode == 94)
|
||||
aByte3912 = (byte) 4;
|
||||
else if (opcode != 95) {
|
||||
if (opcode != 96) {
|
||||
if (opcode == 97)
|
||||
aBoolean3866 = true;
|
||||
else if (opcode == 98)
|
||||
aBoolean3923 = true;
|
||||
else if (opcode == 99) {
|
||||
anInt3857 = stream
|
||||
.readUnsignedByte();
|
||||
anInt3835 = stream
|
||||
.readUnsignedShort();
|
||||
} else if (opcode == 100) {
|
||||
anInt3844 = stream
|
||||
.readUnsignedByte();
|
||||
anInt3913 = stream
|
||||
.readUnsignedShort();
|
||||
} else if (opcode != 101) {
|
||||
if (opcode == 102)
|
||||
anInt3838 = stream
|
||||
.readUnsignedShort();
|
||||
else if (opcode == 103)
|
||||
thirdInt = 0;
|
||||
else if (opcode != 104) {
|
||||
if (opcode == 105)
|
||||
aBoolean3906 = true;
|
||||
else if (opcode == 106) {
|
||||
int i_55_ = stream
|
||||
.readUnsignedByte();
|
||||
anIntArray3869 = new int[i_55_];
|
||||
anIntArray3833 = new int[i_55_];
|
||||
for (int i_56_ = 0; i_56_ < i_55_; i_56_++) {
|
||||
anIntArray3833[i_56_] = stream
|
||||
.readUnsignedShort();
|
||||
int i_57_ = stream
|
||||
.readUnsignedByte();
|
||||
anIntArray3869[i_56_] = i_57_;
|
||||
anInt3881 += i_57_;
|
||||
}
|
||||
} else if (opcode == 107)
|
||||
anInt3851 = stream
|
||||
.readUnsignedShort();
|
||||
else if (opcode >= 150
|
||||
&& opcode < 155) {
|
||||
options[opcode
|
||||
+ -150] = stream
|
||||
.readString();
|
||||
/*if (!loader.showOptions)
|
||||
options[opcode + -150] = null;*/
|
||||
} else if (opcode != 160) {
|
||||
if (opcode == 162) {
|
||||
aByte3912 = (byte) 3;
|
||||
anInt3882 = stream
|
||||
.readInt();
|
||||
} else if (opcode == 163) {
|
||||
aByte3847 = (byte) stream
|
||||
.readByte();
|
||||
aByte3849 = (byte) stream
|
||||
.readByte();
|
||||
aByte3837 = (byte) stream
|
||||
.readByte();
|
||||
aByte3914 = (byte) stream
|
||||
.readByte();
|
||||
} else if (opcode != 164) {
|
||||
if (opcode != 165) {
|
||||
if (opcode != 166) {
|
||||
if (opcode == 167)
|
||||
anInt3921 = stream
|
||||
.readUnsignedShort();
|
||||
else if (opcode != 168) {
|
||||
if (opcode == 169) {
|
||||
aBoolean3845 = true;
|
||||
//added opcode
|
||||
}else if (opcode == 170) {
|
||||
int anInt3383 = stream.readUnsignedSmart();
|
||||
//added opcode
|
||||
}else if (opcode == 171) {
|
||||
int anInt3362 = stream.readUnsignedSmart();
|
||||
//added opcode
|
||||
}else if (opcode == 173) {
|
||||
int anInt3302 = stream.readUnsignedShort();
|
||||
int anInt3336 = stream.readUnsignedShort();
|
||||
//added opcode
|
||||
}else if (opcode == 177) {
|
||||
boolean ub = true;
|
||||
//added opcode
|
||||
}else if (opcode == 178) {
|
||||
int db = stream.readUnsignedByte();
|
||||
} else if (opcode == 249) {
|
||||
int i_58_ = stream
|
||||
.readUnsignedByte();
|
||||
if (aClass194_3922 == null) {
|
||||
/*int i_59_ = Class307
|
||||
.method3331(
|
||||
(byte) -117,
|
||||
i_58_);
|
||||
aClass194_3922 = new HashTable(
|
||||
i_59_);*/
|
||||
}
|
||||
for (int i_60_ = 0; i_60_ < i_58_; i_60_++) {
|
||||
boolean bool = stream
|
||||
.readUnsignedByte() == 1;
|
||||
int i_61_ = stream.read24BitInt();
|
||||
Object class279;
|
||||
if (!bool)
|
||||
/*class279 = new IntegerNode(*/
|
||||
stream
|
||||
.readInt();//);
|
||||
else
|
||||
/*class279 = new Class279_Sub4(*/
|
||||
stream
|
||||
.readString();//);
|
||||
/*aClass194_3922
|
||||
.method1598(
|
||||
(long) i_61_,
|
||||
-125,
|
||||
class279);*/
|
||||
}
|
||||
}
|
||||
} else
|
||||
aBoolean3894 = true;
|
||||
} else
|
||||
anInt3877 = stream
|
||||
.readShort();
|
||||
} else
|
||||
anInt3875 = stream
|
||||
.readShort();
|
||||
} else
|
||||
anInt3834 = stream
|
||||
.readShort();
|
||||
} else {
|
||||
int i_62_ = stream
|
||||
.readUnsignedByte();
|
||||
anIntArray3908 = new int[i_62_];
|
||||
for (int i_63_ = 0; i_62_ > i_63_; i_63_++)
|
||||
anIntArray3908[i_63_] = stream
|
||||
.readUnsignedShort();
|
||||
}
|
||||
} else
|
||||
anInt3865 = stream
|
||||
.readUnsignedByte();
|
||||
} else
|
||||
anInt3850 = stream
|
||||
.readUnsignedByte();
|
||||
} else
|
||||
aBoolean3924 = true;
|
||||
} else {
|
||||
aByte3912 = (byte) 5;
|
||||
anInt3882 = stream
|
||||
.readShort();
|
||||
}
|
||||
} else {
|
||||
aByte3912 = (byte) 3;
|
||||
anInt3882 = stream
|
||||
.readUnsignedShort();
|
||||
}
|
||||
} else
|
||||
aBoolean3873 = true;
|
||||
} else
|
||||
aBoolean3895 = false;
|
||||
} else
|
||||
aBoolean3891 = true;
|
||||
} else {
|
||||
anInt3900 = stream
|
||||
.readUnsignedShort();
|
||||
anInt3905 = stream
|
||||
.readUnsignedShort();
|
||||
anInt3904 = stream
|
||||
.readUnsignedByte();
|
||||
int i_64_ = stream
|
||||
.readUnsignedByte();
|
||||
anIntArray3859 = new int[i_64_];
|
||||
for (int i_65_ = 0; i_65_ < i_64_; i_65_++)
|
||||
anIntArray3859[i_65_] = stream
|
||||
.readUnsignedShort();
|
||||
}
|
||||
} else {
|
||||
configFileId = stream
|
||||
.readUnsignedShort();
|
||||
if (configFileId == 65535)
|
||||
configFileId = -1;
|
||||
configId = stream
|
||||
.readUnsignedShort();
|
||||
if (configId == 65535)
|
||||
configId = -1;
|
||||
int i_66_ = -1;
|
||||
if (opcode == 92) {
|
||||
i_66_ = stream
|
||||
.readUnsignedShort();
|
||||
if (i_66_ == 65535)
|
||||
i_66_ = -1;
|
||||
}
|
||||
int i_67_ = stream
|
||||
.readUnsignedByte();
|
||||
childrenIds = new int[i_67_
|
||||
- -2];
|
||||
for (int i_68_ = 0; i_67_ >= i_68_; i_68_++) {
|
||||
childrenIds[i_68_] = stream
|
||||
.readUnsignedShort();
|
||||
if (childrenIds[i_68_] == 65535)
|
||||
childrenIds[i_68_] = -1;
|
||||
}
|
||||
childrenIds[i_67_ + 1] = i_66_;
|
||||
}
|
||||
} else
|
||||
anInt3855 = stream
|
||||
.readUnsignedByte();
|
||||
} else
|
||||
anInt3915 = stream
|
||||
.readShort() << 2;
|
||||
} else
|
||||
anInt3883 = stream
|
||||
.readShort() << 2;
|
||||
} else
|
||||
anInt3917 = stream
|
||||
.readUnsignedShort();
|
||||
} else
|
||||
anInt3841 = stream
|
||||
.readUnsignedShort();
|
||||
} else
|
||||
aBoolean3872 = false;
|
||||
} else
|
||||
aBoolean3839 = true;
|
||||
} else {
|
||||
int i_69_ = (stream
|
||||
.readUnsignedByte());
|
||||
aByteArray3858 = (new byte[i_69_]);
|
||||
for (int i_70_ = 0; i_70_ < i_69_; i_70_++)
|
||||
aByteArray3858[i_70_] = (byte) (stream
|
||||
.readByte());
|
||||
}
|
||||
} else {
|
||||
int i_71_ = (stream
|
||||
.readUnsignedByte());
|
||||
aShortArray3920 = new short[i_71_];
|
||||
aShortArray3919 = new short[i_71_];
|
||||
for (int i_72_ = 0; i_71_ > i_72_; i_72_++) {
|
||||
aShortArray3920[i_72_] = (short) (stream
|
||||
.readUnsignedShort());
|
||||
aShortArray3919[i_72_] = (short) (stream
|
||||
.readUnsignedShort());
|
||||
}
|
||||
}
|
||||
} else
|
||||
options[-30
|
||||
+ opcode] = (stream
|
||||
.readString());
|
||||
} else
|
||||
anInt3840 = (stream.readByte() * 5);
|
||||
} else
|
||||
anInt3878 = stream.readByte();
|
||||
} else {
|
||||
anInt3876 = stream.readUnsignedShort();
|
||||
if (anInt3876 == 65535)
|
||||
anInt3876 = -1;
|
||||
}
|
||||
} else
|
||||
thirdInt = 1;
|
||||
} else
|
||||
aBoolean3867 = true;
|
||||
} else
|
||||
projectileCliped = false;
|
||||
} else
|
||||
sizeY = stream.readUnsignedByte();
|
||||
} else
|
||||
sizeX = stream.readUnsignedByte();
|
||||
} else
|
||||
name = stream.readString();
|
||||
} else {
|
||||
boolean aBoolean1162 = false;
|
||||
if (opcode == 5 && aBoolean1162)
|
||||
method3297(stream);
|
||||
int i_73_ = stream.readUnsignedByte();
|
||||
anIntArrayArray3916 = new int[i_73_][];
|
||||
aByteArray3899 = new byte[i_73_];
|
||||
for (int i_74_ = 0; i_74_ < i_73_; i_74_++) {
|
||||
aByteArray3899[i_74_] = (byte) stream.readByte();
|
||||
int i_75_ = stream.readUnsignedByte();
|
||||
anIntArrayArray3916[i_74_] = new int[i_75_];
|
||||
for (int i_76_ = 0; i_75_ > i_76_; i_76_++)
|
||||
anIntArrayArray3916[i_74_][i_76_] = stream
|
||||
.readUnsignedShort();
|
||||
}
|
||||
if (opcode == 5 && !aBoolean1162)
|
||||
method3297(stream);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
rm -rf org
|
||||
cp -r ../CompiledServer/production/09Scape/org .
|
||||
java -server -cp ".:./bin;.:./lib/*" org.keldagrim.Server false true false true true
|
||||
java -server -cp ".:./bin;.:./lib/*" org.crandor.Server
|
||||
|
|
|
|||
|
|
@ -75,10 +75,14 @@ public final class ServerConstants {
|
|||
};
|
||||
|
||||
public static final Database[] DATABASES = {
|
||||
new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "server" : DATABASE_NAMES[0]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? "" : "2jf4wkz$")),
|
||||
new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "global" : DATABASE_NAMES[1]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? "" : "2jf4wkz$"))
|
||||
new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "server" : DATABASE_NAMES[0]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? getDatabasePassword() : "2jf4wkz$")),
|
||||
new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "global" : DATABASE_NAMES[1]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? getDatabasePassword() : "2jf4wkz$"))
|
||||
};
|
||||
|
||||
|
||||
private static String getDatabasePassword() {
|
||||
return "password123";
|
||||
}
|
||||
|
||||
/**
|
||||
* If MySQL is enabled.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ public final class GameSettings {
|
|||
file = new FileInputStream(path);
|
||||
properties.load(file);
|
||||
} catch (IOException e) {
|
||||
System.out.println("Warning: Could not find file in " + System.getProperty("user.dir") + path);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return properties;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue