You have to go into your packets (236) and replace it with this:
Code:
case 236: //pickup item
int itemY = inStream.readSignedWordBigEndian();
int itemID = inStream.readUnsignedWord();
int itemX = inStream.readSignedWordBigEndian();
if (System.currentTimeMillis() - lastButton > 800) {
lastButton = System.currentTimeMillis();
} else {
break;
}
apickupid = itemID;
apickupx = itemX;
apickupy = itemY;
break;
And replace your dropItem method with this:
Code:
public void dropItem(int droppedItem, int slot) {
boolean a = true;
if (playerName == null) {
return;
}
if (droppedItem == 4045 && !isInJail()) {
deleteItem(4045, 1);
dealDamage(15);
hitDiff = 15;
plrText = "Ouch!";
plrTextUpdateRequired = true;
updateRequired = true;
hitUpdateRequired = true;
setAnimation(827);
return;
}
if (playerItemsN[slot] != 0 && droppedItem != -1 && playerItems[slot] == droppedItem + 1) {
if (destroyItem(droppedItem)) {
outStream.createFrameVarSizeWord(34);
outStream.writeWord(14171);
outStream.writeByte( 0);
outStream.writeWord(droppedItem + 1);
outStream.writeByte(255);
outStream.writeDWord(1);
outStream.endFrameVarSizeWord();
sendFrame126("Are you sure you want to destroy this object?", 14174);
sendFrame126("Yes", 14175);
sendFrame126("No", 141756);
sendFrame126(""+GetItemName(droppedItem), 14184);
sendFrame126(getMessageA(droppedItem),14182);
sendFrame126(getMessageB(droppedItem),14183);
sendFrame164(14170);
publicDroppendItem = droppedItem;
return;
}
createGroundItem(droppedItem, absX, absY, playerItemsN[slot]);
deleteItem(droppedItem, slot, playerItemsN[slot]);
updateRequired = true;
savegame(false);
}
}