Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //auto place rail levers. WIP
- $${
- //description
- //usage
- if(laylever);
- log("&2[Macro] &fLever laying Stopped.");
- keyup(forward);
- unset(laylever);
- stop();
- else;
- log("&2[Macro] &fLever laying Started.");
- set(laylever);
- pick(lever);
- //snap to cardinal direction and look down
- //thx to Sanwi, ShadowSniper, and Peter http://pastebin.com/V279kYXC
- IF((%YAW% < 45) || (%YAW% >= 315));
- LOOK(180,90);
- #yaw = 180;
- ELSEIF((%YAW% < 314) && (%YAW% >= 225));
- LOOK(90,90);
- #yaw = 90;
- ELSEIF((%YAW% < 224) && (%YAW% >= 135));
- LOOK(0,90);
- #yaw = 0;
- ELSEIF((%YAW% < 134) && (%YAW% >= 45));
- LOOK(270,90);
- #yaw = 270;
- ENDIF;
- //change 11 to whatever distance you want to place the rail on.
- //whatever number you put, 1 less than that number will be the amount blocks where no rail is laid.
- //in this example, A is a rail placed, and B is the next rail placed. A ---10 blocks--- B
- do;
- #xplusten = %XPOS% + 11;
- #zplusten = %ZPOS% + 11;
- #xminusten = %XPOS% - 11;
- #zminusten = %ZPOS% - 11;
- do;
- keydown(forward);
- until((%ZPOS% = %#zplusten%) || (%XPOS% = %#xplusten%) || (%ZPOS% = %#zminusten%) || (%XPOS% = %#xminusten%));
- log("keyup forward");
- keyup(forward);
- LOOK(-90,70);
- pick(diamond_pickaxe);
- do(2000ms);
- key(attack);
- loop;
- loop;
- endif;
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement