Advertisement
someone3709

log but it doesn't craft

Feb 21st, 2023
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. --used to check blocks
  2. function compareTo()
  3.     while turtle.compare() do
  4.         logCode()
  5.     end
  6. end
  7. --checks what can be crafted and to drop it
  8. function slotCheck()
  9.     for i = 1, 16 do
  10.         turtle.select(i)
  11.         if turtle.getSelectedSlot() then
  12.             turtle.drop(64)
  13.         end
  14.     end
  15.     turtle.select(1)
  16. end
  17. --code that breaks trees
  18. function logCode()
  19.     turtle.dig()
  20.     turtle.forward()
  21.     turtle.select(1)
  22.  
  23.     while turtle.compareUp() do
  24.         turtle.digUp()
  25.         turtle.up()
  26.     end
  27.  
  28.     while turtle.detectDown() == false do
  29.         turtle.down()
  30.     end
  31.    
  32.     compareTo()
  33.     turtle.turnLeft()
  34.     compareTo()
  35.     turtle.turnRight()
  36.     turtle.turnRight()
  37.     compareTo()
  38.     turtle.turnRight()
  39.     slotCheck()
  40.     turtle.select(1)
  41.     os.exit()
  42. end
  43.  
  44. logCode()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement