m6P9aRdAb4Z0 Posted March 15, 2016 Share Posted March 15, 2016 I have an area I want to use in my script however it is instanced in-game. My best idea has been to capture the area using getArea(int radius) however I'd like to capture a rectangle if possible. Within the aforementioned area, I want to get all of the non-null objects matching an ID. Then I would like to interact with the first object , and hover over the second object. Any help appreciated Quote Link to comment Share on other sites More sharing options...
Vilius Posted March 16, 2016 Share Posted March 16, 2016 (edited) Find yourself a static object that doesnt change its position in any instance created and map out the areas from its position. For getting all objects you could use RS2Object[] objc = getObjects().getAll().stream().filter(o -> o != null && o.getId() == id && areaVar.contains(o)); Edited March 16, 2016 by Vilius Quote Link to comment Share on other sites More sharing options...
m6P9aRdAb4Z0 Posted March 16, 2016 Author Share Posted March 16, 2016 Find yourself a static object that doesnt change its position in any instance created and map out the areas from its position. For getting all objects you could use RS2Object[] objc = getObjects().getAll().stream().filter(o -> o != null && o.getId() == id && areaVar.contains(o)); Hmm any way I can sort those objects by distance to player? This topic talks about comparators but I'm not sure how to implement it. Quote Link to comment Share on other sites More sharing options...