Advertisement
Guest User

digninebynine.lua

a guest
Apr 7th, 2020
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. function fwd(stp)
  2.   for c=1,stp do
  3.     while turtle.detect() do
  4.      turtle.dig()
  5.      sleep(0.25)
  6.      end
  7.     turtle.forward()
  8.     turtle.digUp()
  9.     turtle.digDown()
  10.   end
  11. end
  12.  
  13. function left(stp)
  14.  for c=1, stp do
  15.   turtle.turnLeft()
  16.   turtle.dig()
  17.   turtle.forward()
  18.   turtle.digUp()
  19.   turtle.digDown()
  20.  end
  21. end
  22.  
  23. function right (stp)
  24.  for c=1, stp do
  25.   turtle.turnRight()
  26.   turtle.dig()
  27.   turtle.forward()
  28.   turtle.digUp()
  29.   turtle.digDown()
  30.  end
  31. end
  32.  
  33. function dig()
  34. fwd(9)
  35. for c=1,4 do
  36. right(2)
  37. fwd(7)
  38. left(2)
  39. fwd(7)
  40. end
  41. end
  42.  
  43. dig()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement