Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local y = 0
- local log = {}
- local function clt()
- term.clear()
- ty = 1
- term.setCursorPos(1, ty)
- end
- local function writeLine( content )
- term.write(content)
- ty = ty + 1
- term.setCursorPos(1, ty)
- end
- local function writeAt( line, content )
- term.setCursorPos(1, line)
- term.write(content)
- end
- local function printc( content )
- table.insert(log, content)
- clt()
- writeAt(1, "======= Turtle Log =======")
- local off = #log - 18
- if off < 1 then off = 0 end
- for i = 18, 1, -1 do
- if (i < #log+1) then
- writeAt(i+1, log[i+off])
- end
- end
- end
- -- start --
- printc("> Starting...")
- peripheral.find("modem", rednet.open)
- repeat
- local id, message = rednet.receive()
- printc(message)
- until false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement