Jump to content

interfaces interacting & nmz fightground


Daviyow

Recommended Posts

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 :)

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...