PappleFruit

TMove V1.0.1

Jul 27th, 2013
168
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function up(blocks)
  2.   for i = 1, blocks do
  3.     turtle.up()
  4.   end
  5. end
  6.  
  7. function down(blocks)
  8.   for i = 1, blocks do
  9.     turtle.down()
  10.   end
  11. end
  12.  
  13. function forward(blocks)
  14.   for i = 1, blocks do
  15.     turtle.forward()
  16.   end
  17. end
  18.  
  19. function back(blocks)
  20.   for i = 1, blocks do
  21.     turtle.back()
  22.   end
  23. end
  24.  
  25. function left(blocks)
  26.   turtle.turnLeft()
  27.   for i = 1, blocks do
  28.     turtle.forward()
  29.   end
  30. end
  31.  
  32. function right(blocks)
  33.   turtle.turnRight()
  34.   for i = 1, blocks do
  35.     turtle.forward()
  36.   end
  37. end
  38.  
  39. function tLeft(rotations)
  40.   for i = 1, rotations do
  41.     turtle.turnLeft()
  42.   end
  43. end
  44.  
  45. function tRight(rotations)
  46.   for i = 1, rotations do
  47.     turtle.turnRight()
  48.   end
  49. end
  50.  
  51. function digForward(blocks)
  52.   for i = 1, blocks do
  53.     turtle.dig()
  54.     turtle.forward()
  55.   end
  56. end
  57.  
  58. function digLeft(blocks)
  59.   turtle.turnLeft()
  60.   for i = 1, blocks do
  61.     turtle.dig()
  62.     turtle.forward()
  63.   end
  64. end
  65.  
  66. function digRight(blocks)
  67.   turtle.turnRight()
  68.   for i = 1, blocks do
  69.     turtle.dig()
  70.     turtle.forward()
  71.   end
  72. end
  73.  
  74. function digUp(blocks)
  75.   for i = 1, blocks do
  76.     turtle.dig()
  77.     turtle.up()
  78.   end
  79. end
  80.  
  81. function digDown(blocks)
  82.   for i = 1, blocks do
  83.     turtle.dig()
  84.     turtle.down()
  85.   end
  86. end
  87.  
  88. function placeTop(blocks)
  89.   for i = 1, blocks-1 do
  90.     turtle.placeUp()
  91.     turtle.forward()
  92.   end
  93.   turtle.placeUp()
  94. end
  95.  
  96. function placeBottom(blocks)
  97.   for i = 1, blocks-1 do
  98.     turtle.placeDown()
  99.     turtle.forward()
  100.   end
  101.   turtle.placeDown()
  102. end
  103.  
  104. function digTop(blocks)
  105.   for i = 1, blocks-1 do
  106.     turtle.digUp()
  107.     turtle.forward()
  108.   end
  109.   turtle.digUp()
  110. end
  111.  
  112. function digBottom(blocks)
  113.   for i = 1, blocks-1 do
  114.     turtle.digDown()
  115.     turtle.forward()
  116.   end
  117.   turtle.digDown()
  118. end
  119.  
  120. function digAround()
  121.   for i = 1, 4 do
  122.     turtle.dig()
  123.     turtle.turnLeft()
  124.   end
  125. end
  126.  
  127. function placeAround()
  128.   for i = 1, 4 do
  129.     turtle.place()
  130.     turtle.turnLeft()
  131.   end
  132. end
  133.  
  134. function replaceAround()
  135.   for i = 1, 4 do
  136.     turtle.dig()
  137.     turtle.place()
  138.     turtle.turnLeft()
  139.   end
  140. end
  141.  
  142. function fillRect(a, b)
  143.   for i = 1, b do
  144.     placeBottom(a)
  145.     if i % 2 == 0 then
  146.       turtle.turnLeft()
  147.       turtle.forward()
  148.       turtle.turnLeft()
  149.     else
  150.       turtle.turnRight()
  151.       turtle.forward()
  152.       turtle.turnRight()
  153.     end
  154.   end
  155. end
  156.  
  157. function digRect(a, b)
  158.   for i = 1, b do
  159.     digBottom(a)
  160.     if i % 2 == 0 then
  161.       turtle.turnLeft()
  162.       turtle.forward()
  163.       turtle.turnLeft()
  164.     else
  165.       turtle.turnRight()
  166.       turtle.forward()
  167.       turtle.turnRight()
  168.     end
  169.   end
  170. end
RAW Paste Data