Untitled


SUBMITTED BY: Guest

DATE: March 1, 2015, 8:11 p.m.

FORMAT: Text only

SIZE: 5.7 kB

HITS: 523

  1. // Configure #north and #south to the very edge of the field.
  2. // Leave 1 block in each direction on level with the field, so you don't fall off.
  3. // Start at the North-East end of the field. The bot will pick in rows from north to south, then slide west for the next row.
  4. // #toolslot is the slot used to break the crops. Put a fortune 3 tool in the slot to get more carrots or potatoes.
  5. // &plant is the item used to replant (e.g. "wheat_seeds","carrot","potato")
  6. // &mode changes the bot's behavior. "default" will harvest a row, then replant it, and repeat. "plant" will plant without harvesting
  7. // and "harvest" will harvest without planting.
  8. // Config
  9. #north = -2626
  10. #south = -2447
  11. #toolslot = 8
  12. &plant = "wheat_seeds"
  13. &mode = "default"
  14. #wait = 100
  15. // End Config
  16. If(automine2);
  17. Log(Automine Disabled);
  18. unset(automine2);
  19. stop;
  20. Else;
  21. log("Automine Enabled");
  22. set(automine2);
  23. slot(1);
  24. do;
  25. if(%ZPOS% = %#south%);
  26. #dest = %#north%
  27. // Throw wheat & seeds
  28. look(180,-40);
  29. gui(inventory);
  30. wait(500ms);
  31. for(#forthrow,9,26);
  32. slotclick(%#forthrow%);
  33. wait(%#wait%ms);
  34. slotclick(-999);
  35. wait(%#wait%ms);
  36. next;
  37. gui();
  38. look(90,90);
  39. else;
  40. #dest = %#south%
  41. look(270,90);
  42. endif;
  43. do;
  44. keydown(left);
  45. do;
  46. // Mode
  47. if(%&mode% = "plant")
  48. set(plant);
  49. elseif(%&mode% = "harvest")
  50. unset(plant);
  51. elseif(%&mode% = "default")
  52. if(%#dest% = %#south%);
  53. look(270,90);
  54. unset(plant);
  55. else;
  56. look(90,90);
  57. set(plant);
  58. endif;
  59. endif;
  60. // If planting
  61. if(plant);
  62. if(%&plant% = "wheat_seeds");
  63. // If item is seeds and stack size >5
  64. if((%ITEM% = %&plant%) && (%STACKSIZE% > 5))
  65. key(use);
  66. else;
  67. keyup(left);
  68. do;
  69. // If no stacks on hotbar >5
  70. if(%INVSLOT% = 9);
  71. // Get more seeds
  72. gui(inventory);
  73. wait(500ms);
  74. for(#cfor,9,35);
  75. getslot(%&plant%,#cslot,%#cfor%);
  76. if(%#cslot% < 36)
  77. slotclick(%#cslot%,1,true);
  78. endif;
  79. wait(%#wait%ms);
  80. next;
  81. gui();
  82. wait(500ms);
  83. slot(1);
  84. else;
  85. inventoryup(1);
  86. endif;
  87. until((%ITEM% = %&plant%) && (%STACKSIZE% > 5))
  88. keydown(left);
  89. endif;
  90. else;
  91. pick("%&plant%");
  92. key(use);
  93. endif;
  94. // else pick
  95. else;
  96. slot(%#toolslot%);
  97. key(attack);
  98. endif;
  99. #cz = %ZPOS%
  100. while(%ZPOS% != %#cz%);
  101. until(%ZPOS% = %#dest%);
  102. keyup(left);
  103. keyup(right);
  104. #cx = %XPOS%
  105. if((%#dest% = %#north%) || (plant) || (%&mode% = "harvest"));
  106. do;
  107. look(90,90);
  108. keydown(sneak);
  109. keydown(back);
  110. until(%#cx% != %XPOS%);
  111. endif;
  112. keyup(sneak);
  113. keyup(back);
  114. keyup(forward);
  115. loop;

comments powered by Disqus