Jump to content

LOOT all items beneath u


legacyZZ

Recommended Posts

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");
if (gI != null) gI.interact("Take");
Edited by legacyZZ
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

1 hour ago, 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

RS2Object door = getObjects().closest(o -> o.getName().equals("Door") && o.hasAction("Open"));

door.interact("Open");

or something like that xD

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...