Molly Posted June 8, 2016 Share Posted June 8, 2016 (edited) 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. Edited June 8, 2016 by Molly Link to comment Share on other sites More sharing options...
progamerz Posted June 8, 2016 Share Posted June 8, 2016 (edited) 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. if u did right click u can use: if(menu.isOpen()){ menu.selectAction(Action Here); } Or i didnt understand u if this is what u need. Thanks, Progamerz Edited June 8, 2016 by progamerz 2 Link to comment Share on other sites More sharing options...
Chris Posted June 8, 2016 Share Posted June 8, 2016 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. interact(action, boolean rightClick) was removed. Try getting the items location and creating a custom method using the Mouse class & MenuAPI class then just mouse click and check if the correct item is selected. 1 Link to comment Share on other sites More sharing options...
Molly Posted June 8, 2016 Author Share Posted June 8, 2016 Thanks guys! 1 Link to comment Share on other sites More sharing options...
Khaleesi Posted June 8, 2016 Share Posted June 8, 2016 Problem was solved. Link to comment Share on other sites More sharing options...