ReIative

Untitled

Jun 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. x = 0
  2. y = 0
  3. tf = true
  4. print("place x value (how far ahead of turtle?)")
  5. x = io.read()
  6. print ("Place y value (how far to the side?) ")
  7. y = io.read()
  8. value = 0
  9. x ^ y = value
  10. if value > 576 then
  11. print("This is too big fo rthe turtle.")
  12. else
  13. a = turtle.getItemCount(1)
  14. b = turtle.getItemCount(2)
  15. c = turtle.getItemCount(3)
  16. d = turtle.getItemCount(4)
  17. e = turtle.getItemCount(5)
  18. f = turtle.getItemCount(6)
  19. g = turtle.getItemCount(7)
  20. h = turtle.getItemCount(8)
  21. i = turtle.getItemCount(9)
  22. end
  23. total = a + b + c + d + e + f + g + h + i
  24. if value > total then
  25. print("You dont have enough blocks")
  26. else
  27. while y > 0 do
  28. y = y - 1
  29. z = x
  30. while z > 0 then
  31. z = z - 1
  32. turtle.digDown()
  33. turtle.placeDown()
  34. turtle.forward()
  35. z = 0
  36. end
  37. if tf = true then
  38. turtle.turnRight()
  39. turtle.forward()
  40. turtle.turnRight()
  41. tf = false
  42. else
  43. turtle.turnLeft()
  44. turtle.forward()
  45. turle.turnLeft()
  46. tf = true
  47. end
  48. end
  49. end
  50. print("Task Complete!")
Add Comment
Please, Sign In to add comment