Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not os.loadAPI("rtl") then shell.run("pastebin get XM1Zpwpq rtl") os.loadAPI("rtl") end
- if turtle.isWorking() then
- print("Uwaga! Turtle nieoczekiwanie sie wylaczyl. Cofanie...")
- turtle.rtl()
- turtle.setWorking(false)
- end
- function turn(p)
- turtle.forward()
- if p == "b" then turtle.digDown() elseif p == "p" then turtle.placeDown() end
- turtle.forward()
- if p == "b" then turtle.digDown() elseif p == "p" then turtle.placeDown() end
- turtle.turnRight()
- end
- function selectItem(name,alt)
- local oldpos = turtle.getSelectedSlot()
- for i=1,16 do
- turtle.select(i)
- local slot = turtle.getItemDetail()
- if slot ~= nil and (slot["name"] == name or slot["name"] == alt) then
- break
- end
- end
- end
- while true do
- if turtle.getFuelLevel() < 500 then selectItem("minecraft:coal_block") turtle.refuel(64) end
- if not turtle.isIdle() then
- turtle.setWorking(true)
- turtle.suckDown(64)
- selectItem("minecraft:log","minecraft:stone")
- turtle.forward()
- for i=1,7 do
- for i=1,4 do turn("p") end
- turtle.up()
- end
- turn("p")
- turtle.setIdle(true)
- end
- while true do
- os.sleep(1)
- local _,name = turtle.inspectDown()
- if name ~= nil and (name["name"] == "Botania:livingrock" or name["name"] == "Botania:livingwood") then
- break
- end
- turtle.setIdle(false)
- end
- for i=1,7 do
- for i=1,4 do turn("b") end
- turtle.down()
- end
- turn("b")
- turtle.back()
- selectItem("Botania:livingwood","Botania:livingrock")
- turtle.dropUp(64)
- turtle.setWorking(false)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement