scape Posted May 4, 2013 Posted May 4, 2013 (edited) final int[] arrowids = { 882, 884, 886, 888, 890, 892, 863, 864, 865 };public int arrowid; void findarrowid() { Player player = client.getMyPlayer(); if (arrowid < 800) { List<GroundItem> list = client.getCurrentRegion().getItems(); Player player = client.getMyPlayer(); NPC attackables = closestNPC(attackable); for (GroundItem g : list) { for (int i : arrowids) { if (attackables != null) { if (player.isUnderAttack() && g.getPosition().distance( player.getPosition()) == 1 && i == g.getId()) { arrowid = g.getId(); log("Arrow id is now " + arrowid + "!"); } } } } } } Pickup method: void pickup() { List<GroundItem> list = client.getCurrentRegion().getItems(); Player player = client.getMyPlayer(); for (GroundItem g : list) { if (g.getId() == arrowid) { try { if (g.getPosition().distance(player.getPosition()) <= 2 && !player.isMoving()) { selectEntityOption(g, "Take"); sleep(random(3000)); } } catch (Exception e) { } } } } Edited May 4, 2013 by scape
scape Posted May 4, 2013 Author Posted May 4, 2013 for what would someone need this? To find the id to pickup an arrow
XavierM Posted May 4, 2013 Posted May 4, 2013 for arrow id you could get the item id from equipment interface
Vitanet Posted May 4, 2013 Posted May 4, 2013 Did you add bolts? in this part final int[] arrowids = { 882, 884, 886, 888, 890, 892, 863, 864, 865 }; you need add ids of bolts toy want example: final int[] arrowids = { 882, 884, 886, 888, 890, 892, 863, 864, 865, you new id, you othernew id, etc };