Jump to content

No entities found at lumbridge bank


lisabe96

Recommended Posts

Tried using area, same issue:

Banks.LUMBRIDGE_UPPER.setPlane(2);
if (Movement.walkToArea(script, Banks.LUMBRIDGE_UPPER)) {
    script.log("Arrived at destination");
}
public static boolean walkToArea(Script script, Area area) {
	if (!script.myPlayer().isMoving()) {
		script.log("not moving");
		if (area.contains(script.myPlayer())) {
			script.log("finished");
			return true;
		}
		script.log("tryna move");
		script.getWalking().webWalk(area.getRandomPosition());
	}
	script.log("movement");
	checkRunning(script);
	return false;
}

Doesn't recognize my player being inside the area, the plane reset

Link to comment
Share on other sites

This seems to be the issue, however it seems to reset the plane :/

public static boolean walkTo(Script script, Position pos) {
	return walkTo(script, pos, false);
}
	
public static boolean walkTo(Script script, Position pos, boolean handleDoor) {
	if (!script.myPlayer().isMoving()) {
		script.log(script.myPosition().getZ() + ", " + pos.getZ());
		if (script.myPosition().distance(pos) < 3) {
			script.log("in distance");
			if (handleDoor) {
				openDoor(script, pos);
			}
			return true;
		}
		script.getWalking().webWalk(pos);
	}
	checkRunning(script);
	return false;
}

For some reason it resets to 0

 

 

Try re working you're script. Or simplifying it. 

 

Did you place the setPlane() in the onStart() method? 

 

I dont think you can setPlane on a position, it should be on an AREA. Try that and let me know 

Link to comment
Share on other sites

Movement.walkToArea(script, Banks.LUMBRIDGE_UPPER);
					
					new ConditionalSleep(5000, 6000) {
                        @Override
                        public boolean condition() throws InterruptedException {
                        	for (RS2Object bankBooth : script.getObjects().getAll()) {
                        		if (Banks.LUMBRIDGE_UPPER.contains(bankBooth)) {
                        			if (bankBooth.getName().equals("Bank booth")) {
                        				bankBooth.interact("Bank");
                        				break;
                        			}
                        		}
                        	}
                            return script.getBank().isOpen();
                        }
                    }.sleep();

This works, however I can't be sure that the player is within the bank area, could be stuck behind the back wall or something.

As you see this time there's no check on the z-axis which obviously is the problem

 

 

@ni562

Yes I tried that, same issue

Edited by lisabe96
Link to comment
Share on other sites

Tried using area, same issue:

 

Doesn't recognize my player being inside the area, the plane reset

 

 

THis is my code and it works 100%

 

 

player = myPlayer();

Walker walker = getLocalWalker();

final Area BANK_AREA = new Area(3207, 3218, 3210, 3220);

 

BANK_AREA.setPlane(2);

 

if(!BANK_AREA.contains(player)){

  walker.walk(BANK_AREA.getRandomPosition(), true);

  walker.waitUntilIdle();

 }

 

//Do your banking here

Link to comment
Share on other sites

THis is my code and it works 100%

 

 

player = myPlayer();

Walker walker = getLocalWalker();

final Area BANK_AREA = new Area(3207, 3218, 3210, 3220);

 

BANK_AREA.setPlane(2);

 

if(!BANK_AREA.contains(player)){

  walker.walk(BANK_AREA.getRandomPosition(), true);

  walker.waitUntilIdle();

 }

 

//Do your banking here

Works! Thanks a lot.

So apparently there's something wrong with Banks.LUMBRIDGE_UPPER I'd assume.

Link to comment
Share on other sites

It's part of the API

Banks. contains all the banks and returns their area

Banks.LUMBRIDGE_UPPER returns the bank area for lumbridge upper

 

Maybe LUMBRIDGE_UPPER only returns true if the player is in the bank room and not on the whole floor? 

 

I didn't even know that was part of the api..Thanks a lot i'll be using it now. 

Link to comment
Share on other sites

Maybe LUMBRIDGE_UPPER only returns true if the player is in the bank room and not on the whole floor? 

 

I didn't even know that was part of the api..Thanks a lot i'll be using it now. 

It doesn't return "true" it just gives the area.

It works perfect for other banks, however maybe there's an issue when the bank is not on the floor plane.

At least it didnt find me being in the area so I assume there's something wrong with it

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.
Note: Your post will require moderator approval before it will be visible.

Guest
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...