Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- // Version: 1.0 - Written by MUSHKRAT / Blitzkrieg
- // Enjoy skidrats.
- // 1. Execute all pre-mine checks (food, health, string on hotbar, pickaxe durability left, if you're in the right place, looking at the right place.)
- // 2. Try to eat; if no food, get more food from chest, if no food from chest, disconnect.
- // 3. Check for string on hotbar. If no string left, check chest. If no string from chest, disconnect.
- // 4. Check pickaxe durability. If <15, store in broken pickaxes chest. Look for new pickaxe in repaired pickaxe chest. If no pickaxe, disconnect.
- // *. Check co-ordinates against %VAR% co-ordinates
- // 5. If all return as a go, place string above hopper, parallel to tripwire.
- // 6. Turn to button, press button.
- // 7. Wait for (tripwire) to turn into (obsidian), and begin mining.
- // 8. Once (obsidian) is (air), stop mining.
- // 9. Repeat until disconnect.
- // Completed Script: Automatically mines obsidian using this design:
- // Variable Pool
- #wait_1 = 200
- #food_yaw = 223
- #food_pitch = 25
- #obby_yaw = 361
- #obby_pitch = 16
- #string_yaw = 497
- #string_pitch = 43
- #x_start = -541
- #z_start = +1306
- #oldpick_yaw = 182
- #oldpick_pitch = 18
- #newpick_yaw = 182
- #newpick_pitch = 2
- #button_yaw = 409
- #button_pitch = 9
- #look_timer = 1
- // Main Set.
- do;
- // Makes sure you're in place (sanity check)
- if((%XPOS% != %#x_start%) || (%ZPOS% != %#z_start%));
- log("not in place. stopping.");
- stop;
- endif;
- // Eats food if you need it.
- if(%HUNGER% < 8);
- pick(baked_potato);
- // Checks if you have food, if not, gets it.
- if(%ITEM% != "baked_potato");
- // Finds food chest and open it, then grabs some food.
- look(%#food_yaw%,%#food_pitch%,%#look_timer%);
- wait(%#wait_1%ms);
- key(use);
- wait(%#wait_1%ms);
- getslot(baked_potato,#cp);
- slotclick(%#cp%,l,true);
- wait(%#wait_1%ms);
- press(escape);
- // If you're out of food, it disconnects you.
- pick(baked_potato);
- if(%ITEM% != "baked_potato");
- log("no food left");
- disconnect();
- endif;
- // Ends the "find food" set.
- endif;
- // Eats the food you found. Resets aim to neutral to avoid opening chest.
- look(%#obby_yaw%,%#obby_pitch%,%#look_timer%);
- do;
- key(use);
- until(%HUNGER% > 9);
- // Completes the pre-set hunger check.
- endif;
- // Checks pickaxe durability. If too low, puts pickaxe in broken chest, retrieves new one.
- pick(diamond_pickaxe);
- wait(%#wait_1%ms);
- if(%DURABILITY% < 10);
- // Finds broken picks chest and places it inside.
- look(%#oldpick_yaw%,%#oldpick_pitch%,%#look_timer%);
- wait(%#wait_1%ms);
- key(use);
- wait(%#wait_1%ms);
- getslot(diamond_pickaxe,#olddiamondpick,44);
- // DE-BUG: If doesn't work, try reverse (44).
- slotclick(%#olddiamondpick%,l,true);
- wait(%#wait_1%ms);
- press(escape);
- look(%#obby_yaw%,%#obby_pitch%,%#look_timer%);
- // Finds new pickaxe to use.
- look(%#newpick_yaw%,%#newpick_pitch%,%#look_timer%);
- wait(%#wait_1%ms);
- key(use);
- wait(%#wait_1%ms);
- getslot(diamond_pickaxe,#newdiamondpick);
- slotclick(%#newdiamondpick%,l,true);
- wait(%#wait_1%ms);
- press(escape);
- // If you're out of pickaxes, it disconnects you.
- pick(diamond_pickaxe);
- wait(%#wait_1%ms);
- if(%ITEM% != "diamond_pickaxe");
- log("no picks left");
- disconnect();
- endif;
- // Completes pre-set pick check.
- endif;
- // All is good, placing string.
- look(%#obby_yaw%,%#obby_pitch%,%#look_timer%);
- pick(string);
- // Checks if you have string, if not, gets it.
- if(%ITEM% != "string");
- // Finds string chest and open it, then grabs some string.
- look(%#string_yaw%,%#string_pitch%,%#look_timer%);
- wait(500ms);
- key(use);
- wait(500ms);
- getslot(string,#string);
- slotclick(%#string%,l,true);
- wait(500ms);
- press(escape);
- // If you're out of string, it disconnects you.
- pick(string);
- look(%#obby_yaw%,%#obby_pitch%,%#look_timer%);
- wait(%#wait_1%ms);
- if(%ITEM% != "string");
- log("no string left");
- disconnect();
- endif;
- // Completes the pre-set string check.
- endif;
- // Resets aim to neutral.
- key(use);
- // Placed string, activating machine.
- look(%#button_yaw%,%#button_pitch%,%#look_timer%);
- key(use);
- // Return to neutral.
- look(%#obby_yaw%,%#obby_pitch%,%#look_timer%);
- // Waits for the tripwire to turn into obsidian.
- do;
- getidrel(0,0,-3,&air);
- until(%&air% != "tripwire");
- // Starts mining the obsidian.
- log("mining obsidian");
- pick(diamond_pickaxe);
- do;
- getidrel(0,0,-3,&id);
- key(attack);
- until(%&id% = "air");
- // Mines the obsidian, increases counter by 1.
- inc(#obbymined,1);
- log("mined obsidian", %#obbymined%);
- // Completes the script. Repeats it.
- loop;
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement