HelloPeeps Posted February 22, 2014 Share Posted February 22, 2014 (edited) I can't seem to find anything on the API, I must be overlooking it, how do I get my script to open doors, if they are not open? Thanks Edited February 22, 2014 by blood1000 Link to comment Share on other sites More sharing options...
tweekah Posted February 22, 2014 Share Posted February 22, 2014 I guess you mean if there not open?:p Link to comment Share on other sites More sharing options...
Booch Posted February 22, 2014 Share Posted February 22, 2014 You cannot open doors if they're already open but they're various ways to tackle this according to your situation, you could simply declare the door as an RS2Object and say that this door is closestObjectForName("Door"), after you declare it you can simply do door.Interact("Open"); You could also use obstacle handlers but I don't recommend that if you're new Link to comment Share on other sites More sharing options...
HelloPeeps Posted February 22, 2014 Author Share Posted February 22, 2014 You cannot open doors if they're already open but they're various ways to tackle this according to your situation, you could simply declare the door as an RS2Object and say that this door is closestObjectForName("Door"), after you declare it you can simply do door.Interact("Open"); You could also use obstacle handlers but I don't recommend that if you're new Thank you Link to comment Share on other sites More sharing options...
HelloPeeps Posted February 22, 2014 Author Share Posted February 22, 2014 You cannot open doors if they're already open but they're various ways to tackle this according to your situation, you could simply declare the door as an RS2Object and say that this door is closestObjectForName("Door"), after you declare it you can simply do door.Interact("Open"); You could also use obstacle handlers but I don't recommend that if you're new Hi I've put it in but I have a small problem the script will go to any door on screen and open it, not just the one by me, if the door is open it will just try find another door to open XD this is what I did RS2Object Door = closestObject(DOOR_ID); if (Door != null) { if (Door.interact("Open")) The door id is the same as every open door in the area, how do I make it so it will only open the door it sees on screen? it clicks the map to find other doors to open XD Thanks Link to comment Share on other sites More sharing options...
Booch Posted February 22, 2014 Share Posted February 22, 2014 Head over the to OSBot API and on the left you'll see a category labelled DoorHandler. Check it out Link to comment Share on other sites More sharing options...
NxJr Posted February 24, 2014 Share Posted February 24, 2014 just make a 1x1 area called door_tile and do RS2Object Door = closestObject(DOOR_ID, door_tile); public final static Area door_tile = new Area(top left x, top left y, bottom right x, bottom right y); Link to comment Share on other sites More sharing options...
Swizzbeat Posted February 24, 2014 Share Posted February 24, 2014 Check for if the doors actions contains "Open". Link to comment Share on other sites More sharing options...
Brown Posted February 24, 2014 Share Posted February 24, 2014 Ok try this: doorO = Get the door orientation. doorX = Get the door X value you can get Y aswell if there are more doors on the same X value. RS2Object door = closestObjectForName("Door"); if(door != null && door.getOrientation() == doorO && door.getX() == doorX){ if(door.interact("Open"){ sleep(500 + random(50, 150); } } Link to comment Share on other sites More sharing options...