Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. if((%foundstack%) && (!%@storagefull%));
  2. unset(foundstack);
  3. echo("/enderchest");
  4. do();
  5. wait();
  6. until(%GUI% == "GUICHEST");
  7.  
  8. #offset1 = %CONTAINERSLOTS% - 36;
  9. #offset2 = %CONTAINERSLOTS% - 1;
  10. #offset3 = %#offset1% - 1;
  11.  
  12. &target-item = "Air";
  13. #target-stack = 0;
  14. #freeslots = 0;
  15.  
  16. // get open slots in echest
  17.  
  18. for(#n,0,%#offset3%);
  19. getslotitemext(%#n%,&idvar,#stacksize,#data,&tempname);
  20. strip(&displayname,%&tempname%);
  21. if((%&displayname% == %&target-item%) && (%#stacksize% == %#target-stack%));
  22. inc(#freeslots);
  23. endif;
  24. next;
  25.  
  26. #start-slot = %#offset1%;
  27. #end-slot = %#offset2%;
  28. &target-item = "Enchanted Cobblestone";
  29. #target-stack = 64;
  30.  
  31. for(#n,%#start-slot%,%#end-slot%);
  32. getslotitemext(%#n%,&idvar,#stacksize,#datavar,&nbt)
  33. strip(&displayname,%&nbt%);
  34. if((%&displayname% == %&target-item%) && (%#stacksize% == %#target-stack%));
  35. wait(300ms);
  36. dec(#freeslots);
  37. if(%#freeslots% > 0);
  38. unset(#delay); random(#delay,%#max%,%#min%);
  39. wait(%#delay%ms); if(%logging%); log("&7Waited &c%#delay% &7milliseconds at:&c storing enchanted cobblestone&7."); log(" "); endif;
  40. slotclick(%#n%,l,true);
  41. else;
  42. set(@storagefull);
  43. log("&eThe enderchest is now full, the script will no longer attempt to store stuff in it.")
  44. break;
  45. endif;
  46. endif;
  47. next;
  48.  
  49. gui();
  50. do();
  51. wait();
  52. until(%GUI% == "NONE");
  53.  
  54. endif;
  55. else;
  56. log(%XPOS% %ZPOS%)
  57. log("%&cc% &dNot directly facing mine merchant, hover cursor over mine merchant and go agane");
  58. exec(enchanted-cobblestone-crafter-disable.txt);
  59. stop;
  60. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement