Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. function level()
  2. --reads and detects arguments
  3. local args={...}
  4. side=args[1]
  5. height= rgs[2]
  6. for i=1, height do
  7. for i=1, side do
  8. for i=1, side do
  9. if turtle.detect() then
  10. turtle.dig()
  11. end
  12. turtle.forward()
  13. end
  14. turtle.turnLeft()
  15. if turtle.detect() then
  16. turtle.dig()
  17. end
  18. turtle.forward()
  19. --turns the turtle left
  20. turtle.turnLeft()
  21. --does the second row
  22. for i=1, side-1 do
  23. if turtle.detect() then
  24. turtle.dig()
  25. end
  26. turtle.forward()
  27. end
  28. --third row
  29. turtle.turnRight()
  30. if turtle.detect() then
  31. turtle.dig()
  32. end
  33. turtle.forward()
  34. turtle.turnRight()
  35. for i=1, side-1 do
  36. if turtle.detect() then
  37. turtle.dig()
  38. end
  39. turtle.forward()
  40. end
  41. end
  42. end
  43. level()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement