Strange_Fk Posted May 29, 2016 Share Posted May 29, 2016 I've come up with two ways to hover an action, both have ups and downs. The first was lag free, but not the most effective so I ditched this and came up with this as my second attempt, however it lags slightly whenever it pulls up the menu. int menuActionNumber = getMenuAPI().getMenuIndex(menuName, menuAction); if (!canLoot && menu.isOpen() && menuActionNumber >= 0) { int minOptionX = menu.getX(); int maxOptionX = minOptionX + menu.getWidth(); int minOptionY = menu.getOptionRectangle(menuActionNumber).y; int maxOptionY = minOptionY + 12; sleep(random(611, 711)); mouse.move(random(minOptionX, maxOptionX), random(minOptionY, maxOptionY)); } The if statement is the same for both attempts so if has to do with the body of the if statement that causes the lag. If there is a more effective way to do this it would be much appreciated if someone could send me in the right direction. Quote Link to comment Share on other sites More sharing options...
Soldtodie Posted May 30, 2016 Share Posted May 30, 2016 Just: Mouse.move(menu.getOptionRectangle(menuActionNumber)); 1 Quote Link to comment Share on other sites More sharing options...
Strange_Fk Posted May 31, 2016 Author Share Posted May 31, 2016 Just: Mouse.move(menu.getOptionRectangle(menuActionNumber)); Thanks mah dude, didn't use this exact snippet, but it got me in right direction and now doesn't lag anymore! Quote Link to comment Share on other sites More sharing options...