Advertisement
Frayna

Move

Oct 18th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. function forward(nb)
  2. i = 0
  3.     while i<nb do
  4.     local success, data = turtle.inspect()
  5.         if success then
  6.         turtle.dig()
  7.         turtle.forward()
  8.         else
  9.         turtle.forward()
  10.         end
  11.     i = i+1
  12.     end
  13. end
  14.  
  15. function up(nb)
  16. i = 0
  17.     while i<nb do
  18.     local success, data = turtle.inspect()
  19.         if success then
  20.         turtle.digUp()
  21.         turtle.up()
  22.         else
  23.         turtle.up()
  24.         end
  25.     i = i+1
  26.     end
  27. end
  28.  
  29. function down(nb)
  30. i = 0
  31.     while i<nb do
  32.     local success, data = turtle.inspect()
  33.         if success then
  34.         turtle.digDown()
  35.         turtle.down()
  36.         else
  37.         turtle.down()
  38.         end
  39.     i = i+1
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement