Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- //Item to craft
- &item = "golden_carrot"
- //Amount to craft
- &amount = $$?
- //Slot to start looking for items
- #startlooking = 10
- //Item for 3x3 minus center
- &craft3x3-5 = "gold_nugget"
- //Item for center of 3x3 grid
- &craftslot5 = "carrot"
- //DO NOT MODIFY ANYTHING BELOW THIS LINE
- //Changing variables below this line may cause the script to stop working
- //Delay between actions
- #wait = 200
- key(use);
- wait(500ms);
- for(#ccrafted,1,%&amount%);
- //3x3 grid minus center (slot 5)
- //Looks for stacks of 64, places in 3x3 grid minus center
- &citem = %&craft3x3-5%
- #newslot = %#startlooking%
- #stacksize = 64
- for(#craftslot,1,9);
- if(%#craftslot% != 5);
- //Find a stack of 64 of &citem
- do;
- getslot("%&citem%",#citemslot,%#newslot%);
- getslotitem(%#citemslot%,&cgotitem,#cstacksize);
- #newslot = (%#citemslot%) + (1)
- if(%&cgotitem% != %&citem%);
- log("Out of %&citem%!");
- for(#cclearing,1,9);
- slotclick(%#cclearing%,1,true);
- wait(%#wait%ms);
- next;
- gui();
- stop();
- endif;
- until(%#cstacksize% = %#stacksize%);
- //Place stack of &citem in #craftslot
- slotclick(%#citemslot%);
- wait(%#wait%ms);
- slotclick(%#craftslot%);
- wait(%#wait%ms);
- endif;
- next;
- //center item (slot 5)
- //Looks for stacks of &item, places in #craftslot
- //Config
- &citem = %&craftslot5%
- #stacksize = 64
- #craftslot = 5
- //End config
- #newslot = %#startlooking%
- //Find a stack of of &citem
- do;
- getslot("%&citem%",#citemslot,%#newslot%);
- getslotitem(%#citemslot%,&cgotitem,#cstacksize);
- #newslot = (%#citemslot%) + (1)
- if(%&cgotitem% != %&citem%);
- log("Out of %&citem%!");
- for(#cclearing,1,9);
- slotclick(%#cclearing%,1,true);
- wait(%#wait%ms);
- next;
- gui();
- stop();
- endif;
- until(%#cstacksize% = %#stacksize%);
- //Place stack of &citem in #craftslot
- slotclick(%#citemslot%);
- wait(%#wait%ms);
- slotclick(%#craftslot%);
- wait(%#wait%ms);
- //Shift-click crafted item into inventory
- slotclick(0,1,true);
- wait(%#wait%ms);
- next;
- gui();
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement