Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- 9 X 9 Farm
- ]]--
- local function move()
- turtle.digDown()
- turtle.placeDown()
- 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,8 do
- move()
- end
- turtle.turnRight()
- move()
- turtle.turnRight()
- move()
- for i = 1,8 do
- move()
- end
- turtle.turnLeft()
- move2()
- turtle.turnLeft()
- move2()
- end
- for i = 1,8 do
- move()
- end
- move()
- while not turtle.down() do
- sleep(1)
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- local iRepeat = 0
- local iMin = 40
- 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)
- plow()
- 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