Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- 12 X 12 farm
- ]]--
- local function move()
- turtle.digDown()
- slot=1
- while not turtle.placeDown() do
- turtle.select(slot)
- slot=slot+1
- if slot>16 then
- break
- end
- end
- while not turtle.forward() do
- sleep(1)
- end
- end
- local function move2()
- while not turtle.forward() do
- sleep(1)
- end
- end
- local function plow()
- while not turtle.up() do
- sleep(1)
- end
- move2()
- for o = 1,6 do
- for i = 1,12 do
- move()
- end
- turtle.turnRight()
- move()
- turtle.turnRight()
- move()
- for i = 1,12 do
- move()
- end
- turtle.turnLeft()
- move2()
- turtle.turnLeft()
- move2()
- end
- for i = 1,12 do
- move()
- end
- move()
- while not turtle.down() do
- sleep(1)
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- local iRepeat = 0
- local iMin = 50
- local iCount = 0
- local spacer = ""
- while true do
- term.clear()
- term.setCursorPos(1,4)
- print("Fuel Remaning : "..tostring(turtle.getFuelLevel()))
- term.setCursorPos(1,1)
- iRepeat = iRepeat+1
- print("plowing :"..iRepeat)
- for i = 1,16 do
- turtle.select(i)
- turtle.refuel()
- end
- plow()
- turtle.turnRight()
- for slot=1,16 do
- turtle.select(slot)
- sleep(0.1)
- turtle.drop()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- sleep(5)
- for i = 1,3 do
- sleep(1)
- turtle.suck()
- end
- turtle.turnRight()
- term.setCursorPos(1,4)
- print("Fuel Remaning : "..tostring(turtle.getFuelLevel()))
- iCount = iMin
- while true do
- iCount = iCount-1
- term.setCursorPos(1,2)
- term.clearLine()
- print("sleeping "..iMin.." minuites")
- for i = 59,0,-1 do
- sleep(1)
- term.setCursorPos(1,3)
- term.clearLine()
- if i < 10 then
- spacer = "0"
- else
- spacer = ""
- end
- write("To go "..iCount..":"..spacer..i)
- end
- if iCount == 0 then
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement