Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function go()
- while not turtle.forward() do
- os.sleep(0.3)
- end
- end
- function goBack()
- while not turtle.back() do
- os.sleep(0.3)
- end
- end
- function goUp()
- while not turtle.up() do
- os.sleep(0.3)
- end
- end
- function goDown()
- while not turtle.down() do
- os.sleep(0.3)
- end
- end
- function fuel()
- while turtle.getFuelLevel() < 200 do
- turtle.select(2)
- turtle.suckDown(1)
- turtle.refuel()
- end
- end
- fuel()
- turtle.select(16)
- if turtle.compareDown() then
- if not turtle.detect() then
- turtle.select(1)
- turtle.drop()
- go()
- turtle.suck(1)
- goBack()
- turtle.place()
- end
- else
- turtle.up()
- turtle.select(15)
- if turtle.compareUp() then
- turtle.select(1)
- turtle.digUp()
- goUp()
- while turtle.compareUp() do
- turtle.digUp()
- goUp()
- end
- end
- turtle.drop()
- while not turtle.detectDown() do
- goDown()
- end
- turtle.suck(1)
- goBack()
- turtle.place()
- end
- while true do
- os.sleep(10)
- turtle.select(15)
- if turtle.compare() then
- fuel()
- turtle.select(1)
- turtle.dig()
- go()
- while turtle.compareUp() do
- turtle.digUp()
- goUp()
- end
- turtle.drop()
- while not turtle.detectDown() do
- goDown()
- end
- turtle.suck(1)
- goBack()
- turtle.place()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement