Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. run = true
  2. print("**Farming area is meant to be a rectangle**")
  3. print("**Turtle should start at the bottom left of the farm plot behind first crop**")
  4.  
  5. io.write("What is the crop type: ")
  6. croptype = (tostring(io.read()))
  7. io.write("How many blocks forward: ")
  8. blocksforward = (tonumber(io.read()))
  9. io.write("How many blocks to the right: ")
  10. blocksright = (tonumber(io.read()))
  11. x = 0
  12. y = 0
  13.  
  14. while run do
  15. local event, param = os.pullEvent()
  16. if event == "key" and param == 28 then
  17. break
  18.  
  19. elseif croptype == "hemp" then
  20. if turtle.detect() then
  21. if x not == blocksforward then
  22. turtle.dig()
  23. turtle.forward()
  24. x = x + 1
  25. end
  26.  
  27.  
  28.  
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement