Purpose: How to output what packets are comming to the server.
Difficulty: -5
Assumed Knowledge: Copying & Pasting, Finding Text
Classes Modified: client.java
Credits: Me.
1. Find:
Code:
break;
// any packets we might have missed
default:
interfaceID = inStream.readUnsignedWordA();
int actionButtonId1 = misc.HexToInt(inStream.buffer, 0, packetSize);
println_debug("Unhandled packet ["+packetType+", InterFaceId: " +interfaceID+", size="+packetSize+"]: ]"+misc.Hex(inStream.buffer, 1, packetSize)+"[");
println_debug("Action Button: "+actionButtonId1);
break;
}
After, add:
Code:
if (!(packetType == 0)) {
int interfaceID = inStream.readUnsignedWordA();
int actionButtonId1 = misc.HexToInt(inStream.buffer, 0, packetSize);
misc.println("packetType = "+Integer.toString(packetType)+" | "+"i = "+Integer.toString(i)+" | "+"interfaceID = "+Integer.toString(interfaceID)+" | "+"packetSize = "+Integer.toString(packetSize)+" | "+"actionButtonId1 = "+Integer.toString(actionButtonId1)+" | ");
}
Now, it will output what the packets are in the server window.
Well, enjoy!