Jump to content

Open door after teletabbing to house?

Recommended Posts

This is my code:

        List<RS2Object> doors = this.script.objects.getAll();
        RS2Object theDoor = null;
        Position myDoorCHANGE = new Position(7264, 11595, 0);
        for (RS2Object potDoor : doors) {
            if (potDoor.getId() == 13101 && potDoor.getOrientation() == 0
                    && potDoor.getPosition().equals(myDoorCHANGE)) {
                theDoor = potDoor;
        if (theDoor.isVisible()) {
            while (theDoor.exists()) {
        } else {
            while (theDoor.exists()) {
but the problem is "theDoor" is null after the for-each method. Wat do?
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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