Jump to content

Does the bot intentionally double click for no reason?


mr magoo

Recommended Posts

something as simple as:

if (getBank().isOpen() { getBank().depositAll(itemID); }

Seems to run into problems. It SEEMS to click twice very quickly: it right clicks on the item once, begins to move, and then right clicks again all in a very short time frame. The second click is not on an item and thus does not have a deposit-all option, so the bot stutters, and then goes to attempt the deposit again (which at this point works 100% of the time as far as I'm aware).

This is rather frustrating though. I'm not sure if it's a bug or if it's intended but it's a considerable problem when it comes to doing multithreaded processes. I've noticed this issue of double clicking very blatantly in other projects, but now I've run into a stand still for this project due to the problem and will likely stop developing for this platform unless it turns out it's actually a problem on my end, which is my reason for this post. Does this also happen to you? Considering the situation has appeared in numerous projects of mine I'm lead to believe it's not due to something I've done.

Link to comment
Share on other sites

Of course I use sleep. Unless you're unaware the onLoop method must return an integer value for the script to wait. In what manner would using a sleep stop the one line of code I provided to stop executing twice in rapid succession?

It gets called only a maximum of once per execution of onloop, but per observation it very obviously executes more than once per execution of onLoop. This is the problem.

Consider the problem in a vacuum. If the mouse is located ontop of a prayer, and if every iteration of onLoop consisted of left clicking once, sleeping for x amount of time, left clicking again (that is, turning the prayer on and then off), and then sleeping for 5 seconds, there would occasionally be an instance where each click would register twice. The outcome is effectively the same, but the problem is there.

This is a simplified version of the problem but this scenario has appeared often.

Edited by mr magoo
Link to comment
Share on other sites

1 minute ago, mr magoo said:

Of course I use sleep. Unless you're unaware the onLoop method must return an integer value for the script to wait. In what manner would using a sleep stop the one line of code I provided to stop executing twice in rapid succession?

It gets called only a maximum of once per execution of onloop, but per observation it very obviously executes more than once per execution of onLoop. This is the problem.

conditional sleep, whats your return at the end of the loop, like 500ms 

 

Link to comment
Share on other sites

20 minutes ago, mr magoo said:

Of course I use sleep. Unless you're unaware the onLoop method must return an integer value for the script to wait. In what manner would using a sleep stop the one line of code I provided to stop executing twice in rapid succession?

It gets called only a maximum of once per execution of onloop, but per observation it very obviously executes more than once per execution of onLoop. This is the problem.

Consider the problem in a vacuum. If the mouse is located ontop of a prayer, and if every iteration of onLoop consisted of left clicking once, sleeping for x amount of time, left clicking again (that is, turning the prayer on and then off), and then sleeping for 5 seconds, there would occasionally be an instance where each click would register twice. The outcome is effectively the same, but the problem is there.

This is a simplified version of the problem but this scenario has appeared often.

:???: It's like you can check boolean values and use certain sleep classes to sleep until they've executed succesfully. :o 

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