Jump to content

Why would this fail?


Recommended Posts

Posted
On 4/6/2017 at 6:13 PM, harrypotter said:

This seems to fail on Low CPU mode. It will continue to pick the bush even when the inventory contains Cadava berries.


                if (!script.inventory.contains("Cadava berries")) {
                    if (!bushArea.contains(script.myPosition())) {
                        script.getWalking().webWalk(bushArea);
                    } else {
                        Entity bush = script.getObjects().closest("Cadava bush");
                        if (bush != null) {
                            if (bush.interact("Pick-from")) {
                                Sleep.sleepUntil(() -> script.inventory.contains("Cadava berries"), 5000);
                            }
                        }
                    }
                }

If I pause the script and resume again it works as expected?



When you're picking the berries, is the inventory OPEN? When you pause/resume does it open the inventory?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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