Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local block = 1
- local quarry = 13
- local tesseract = 16
- local landmark = 15
- local chest = 14
- local args = {...}
- local length = 10
- local height = 0
- function height()
- term.clear()
- term.setCursorPos(1,1)
- print("Do you wish the turtle to setup the quarry in air?")
- print("Press Y/N to confirm")
- local event, key = os.pullEvent("key")
- if key == keys.y then
- print("How far up?")
- input = read()
- if input then
- height = tonumber(input)
- end
- return
- elseif key == keys.n then
- print("Not going up..")
- sleep(1)
- end
- return
- end
- function checkFuel()
- term.clear()
- term.setCursorPos(1,1)
- print("Checking if i have enough fuel..")
- sleep(2)
- if turtle.getFuelLevel() < 500 then
- print("Master.. Im low on fuel, could i get some?, i would prefer atleast 8 pieces of coal, or any other so i get above 500 fuel master Please..")
- while true do
- local event, key = os.pullEvent("key")
- if key == keys.enter then
- turtle.refuel()
- print(turtle.getFuelLevel())
- sleep(2)
- return
- end
- end
- end
- if turtle.getFuelLevel() >= 500 then
- print("Im fine on fuel thanks.. press enter to continue.")
- while true do
- local event, key = os.pullEvent("key")
- if key == keys.enter then
- return
- end
- end
- end
- end
- function lenght()
- term.clear()
- term.setCursorPos(1,1)
- print("How big do you want the quarry?")
- input = read()
- if input then
- length = input
- elseif input == nil then
- print("Error..")
- end
- print("You have said that you want the quarry to be: ".. tostring(length))
- print("Are you sure?")
- print("Press Y/N")
- while true do
- local event, key = os.pullEvent("key")
- if key == keys.y then
- print("I'm gonna go a head and build you quarry!")
- sleep(2)
- Quarry()
- end
- if key == keys.n then
- print("You pressed N, breaking the program..")
- break
- end
- end
- end
- function Quarry()
- for i = 1, height do
- turtle.up()
- end
- -- [ Landmarks ] --
- for i = 1,length do
- turtle.forward()
- end
- turtle.select(block)
- turtle.forward()
- turtle.placeDown()
- turtle.back()
- turtle.select(landmark)
- turtle.place()
- for o = 1, length -1 do
- turtle.back()
- end
- turtle.turnRight()
- for p = 1,length -1 do
- turtle.forward()
- end
- turtle.select(block)
- turtle.forward()
- turtle.placeDown()
- turtle.back()
- turtle.select(landmark)
- turtle.place()
- for a = 1, length -1 do
- turtle.back()
- end
- turtle.turnLeft()
- turtle.select(block)
- turtle.placeDown()
- turtle.back()
- turtle.select(landmark)
- turtle.place()
- turtle.attack()
- -- [ Landmarks end] --
- turtle.back()
- turtle.select(quarry)
- turtle.place()
- turtle.up()
- turtle.select(chest)
- turtle.place()
- turtle.back()
- turtle.down()
- turtle.select(tesseract)
- turtle.place()
- print("Done.")
- for i = 0,height do
- turtle.down()
- end
- end
- function itemsSlot()
- term.clear()
- term.setCursorPos(1,1)
- print("Place following items in slot:")
- print("Block for air placement: 1")
- print("Quarry: 13")
- print("Chest: 14")
- print("Landmarks: 15")
- print("Tesseract: 16")
- sleep(10)
- end
- -- [Main program] --
- itemsSlot()
- checkFuel()
- height()
- lenght()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement