Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- -- --
- -- d --
- -- -- --
- --turtle on bottom left corner, chest with ingredients above, chest to dump items to the left below, turtle direction ^
- moves = 0
- go = "n"
- turtle.select(1)
- function replace()
- turtle.digDown()
- turtle.placeDown()
- end
- function checkslot()
- if turtle.getItemCount(1) > 0 then
- data = turtle.getItemDetail(1)
- if data.name == "minecraft:stone" then
- go = "y"
- end
- if data.name == "minecraft:spruce_log" then
- go = "y"
- end
- else
- repeat
- turtle.getItemCount(1)
- print("Need stone or wood plx.")
- sleep(5)
- until turtle.getItemCount(1) > 0
- end
- end
- function checkformats()
- checkslot()
- if go ~= "y" then
- repeat
- checkslot()
- print("Need stone or wood plx.")
- sleep(5)
- until go == "y"
- end
- go = "n"
- end
- function move()
- repeat
- checkformats()
- replace()
- if turtle.forward() then moves = moves + 1 end
- until moves == 2
- end
- function oneround()
- for i =1, 4 do
- move()
- turtle.turnRight()
- moves = 0
- end
- end
- function unloaditems()
- for i=2, 16 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- if turtle.dropDown() == false then
- sleep(5)
- print("Waiting for storage")
- end
- end
- end
- turtle.select(1)
- end
- while true do
- oneround()
- turtle.turnLeft()
- repeat until turtle.forward()
- unloaditems()
- repeat until turtle.back()
- turtle.turnRight()
- if turtle.suckUp() == false then
- repeat
- print("Barrel empty, plz refill.")
- sleep(5)
- until turtle.suckUp()
- end
- for i = 2, 16 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(1)
- end
- sleep(50)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement