Advertisement
Sanwi

craft golden carrots

Apr 1st, 2015
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. $${
  2.  
  3. //Item to craft
  4. &item = "golden_carrot"
  5.  
  6. //Amount to craft
  7. &amount = $$?
  8.  
  9. //Slot to start looking for items
  10. #startlooking = 10
  11.  
  12. //Item for 3x3 minus center
  13. &craft3x3-5 = "gold_nugget"
  14.  
  15. //Item for center of 3x3 grid
  16. &craftslot5 = "carrot"
  17.  
  18. //DO NOT MODIFY ANYTHING BELOW THIS LINE
  19. //Changing variables below this line may cause the script to stop working
  20.  
  21. //Delay between actions
  22. #wait = 200
  23.  
  24.  
  25. key(use);
  26. wait(500ms);
  27.  
  28. for(#ccrafted,1,%&amount%);
  29.  
  30. //3x3 grid minus center (slot 5)
  31. //Looks for stacks of 64, places in 3x3 grid minus center
  32. &citem = %&craft3x3-5%
  33. #newslot = %#startlooking%
  34. #stacksize = 64
  35. for(#craftslot,1,9);
  36. if(%#craftslot% != 5);
  37. //Find a stack of 64 of &citem
  38. do;
  39. getslot("%&citem%",#citemslot,%#newslot%);
  40. getslotitem(%#citemslot%,&cgotitem,#cstacksize);
  41. #newslot = (%#citemslot%) + (1)
  42. if(%&cgotitem% != %&citem%);
  43. log("Out of %&citem%!");
  44. for(#cclearing,1,9);
  45. slotclick(%#cclearing%,1,true);
  46. wait(%#wait%ms);
  47. next;
  48. gui();
  49. stop();
  50. endif;
  51. until(%#cstacksize% = %#stacksize%);
  52.  
  53. //Place stack of &citem in #craftslot
  54. slotclick(%#citemslot%);
  55. wait(%#wait%ms);
  56. slotclick(%#craftslot%);
  57. wait(%#wait%ms);
  58.  
  59. endif;
  60. next;
  61.  
  62. //center item (slot 5)
  63. //Looks for stacks of &item, places in #craftslot
  64.  
  65. //Config
  66. &citem = %&craftslot5%
  67. #stacksize = 64
  68. #craftslot = 5
  69. //End config
  70.  
  71. #newslot = %#startlooking%
  72. //Find a stack of of &citem
  73. do;
  74. getslot("%&citem%",#citemslot,%#newslot%);
  75. getslotitem(%#citemslot%,&cgotitem,#cstacksize);
  76. #newslot = (%#citemslot%) + (1)
  77. if(%&cgotitem% != %&citem%);
  78. log("Out of %&citem%!");
  79. for(#cclearing,1,9);
  80. slotclick(%#cclearing%,1,true);
  81. wait(%#wait%ms);
  82. next;
  83. gui();
  84. stop();
  85. endif;
  86. until(%#cstacksize% = %#stacksize%);
  87.  
  88. //Place stack of &citem in #craftslot
  89. slotclick(%#citemslot%);
  90. wait(%#wait%ms);
  91. slotclick(%#craftslot%);
  92. wait(%#wait%ms);
  93.  
  94.  
  95. //Shift-click crafted item into inventory
  96. slotclick(0,1,true);
  97. wait(%#wait%ms);
  98.  
  99.  
  100. next;
  101.  
  102. gui();
  103.  
  104. }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement