Guest User

Untitled

a guest
Aug 22nd, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.19 KB | None | 0 0
  1. i = 5 --Number of times the turtle has dug
  2. u = 1 --Number of times the turtle has dug, in 5s
  3. --h = 1 --Now assigned by input
  4. s = 1 --Used to end program
  5. --t == 4
  6. b = 1
  7. rednet.open("right")
  8. print("Ready to accept")
  9. print("1.")
  10. message = rednet.receive()
  11. h = message
  12. print("2.")
  13. message = rednet.receive()
  14. d = message
  15. print("3.")
  16. message = rednet.receive()
  17. input = message
  18. if d == "Yes" then
  19.     turtle.digDown()
  20.     turtle.down()
  21.     end
  22. if d == "No" then
  23.     end
  24. repeat
  25.     if turtle.detect() == true then
  26.         turtle.dig()  
  27.         turtle.forward()   
  28.         end
  29.     if turtle.detect() == false then
  30.         turtle.forward()       
  31.         end
  32.         i = i - 1
  33.     if i < 2 then
  34.         i = 5
  35.         u = u + 1
  36.         h = h - 1
  37.         turtle.digDown()
  38.         turtle.turnLeft()
  39.         turtle.turnLeft()
  40.         turtle.down()
  41.         print(u)
  42.         end
  43.     if h == 0 then --Change once testing is complete
  44.         u = u + 1
  45.         if b == 1 then
  46.             rednet.open("right")
  47.             rednet.send(62,"Finished")
  48.             repeat
  49.                 turtle.up()
  50.                 u = u - 1
  51.             until u <= 1
  52.             s = s + 1
  53.             end
  54.         end
  55.         turtle.select(1)
  56.         turtle.placeDown()
  57.         if input == "Once" then
  58.             turtle.turnLeft()
  59.             turtle.forward()
  60.             turtle.turnRight()
  61.             end
  62.         if input == "Twice+" then
  63.             end
  64. until s > 1
Advertisement
Add Comment
Please, Sign In to add comment