Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if((%foundstack%) && (!%@storagefull%));
- unset(foundstack);
- echo("/enderchest");
- do();
- wait();
- until(%GUI% == "GUICHEST");
- #offset1 = %CONTAINERSLOTS% - 36;
- #offset2 = %CONTAINERSLOTS% - 1;
- #offset3 = %#offset1% - 1;
- &target-item = "Air";
- #target-stack = 0;
- #freeslots = 0;
- // get open slots in echest
- for(#n,0,%#offset3%);
- getslotitemext(%#n%,&idvar,#stacksize,#data,&tempname);
- strip(&displayname,%&tempname%);
- if((%&displayname% == %&target-item%) && (%#stacksize% == %#target-stack%));
- inc(#freeslots);
- endif;
- next;
- #start-slot = %#offset1%;
- #end-slot = %#offset2%;
- &target-item = "Enchanted Cobblestone";
- #target-stack = 64;
- for(#n,%#start-slot%,%#end-slot%);
- getslotitemext(%#n%,&idvar,#stacksize,#datavar,&nbt)
- strip(&displayname,%&nbt%);
- if((%&displayname% == %&target-item%) && (%#stacksize% == %#target-stack%));
- wait(300ms);
- dec(#freeslots);
- if(%#freeslots% > 0);
- unset(#delay); random(#delay,%#max%,%#min%);
- wait(%#delay%ms); if(%logging%); log("&7Waited &c%#delay% &7milliseconds at:&c storing enchanted cobblestone&7."); log(" "); endif;
- slotclick(%#n%,l,true);
- else;
- set(@storagefull);
- log("&eThe enderchest is now full, the script will no longer attempt to store stuff in it.")
- break;
- endif;
- endif;
- next;
- gui();
- do();
- wait();
- until(%GUI% == "NONE");
- endif;
- else;
- log(%XPOS% %ZPOS%)
- log("%&cc% &dNot directly facing mine merchant, hover cursor over mine merchant and go agane");
- exec(enchanted-cobblestone-crafter-disable.txt);
- stop;
- endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement