Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while digDown do
- local block, what = robot.detectDown()
- print(what)
- if what == "solid" then
- if robot.swingDown() then
- robot.down()
- depth = depth + 1
- else
- digDown = false
- end
- elseif (what == "replaceable") or (what == "liquid") then
- print("I think there's lava!")
- os.sleep(1)
- local drain = robot.compareFluidDown()
- print(drain)
- while drain do
- os.sleep(2)
- robot.drainDown()
- local detect, thing = robot.detectDown()
- if (thing == "air") then
- drain = false
- print("I did it!")
- else
- print("Nope, no lava this time.")
- end
- end
- robot.down()
- depth = depth + 1
- else
- robot.down()
- depth = depth + 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment