Jump to content

Opening doors?


Recommended Posts

Posted

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

Posted

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 :)

Posted

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

Posted

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);
    }
}
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...