Created
July 13, 2015 15:50
-
-
Save lordgmage/946f89f4f7780d78b8d8 to your computer and use it in GitHub Desktop.
walking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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