Skip to content

How to Pick Up Ground Items

  1. You need to find either the item's name (preferred method, as names change less than ID's) or ID you'd like to pick up.
  2. After that, you need to find the ground item, make sure it exists, and then interact with it in the onLoop or another method called by onLoop.

Pick up an item by name

GroundItem item = GroundItems.closest("Coins");

if (item != null) {
    item.interact("Take");
    sleep(2000, 3000);
}

Pick up an item by ID

GroundItem item = GroundItems.closest(995);

if (item != null) {
    item.interact("Take");
    sleep(2000, 3000);
}

Pick up the closest item that matches any name

You can use this to find and pick up the closest item out of a list of names, it will take the closest one it can find.

GroundItem item = GroundItems.closest("Coins", "Bones", "Cowhide");

if (item != null) {
    item.interact("Take");
    sleep(2000, 3000);
}