Skip to content

Instantly share code, notes, and snippets.

@lordgmage
Created July 13, 2015 15:50
Show Gist options
  • Save lordgmage/946f89f4f7780d78b8d8 to your computer and use it in GitHub Desktop.
Save lordgmage/946f89f4f7780d78b8d8 to your computer and use it in GitHub Desktop.
walking
public class ToMineEss implements Strategy {
SceneObject[] Ess = SceneObjects.getNearest(2491);
public static Tile[] EssPath = {new Tile(3222, 3426), new Tile(3233, 3412), new Tile(3248, 3400)};
Npc[] Aubury = null;
@Override
public boolean activate() {
Aubury = Npcs.getNearest(953);
return Inventory.isEmpty() && Players.getMyPlayer().getAnimation() == -1;
}
@Override
public void execute() {
System.out.println("ToMine");
final TilePath ToMine = new TilePath(EssPath);
if (ToMine != null && !ToMine.hasReached()) {
ToMine.traverse();
Time.sleep(new SleepCondition() {
@Override
public boolean isValid() {
return ToMine.hasReached();
}
}, 5000);
Time.sleep(500,1000);
Aubury[0].interact(Npcs.Option.SECOND);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment