Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function get(address,CT)
- for c in require('component').list(CT,true) do
- if c:sub(1,address:len()) == address then
- return c
- end
- end
- end
- local cmp = component
- local modem = cmp.proxy(cmp.list("modem")())
- local gpu = cmp.proxy(cmp.list("gpu")())
- modem.open(1)
- gpu.bind(cmp.list('screen')(),false)
- gpu.setResolution(126,63)
- gpu.setDepth(8)
- gpu.fill(1,1,126,63,' ')
- local function set(idk)
- gpu.setForeground(idk[4])
- gpu.setBackground(idk[3])
- return gpu.set(idk[1],idk[2],idk[5])
- end
- local iM = false
- modem.broadcast(1,'get',' ',' ')
- local exit = false
- gpu.set(1,1,'Wait For Address...')
- while exit == false do
- local name, _, _, _, _, x, y =computer.pullSignal(1)
- if name == 'modem_message' then
- monitorx = tonumber(x)
- monitory = tonumber(y)
- exit = true
- end
- end
- exit = nil
- if monitorx == 6 then
- if monitory == 5 then
- iM = true
- end
- end
- while true do
- local name, _, _, _, _, x, y,e3,e4 =computer.pullSignal(1)
- if name == 'modem_message' then
- gpu.set(1,1,x..' '..y..' '..e3..' '..monitorx..' '..monitory)
- if tostring(x) == 'get' then
- if iM == false then
- iM = true
- y = monitory
- x = monitorx + 1
- if x > 6 then
- x = 1
- y = monitory + 1
- end
- modem.broadcast(1,x,y)
- end
- end
- if tonumber(x) == monitorx then
- if tonumber(y) == monitory then
- if e3 == 'set' then
- if e3 then
- gpu.fill(1,1,126,63,' ')
- gpu.set(1,3,'draw')
- load(e3)()
- for i=1,#mon do
- set(mon[i])
- end
- end
- end
- if e3 == 'clear' then
- gpu.fill(1,1,126,63,' ')
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement