Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local choice = ""
- local t = turtle
- tgf = turtle.getFuelLevel()
- fuelLimit = 1
- ready = false
- runcheck = 0
- function WriteMenu()
- term.clear()
- term.setCursorPos(1, 1)
- print("+--Mega Quarry 9000 by IllProtectJu--+")
- os.sleep(1)
- if ready == true then
- print("If I'm fully stocked with the items below then you may continue:")
- os.sleep(1)
- print("+---T-h-e-s-e--+--I-t-e-m-s---+")
- os.sleep(.1)
- print("| Block:40 | Quarry:2 |")
- os.sleep(.1)
- print("| RSCond: 4 | EnergyTess:6 |")
- os.sleep(.1)
- print("| GoldP: 6 | Lamp:1 |")
- os.sleep(.1)
- print("| EnderChest:| DiamondP:1 |")
- os.sleep(.1)
- print("| VoidPipe:1 | SpotLoader:1 |")
- print("+----R----E----A----D----Y----+")
- os.sleep(.5)
- print("y/n?")
- print("")
- end
- end
- local function fw(x)
- for i = 1, x do
- turtle.forward()
- end
- end
- local function back(x)
- for i = 1, x do
- turtle.back()
- end
- end
- local function left(x)
- for i = 1, x do
- turtle.turnLeft()
- end
- end
- local function right(x)
- for i = 1, x do
- turtle.turnRight()
- end
- end
- local function up(x)
- for i = 1, x do
- turtle.up()
- end
- end
- local function down(x)
- for i = 1, x do
- turtle.down()
- end
- end
- local function pipe(x)
- for i = 1, x do
- turtle.place()
- turtle.back()
- end
- end
- local function unpipe(x)
- for i = 1, x do
- turtle.dig()
- turtle.forward()
- end
- end
- local function putD(x)
- for i = 1, x do
- turtle.placeDown()
- turtle.forward()
- end
- end
- local function getD(x)
- for i = 1, x do
- turtle.digDown()
- turtle.forward()
- end
- end
- local function stack(x)
- for i = 1, x do
- turtle.placeDown()
- turtle.up()
- end
- end
- local function unstack(x)
- for i = 1, x do
- turtle.down()
- turtle.digDown()
- end
- end
- function stone()
- turtle.select(1)
- end
- function quarry()
- turtle.select(2)
- end
- function RSC()
- turtle.select(3)
- end
- function tess()
- turtle.select(4)
- end
- function gpipe()
- turtle.select(5)
- end
- function chest()
- turtle.select(7)
- end
- function dpipe()
- turtle.select(8)
- end
- function vpipe()
- turtle.select(9)
- end
- function chunk()
- turtle.select(10)
- end
- function lamp()
- turtle.select(6)
- end
- function ring(x)
- for i = 1, x do
- stone()
- putD(2)
- right(1)
- putD(1)
- left(1)
- putD(1)
- right(1)
- putD(1)
- left(1)
- putD(1)
- right(1)
- putD(2)
- end
- end
- function unring(x)
- for i = 1, x do
- stone()
- getD(2)
- right(1)
- getD(1)
- left(1)
- getD(1)
- right(1)
- getD(1)
- left(1)
- getD(1)
- right(1)
- getD(2)
- term.clear()
- print('All Packed up!!! Do you want me to "move" to another location?')
- end
- end
- local function power(x)
- for i = 1, x do
- fw(1)
- RSC()
- putD(1)
- right(1)
- putD(1)
- tess()
- left(1)
- putD(1)
- right(1)
- putD(1)
- left(1)
- putD(1)
- left(1)
- RSC()
- fw(1)
- putD(1)
- left(1)
- putD(1)
- left(2)
- putD(1)
- right(1)
- fw(2)
- putD(2)
- end
- end
- local function bigpower(x)
- for i = 1, x do
- up(1)
- right(1)
- fw(1)
- RSC()
- putD(1)
- right(1)
- putD(1)
- right(2)
- tess()
- putD(1)
- fw(1)
- right(2)
- putD(1)
- left(1)
- fw(1)
- putD(1)
- lamp()
- down(1)
- stack(1)
- chest()
- putD(1)
- tess()
- putD(1)
- RSC()
- left(1)
- putD(1)
- left(2)
- tess()
- putD(1)
- fw(1)
- left(2)
- putD(1)
- right(1)
- RSC()
- fw(1)
- putD(1)
- end
- end
- local function bigmarks(x)
- for i = 1, x do
- fw(1)
- down(1)
- stone()
- left(1)
- putD(1)
- fw(30)
- right(1)
- putD(1)
- fw(62)
- right(2)
- putD(1)
- fw(62)
- left(1)
- fw(62)
- right(2)
- putD(1)
- fw(30)
- left(1)
- fw(1)
- up(2)
- fw(9)
- down(2)
- stone()
- left(1)
- putD(1)
- fw(30)
- right(1)
- putD(1)
- fw(62)
- right(2)
- putD(1)
- fw(62)
- left(1)
- fw(62)
- right(2)
- putD(1)
- fw(30)
- left(1)
- fw(1)
- up(2)
- gpipe()
- putD(4)
- fw(1)
- putD(3)
- right(2)
- putD(1)
- fw(3)
- dpipe()
- stack(1)
- vpipe()
- stack(1)
- chunk()
- stack(1)
- term.clear()
- print("DONE!!!")
- end
- end
- local function unpower(x)
- for i = 1, x do
- fw(1)
- RSC()
- getD(1)
- right(1)
- getD(1)
- tess()
- left(1)
- getD(1)
- right(1)
- getD(1)
- left(1)
- getD(1)
- left(1)
- RSC()
- fw(1)
- getD(1)
- left(1)
- getD(1)
- left(2)
- getD(1)
- right(1)
- fw(2)
- getD(2)
- end
- end
- local function pipes(x)
- for i = 1, x do
- down(1)
- quarry()
- turtle.place()
- up(1)
- gpipe()
- pipe(3)
- turtle.place()
- right(1)
- fw(3)
- end
- end
- local function unpipes(x)
- for i = 1, x do
- gpipe()
- unpipe(3)
- turtle.dig()
- down(1)
- quarry()
- turtle.dig()
- up(1)
- back(3)
- left(1)
- end
- end
- local function finish(x)
- for i = 1, x do
- down(1)
- lamp()
- stack(1)
- chest()
- stack(1)
- dpipe()
- stack(1)
- vpipe()
- stack(1)
- chunk()
- stack(1)
- print("All Done!!!")
- term.clear()
- print('When youre ready for me to "packup" or "move" to another location, just let me know!')
- end
- end
- local function unfinish(x)
- for i = 1, x do
- chunk()
- unstack(1)
- vpipe()
- unstack(1)
- dpipe()
- unstack(1)
- chest()
- unstack(1)
- lamp()
- unstack(1)
- turtle.digDown()
- turtle.digDown()
- up(1)
- end
- end
- local function newlocation(x)
- for i = 1, x do
- fw(16)
- right(1)
- fw(16)
- left(1)
- end
- end
- function choiceFunction()
- if ready == true then
- choice = io.read()
- choice = string.lower(choice)
- if choice == "y" then
- bigbuild()
- choice = io.read()
- choice = string.lower(choice)
- end
- if choice == "move" then
- move()
- choice = io.read()
- choice = string.lower(choice)
- end
- if choice == "packup" then
- packup()
- choice = io.read()
- choice = string.lower(choice)
- end
- if choice == "debug" then
- debugz()
- choice = io.read()
- choice = string.lower(choice)
- end
- if choice == "big" then
- bigbuild()
- choice = io.read()
- choice = string.lower(choice)
- end
- end
- end
- function ReadyFunction()
- if (tgf > fuelLimit) then
- ready = true
- end
- end
- function build()
- while true do
- print("Im Working!!!")
- os.sleep(.2)
- print("Im Working!!!")
- os.sleep(.2)
- print("Im Working!!!")
- os.sleep(1)
- ring(4)
- up(1)
- power(4)
- left(1)
- back(1)
- pipes(4)
- finish(1)
- break
- end
- end
- function deploy()
- up(5)
- turtle.select(16)
- turtle.placeUp()
- turtle.select(1)
- down(5)
- end
- function bigbuild()
- while true do
- deploy()
- print("Im Working BigTime!!!")
- os.sleep(.2)
- print("Im Working!!!")
- os.sleep(.2)
- print("Im Working!!!")
- os.sleep(1)
- ring(4)
- bigpower(1)
- bigmarks(1)
- break
- end
- end
- function packup()
- while true do
- print("Im Packing Up!!!")
- os.sleep(.2)
- print("Im Packing Up!!!")
- os.sleep(.2)
- print("Im Packing Up!!!")
- os.sleep(1)
- unfinish(1)
- unpipes(4)
- fw(4)
- right(1)
- unpower(4)
- down(1)
- unring(4)
- break
- end
- end
- function move()
- while true do
- print("Im Moving!!!")
- os.sleep(.2)
- print("Im Moving!!!")
- os.sleep(.2)
- print("Im Moving!!!")
- os.sleep(1)
- unfinish(1)
- unpipes(4)
- fw(4)
- right(1)
- unpower(4)
- down(1)
- unring(4)
- newlocation(1)
- os.sleep(1)
- ring(4)
- up(1)
- power(4)
- left(1)
- back(1)
- pipes(4)
- finish(1)
- break
- end
- end
- function debugz()
- while true do
- print("FullDebugCommencing!")
- os.sleep(.2)
- print("FullDebugCommencing!")
- os.sleep(.2)
- print("FullDebugCommencing!")
- os.sleep(1)
- ring(4)
- up(1)
- power(4)
- left(1)
- back(1)
- pipes(4)
- finish(1)
- os.sleep(1)
- unfinish(1)
- unpipes(4)
- fw(4)
- right(1)
- unpower(4)
- down(1)
- unring(4)
- newlocation(1)
- os.sleep(1)
- ring(4)
- up(1)
- power(4)
- left(1)
- back(1)
- pipes(4)
- finish(1)
- os.sleep(1)
- unfinish(1)
- unpipes(4)
- fw(4)
- right(1)
- unpower(4)
- down(1)
- unring(4)
- term.clear()
- print("Debug Done. Rebooting...")
- os.reboot()
- end
- end
- function main()
- ReadyFunction()
- if ready == true then
- WriteMenu()
- choiceFunction()
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment