Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open( "top" )
- function sendToAll( message )
- for i=574, 577 do
- rednet.send( i, message )
- end
- end
- x = 0
- y = 0
- sendToAll( "_getSize" )
- for i=1,4 do
- id, message = rednet.receive()
- if id >= 574 and id <= 577 then
- size = textutils.unserialize( message )
- x = x + size[1]
- y = y + size[2]
- else
- i = i-1
- end
- end
- function update()
- while true do
- os.pullEvent("redstone")
- if redstone.getInput("left") then
- sendToAll( "_update" )
- end
- end
- end
- function sshell()
- shell.run("shell")
- end
- term.clear()
- term.setCursorPos(1,1)
- print("Screen Size: ")
- print(x .. " / " .. y)
- print( string.rep( "-", term.getSize() -1 ) )
- parallel.waitForAny( update, sshell )
Advertisement
Add Comment
Please, Sign In to add comment