Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- //This is a Macro mod script for Minecraft.
- //Credit to Sanwi for creating the swim hover script: http://pastebin.com/aiuESR4H
- //Ever wanted to swim across an ocean, but dreaded having to be at your keyboard the whole time?
- //Wish you could AFK the trip like you can on on rails?
- //Then this is for you.
- //USAGE: Assign this to whatever button you would like. Stand on shore - preferably a block on water level.
- //Activate script, and input the X and Z coordinates of your destination and press enter.
- //You will start swimming to the provided coordinates, constantly adjusting to the correct yaw (angle) so you won't get pushed off track.
- //PLEASE NOTE that this only can swim in a straight line, so
- //if there is any land in the way, it will not jump over it or navigate around it.
- //As you swim, it will report your current position and distance from your destination.
- //todo: multiple waypoints (so you can swim around land).
- //speed pot timer.
- //fix bug where cancelling coord input makes you dash to 0,0.
- if(!swimtocoords);
- set(swimtocoords);
- #y_anchor = %YPOS%;
- PROMPT(&inputcoords,"$$?","Enter target destination coordinates: x and z",true,"%&inputcoords%");
- replace(&inputcoords,"\"","");
- #endcoords[] = split(" ","%&inputcoords%");
- #counter = 0;
- do;
- if(KEY_SPACE);
- keydown(jump);
- #y_anchor = %YPOS%;
- elseif(KEY_LSHIFT);
- keyup(jump);
- #y_anchor = %YPOS%;
- elseif(#y_anchor > %YPOS%);
- keydown(jump);
- else;
- keyup(jump);
- endif;
- CALCYAWTO(%#endcoords[0]%,%#endcoords[1]%,#yaw,#distance);
- inc(#yaw,180);
- looks(%#yaw%,+0,.1);
- keydown(forward);
- #counter = %#counter% + 1;
- if(#counter = 300);
- log("Your coordinates are: %XPOS%, %ZPOS% (%YPOS%) and your destination is %#distance% away");
- #counter = 0;
- endif;
- while( (XPOS != %#endcoords[0]%) || ((ZPOS != %#endcoords[1]%) );
- keyup(forward);
- else;
- unset(swimtocoords);
- if(!KEY_SPACE);
- keyup(jump);
- keyup(forward);
- endif;
- stop();
- endif;
- stop();
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement