Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --X X X F X
- --F X L X X
- --X L T L X
- --X X L X F
- --X F X X X
- -- F= Thermalily flower, T= Turtle, L= Pit for Lava, X= Any fireproof material
- print("Thermalily x4 feeder: https://pastebin.com/kiND0X1S")
- tanklist={"Above", "Below"}
- if (fs.exists("choices") == false) then --Check if this is first time run, no saved choices on file
- while true do --Asks for type of crops
- print("Where is the lava tank located?")
- for i=1, #tanklist do
- print(i..". "..tanklist [i])
- end
- local answer = read()
- if tonumber(answer)==nill then
- print("-Wrong answer, input not a number-")
- else
- local answerv = tonumber(string.format("%." .. 0 .. "f", answer))
- if (0 < answerv and answerv <= #tanklist ) then
- pick=answerv
- --print("Tank location chosen: ", tanklist [answerv])
- break
- else
- print("-Wrong answer, input does not match range of choices-")
- end
- end
- end
- --Write choices to file
- local file = fs.open("choices","w")
- file.writeLine("pick="..tostring(pick))
- file.close()
- end
- os.loadAPI("choices") -- Reads choices from file
- local pick= choices.pick
- print("Starting in 6 minutes")
- sleep(90*4)
- while true do
- if redstone.getInput("top")==false then
- if pick==1 then
- turtle.placeUp()
- elseif pick==2 then
- turtle.placeDown()
- end
- sleep(0.5)
- data = turtle.getItemDetail(1)
- if string.find(data.name,"minecraft:lava_bucket") then
- turtle.place()
- turtle.turnLeft()
- end
- sleep(80)
- end
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement