Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. local tArgs={ ... }
  2. print("Making a brand new floor for you master..")
  3.  
  4. turtle.refuel()
  5. local counter=0
  6. local finished=false
  7. local selected=2
  8. local placed=0
  9. local row=0
  10.  
  11. local left = true
  12. local right = false
  13.  
  14. turtle.select(selected)
  15.  
  16. while not finished do
  17.  
  18. if placed == 64 then
  19. selected=selected+1
  20. turtle.select(selected)
  21. placed=0
  22. end
  23.  
  24. while not (turtle.detect()) do
  25.  
  26. if turtle.forward() then
  27. counter=counter+1
  28. if not turtle.detectDown() then
  29. turtle.placeDown()
  30. placed=placed+1
  31. end
  32. end
  33.  
  34. print("Turtle say: bump!")
  35.  
  36. if counter == 10 then
  37.  
  38. if right then
  39. turtle.turnRight()
  40. turtle.forward()
  41. turtle.turnRight()
  42. left = true
  43. right = false
  44. row=row+1
  45. else
  46. turtle.turnLeft()
  47. turtle.forward()
  48. turtle.turnLeft()
  49. left = false
  50. right = true
  51. row=row+1
  52. end
  53.  
  54. end
  55. if row == 3 then
  56. finished=true
  57. print("Hey master, I'm done!")
  58. end
  59.  
  60. end
  61.  
  62. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement