Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- if(autousing);
- log("&2[AutoCrateOpener] &fAutoCrateOpener Stopped.");
- unset(autousing);
- stop();
- else;
- log("&2[AutoCrateOpener] &fAutoCrateOpener Started.");
- set(autousing);
- SET(#startslot,%INVSLOT%)
- IF(%HITID%="bookshelf")
- SET(&requiredkey,"nether_star")
- ELSEIF(%HITID%="chest")
- SET(&requiredkey,"tripwire_hook")
- ELSE
- LOG("&2[AutoCrateOpener] &cERROR: Not a valid crate.");
- Unset(autousing);
- ENDIF
- DO
- IFMATCHES(%ITEM%,%&requiredkey%)
- SET(#howmany,%STACKSIZE%)
- key(use);
- WAIT(7)
- GUI();
- IF(%#howmany%=%STACKSIZE%)
- LOG("&2[AutoCrateOpener] &fAutoCrateOpener Stopped: &cNot a crate?");
- unset(autousing);
- ENDIF
- ELSE
- INVENTORYUP()
- IF(%INVSLOT%=%#startslot%)
- LOG("&2[AutoCrateOpener] &fAutoCrateOpener Stopped: &cNo keys found.");
- unset(autousing);
- ENDIF
- ENDIF
- WHILE(autousing);
- endif;
- }$$
Advertisement
Add Comment
Please, Sign In to add comment