Kirito 5 Share Posted December 22, 2016 How do u interact with an item that is laying on the ground? Link to comment Share on other sites More sharing options...
Ratchet 15 Share Posted December 22, 2016 import org.dreambot.api.wrappers.items.GroundItem; GroundItem bones = getGroundItems().closest("Bones"); bones.interact("Take"); Link to comment Share on other sites More sharing options...
Kirito 5 Author Share Posted December 22, 2016 import org.dreambot.api.wrappers.items.GroundItem; GroundItem bones = getGroundItems().closest("Bones"); bones.interact("Take"); ty ^^ i'm kinda fucked now --' i closed the window where you see all the packages and sources -.- Link to comment Share on other sites More sharing options...
slasso 27 Share Posted December 22, 2016 ty ^^ i'm kinda fucked now --' i closed the window where you see all the packages and sources -.- What? In your IDE? What are you using Link to comment Share on other sites More sharing options...
Kirito 5 Author Share Posted December 22, 2016 What? In your IDE? What are you using fixed it now i'm in need off a counter so i currently got this int bID = 1050; but i have 8 items that need to be counted how would i make it count the 8 items? Link to comment Share on other sites More sharing options...
slasso 27 Share Posted December 22, 2016 Not sure what you mean Link to comment Share on other sites More sharing options...
Kirito 5 Author Share Posted December 23, 2016 Not sure what you mean so i'm working on my paint right now but for now lets say iron ore was looted while it also needs to loot coal tin copper etc but now it only counts iron ore while it needs to count all the other ores public void pick(String[] party) { int bID = 1050; if (getInventory().isFull()){ if (getLocalPlayer().distance(party) >3) { getWalking().walk(party); sleepUntil(() ->!getLocalPlayer().isMoving(), 300); }else if (!getLocalPlayer().isAnimating() && !getLocalPlayer().isMoving() && party.exists() && party.isOnScreen()) { //&& myORE != null int bCount = getInventory().count(438); party.interact("Take"); if(getLocalPlayer().isAnimating()) { sleepUntil(() -> getInventory().count(bID) > bCount, Calculations.random(10000, 15000)); picked++; } }else getCamera().rotateToEntity(getGroundItems().closest(party)); }else if (getInventory().isFull()) { State = State.BANK; } } Link to comment Share on other sites More sharing options...
slasso 27 Share Posted December 23, 2016 You need separate counters for each one Link to comment Share on other sites More sharing options...
LogicSoup 92 Share Posted December 23, 2016 GroundItem groundItemsToLoot = getGroundItems().closest("item1", "item2"); if (groundItemsToLoot != null) groundItemsToLoot.interact("Take"); something like that. written off the top of my head. Look here for more information http://dreambot.org/javadocs/ For multiple counters just make a switch(int) and pass the groundItem id. if it matches the case -> increment by 1 on the specified variable Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.