priMELval

autocrate macro

Sep 10th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. $${
  2. if(autousing);
  3. log("&2[AutoCrateOpener] &fAutoCrateOpener Stopped.");
  4. unset(autousing);
  5. stop();
  6. else;
  7. log("&2[AutoCrateOpener] &fAutoCrateOpener Started.");
  8. set(autousing);
  9. SET(#startslot,%INVSLOT%)
  10. IF(%HITID%="bookshelf")
  11. SET(&requiredkey,"nether_star")
  12. ELSEIF(%HITID%="chest")
  13. SET(&requiredkey,"tripwire_hook")
  14. ELSE
  15. LOG("&2[AutoCrateOpener] &cERROR: Not a valid crate.");
  16. Unset(autousing);
  17. ENDIF
  18. DO
  19. IFMATCHES(%ITEM%,%&requiredkey%)
  20. SET(#howmany,%STACKSIZE%)
  21. key(use);
  22. WAIT(7)
  23. GUI();
  24. IF(%#howmany%=%STACKSIZE%)
  25. LOG("&2[AutoCrateOpener] &fAutoCrateOpener Stopped: &cNot a crate?");
  26. unset(autousing);
  27. ENDIF
  28. ELSE
  29. INVENTORYUP()
  30. IF(%INVSLOT%=%#startslot%)
  31. LOG("&2[AutoCrateOpener] &fAutoCrateOpener Stopped: &cNo keys found.");
  32. unset(autousing);
  33. ENDIF
  34.  
  35. ENDIF
  36. WHILE(autousing);
  37. endif;
  38. }$$
Advertisement
Add Comment
Please, Sign In to add comment