Jump to content

How do I use an object at a certain location?


Recommended Posts

Posted

I'm trying to mine a rock at a specific location, but can't seem to work out how to do it?

I assumed it would be something along of lines of

getObjects().closest("Rock") at location (1334, 1553);

But I can't work out how to add a location to the object. Do I need to make my own method or something to check the location?

like:
 

public boolean rockLocation() {

     if (getObjects().closest("Rock").exists && Location == (1334, 1553)) {

          return true;

     }

}

 

I just don't know how to check the location. Cheers guys

Posted
13 minutes ago, mitsuki said:

Thank you dude, any chance you can explain what the code is doing so i can understand fully using comments? No worries if not man

There are a lot of ways to filter stuff, thats just a quick way to filter the closest object that meets the criteria. You could also filter for .hasAction() or pretty much anything else.

Just google "osbot filter" for more info/examples

  • Heart 1

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