January 4, 201610 yr Author 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
January 4, 201610 yr 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
January 4, 201610 yr Author 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 January 4, 201610 yr by lisabe96
January 4, 201610 yr 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
January 4, 201610 yr Author 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.
January 4, 201610 yr Works! Thanks a lot. So apparently there's something wrong with Banks.LUMBRIDGE_UPPER I'd assume. It's probably the Bank.LUMBRIDGE_UPPER...What is the Bank. part? it should just be just "LUMBRIDGE_UPPER"
January 5, 201610 yr Author It's probably the Bank.LUMBRIDGE_UPPER...What is the Bank. part? it should just be just "LUMBRIDGE_UPPER" 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
January 5, 201610 yr 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.
January 5, 201610 yr Author 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
January 5, 201610 yr It doesn't return "true" it just gives the area. Sorry... Banks.LUMBRIDGE_UPPER.contains(myPlayer()); Maybe it only checks if the player is actually in the bank area, like the little bank room? Have you tried that?
January 5, 201610 yr Author Sorry... Banks.LUMBRIDGE_UPPER.contains(myPlayer()); Maybe it only checks if the player is actually in the bank area, like the little bank room? Have you tried that? I did yes
January 5, 201610 yr I did yes Sorry i can't help you then...Must be a bug like you said. Feel free to use the version i posted if it works for you!
Create an account or sign in to comment