Jump to content
dokato

interaction with object using position

Recommended Posts

for example,

there are multiple objects with the same id in a certain location. But I only want to interact with the object that has a specific position x,y,z. What code could i use for this?

 

Because it will automatically interact with all he objects... something i dont want sad.png

 

 

here:

getObjects().closest(new Filter<RS2Object>() {
        @Override
	public boolean match(RS2Object o) {
	      if(o != null && o.getName().equals("NAME HERE") && o.getPosition().equals(new Position(X,Y,Z)))
	            return true;
	      return false;
	}
});
  • Like 1
Link to comment
Share on other sites

This <3

here:

getObjects().closest(new Filter<RS2Object>() {
        @Override
	public boolean match(RS2Object o) {
	      if(o != null && o.getName().equals("NAME HERE") && o.getPosition().equals(new Position(X,Y,Z)))
	            return true;
	      return false;
	}
});
Why don't you just use the position filter that is now in the api?
Link to comment
Share on other sites

Why don't you just use the position filter that is now in the api?

 

Since Osbot api breaks every time now and then, I prefer you to use custom make mehods ;)

and there are way too many option too choose from in the API xD

 

They should delete atleast 50% and fix the rest what is left.

 

Thats why 

 

Khaleesi

Link to comment
Share on other sites

Since Osbot api breaks every time now and then, I prefer you to use custom make mehods wink.png

and there are way too many option too choose from in the API xD

 

They should delete atleast 50% and fix the rest what is left.

 

Thats why 

 

Khaleesi

 

its a simple interface. Interfaces dont break. What break more are like methods.

Yes way to many option but its better then before with have almost no option.

  • Like 1
Link to comment
Share on other sites

its a simple interface. Interfaces dont break. What break more are like methods.

Yes way to many option but its better then before with have almost no option.

 

Basic options + Fitler would be more then enough.

Instead they gave the scripters 50 options -_-

 

i've a lot breaking and failing -_-

rather make all myself <3

Link to comment
Share on other sites

http://osbot.org/api/org/osbot/rs07/api/filter/PositionFilter.html

getObjects().closest(new PositionFilter<RS2Object>(new Position(0,0,0)));

 

could u guys pls give an example on how to use the PositionFilter?

 if not use this one same shit 

 

 

 

here:

getObjects().closest(new Filter<RS2Object>() {
        @Override
	public boolean match(RS2Object o) {
	      if(o != null && o.getName().equals("NAME HERE") && o.getPosition().equals(new Position(X,Y,Z)))
	            return true;
	      return false;
	}
});

 

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.

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