Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("top")
- rs.setBundledOutput("right", 0)
- print("Hossz:")
- local hossz = read()
- print("Miningwell DB:")
- local db = read()
- print("white time?")
- local tim = read()
- function msg(txt,col)
- m.setBackgroundColor(colors.cyan)
- m.clear()
- m.setCursorPos(2,2)
- if col == nil then
- m.setTextColor(colors.green)
- else
- m.setTextColor(col)
- end
- m.write(txt)
- m.setCursorPos(14,5)
- m.setTextColor(colors.red)
- m.write("By avartoon15 :)")
- end
- function quarry(pro)
- msg("Break")
- rs.setBundledOutput("right", colors.white)
- sleep(1)
- rs.setBundledOutput("right", 0)
- if f == 0 then
- msg("Forward")
- else
- msg("Back")
- end
- sleep(1)
- rs.setBundledOutput("right", pro)
- sleep(2)
- msg("Deploy")
- rs.setBundledOutput("right", colors.red)
- sleep(1)
- rs.setBundledOutput("right", 0)
- for i = 1,tim do
- msg("Dolgozom s", colors.yellow)
- m.setTextColor(colors.yellow)
- m.setCursorPos(11,2)
- m
- m.write(%tim - i)
- m.setTextScale(1)
- m.setCursorPos(13,4 )
- if f == 0 then
- m.write("Forward")
- else
- m.write("Back")
- end
- sleep(1)
- end
- end
- function ford()
- msg("Quarry Turn", colors.yellow)
- rs.setBundledOutput("right", colors.white)
- sleep(1)
- rs.setBundledOutput("right", 0)
- for i = 1,db do
- stop()
- rs.setBundledOutput("right", colors.blue)
- sleep(1)
- rs.setBundledOutput("right", 0)
- sleep(1)
- end
- end
- function stop()
- while rs.getInput("left") == true do
- msg("Quarry Off", colors.red)
- rs.setBundledOutput("right", 0)
- sleep(1)
- end
- end
- function irany(szin)
- for i = 1,hossz do
- stop()
- quarry(szin)
- end
- end
- f = 0
- stop()
- irany(colors.yellow)
- ford()
- f = 1
- stop()
- irany(colors.orange)
- ford()
- msg("Quarry end")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement