Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tess = peripheral.wrap("tile_thermalexpansion_tesseract_name_3")
- mon = peripheral.wrap("monitor_0")
- mon2 = peripheral.wrap("monitor_1")
- chest = peripheral.wrap("back")
- ec = peripheral.wrap("bottom")
- function display()
- x,y = mon.getSize()
- mon.setBackgroundColor(colors.black)
- mon.clear()
- mon.setTextColor(colors.black)
- for i = 1, y, 2 do
- mon.setCursorPos(x/2,i)
- mon.setBackgroundColor(colors.purple)
- mon.write(" "..i.." ")
- mon.setCursorPos(x/2,i+1)
- mon.setBackgroundColor(colors.lightBlue)
- mon.write(" "..(i+1).." ")
- end
- end
- while true do
- display()
- event, param1, param2, level = os.pullEvent()
- if event == "monitor_touch" and fs.exists(tostring(level)) then
- file = fs.open(tostring(level),"r")
- freq = file.readAll()
- file.close()
- print(freq)
- if ec.pushItem("down",1) == 1 then
- tess.setFrequency(tonumber(freq))
- while chest.pushItem("up",1) == 0 do
- print("nope")
- os.sleep(0.1)
- end
- else
- print("no drive")
- mon.clear()
- mon.setCursorPos(x/2, y/2)
- mon.write("Try")
- mon.setCursorPos(x/2-1, y/2+1)
- mon.write("Again")
- os.sleep(4)
- end
- elseif event == "redstone" then
- chest.pushItem("down",1)
- print("redstone")
- else
- mon.clear()
- mon.setCursorPos(x/2, y/2)
- mon.write("Try")
- mon.setCursorPos(x/2-1, y/2+1)
- mon.write("Again")
- os.sleep(4)
- end
- print("done")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement