krom

MineCraft Woody01 - Master

Feb 16th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local nSlaveID = 26
  2. local nTimeout = 30
  3. local bCool = true
  4.  
  5. yourmonitor = peripheral.wrap("top")
  6. term.redirect(yourmonitor)
  7.  
  8. term.clear()
  9. term.setCursorPos(1,1)
  10.  
  11. print("**************")
  12. print("* Welcome    *")
  13. print("**************")
  14. print("")
  15. print("Enabling network, connecting to HarvestBot 01")
  16. rednet.open("back")
  17. print("Network enabled. Receiving...")
  18.  
  19. local time
  20.  
  21. while bCool  == true do
  22.     local id,msg,foo = rednet.receive(nTimeout)
  23.  
  24.     if id == nil then
  25.         print("Timeout")
  26.         bCool = false
  27.     elseif id == nSlaveID then
  28.         time = os.time()
  29.         time = textutils.formatTime(time, true)
  30.         print(time.." - "..msg)
  31.     end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment