Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("By default this CnS bot will mine a distance of 128 blocks")
- print("Press any button to change this value")
- local x, y = term.getCursorPos()
- local s = 5
- local distance
- local myTimer = os.startTimer(0)
- while s >= 0 do
- local event, param = os.pullEvent()
- if event == "timer" and param == myTimer then
- term.setTextColor(8)
- term.write(s)
- s = s - 1
- term.setCursorPos(x, y)
- myTimer = os.startTimer(1)
- elseif event == "key" then
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(1)
- term.write("Enter the distance you'd like this CnS bot to dig.")
- while true do
- distance = tonumber(read())
- if distance then
- break
- end
- print("Please enter an actual number.")
- end
- break
- end
- end
- --turtle.getFuelLevel(
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement