Advertisement
Guest User

Swim hover destination - work in progress

a guest
Jun 19th, 2015
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. //THIS SCRIPT DOESN'T WORK. TROUBLESHOOTING
  2.  
  3. $${
  4. //Credit to Sanwi for creating the swim hover script: http://pastebin.com/aiuESR4H
  5.  
  6. if(!swimhover);
  7. set(swimhover);
  8. #y_anchor = %YPOS%;
  9. do;
  10. if(KEY_SPACE);
  11. keydown(jump);
  12. #y_anchor = %YPOS%;
  13. elseif(KEY_LSHIFT);
  14. keyup(jump);
  15. #y_anchor = %YPOS%;
  16. elseif(#y_anchor > %YPOS%);
  17. keydown(jump);
  18. else;
  19. keyup(jump);
  20. endif;
  21. loop;
  22.  
  23. PROMPT(&inputcoords,"$$?","Enter target destination coordinates: x and z",true,"%&inputcoords%");
  24. replace(&inputcoords,"\"","");
  25. #endcoords[] = split(" ","%&inputcoords%");
  26.  
  27. do
  28. CALCYAWTO(%#endcoords[0]%,%#endcoords[1]%,#yaw);
  29. inc(#yaw,180);
  30. looks(%#yaw%,+0,.1);
  31.  
  32. keydown(forward);
  33.  
  34. if( #distance != #olddistance);
  35. #olddistance = #distance;
  36. log("%XPOS%, %ZPOS% (%YPOS%) D: %#distance%");
  37. endif;
  38.  
  39. while( (XPOS != %#endcoords[0]%) || ((ZPOS != %#endcoords[1]%) );
  40.  
  41. keyup(forward);
  42.  
  43.  
  44. else;
  45. unset(swimhover);
  46. if(!KEY_SPACE);
  47. keyup(jump);
  48. endif;
  49. stop();
  50. endif;
  51.  
  52. stop();
  53.  
  54. }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement