Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Rejected Allow Interactable.click() to take an argument for right clicking

Joined
Aug 23, 2015
Messages
1,970
Isn't that what interact() does? Or am I missing something
interact("string") requires you to put in the action of the object, such as "Use". It could left click it if that happens to be the option, or it may right click it and select the option. I want to right click without the option being selected.
 
You can't do "Interactable.interact(Mouse.Button.RIGHT);"

if that's what you were implying.
 
Joined
Aug 23, 2015
Messages
1,970
if( x.hover )
Mouse.click(RIGHT);

Works fine.

to stick to 1 action per loop I usually do
if(!x.getBounds().contains(Mouse.getPosition())){
x.getInteractionPoint().hover();
} else {
Mouse.click(Mouse.Button.RIGHT);
}

which works fine, but I'd still like the argument in .click() so that this isn't necessary.
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
to stick to 1 action per loop I usually do
if(!x.getBounds().contains(Mouse.getPosition())){
x.getInteractionPoint().hover();
} else {
Mouse.click(Mouse.Button.RIGHT);
}

which works fine, but I'd still like the argument in .click() so that this isn't necessary.
The whole thing is one action, you dont need to split that up into several loops. It's not only unnecessary but will also slow your bot down by quite a lot depending on your loop delay.
 
Joined
Aug 23, 2015
Messages
1,970
The whole thing is one action, you dont need to split that up into several loops. It's not only unnecessary but will also slow your bot down by quite a lot depending on your loop delay.
Do u think real players click the button as soon as the item is hovered or shortly after? Not being sarcastic I honestly don't know which would be more human like
 
Joined
Jun 9, 2015
Messages
3,726
interact("string") requires you to put in the action of the object, such as "Use". It could left click it if that happens to be the option, or it may right click it and select the option. I want to right click without the option being selected.
 
You can't do "Interactable.interact(Mouse.Button.RIGHT);"

if that's what you were implying.
Oh right. I misunderstood.
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
Do u think real players click the button as soon as the item is hovered or shortly after? Not being sarcastic I honestly don't know which would be more human like
Irrelevant, if you feel like a short delay inbetween the two things is needed (which i think is not, but thats opinion), add one by using the Execution class :)
 
Client Developer
Joined
Oct 12, 2015
Messages
3,764
Code:
Mouse.click(final Interactable target, final Button button)
 
Top