Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Vars
- north = colors.yellow
- east = colors.lime
- south = colors.pink
- west = colors.gray
- up = colors.purple
- down = colors.blue
- -- Misc Functions
- function clearScreen()
- term.clear()
- term.setCursorPos(1,1)
- end
- -- Setting & Getting functions
- function getDrills()
- clearScreen()
- for i=1,8 do
- print("Retrieving drill #"..i)
- redstone.setBundledOutput("left",colors.lightBlue)
- os.sleep(1)
- redstone.setBundledOutput("left",0)
- os.sleep(1)
- end
- end
- function setDrills()
- clearScreen()
- for i=1,8 do
- print ("Deploying drill #"..i)
- redstone.setBundledOutput("left",colors.magenta)
- os.sleep(1)
- redstone.setBundledOutput("left",0)
- os.sleep(1)
- end
- end
- --function getCells()
- -- clearScreen()
- -- for i=1,8 do
- -- print("Retrieving cell stack #"..i)
- -- redstone.setBundledOutput("left",colors.orange)
- -- os.sleep(1)
- -- redstone.setBundledOutput("left",0)
- -- os.sleep(1)
- -- end
- --end
- function setCells()
- clearScreen()
- for i=1,8 do
- print("Deploying cell stack #"..i)
- redstone.setBundledOutput("left",colors.white)
- os.sleep(1)
- redstone.setBundledOutput("left",0)
- os.sleep(1)
- end
- end
- function coverHoles()
- clearScreen()
- for i=1,64 do
- print("Deploying sand #"..i)
- redstone.setBundledOutput("left",colors.orange)
- os.sleep(1)
- redstone.setBundledOutput("left",0)
- os.sleep(1)
- end
- end
- function mainMiningProgram()
- clearScreen()
- setDrills()
- clearScreen()
- for i=1,15 do
- clearScreen()
- print("Waiting for drills...")
- print("Time remaining: "..15-i)
- os.sleep(1)
- end
- setCells()
- for i=1,1800 do
- clearScreen()
- print("Mining...")
- print("Time remaining: "..1800-i)
- if i % 100 == 0 then
- setCells()
- end
- os.sleep(1)
- end
- getDrills()
- os.sleep(100)
- coverHoles()
- end
- while true do
- redstone.setBundledOutput("left",0)
- clearScreen()
- print("Frame Ship Menu")
- print("==============================")
- print("What do you wish to do?")
- print("1. Main mining program.")
- print("2. Retrieve Drills from Miners")
- print("3. Insert Drills into miners")
- print("4: Insert cells into pumps")
- print("5. Cover holes")
- print("6. Initializa navigation system")
- print("0. Exit")
- write("Command> ")
- local choice = read()
- if (choice == '1') then
- mainMiningProgram()
- elseif (choice == '2') then
- getDrills()
- elseif (choice == '3') then
- setDrills()
- elseif (choice == '4') then
- setCells()
- elseif (choice == '5') then
- coverHoles()
- elseif (choice == '0') then
- clearScreen()
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment