Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local looptime = 0.5
- function getDeviceSide(deviceType)
- deviceType = deviceType:lower()
- for i, side in pairs(rs.getSides()) do
- if (peripheral.isPresent(side)) then
- if (string.lower(peripheral.getType(side)) == deviceType) then
- return side;
- end
- end
- end
- return nil;
- end
- function wrapThis(thing, f)
- local wrapped = nil
- while wrapped == nil and f <= 100 do
- wrapped = peripheral.wrap(thing.."_"..f)
- f = f + 1
- end
- if wrapped == nil then
- side = getDeviceSide(thing)
- if side ~= nil then
- return peripheral.wrap(side)
- else
- return nil
- end
- else
- return wrapped
- end
- end
- local monitor = wrapThis("monitor", 0)
- monitor.setTextScale(1.5)
- monitor.setTextColor(colors.magenta)
- if monitor == nil then
- print("Can't find monitor.")
- sleep(5)
- finished = true
- os.reboot()
- end
- if monitor then
- term.clear()
- term.setCursorPos(1,1)
- term.write("Display redirected to Monitor. CTRL+T to exit.")
- end
- while not finished do
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write("CAFETERIA ")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write("AFETERIA C")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write("FETERIA CA")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write("ETERIA CAF")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write("TERIA CAFE")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write("ERIA CAFET")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write("RIA CAFETE")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write("IA CAFETER")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write("A CAFETERI")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write(" CAFETERIA")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write(" CAFETERIA ")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write(" CAFETERIA ")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write(" CAFETERIA ")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write(" CAFETERIA ")
- sleep(10)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write(" CAFETERIA ")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write(" CAFETERIA ")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write(" CAFETERIA ")
- sleep(looptime)
- monitor.clear()
- monitor.setCursorPos(1,2)
- monitor.write(" CAFETERIA ")
- sleep(looptime)
- end
Advertisement
Add Comment
Please, Sign In to add comment