Jump to content

Because object IDs change!?


Codex

Recommended Posts

I could use the name for woodcutting and I do but for mining every Rock object is called Rock.

 

Plus I have not got a clue how to use the filters

 

PositionFilter<RS2Object> posFilter = new PositionFilter(pos);

NameFilter<RS2Object> nameFilter = new NameFilter("Rock");

 

RS2Object rock = getObjects().closest(posFilter, nameFilter);

 

_____

Alternatively, make your own filter that suits all of your needs (position / name / color etc. etc.)

 

Link to comment
Share on other sites

PositionFilter<RS2Object> posFilter = new PositionFilter(pos);

NameFilter<RS2Object> nameFilter = new NameFilter("Rock");

 

RS2Object rock = getObjects().closest(posFilter, nameFilter);

 

_____

Alternatively, make your own filter that suits all of your needs (position / name / color etc. etc.)

 

 

Cheers for the example mate!

 

I have put something together that will interact with the object in a 1x1 area.

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