Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function leftPlace()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
- function rightPlace()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- function restock()
- turtle.select(16)
- turtle.turnLeft()
- turtle.suck(turtle.getItemSpace())
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(2)
- turtle.suck(turtle.getItemSpace())
- turtle.select(1)
- turtle.suckUp(turtle.getItemSpace())
- turtle.turnLeft()
- end
- while (true) do
- if(rs.getInput("back")) then
- print("Stopped")
- sleep(1)
- else
- print("Running")
- if(turtle.getFuelLevel()<80) then
- turtle.select(16)
- turtle.refuel()
- else
- turtle.select(3)
- turtle.dig()
- for i = 0,2 do
- turtle.forward();
- end
- for i = 0,1 do
- turtle.down();
- end
- turtle.select(1)
- turtle.place()
- turtle.up()
- leftPlace()
- rightPlace()
- turtle.place()
- turtle.up()
- turtle.select(2)
- leftPlace()
- rightPlace()
- turtle.place()
- for i = 0,2 do
- turtle.back();
- end
- turtle.select(3)
- turtle.place()
- sleep(15)
- print("Restocking")
- restock()
- sleep(15)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment