Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 0
- local function getRealTime()
- local time = os.date("*t")
- return time
- end
- function reffil()
- if turtle.getItemCount(1) == 0 then
- turtle.select(15)
- turtle.placeUp()
- turtle.select(1)
- turtle.suckUp(64)
- turtle.select(15)
- turtle.digUp()
- turtle.select(1)
- end
- end
- function deposit()
- if turtle.getItemCount(2) == 64 then
- turtle.select(16)
- turtle.placeUp()
- turtle.select(2)
- turtle.dropUp(64)
- turtle.select(16)
- turtle.digUp()
- turtle.select(1)
- end
- end
- function check()
- local checkBelow, data = turtle.inspectDown()
- if checkBelow == true then
- if data.name == "botania:livingwood_log" then
- turtle.select(2)
- turtle.digDown()
- turtle.select(1)
- turtle.placeDown()
- reffil()
- deposit()
- end
- end
- end
- function pathLeft()
- turtle.forward()
- check()
- turtle.turnLeft()
- turtle.forward()
- check()
- turtle.forward()
- check()
- turtle.turnLeft()
- turtle.forward()
- check()
- turtle.forward()
- check()
- turtle.turnLeft()
- turtle.forward()
- check()
- turtle.forward()
- check()
- turtle.turnLeft()
- turtle.forward()
- sleep(1)
- x = 1
- end
- function pathRight()
- check()
- turtle.forward()
- check()
- turtle.turnRight()
- turtle.forward()
- check()
- turtle.forward()
- check()
- turtle.turnRight()
- turtle.forward()
- check()
- turtle.forward()
- check()
- turtle.turnRight()
- turtle.forward()
- check()
- turtle.forward()
- check()
- turtle.turnRight()
- turtle.forward()
- check()
- sleep(1)
- x = 0
- end
- while true do
- if x == 1 then
- pathRight()
- reffil()
- deposit()
- sleep(1)
- else
- pathLeft()
- reffil()
- deposit()
- sleep(1)
- end
- local currentTime = getRealTime()
- if currentTime.hour == 04 and currentTime.min >= 50 then
- sleep(5000)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment