Guest User

Untitled

a guest
Jul 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. 1. public class Fletch implements Condition, Task {
  2. 2.
  3. 3. @Override
  4. 4. public void run() {
  5. 5. //boolean isFletching = false;
  6. if(Players.getLocal().isMoving() && Players.getLocal().getAnimation() != -1) {
  7. 7. for (Item i : Inventory.getItems()) {
  8. 8. i.getName().contains("Logs");
  9. 9. i.getWidgetChild().interact("Craft");
  10. 10. log.info("Fletching logs and making arrow shafts...");
  11. 11. Time.sleep(2000);
  12. 12.
  13. 13. if (Widgets.get(1179, 12).isVisible()) {
  14. 14. Widgets.get(1179, 12).click(true);
  15. 15. Time.sleep(1000);
  16. 16.
  17. 17. if (Widgets.get(905, 14).isVisible()) {
  18. 18. Widgets.get(905, 14).click(true);
  19. 19. //isFletching = true;
  20. 20. Time.sleep(2000);
  21. 21.
  22. 22. }
  23. 23. }
  24. 24. }
  25. 25. }
  26. 26. }
  27. 27.
  28. 28. @Override
  29. 29. public boolean validate() {
  30. 30. return Inventory.getCount() == 28 && !isBusy();
  31. 31. }
  32. 32.
  33. 41.
  34. 42. }
Add Comment
Please, Sign In to add comment