Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("predictSimpleQuarry.lua")
- os.loadAPI("userInput.lua")
- os.loadAPI("getTurtleFuel.lua")
- os.loadAPI("simpleQuarry.lua")
- os.loadAPI("turtleForward.lua")
- os.loadAPI("turtleRefuel.lua")
- function mine()
- choice = 0
- while choice ~= 1 do
- invalid = true
- while invalid do
- width = tonumber(userInput.getUserInput("Enter Length: "))
- length = tonumber(userInput.getUserInput("Enter Width: "))
- depth = tonumber(userInput.getUserInput("Enter Depth"))
- if width == nil then
- print("Invalid Length!")
- elseif length == nil then
- print("Invalid Width!")
- elseif depth == nil then
- print("Invalid Depth!")
- else
- invalid = false
- end
- end
- tw = width
- tl = length
- td = depth
- if tw == 0 then
- tw = 1
- end
- if tl == 0 then
- tl = 1
- end
- if td == 0 then
- td = 1
- end
- volume = tw * tl * td
- width = width - 1
- print("Volume: " .. volume .. " blocks")
- if volume > 800 then
- print("WARNING! Volume over 800")
- print("Max is 1024 with Empty Inventory")
- print("With Stacks of 64.")
- end
- max = volume > 9000
- if not max then
- print("Proceed?")
- choice = tonumber(userInput.getUserInput("Yes = 1, No = 2"))
- predictSimpleQuarry.predict(width, length, depth)
- fuelcost = predictSimpleQuarry.getFuelCost()
- if fuelcost > turtle.getFuelLevel() then
- getTurtleFuel.displayFuelInfo()
- print("Quarry Fuel Cost = " .. fuelcost)
- print("Fuel too Low to Start, Please Insert Buckets")
- choice = tonumber(userInput.getUserInput("Type 1 to Refuel, Type 2 to Re-select Quarry"))
- if choice == 1 then
- turtleRefuel.refuelWithLava()
- turtle.select(1)
- if fuelcost > turtle.getFuelLevel() then
- print("Fuel Still too Low to Start, Terminating Program")
- os.sleep(3)
- else
- simpleQuarry.quarry(width, length, depth)
- end
- end
- else
- if choice == 1 then
- simpleQuarry.quarry(width, length, depth)
- end
- end
- else
- print("Volume = " .. volume)
- print("Volume Over 5000, Please Reselect Size Constraints")
- choice = 2
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement