I've been working on some antiban for my scripts where based upon a seed the likelihood of right/left clicking for an interaction varies, this is so user's behavior will vary per account. I've run into a problem however, I cannot figure out how to force a right click when say, interacting with an item in the inventory or an object.
I know I can move the mouse to the object, item, etc, that's simple of course. I also know I can use the method mouse.click(true) to right click when at the destination. The problem is if I move the mouse to the item, right click, then do:
myItem.interact("Use");
The bot will not simply select "Use" from the already open menu(opened via the right click earlier) but rather it will move the mouse, then go back to the item and left click to select "Use", assuming "Use" is the first option available. I had hoped using the mouse.click(true) method would be a good work around since apparently interact(action, boolean rightClick) is not a thing(I swear it used to be?), and InteractionEvent doesn't offer a force right click option. Can anyone help me with this problem? I would be very grateful! Thanks.