I'm trying to make Item on npc for sheep shearing and I tried making this and it doesn't seem to want to work, I put the packet Id as 57 I don't know if that is correct so tell me if it isn't.
Her is what I am using.
Code:
public void processPacket(final Client c, int packetType, int packetSize) {
int itemUsedSlot = c.inStream.readUnsignedWordA();
int itemId = c.playerItems[itemUsedSlot]-1;
int npcId = Server.npcHandler.npcs[c.npcIndex].npcType;
System.out.println("Item: "+itemId);
System.out.println("Npc: "+npcId);
if(npcId == 42 && itemId == 1735) {
c.getItems().addItem(1759, 1);
}
if(itemId == 1735 && npcId == 42) {
c.getItems().addItem(1759, 1);
}
}
Doesn't want to work so please help me.