Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- // Looks in a chest for a specified item
- // It will prompt you for the item you're looking for, open the chest, and shift-click all of that item it finds into your inventory
- set(@getitem);
- #wait = 500
- #newslot = %@#startlooking%
- //Find a stack of of @&citem
- do;
- getslot("%@&citem%",@#citemslot,%#newslot%);
- getslotitem(%@#citemslot%,&cgotitem,#cstacksize);
- #newslot = (%@#citemslot%) + (1)
- // If no item found
- if(%&cgotitem% != %@&citem%);
- set(@gotitemfail);
- unset(@getitem);
- stop();
- endif;
- if(%@&stackrequired% = "false");
- break();
- endif;
- until(%#cstacksize% = %@#stacksize%);
- //Place stack of @&citem in @#craftslot
- slotclick(%@#citemslot%);
- wait(%#wait%ms);
- slotclick(%@#craftslot%);
- wait(%#wait%ms);
- unset(@getitem);
- stop();
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement