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);