Stravides

QuarryMonitor

May 5th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. -- ************************************ --
  2. -- Quarrying Turtle Monitoring Programe --
  3. -- By Jharakn                           --
  4. -- ************************************ --
  5.  
  6. local monitor = peripheral.wrap("top")
  7.  
  8. rednet.open("left")
  9. monitor.clear()
  10. monitor.setCursorPos(1,1)
  11.  
  12. local line = {"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"}
  13.  
  14. while true do
  15.         local senderId, message, distance = rednet.receive()
  16.         print(message)
  17.         --line.1 = line.2; line.2 = line.3; line.3 = line.4; line.4 = line.5; line.5 = line.6; line.6 = line.7; line.7 = line.8; line.8 = line.9; line.9 = line.10; line.10 = line.11; line.11 = line.12
  18.         for i = 1,11 do
  19.                 line[i] = line[i+1]
  20.         end
  21.         line[12] = message
  22.         for i = 1,12 do
  23.                 monitor.setCursorPos(1,i)
  24.                 monitor.clearLine()
  25.                 monitor.write(line[i])
  26.         end
  27.  
  28. end
Advertisement
Add Comment
Please, Sign In to add comment