Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true
- do
- os.pullEvent("redstone")
- while rs.getInput("left")
- do
- if turtle.detectDown() == false then
- repeat
- turtle.down()
- until turtle.detectDown() == true
- end
- if turtle.getItemCount(3) > 0 then
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 3, 16, 1
- do
- turtle.select(i)
- turtle.drop(turtle.getItemCount(i))
- end
- turtle.select(1)
- turtle.turnLeft()
- turtle.turnLeft()
- end
- if turtle.getFuelLevel() <= 100 then
- rednet.open("left")
- rednet.broadcast("refill")
- sleep(3)
- repeat
- turtle.suckDown(64)
- if turtle.getItemDetail(3).name ~= "minecraft:oak_plank" then
- turtle.turtLeft()
- turtle.turnLeft()
- turtle.select(3)
- turtle.drop(turtle.getItemCount())
- turtle.select(1)
- turtle.turnLeft()
- turtle.turnLeft()
- end
- until turtle.getItemDetail(3).name == "minecraft:oak_plank"
- turtle.select(3)
- turtle.refuel(turtle.getItemCount())
- turtle.select(1)
- elseif turtle.getFuelLevel() > 100 then
- rednet.open("left")
- rednet.broadcast("good")
- rednet.close("left")
- end
- if turtle.getItemCount(2) <= 3 then
- turtle.suckDown(64)
- end
- if turtle.compare() then
- repeat
- turtle.dig()
- turtle.digUp()
- turtle.up()
- until turtle.compare() == false
- repeat
- turtle.down()
- until turtle.detectDown() == true
- elseif turtle.detect() == false then
- turtle.select(2)
- turtle.place()
- turtle.select(1)
- end
- if turtle.getItemCount() >= 50 then
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.drop(turtle.getItemCount() - 2)
- turtle.turnLeft()
- turtle.turnLeft()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement