Jump to content

interfaces interacting & nmz fightground


Recommended Posts

Posted

Hi, im trying to make the bot press Accept in this interface:

 

f4dc0d5910.png

 

        RS2InterfaceChild accept = interfaces.get(187).getChild(1);            
if (accept != null) {
                interfaces.interactWithChild(187, 1, "Continue");
                sleep(random(700, 1400));
            }

it doesnt press continue on the accept button but when i drag my mouse over the accept button it presses accept i have no idea why it won't drag the mouse to the accept button

 

and i had another question how do i make my bot run in the middle of the fightground of nmz when i just enter? do i grab my position when i enter and make the bot run to that position but +10 to my current Y or X position or can it be done way simpler?

 

thanks for reading :)

Posted (edited)
RS2Widget accept = getWidgets().get(187, 1, 9);
if(accept != null) {
    accept.interact("Continue");
}

To get to the middle of the instance, find the localX and localY coordinates of where you want to go.

With these you can create valid positions like so:

new Position(getMap().getBaseX() + localX, getMap().getBaseY() + localY, zCoord)
Edited by FrostBug
  • Like 2

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