Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wartezeit=900 --Die Wartezeit vor dem nächsten Farmen in normalen sekunden 1200=20min=1 MC Tag
- function refuel()
- fuel=turtle.getFuelLevel()
- if fuel<5 then
- turtle.select(1)
- turtle.refuel(1)
- end
- end
- function deposit()
- for i=2,16 do
- turtle.select(i)
- if turtle.getItemCount(i)~=0 then
- turtle.dropDown()
- end
- end
- turtle.select(1)
- end
- function linkereiheend(state)
- for i=1,23 do
- refuel()
- if state==true then
- turtle.digDown()
- else
- plant()
- end
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- deposit()
- end
- function linkereihe(state)
- for i=1,23 do
- refuel()
- if state==true then
- turtle.digDown()
- else
- plant()
- end
- turtle.forward()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- refuel()
- end
- function rechtereihe(state)
- for i=1,23 do
- refuel()
- turtle.forward()
- if state==true then
- turtle.digDown()
- else
- plant()
- end
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- refuel()
- end
- function plant()
- checkforseeds()
- turtle.placeDown()
- end
- function checkforseeds()
- for i=2,16 do
- if turtle.getItemCount(i)~=0 then
- turtle.select(i)
- break
- else
- clear()
- print("Keine seeds!")
- if start==true then
- print("Egal...")
- elseif start==false then
- error()
- end
- end
- end
- end
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function farm()
- clear()
- print("Farme den Weizen...")
- rechtereihe(true)
- linkereihe(true)
- rechtereihe(true)
- linkereiheend(true)
- turtle.select(1)
- clear()
- print("Done.")
- sleep(1)
- main()
- end
- function replant()
- clear()
- print("Pflanze den Weizen...")
- checkforseeds()
- start=true
- rechtereihe(false)
- linkereihe(false)
- rechtereihe(false)
- linkereiheend(false)
- turtle.select(1)
- clear()
- print("Fertig.")
- sleep(1)
- wait()
- end
- function wait()
- counter=0
- for i=0,wartezeit do
- clear()
- counter=counter+1
- print("Warte "..wartezeit.." Sekunden...")
- print(wartezeit-counter.." Sekunden verbleiben...")
- sleep(1)
- end
- farm()
- end
- function main()
- replant()
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement