Alright i have this atm.
Code:
public void pickupitem() {
try {
if(c == null)
return;
int x = c.instream.readsignedwordbigendiana();
int index = c.instream.readunsignedword();
int y = c.instream.readsignedworda();
int amount = 1;
if(gameengine.distance(x, y, c.absx, c.absy) < 2 && gameengine.distance(x, y, c.absx, c.absy) > -1) {
if(gameengine.debug)
System.out.println("Player ID "+c.playerindex+" picked up item ("+index+", "+amount+", "+x+", "+y+").");
c.playeritems.additem(index, amount);
deletegrounditem(index, x, y);
}
} catch(Exception _ex) {
_ex.printStackTrace();
}
}
As you can see, i don't know how to read the item amount correctly, i took a look in some other servers and noticed they don't have it either, i looked in the client but couldn't find the item amount being sent either lol.
Halp. (H)