Advertisement
colhaydutu

atm9 receiver

Jan 22nd, 2024 (edited)
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. local modemSide = "right"
  2. local monitor = peripheral.wrap("left")
  3. local unobtainiumComputerID = 72
  4. local atmComputerID = 18
  5. local vibraniumComputerID = 43
  6. local ub = 0
  7. local atm = 0
  8. local vib = 0
  9. rednet.open(modemSide)
  10.  
  11. while true do
  12. local senderID, message = rednet.receive()
  13.  
  14. if senderID == unobtainiumComputerID then
  15. ub = message
  16. elseif senderID == atmComputerID then
  17. atm = message
  18. elseif senderID == vibraniumComputerID then
  19. vib = message
  20. end
  21.  
  22. monitor.clear()
  23. monitor.setTextScale(0.9)
  24. monitor.setBackgroundColor(colors.lime)
  25. monitor.setTextColor(colors.white)
  26. monitor.setCursorPos(1, 2)
  27. monitor.write("Ores")
  28. monitor.setCursorPos(1, 4)
  29. monitor.write("Unobtainium:"..ub)
  30. monitor.setCursorPos(1, 6)
  31. monitor.write("ATM:"..atm)
  32. monitor.setCursorPos(1, 8)
  33. monitor.write("Vibranium:"..vib)
  34. sleep(1)
  35. end
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement