I use the folowing code.
If returns null: Means the door is open, else just interact with it.
public static RS2object getobjectAt(String name, Postion pos, Script script){
return script.objects.closest(New Filter<RS2Object>(){
boolean match(RS2object d){
If(d != null && d.getPosition() == pos && d.getName().equals("Door") && d.getDefinition() != null && Arrays.asList(d.getDefinition().getActions()).contains("Open"))
return true;
}
});
}
Don't mind if I made some mistakes, just typed that in notepad at my work xD
Khaleesi x3