Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.setComputerLabel("farmer")
- function farm()
- shell.run("clear")
- print("Farm Programm by M3veronMast3r")
- print("------------------------------")
- print(" !!!-WORK IN PROGRESS-!!!")
- print("Sent all Fails to +491748274510")
- end
- -- Settings --
- -- laenge:
- x= 12
- -- breite: (MUSS EINE GERADE ZAHL SEIN)
- z= 12
- -- functions --
- function forward()
- while not turtle.forward() do
- sleep(1)
- end
- end
- function back()
- while not turtle.back() do
- sleep(1)
- end
- end
- function reboot()
- while turtle.getItemCount(16) < 1 do
- shell.run("clear")
- print("Need Chest in Slot 16")
- sleep(1)
- end
- shell.run("clear")
- print("starting Farm Programm..")
- turtle.select(16)
- while not turtle.compare() do
- while not turtle.detect() do
- forward()
- end
- if turtle.compare() then
- else
- turtle.turnRight()
- end
- end
- turtle.turnRight()
- farm()
- end
- function check()
- if turtle.getItemCount(e) < 1 then
- while turtle.getItemCount(e) < 1 do
- e=e+1
- if e > 15 then
- e=1
- turtle.select(e)
- return
- end
- end
- end
- turtle.select(e)
- end
- function drop()
- for i=5,15 do
- turtle.select(i)
- turtle.drop()
- end
- end
- -- functions end --
- reboot()
- e=1
- r=0
- r2=0
- f=0
- check()
- if turtle.getItemCount(e) < 1 then
- if not fs.exists("farmfirststart") then
- shell.run("clear")
- print("Need some Potatoes or Carrots for first start. Continue if you inserted some or planted")
- print("")
- write("Press ENTER to continue")
- read()
- fs.open("farmfirststart","w")
- farm()
- end
- end
- while true do
- while z > 0 do
- while x > 0 do
- check()
- turtle.digDown()
- turtle.digDown()
- turtle.suckDown()
- turtle.suckDown()
- turtle.placeDown()
- if x > 1 then
- forward()
- end
- x=x-1
- r2=r2+1
- end
- while r2 > 0 do
- x=x+1
- r2=r2-1
- end
- r=r+1
- z=z-1
- if z > 0 then
- if f < 1 then
- turtle.turnRight()
- forward()
- turtle.turnRight()
- f=1
- elseif f > 0 then
- turtle.turnLeft()
- forward()
- turtle.turnLeft()
- f=0
- end
- end
- end
- turtle.turnRight()
- while r > 0 do
- if r > 1 then
- forward()
- end
- r=r-1
- z=z+1
- end
- drop()
- turtle.turnRight()
- f=0
- sleep(3300)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement