Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sapslot = 1
- local rubslot = 2
- local fuelslot = 3
- local function fuelcheck()
- if turtle.getItemCount(3) <1 then
- turtle.select(3)
- sleep(0.2)
- turtle.down()
- sleep(0.2)
- turtle.turnLeft()
- sleep(0.2)
- turtle.turnLeft()
- sleep(0.2)
- turtle.suck()
- sleep(0.2)
- end
- repeat
- turtle.drop(1)
- sleep(0.2)
- until
- turtle.getItemCount() == 5
- end
- turtle.turnRight()
- sleep(0.2)
- turtle.turnRight()
- sleep(0.2)
- turtle.up()
- sleep(0.2)
- print("Got the fuel")
- sleep(0.3)
- end
- local function sapcheck()
- if turtle.getItemCount(1)<1 then
- turtle.select(1)
- sleep(0.2)
- turtle.down()
- sleep(0.2)
- turtle.turnRight()
- sleep(0.2)
- turtle.suck()
- sleep(0.2)
- end
- repeat
- turtle.drop(1)
- sleep(0.2)
- until
- turtle.getItemCount() == 1
- end
- print("Got the sapplings")
- sleep(0.3)
- end
- local function rubcheck()
- if turtle.getItemCount(2) <1 then
- turtle.select(2)
- sleep(0.2)
- turtle.down()
- sleep(0.2)
- turtle.turnRight()
- sleep(0.2)
- turtle.suck()
- sleep(0.2)
- end
- repeat
- turtle.drop(1)
- sleep(0.2)
- until
- turtle.getItemCount() == 1
- end
- turtle.turnRight()
- sleep(0.2)
- turtle.turnRight()
- sleep(0.2)
- turtle.up()
- sleep(0.2)
- print("Got the rubber")
- sleep(0.3)
- end
- local function felling()
- if turtle.detect() then
- turtle.dig()
- sleep(0.2)
- turtle.forward()
- sleep(0.2)
- end
- repeat
- turtle.digUp()
- sleep(0.2)
- turtle.dUp()
- until
- not turtle.detect()
- end
- repeat
- turtle.down()
- sleep(0.2)
- until
- turtle.detect()
- turtle.digDown()
- sleep(0.2)
- turtle.select(1)
- sleep(0.2)
- turtle.place()
- sleep(0.2)
- turtle.back()
- sleep(0.3)
- end
- local function main()
- fuelcheck()
- rubcheck()
- sapcheck()
- felling()
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement