Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- //this script lays powered rails every so many rails. adjust the script below to fit your needs.
- //as of 1.8, supercarting requires 11 between powered rails. by placing every 11 blocks,
- //this script leaves 10 blocks of space to be safe.
- //recommended you assign this to a key and NOT to the button panel as a small mouse jitter will make it go off path.
- //usage: face the direction you'll be placing rails. make sure powered rails are in your hotbar.
- if(layrail);
- log("&2[Macro] &fRail laying Stopped.");
- keyup(forward);
- unset(layrail);
- stop();
- else;
- log("&2[Macro] &fRail laying Started.");
- set(layrail);
- pick(golden_rail);
- //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);
- ELSEIF((%YAW% < 314) && (%YAW% >= 225));
- LOOK(90,90);
- ELSEIF((%YAW% < 224) && (%YAW% >= 135));
- LOOK(0,90);
- ELSEIF((%YAW% < 134) && (%YAW% >= 45));
- LOOK(270,90);
- 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%));
- keyup(forward);
- key(use);
- keydown(forward);
- pick(golden_rail);
- if( %ITEM% != "golden_rail");
- log("There are no more rails left to use. Stopping now.");
- keyup(forward);
- unset(layrail);
- break();
- endif;
- loop;
- endif;
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement