Well I have added everything that is needed and I have used this tutorial: http://www.rune-server.org/runescape...y-packets.html but it gives me a error or w/e you want to call it: http://gyazo.com/6891a571ce3f4799eccc712065589f38
If anyone wants to me help me out, then please PM me or just post on this thread and I'd give you teamviewer or my Skype. I really don't find the issue to fix it.
Thank you.
My LoginDecoder:
Code:
int a = in.readInt() & 0xff;
int b = in.readInt() & 0xff;
in.skip(20);
String settings = in.readString();
in.readInt();
/* Cache Idx Verification */
int[] CacheIdxs = new int[34];
for (int i = 0; i < 34; i++) {
CacheIdxs[i] = in.readInt();
}
for (;;) {
if (in.readByte() == 10) {
break;
}
}
in.readLong();
in.readLong();
String username = Misc.formatPlayerNameForProtocol(Misc.longToString(in
.readLong()));
String password = in.readString();
in.readLong();
in.readLong();
Player player = new Player(username, password, null, null, (short) 0, password, (byte) 0);
OutStream outstream = new OutStream();
outstream.writeByte(2);
ch.setPlayer(player);
World.registerConnection(ch, true);
World.java
Code:
public static void registerConnection(ConnectionHandler p, boolean lobby) {
if (lobby)
p.getPlayer().loadLobby(p);
loadLoby()
Code:
public void loadLobby(ConnectionHandler connection) {
setConnection(connection);
setOnline(true);
setWorldlist(new WorldList());
OutStream out = new OutStream();
OutStream out1 = new OutStream();
out.writeByte(getRights());
out1.writeByte(2);
out1.writeByte(2);
out1.writeByte(0);
out1.writeByte(0);
out1.writeByte(0);
out1.writeShort(31);
out1.writeShort(1);
out1.writeShort(0);
out1.writeShort(32512);
out1.writeInt(Misc.IPAddressToNumber("127.0.0.1"));
out1.writeByte(0);
out1.writeShort(0);
out1.writeShort(1);
out1.writeByte(0);
out1.putGJString2(getUsername());
out1.writeByte(0);
out1.writeInt(1);
out1.writeShort(1);
out1.putGJString2("127.0.0.1");
int length = out.getOffset();
out.writeByte(length);
out.writeBytes(out.buffer(), 0, length);
getConnection().write(out);
sendWorldList(true);
}
sendWorldList
Code:
public void sendWorldList(boolean getWorldConfiguration) {
OutStream worldbuffer = new OutStream();
OutStream out = new OutStream();
getWorldlist().loadWorldList(worldbuffer, getWorldConfiguration);
out.writePacketVarShort(48);
out.writeByte(1);
out.writeBytes(worldbuffer.getBuffer(), 0, worldbuffer.getOffset());
out.endPacketVarShort();
getConnection().write(out);
}
WorldList.java and WorldDef can be found here: http://www.rune-server.org/runescape...y-packets.html