Jump to content

Why would this fail?


harrypotter

Recommended Posts

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?

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...