Advertisement
Sanwi

Railplacer

Jun 16th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. $${
  2.  
  3. #placedrail = 0
  4.  
  5. do;
  6. pick("rail");
  7. if(%ITEM% = "rail");
  8. #stack = %STACKSIZE%
  9. else;
  10. stop();
  11. endif;
  12.  
  13. do;
  14. // Movement
  15. #xcoord = %XPOS%
  16. #zcoord = %ZPOS%
  17. do;
  18. keydown(left);
  19. until((%#zcoord% != %ZPOS%) || (%#xcoord% != %XPOS%));
  20. keyup(left);
  21. // Place rail
  22. key(use);
  23. inc(#placedrail);
  24. until(%#placedrail% = 11);
  25. #placedrail = 0
  26.  
  27. pick("golden_rail");
  28. #stack = %STACKSIZE%
  29.  
  30. do;
  31. // Movement
  32. #xcoord = %XPOS%
  33. #zcoord = %ZPOS%
  34. do;
  35. keydown(left);
  36. until((%#zcoord% != %ZPOS%) || (%#xcoord% = %XPOS%));
  37. keyup(left);
  38. // Place rail
  39. key(use);
  40. until(%STACKSIZE% = (%#stack% - 1));
  41. loop;
  42.  
  43. stop();
  44. }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement