So here is my code
if (loot1 == null && !Tile1.contains(myPlayer()) && Tile2.contains(myPlayer())) {
log ("going back to safe");
getWalking().walk(Tile1);
new ConditionalSleep(5000, 1000)
{
@Override
public boolean condition()
{
return Tile1.contains(myPosition());
}
}.sleep();
}
The idea is that it goes to loot and when there is no loot it runs back to safety where it can attack from distance but the problem is it missclicks? when it is moving to tile1 and clicks tile next to it and it wont run this again as it thinks its in safety for some reason even tho its not. here is picture explaining it better:
So the bot thinks missclicks tile 2 when it was supposed to click tile 1 and even when it is in the orange area the above code should execute again as its not in tile 1 but it wont and i am stuck.
First thing you would think that the areas/tiles are in wrong coordinates but i double checked all the coordinates and they should be correct unless you cant create rectangular area with 1x3 tiles
here is also the area for Tile1:
Area Tile1 = new Area (1289, 10097,1289, 10099);
and Tile2 is the whole area above:
Area Tile2 = new Area (1289,10093,1296,10100);
I have had this same problem with others scripts before but i just fixed it by making the click area 1 tile smaller in every direction and the area that checks if i am in the correct place 1 tile bigger so even if it missclicks it still knows its in the correct place but in this case i cant do that as the area is very small and it needs to be exact.