Botre Posted April 28, 2014 Share Posted April 28, 2014 Link to comment Share on other sites More sharing options...
Joseph Posted April 28, 2014 Share Posted April 28, 2014 You could also use that. Which return a rs2Object at the specific location. client.getCurrentRigion.getObjectAtLocal(id, x, y, z); Link to comment Share on other sites More sharing options...
Botre Posted April 28, 2014 Author Share Posted April 28, 2014 You could also use that. Which return a rs2Object at the specific location. client.getCurrentRigion.getObjectAtLocal(id, x, y, z); Not a huge fan of using IDs for doors and gates, used it in the past and they seem to change once in a while.. Link to comment Share on other sites More sharing options...
Dog_ Posted May 29, 2014 Share Posted May 29, 2014 should check if the door is already open Link to comment Share on other sites More sharing options...
Precise Posted May 29, 2014 Share Posted May 29, 2014 should check if the door is already openit does? It checks whether it is at the same location as the closed door. 1 Link to comment Share on other sites More sharing options...
thepecher Posted May 29, 2014 Share Posted May 29, 2014 i just use this public boolean gateIsOpen() { RS2Object gate = closestObjectForName("Gate"); if(Arrays.asList(gate.getDefinition().getActions()).contains("Open")){ return false; } else {return true;} } Link to comment Share on other sites More sharing options...
Botre Posted May 29, 2014 Author Share Posted May 29, 2014 i just use this public boolean gateIsOpen() { RS2Object gate = closestObjectForName("Gate"); if(Arrays.asList(gate.getDefinition().getActions()).contains("Open")){ return false; } else {return true;} } You might start opening doors you don't need/want to open. Link to comment Share on other sites More sharing options...
thepecher Posted May 29, 2014 Share Posted May 29, 2014 You might start opening doors you don't need/want to open. I usually walk up to the tile next to the door and then closestObjectforName does the trick Link to comment Share on other sites More sharing options...
Botre Posted May 29, 2014 Author Share Posted May 29, 2014 I usually walk up to the tile next to the door and then closestObjectforName does the trick What if a tile is next to 2 doors and the client returns the other one instead of the one you want when you request the closest? Rare situation, but I had to change mine because of one >< 1 Link to comment Share on other sites More sharing options...
Dog_ Posted June 6, 2014 Share Posted June 6, 2014 How about osbot creates a decent pathgenerator that handles doors. SMH. Huge lack of skills in this dev team. inb4 ban because devs are butthurt. If they are professional they give me a reply why they haven't done anything useful to this bot since it's release. No decent web, no door handling, no decent equipment loading, grounditems have the wrong height, and the list goes on. Pretty sure they correctly calculate the height of the items in osbot 2. Link to comment Share on other sites More sharing options...
Precise Posted June 6, 2014 Share Posted June 6, 2014 How about osbot creates a decent pathgenerator that handles doors. SMH. Huge lack of skills in this dev team. inb4 ban because devs are butthurt. If they are professional they give me a reply why they haven't done anything useful to this bot since it's release. No decent web, no door handling, no decent equipment loading, grounditems have the wrong height, and the list goes on. i can agree with some but http://osbot.org/osbot2_api/org/osbot/rs07/api/DoorHandler.html Link to comment Share on other sites More sharing options...
Khaleesi Posted June 18, 2014 Share Posted June 18, 2014 (edited) 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 Edited June 18, 2014 by Khaleesi Link to comment Share on other sites More sharing options...
Botre Posted June 18, 2014 Author Share Posted June 18, 2014 use this method: 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")) return door; } }); } Don't mind if I made some mistakes, just typed that in notepad at my work xD Khaleesi x3 Yh this is rather old :p Link to comment Share on other sites More sharing options...
Khaleesi Posted June 18, 2014 Share Posted June 18, 2014 Yh this is rather old I just realized that... sorry about that -_- Link to comment Share on other sites More sharing options...
Swizzbeat Posted June 18, 2014 Share Posted June 18, 2014 d.getPosition() == pos pls no 1 Link to comment Share on other sites More sharing options...