Jump to content

Entity portal = closestObjectForName(PORTAL_NAME); not working


Recommended Posts

Posted
3 minutes ago, Medusa said:

RS2Object portal = getObjects().closest(PORTAL_NAME);

 

i ended up using this and it seems to be working great

 // code in loop
    public int onLoop() throws InterruptedException {

        Player player = myPlayer();

        //if player is in bank area find portal
        if (BANK_AREA.contains(player)) {
            objects.closest("Guthix Portal").interact("Enter");
        }
    return 50;
    }
}

 

 

ive seen RS2Object is that acceptable for osrs?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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