Jump to content

Any other way to hover an Action?


Recommended Posts

Posted

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.

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