Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- pastebin get RgVX49wJ farming2
- -- field spezification
- local iFelder = 15
- local iReihen = 6
- local iWasserReihe = 3
- -- turtle spetification
- local iSamenSlot = 1
- local iKohleSlot = 2
- local iF = 0
- local iR = 0
- function nextLine(iAktuell)
- if iAktuell%2==0 then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- function checkFuel(iSamenSlot, iKohleSlot)
- iTankMin = 20
- if turtle.getFuelLevel() < iTankMin then
- iKohle = turtle.getItemCount(iKohleSlot)
- turtle.select(iKohleSlot)
- turtle.refuel(iKohle/2)
- turtle.select(iSamenSlot)
- end
- end
- function goHome(iReihen, iFelder)
- if iReihen%2 == 0 then
- else
- turtle.turnRight()
- turtle.turnRight()
- while iFelder>=0 do
- turtle.forward()
- iFelder = iFelder-1
- end
- turtle.forward()
- end
- turtle.turnRight()
- while iReihen>0 do
- turtle.forward()
- iReihen = iReihen-1
- end
- turtle.turnRight()
- turtle.down()
- turtle.down()
- end
- turtle.up()
- turtle.up()
- while iR<iReihen do
- while iF<=iFelder do
- if iReihe == iWasserReihe then
- else
- turtle.digDown()
- turtle.placeDown()
- end
- turtle.forward()
- iF = iF+1
- end
- if iR+1 == iReihen then
- else
- nextLine(iR)
- end
- iF = 1
- iR = iR+1
- checkFuel(iSamenSlot, iKohleSlot)
- end
- goHome(iReihen, iFelder)
- -- create by Padhie alias PaddyPadhie
Advertisement
Add Comment
Please, Sign In to add comment