Advertisement
Guest User

mass

a guest
Jan 17th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. local mon = peripheral.find("monitor")
  2. os.loadAPI("ocs/apis/sensor")
  3. ms = sensor.wrap("right")
  4. mon.clear()
  5. mon.setTextScale(2.5)
  6. mon.setCursorPos(1,2)
  7. mon.write("Reaktory Generuja:")
  8.  
  9. while true do
  10.   kabelS = ms.getTargets()
  11.   kabel = ms.getTargetDetails("-1,-2,4")
  12.   karta = ms.getSensorName()
  13.   inputMass = tostring(kabel.EnergyIn)
  14.   mon.setCursorPos(1,3)
  15.   mon.write(inputMass.." EU/t       ")
  16.   sleep(3)
  17.   if tonumber(inputMass) >= 10000 then
  18.     mon.setCursorPos(1,4)
  19.     mon.write("Zajebiscie :D")
  20.   else
  21.     mon.setCursorPos(1,3)
  22.     mon.write("                     ")
  23.   end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement