Guiness1 0 Posted April 26, 2020 Hi guys, Im just learning to script. I want to click items in my inventory. How do I do this please? Many Thanks Conor
Koschei 147 Posted April 26, 2020 https://dreambot.org/javadocs/org/dreambot/api/methods/container/impl/Inventory.html#interact-java.lang.String-java.lang.String- Example: if (getInventory().interact("Lobster","Eat")){ sleep(1200); }
Guiness1 0 Author Posted April 26, 2020 Thanks Koschie, Im looking to click on 27 items in my invent. How would I go about do that? Thanks!
Koschei 147 Posted April 26, 2020 7 minutes ago, Guiness1 said: Thanks Koschie, Im looking to click on 27 items in my invent. How would I go about do that? Thanks! Can do something like this. for (Item item : getInventory().all(i-> i != null && i.getName().equals("Trout"))) { if (item.interact("Drop")) sleep(200,300); }
Guiness1 0 Author Posted April 26, 2020 Adjusted that to drop what I need. It seems to do the clicking but not on my actual invent. It doesn't swap to my invent before hand. Just clicks on my magic tab is there a way to make sure it's got my invent open? thanks for all the help
Zawy 1037 Posted April 26, 2020 1 hour ago, Guiness1 said: Adjusted that to drop what I need. It seems to do the clicking but not on my actual invent. It doesn't swap to my invent before hand. Just clicks on my magic tab is there a way to make sure it's got my invent open? thanks for all the help getTabs().isOpen && getTabs().open(Tab.INVENTORY) Go look in the docs, its all there
Recommended Posts
Archived
This topic is now archived and is closed to further replies.