Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function CleanClear()
- term.clear()
- term.setCursorPos(1, 1)
- end
- function Confirm(xD, zD, dep, retFq)
- CleanClear()
- textutils.slowPrint("So...")
- sleep(2)
- CleanClear()
- textutils.slowPrint("Quarry Parameter Preview\n")
- print("Quarry X: "..xD)
- print("Quarry Z: "..zD)
- print("Quarry depth: "..dep)
- print("Quarry return frequency: "..retFq.."\n")
- sleep(2)
- print("Is this correct?")
- textutils.slowPrint("Y for yes or anything else for no...")
- confirmEnter = read()
- if confirmEnter ~= "Y" then
- CleanClear()
- print("Okay... Restarting program.")
- sleep(1)
- Start()
- else
- CleanClear()
- textutils.slowPrint("Quarry Fuel Preview\n")
- local amOfFuelIn = turtle.getFuelLevel()
- if amOfFuelIn <= 0 then
- print("It seems that there is no fuel left in QuarryBot. In order to continue, enter the amount of items of fuel you want to load in or enter \'all\' to load QuarryBot with all the fuel within its inventory. If you don't use \'all\' then it will only take fuel from the top-left slot.\n")
- local fuelParamEnter = read()
- if fuelParamEnter == "all" then
- for i = 1, 16 do
- turtle.select(i)
- if turtle.refuel(0) then
- turtle.refuel(turtle.getItemCount(i))
- end
- end
- turtle.select(1)
- else
- turtle.select(1)
- if(turtle.refuel(0)) then
- turtle.refuel(tonumber(fuelParamEnter))
- end
- end
- print("Refueled!\n")
- print("There is now "..turtle.getFuelLevel().." fuel inside of QuarryBot.")
- end
- end
- end
- function Start()
- CleanClear()
- textutils.slowPrint("Welcome to Quarry")
- sleep(2)
- print("How far on the X-Axis do you want to quarry?")
- local xDist = tonumber(read())
- sleep(1)
- print("How far on the Z-Axis do you want to quarry?")
- local zDist = tonumber(read())
- sleep(1)
- print("How deep would you like to quarry?")
- local depth = tonumber(read())
- sleep(1)
- print("How often would you like the QuarryBot to return to the surface?")
- print("(Per the amount of blocks the quarry mines.)")
- local returnFreq = tonumber(read())
- sleep(2)
- Confirm(xDist, zDist, depth, returnFreq)
- end
- Start()
Advertisement
Add Comment
Please, Sign In to add comment