Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wachstumsstandRechts=0
- wachstumsstandLinks=0
- local buds=50
- local length=8
- local function drop()
- turtle.up()
- turtle.up()
- turtle.select(1)
- if turtle.getItemCount(1)>16 then
- turtle.dropUp(turtle.getItemCount(1)-16)
- end
- turtle.down()
- turtle.down()
- end
- local function harvestLeft()
- if turtle.getItemCount(1)<16 then
- print("Zu wenige Kartoffeln in Slot 1. Bitte nachfuellen und [Enter] Druecken.")
- io.read()
- end
- turtle.select(1)
- for i=1, length, 1 do
- turtle.forward()
- turtle.digDown()
- end
- turtle.turnRight()
- turtle.turnRight()
- for i=1, length, 1 do
- turtle.placeDown()
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- local function harvestRight()
- if turtle.getItemCount(1)<16 then
- print("Zu wenige Kartoffeln in Slot 1. Bitte nachfuellen und [Enter] Druecken.")
- io.read()
- end
- turtle.select(1)
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- for i=2, length, 1 do
- turtle.digDown()
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for i=2, length, 1 do
- turtle.placeDown()
- turtle.forward()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- local function wait()
- while true do
- os.pullEvent("redstone")
- if rs.getInput("right")==true then
- wachstumsstandRechts=wachstumsstandRechts+1
- end
- if wachstumsstandRechts>=buds then
- harvestLeft()
- wachstumsstandLinks=wachstumsstandLinks+3
- wachstumsstandRechts=0
- drop()
- end
- if rs.getInput("back")==true then
- wachstumsstandLinks=wachstumsstandLinks+1
- end
- if wachstumsstandLinks>=buds then
- harvestLeft()
- wachstumsstandRechts=wachstumsstandRechts+3
- wachstumsstandLinks=0
- drop()
- end
- local wsLeft=wachstumsstandLinks/buds*100
- local wsRight=wachstumsstandRechts/buds*100
- term.clear()
- term.setCursorPos(1, 1)
- print("Derzeitiger Wachstumsstatus:\n-links: ", wsLeft, "%")
- print("-rechts: ", wsRight, "%")
- end
- end
- local function start()
- if turtle.getItemCount(1)<16 then
- print("Zu wenige Kartoffeln in Slot 1. Bitte nachfuellen und [Enter] Druecken.")
- io.read()
- end
- turtle.select(1)
- for i=1, length, 1 do
- turtle.forward()
- turtle.digDown()
- turtle.placeDown()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.select(1)
- for i=2, length, 1 do
- turtle.digDown()
- turtle.placeDown()
- turtle.forward()
- end
- turtle.digDown()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- ------------------
- start()
- while true do
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment