semanji Posted August 21, 2015 Share Posted August 21, 2015 Script wont reconise when my player is in lumbbank area (stays in while loop just clicking around the bank) Any help is appreciated. case WALK_TO_LUMBY_BANK: while (!lumbbank.contains(myPlayer())) { if (myPosition().getZ() != 2) { state = determineState(); break; } while (myPlayer().isMoving()) { sleep(random(3000, 5000)); } mouse.click(new MiniMapTileDestination(bot, lumbbank.getRandomPosition())); while (myPlayer().isMoving()) { sleep(random(3000, 5000)); } } state = State.USING_BANK; break; case USING_BANK: if (determineState() != State.USING_BANK) { state = determineState(); break; } if (!bank.isOpen()) { bank.open(); sleep(random(300, 500)); } if (!inventory.isEmpty()) { bank.depositAll(); sleep(random(300, 500)); bank.depositWornItems(); sleep(random(300, 500)); } if (!bank.contains("Dragon spear") || !bank.contains("Games necklace(1)")) { bank.close(); state = State.LOGOUT; break; } if (!inventory.contains("Dragon spear") || !inventory.contains("Games necklace(1)")) { bank.withdraw(1249, 1); //dragon spear sleep(random(300, 500)); bank.withdraw(3868, 1); //games necklace(1) sleep(random(300, 500)); } break; Lumby bank area; lumbbank = new Area(3210, 3218, 3208, 3220); Quote Link to comment Share on other sites More sharing options...
itzDot Posted August 22, 2015 Share Posted August 22, 2015 while (!lumbbank.contains(myPlayer())) {} instead of myPlayer use myPosition Quote Link to comment Share on other sites More sharing options...
Precise Posted August 22, 2015 Share Posted August 22, 2015 don't use while loops unless they are necessary, try if and else if statements. Quote Link to comment Share on other sites More sharing options...
Apaec Posted August 22, 2015 Share Posted August 22, 2015 while (!lumbbank.contains(myPlayer())) {} instead of myPlayer use myPosition myplayer() is fine. @OP, it's probably because with the new area updates, plane is important. You'll have to call Area.setPlane(2) //or whatever the plane is (plane = z value) apa 2 Quote Link to comment Share on other sites More sharing options...
semanji Posted August 22, 2015 Author Share Posted August 22, 2015 myplayer() is fine. @OP, it's probably because with the new area updates, plane is important. You'll have to call Area.setPlane(2) //or whatever the plane is (plane = z value) apa That worked, thanks alot. 1 Quote Link to comment Share on other sites More sharing options...
qverkk Posted August 22, 2015 Share Posted August 22, 2015 what are you going to do with dragon spear? Corp bug v3? Quote Link to comment Share on other sites More sharing options...