Advertisement
bjohnston562

floors

Aug 1st, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. function check()
  2. local g=2
  3. if turtle.getItemCount(s)==0
  4. then
  5. s=s+1
  6. if s<17
  7. then
  8. turtle.select(s)
  9. else
  10. s=1
  11. turtle.select(s)
  12. while g == 2
  13. do
  14. print("Waiting for supplies. Type 1 to continue building.")
  15. g=read()
  16. end
  17. end
  18. end
  19. end
  20.  
  21. -- main script the floor
  22. print("What are the side lengths of your floor?")
  23. x=read()
  24. s=1
  25. for i=1,x
  26. do
  27. for i=1,(x-1)
  28. do
  29. check()
  30. turtle.placeDown()
  31. sleep(.1)
  32. turtle.forward()
  33. end
  34. turtle.placeDown()
  35. turtle.turnRight()
  36. turtle.forward()
  37. turtle.turnRight()
  38. for i=1, (x-1)
  39. do
  40. turtle.forward()
  41. end
  42. turtle.turnLeft()
  43. turtle.turnLeft()
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement