Guest Apogee Posted April 12, 2014 Share Posted April 12, 2014 I'm looking to detect "pickaxe head"I've done this.String pickhead; -- under class pickhead = "Pickaxe Head"; -- in "onLoop" if (client.getGroundItemDeques().equals(pickhead)) { log("i have detected a pickaxe head on the ground."); -- in "onLoop" } If i am doing this wrong, please let me know. Link to comment Share on other sites More sharing options...
Soldtodie Posted April 12, 2014 Share Posted April 12, 2014 (edited) Use this: public GroundItem getGroundItem(String name) { for(GroundItem item : client.getCurrentRegion().getItems()) { if(item != null) { if(item.getName().equalsIgnoreCase(name)) { return item; } } } return null; } Edited April 12, 2014 by Soldtodie Link to comment Share on other sites More sharing options...
Guest Apogee Posted April 12, 2014 Share Posted April 12, 2014 (edited) Use this: public GroundItem getGroundItem(String name) { for(GroundItem item : client.getCurrentRegion().getItems()) { if(item != null) { if(item.getName().equalsIgnoreCase(name)) { return item; } } } return null; } hmmm, thanks for clarifying. I sort of understand this, Here's what i got: public GroundItem getGroundItem(String name) { pickhead = "Pickaxe head"; for(GroundItem item : client.getCurrentRegion().getItems()) { if(item != null) { if(item.getName().equalsIgnoreCase(pickhead)) { return item; } } } return null; } -- Does it matter where i put that? I have it above "onLoop()" and this at the top under script { String pickhead; Edited April 12, 2014 by Bitter Link to comment Share on other sites More sharing options...
Daviyow Posted April 12, 2014 Share Posted April 12, 2014 (edited) i just use GroundItem hooters = closestGroundItemForName("Hooters"); if(hooters != null) { if(hooters.isVisible()) { hooters.interact("Squeeze"); } else { client.moveCameraToEntity(hooters); } Edited April 12, 2014 by daviyow Link to comment Share on other sites More sharing options...
Guest Apogee Posted April 12, 2014 Share Posted April 12, 2014 (edited) i just use GroundItem hooters = closestGroundItemForName("Hooters"); if(hooters != null) { if(hooters.isVisible()) { hooters.interact("Squeeze"); } else { client.moveCameraToEntity(hooters); } To pick up the item, would i use this?: hooters.interact("Take"); And yes, i know to change hooters to my variables and things. Just unsure if what you have here will work for picking up a ground item and using it on the (equipped) pickaxe handle. Edited April 12, 2014 by Bitter Link to comment Share on other sites More sharing options...
Daviyow Posted April 12, 2014 Share Posted April 12, 2014 yeah take will work you need a different method for equipping tho Link to comment Share on other sites More sharing options...