legacyZZ Posted April 25, 2019 Share Posted April 25, 2019 (edited) Im looking for a way to pick up all items that appear beneath u literally ALL in the spot u are standing on, I've found this snippet but now instead of item 1 2 etc it needs to be all and only items on myposition GroundItem gI = getGroundItems().closest("item1", "item2"); On 12/30/2016 at 11:34 PM, Chris said: if (gI != null) gI.interact("Take"); Edited April 25, 2019 by legacyZZ Quote Link to comment Share on other sites More sharing options...
dreameo Posted April 25, 2019 Share Posted April 25, 2019 List<GroundItem> groundItems = getGroundItems().get(myPlayer().getX(), myPlayer().getY()); groundItems.forEach(groundItem -> { if(groundItem != null){ groundItem.interact("take"); // not sure if the interact is 'take' } }); // This will spam and you will have to put a type of sleep that you prefer This is just off my head but this is about it. Maybe a syntax error somewhere but you should be able to fix it. Quote Link to comment Share on other sites More sharing options...
legacyZZ Posted April 25, 2019 Author Share Posted April 25, 2019 (edited) Thank you @dreameo this worked, do u know by any chance everytime closest door is closed automatically open it and repeat procces , without moving Those 2 things are only thing i cant seem to figure out in my whole script Edited April 25, 2019 by legacyZZ Quote Link to comment Share on other sites More sharing options...
FuryShark Posted April 25, 2019 Share Posted April 25, 2019 On 4/25/2019 at 9:38 PM, legacyZZ said: Thank you @dreameo this worked, do u know by any chance everytime closest door is closed automatically open it and repeat procces , without moving Those 2 things are only thing i cant seem to figure out in my whole script Expand RS2Object door = getObjects().closest(o -> o.getName().equals("Door") && o.hasAction("Open")); door.interact("Open"); or something like that xD Quote Link to comment Share on other sites More sharing options...
legacyZZ Posted April 26, 2019 Author Share Posted April 26, 2019 On 4/25/2019 at 10:44 PM, FuryShark said: RS2Object door = getObjects().closest(o -> o.getName().equals("Door") && o.hasAction("Open")); door.interact("Open"); or something like that xD Expand Thank you for the help, ive managed to do it 1 Quote Link to comment Share on other sites More sharing options...