Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This program is made for turning a
- -- oak log into a stripped log from
- -- 4 fluid extractors from industrial
- -- forgoing, then apply an andesite to
- -- create andesite casing from create.
- -- Put this turtle on top of the log.
- -- Input is to the right, andesite
- -- casing output on the left, and
- -- stripped logs in the back.
- t = 30
- while t > 0 do
- term.clear()
- term.setCursorPos(1,1)
- print("Automatic latex production and andesite casing production has started")
- turtle.select(2)
- turtle.turnRight()
- if turtle.getItemDetail() == nil then
- turtle.suck(1)
- end
- if (turtle.suck(1)) == true then
- print("Turtle has picked up 1 log")
- turtle.placeDown()
- print("Turtle has placed down the log")
- turtle.select(3)
- turtle.turnLeft()
- if turtle.suck(1) == true then
- print("Turtle has picked up 1 andesite")
- a = 1
- else
- print("There is no more andesite in input inventory. Turtle will now only create stripped logs")
- a = 0
- end
- i = 1
- while i == 1 do
- print("Turtle will now wait", t, "seconds for the fluid extractors to finish extracting fluid")
- sleep(t)
- print("Checking if log has been stripped")
- turtle.select(2)
- if turtle.compareDown() == false then
- i = 0
- else
- print("The log is not yet stripped, trying again later..")
- end
- end
- if a == 1 then
- turtle.select(3)
- turtle.placeDown()
- print("Andesite casing created!")
- print("Digging up the andesite casing!")
- else
- print("Digging up the stripped wood!")
- end
- turtle.select(1)
- turtle.digDown()
- turtle.turnLeft()
- if a == 0 then
- turtle.turnLeft()
- turtle.drop()
- turtle.turnRight()
- turtle.turnRight()
- else
- turtle.drop()
- turtle.turnRight()
- end
- print("All contents stored. Starting new iteration in 5 seconds")
- sleep(5)
- else
- print("Turtle has run out of logs. Refill input inventory!")
- t = 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement