are any of this stuff important?. for wild attacking because it ant working for some reason
Code:
public void UsePacket() {
/*if (Focus == 0 && packetType == 241) {
for (int i = 0; i < 26; i++) {
if (silentPackets[i] <= 0) {
silentPackets[i] = packetType;
break;
}
}
silentMouseLog++;
if (silentMouseLog >= 5)
appendSilentMouse();
if (silentMouseLog >= 25) {
appendtoTempBanned();
disconnected = true;
}
}*/
just wandering if i should uncomment this or this
Code:
/*if ((Focus != 0 || packetType == 3 || packetType == 202)
&& packetDelay <= 0) {
silentMouseLog = 0;
for (int i = 0; i < 26; i++)
silentPackets[i] = -1;*/
Code:
/*public boolean PacketProcess()
{
try {
if(PlayerHandler.players[playerId] == null || disconnected || in == null)
{
System.out.println("Disconnected 5");
return false;
}
if(timeOutCounter++ <= 15)
{
//break;
//System.out.println("Disconnected ");
//runStream = false;
// disconnected = true;
}
// return false;
int i;
i = 0;
i = in.available();
if(i == 0)
{
return false;
}
if(packetType == -1)
{
packetType = in.read() & 0xff;
packetType = packetType - inStreamDecryption.getNextKey() & 0xff;
packetSize = packetSizes[packetType];
i--;
}
if(packetSize != -1)
{
//break;
}
if(i > 0)
{
packetSize = in.read() & 0xff;
i--;
// break;
}
//return false;
if(i < packetSize)
{
return false;
}
fillInStream(packetSize);
timeOutCounter = 0;
if(packetType > 0)
{
System.out.println("recieved packet: "+packetType);
UsePacket();
// break;
}
packetType = -1;
//return false;
// Exception exception;
//exception;
packetType = -1;
runStream = false;
if(combatDelay <= 0 && deathDelay < 0)
{
//System.out.println("Disconnected 7");
//disconnected = true;
}
// return false;
if(packetType == 72 || packetType == 128)
{
if(IsAttackingNPC && !IsDead)
{
if(Server.s.npcHandler.npcs[attacknpc] != null)
{
if(!Server.s.npcHandler.npcs[attacknpc].IsDead)
{
attackNpc();
} else
{
IsAttackingNPC = false;
}
} else
{
IsAttackingNPC = false;
}
}
if(attackingPlayer && !IsDead)
{
//
if(PlayerHandler.players[attackingPlayerId] != null)
{
//
if(!PlayerHandler.players[attackingPlayerId].IsDead)
{
attackPlayer();
} else
{
attackingPlayer = false;
}
} else
{
attackingPlayer = false;
}
}
}
} catch (Exception e){
}
packetType = -1;
return true;
} */
this is packet process which has been canceled out and been replaced with this
Code:
public boolean PacketProcess() {
if (disconnected) {
System.out.println("Disconnected ");
return false;
}
try {
parseOutgoingPackets();
if (timeOutCounter++ > 20/* && logoutButton*/) {
System.out.println("Disconnected "+playerName+", Data transfer timeout.");
disconnected = true;
return false;
}
if(in == null) return false;
int avail = in.available();
if(avail == 0) return false;
if(packetType == -1) {
packetType = in.read() & 0xff;
if(inStreamDecryption != null)
packetType = packetType - inStreamDecryption.getNextKey() & 0xff;
packetSize = packetSizes[packetType];
avail--;
}
if(packetSize == -1) {
if(avail > 0) {
packetSize = in.read() & 0xff;
avail--;
}
else return false;
}
if(avail < packetSize) return false;
fillInStream(packetSize);
timeOutCounter = 0;
UsePacket();
packetType = -1;
} catch(java.lang.Exception __ex) {
System.out.println("Exception encountered while parsing incoming packets from "+playerName+".");
__ex.printStackTrace();
disconnected = true;
}
return true;
}
as you can see in the other packet process it says attack player so shall i delete the process which isnt canceled out?