March 15, 20169 yr 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
March 16, 20169 yr 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, 20169 yr by Vilius
March 16, 20169 yr Author 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.
Create an account or sign in to comment