Jump to content
Tommm39

Script occasionally stops during dropAll()

Recommended Posts

if (getInventory().dropAllExcept("Bird nest", axeName)) {

This is the code I use, occasionally I've noticed that the bot kind of gets stuck because it's accidentally clicked the "Use" option on one of the logs. Is there any way that I can fix this? I was thinking I could put an if statement somewhere to check if an item is selected then deselect it but I'm not really sure how to structure it.

I'm running on low CPU mode so many that's what's causing it? Any feedback would be greatly appreciated

Link to comment
Share on other sites

I'm suprised that dropAll() doesn't fix itself if this happens? Low-cpu is likely the cause of the misclick in the first place, but misclicks can certainly happen in normal mode as well so recovery is important.

Instead, you can do the dropping yourself - this way you can implement the check yourself manually. I'd advice still using the 'drop' function, perhaps only on one item per onLoop iteration however.

Best of luck

Apa

Link to comment
Share on other sites

7 minutes ago, Apaec said:

I'm suprised that dropAll() doesn't fix itself if this happens? Low-cpu is likely the cause of the misclick in the first place, but misclicks can certainly happen in normal mode as well so recovery is important.

Instead, you can do the dropping yourself - this way you can implement the check yourself manually. I'd advice still using the 'drop' function, perhaps only on one item per onLoop iteration however.

Best of luck

Apa

Sounds good, thanks for the idea

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.

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