Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. local energymoy = 0
  2. local previousEnergymoy = 0
  3. local x = 2
  4. local cyclePlasma = 0
  5. local cycleIridium = 0
  6.  
  7. m = peripheral.wrap('right')
  8. m.setCursorPos(6, 2)
  9. m.write("/6sec")
  10. m.setCursorPos(7, 4)
  11. m.write("/25sec")
  12.  
  13. --m.clear()
  14. nir = peripheral.wrap('left')
  15. for s=3,7 do
  16. a,b,c,info = nir.get(s)
  17. for system, status in pairs(info) do
  18. status = tostring(status)
  19. if system == "energyL" then
  20. --m.write("system"..system.." Status: "..status)
  21. --m.write(system)
  22. --m.setCursorPos(1, x)
  23. --x = x+1
  24. energymoy = energymoy+status
  25. end
  26. end
  27. end
  28. if energymoy ~= previousEnergymoy then
  29. previousEnergymoy = energymoy
  30. m.clear()
  31. m.setCursorPos(1, 1)
  32. m.write("Energy A.E.S.U. = "..energymoy)
  33. end
  34.  
  35. for s=1,2 do
  36. a,b,c,info = nir.get(s)
  37. for system, status in pairs(info) do
  38. status = tostring(status)
  39. if system == "String2" then
  40. --m.write("system"..system.." Status: "..status)
  41. --m.write(system)
  42. m.setCursorPos(1, s*2)
  43. x = x+1
  44. m.write(status)
  45. if s == 1 && status == 6 then
  46. cyclePlasma = cyclePlasma+1
  47. m.setCursorPos(1, 3)
  48. m.write(cyclePlasma.."cycle Plasma")
  49. elseif s == 2 && status == 25 then
  50. cycleIridium = cycleIridium+1
  51. m.setCursorPos(1, 5)
  52. m.write(cycleIridium.."cycle Iridium")
  53. end
  54. end
  55. end
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement