uepyon

getCoords.lua

Mar 9th, 2024 (edited)
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | Gaming | 0 0
  1. mon = peripheral.wrap("bottom")
  2. rednet.open("left")
  3.  
  4. local str2num = function(x)
  5. r = {}
  6. for i in string.gmatch(x, "%S+") do
  7. r[#r + 1] = tonumber(i)
  8. end
  9. return r
  10. end
  11.  
  12. while true do
  13. local sid, msg, dis = rednet.receive()
  14.  
  15. time = os.time()
  16. time = textutils.formatTime(time)
  17.  
  18. mon.clear()
  19. mon.setCursorPos(1, 1)
  20. mon.write(time)
  21. mon.setCursorPos(1, 2)
  22. -- mon.write(sid..":"..msg)
  23. mon.write(sid..":"..table.concat(str2num(msg), ", "))
  24. end
  25.  
  26.  
Tags: ccTweaked
Advertisement
Add Comment
Please, Sign In to add comment