Jump to content

Script occasionally stops during dropAll()


Recommended Posts

Posted
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

Posted

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

Posted
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

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