Jump to content

interact.() clicks wrong option sometimes


Recommended Posts

Posted

Hello, I'm a new poster and I hope I'm doing this right.

I wrote my own script that steals from chests, but some are trapped so I made it so that it will always click the "Search for traps" option, not the "Open" one.

However, it seems that every now and then the bot will click the "Open" button and take damage. This shouldn't be the case at all since "Open" isn't even included in the script.

Anyone have any ideas? Is there a bit of code that can tell it to be sure NOT to click "Open"?

Thanks much!

Posted

It could be that the Open option is the right-click option at the time of starting the interaction event; but then the object changes state before the actual click is executed?

 

About one of the only scenarios I can think of.

 

You could enforce right-click interactions if you want to make sure that 'Open' is never selected.

This could be done by right clicking the chest and then using MenuAPI to find and click the option

Posted (edited)

I'm not sure, when i want to use a object i normally just use this; works fine this way.

 

The only issue I had with that was the fact that right after he would open the chest, he would walk to a chest across the room and start mucking about with that one.

 

 

It could be that the Open option is the right-click option at the time of starting the interaction event; but then the object changes state before the actual click is executed?

 

About one of the only scenarios I can think of.

 

You could enforce right-click interactions if you want to make sure that 'Open' is never selected.

This could be done by right clicking the chest and then using MenuAPI to find and click the option

 

 

I'll give this a try and will report back with the results. Thanks! 

Edited by LSFKing
Posted

Okay, fixed it. What I did was put a delay between right-clicking and selecting the option and I haven't had any issues since. Plus, I added a failsafe so that if one of my bots take damage, it logouts and turns itself off so I immediately know the issue.

Thanks all for your input, much appreciated!

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