Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Mining software Developed for use with
- -- project red frame quarry...
- -- developed by Tiberium_117
- -- bug tested by ProNoob4Life
- -- Button Api by Direwolf 20
- -- requirements for code to run
- -- monitors on left and right of computer
- -- bundled cable comming out back
- os.loadAPI("button")
- m = peripheral.wrap("left")
- m2 = peripheral.wrap("right")
- CA = "Nothing"
- m.clear()
- m2.clear()
- function fillTable1()
- button.setTable("HeadDown", lowerHead,"", 10,20,3,4)
- button.setTable("HeadUp", raiseHead,"", 22,32,3,4)
- button.setTable("Mine", mine,"", 10,20,6,7)
- button.setTable("Mine 1 level", miningEvent,"", 22,36,6,7)
- button.setTable("HeadLeft", headLeft,"", 10,20,9,10)
- button.setTable("HeadRight", headRight,"",22,32,9,10)
- button.setTable("Forward", forward,"",10,20,12,13)
- button.setTable("Reverse", reverse,"",22,32,12,13)
- button.setTable("Left", left,"",10,20,15,16)
- button.setTable("Right", right,"",22,32,15,16)
- button.setTable("Cycle 1", cycle1,"",10,20,18,19)
- button.setTable("CycleJim", cycleJim,"",22,32,18,19)
- button.screen()
- end
- function fillTable2()
- button.setTable("2", cycle2,"",10,13,3,4)
- button.setTable("3", cycle3,"",15,18,3,4)
- button.setTable("4", cycle4,"",20,23,3,4)
- button.setTable("5", cycle5,"",25,28,3,4)
- button.setTable("6", cycle6,"",30,33,3,4)
- button.setTable("7", cycle7,"",10,13,6,7)
- button.setTable("8", cycle8,"",15,18,6,7)
- button.setTable("9", cycle9,"",20,23,6,7)
- button.setTable("10", cycle10,"",25,28,6,7)
- button.setTable("11", cycle11,"",30,33,6,7)
- button.setTable("12", cycle12,"",10,13,9,10)
- button.setTable("13", cycle13,"",15,18,9,10)
- button.setTable("14", cycle14,"",20,23,9,10)
- button.setTable("15", cycle15,"",25,28,9,10)
- button.setTable("16", cycle16,"",30,33,9,10)
- button.setTable("jim", JIM,"",20,23,12,13)
- end
- function getClick()
- event,side,z,y = os.pullEvent("monitorTouch")
- button.checkxy(x, y)
- end
- function lowerHead()
- CA = "LoweringHead"
- sleep(1)
- redstone.setBundledOutput("back", colors.magenta)
- sleep(.5)
- redstone.setBundledOutput("back", 0)
- sleep(.5)
- CA = "Nothing"
- end
- function raiseHead()
- CA = "RaisingHead"
- sleep(1)
- redstone.setBundledOutput("back", colors.orange)
- sleep(.5)
- redstone.setBundledOutput("back", 0)
- sleep(.5)
- CA = "Nothing"
- end
- function mine()
- CA = "PulsingMiningHead"
- sleep(1)
- redstone.setBundledOutput("back", colors.white)
- sleep(.5)
- redstone.setBundledOutput("back", 0)
- slep(.5)
- CA = "Nothing"
- end
- function miningEvent()
- CA = "Completing one mining cycle"
- sleep(.5)
- lowerHead()
- sleep(.5)
- for i = 1,16 do
- mine()
- headLeft()
- end
- lowerHead()
- for i = 1,16 do
- mine()
- headRight()
- end
- sleep(.5)
- CA = "Nothing"
- end
- function headLeft()
- CA = "Moving Head Left"
- sleep(1)
- redstone.setBundledOutput("back", colors.lightBlue)
- sleep(.5)
- redstone.setBundledOutput("back", 0)
- sleep(.5)
- CA = "Nothing"
- end
- function headRight()
- CA = "Moving head Right"
- sleep(1)
- redstone.setBundledOutput("back", colors.yellow)
- sleep(.5)
- redstone.setBundledOutput("back", 0)
- sleep(.5)
- CA = "Nothing"
- end
- function forward()
- CA = "Moving Miner Forward"
- sleep(1)
- redstone.setBundledOutput("back", colors.lime)
- sleep(.5)
- redstone.setBundledOutput("back", 0)
- sleep(.5)
- CA = "Nothing"
- end
- function reverse()
- CA = "Moving Miner Backwards"
- sleep(1)
- redstone.setBundledOutput("back", colors.pink)
- sleep(.5)
- redstone.setBundledOutput("back", 0)
- sleep(.5)
- CA = "Nothing"
- end
- function left()
- CA = "Moving Miner Left"
- sleep(1)
- redstone.setBundledOutput("back", colors.grey)
- sleep(.5)
- redstone.setBundledOutput("back", 0)
- sleep(.5)
- CA = "Nothing"
- end
- function right()
- CA = "Moving Miner Right"
- sleep(1)
- redstone.setBundledOutput("back", colors.lightGray)
- sleep(.5)
- redstone.setBundledOutput("back", 0)
- sleep(.5)
- CA = "Nothing"
- end
- function cycleJim()
- m.clear()
- fillTable2()
- end
- function printAction()
- m2.setCursorPos(18,4)
- m2.write(CA)
- end
- function JIM()
- CA = "UH.... FUCK NO!"
- printAction()
- sleep(10)
- CA = "Nothing"
- printAction()
- end
- function cycle1()
- for i = 1,70 do
- miningEvent()
- end
- for i 1,70 do
- raiseHead()
- end
- for i = 1,16 do
- forward()
- end
- end
- function cycle2()
- for i = 1,2 do
- cycle1()
- end
- end
- function cycle3()
- for i = 1,3 do
- cycle1()
- end
- end
- function cycle4()
- for i = 1,4 do
- cycle1()
- end
- end
- function cycle5()
- for i = 1,5 do
- cycle1()
- end
- end
- function cycle6()
- for i = 1,6 do
- cycle1()
- end
- end
- function cycle7()
- for i = 1,7 do
- cycle1()
- end
- end
- function cycle8()
- for i = 1,8 do
- cycle1()
- end
- end
- function cycle9()
- for i = 1,9 do
- cycle1()
- end
- end
- function cycle10()
- for i = 1,10 do
- cycle1()
- end
- end
- function cycle11()
- for i = 1,11 do
- cycle1()
- end
- end
- function cycle12()
- for i = 1,12 do
- cycle1()
- end
- end
- function cycle13()
- for i = 1,13 do
- cycle1()
- end
- end
- function cycle14()
- for i = 1,14 do
- cycle1()
- end
- end
- function cycle15()
- for i = 1,15 do
- cycle1()
- end
- end
- function cycle16()
- for i = 1,16 do
- cycle1()
- end
- end
- fillTable1()
- button.heading("Tiberium Mining Software version 0.0.1")
- m2.setCursorPos(1,1)
- m2.write("Tiberium Mining Software Version 0.0.1")
- m2.setCursorPos(1,4)
- m2.write("Current Action: ")
- m2.write(CA)
- while true do
- printAction()
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment