Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.close("back")
- sleep(.5)
- rednet.open("back")
- m = peripheral.wrap("top")
- drillid = 15
- energyid = 17
- reaktorid = 18
- fireworkid = 19
- armataid = 21
- turbineid = 34
- local function sluchaj(x,y)
- rednet.send(x,y)
- id,msg = rednet.receive()
- return msg
- end
- while true do
- drill = sluchaj(drillid,"drill")
- energy = sluchaj(energyid,"energy")
- reaktor = sluchaj(reaktorid,"reaktor")
- reaktorp = sluchaj(reaktorid,"reaktorp")
- reaktore = sluchaj(turbineid,"reaktore")
- reaktore = math.floor(reaktore/100)/10
- reaktort = sluchaj(reaktorid,"reaktort")
- armata = sluchaj(armataid,"armata")
- if energy >= 0 and energy <= 33 then energycolor = colors.red
- elseif energy > 33 and energy <= 66 then energycolor = colors.orange
- elseif energy > 66 and energy < 99 then energycolor = colors.green
- elseif energy >= 99 then energycolor = colors.green energy = 100 end
- if drill == "on" then drillcolor = colors.green
- else drillcolor = colors.red end
- if reaktor == "on" then reaktorcolor = colors.green
- else reaktorcolor = colors.red end
- if armata == "on" then armatacolor = colors.green
- else armatacolor = colors.red end
- m.clear()
- m.setCursorPos(1,1)
- m.write("Panel Sterowania")
- m.setCursorPos(19,1)
- m.write(textutils.formatTime(os.time(),false))
- m.setBackgroundColor(energycolor)
- m.setCursorPos(8,3)
- m.write("Energia: ")
- m.setCursorPos(17,3)
- m.write(energy.."%")
- m.setCursorPos(4,6)
- m.setBackgroundColor(drillcolor)
- m.write("DRILL")
- m.setCursorPos(16,8)
- m.setBackgroundColor(reaktorcolor)
- m.write("Reaktor")
- m.setCursorPos(15,10)
- m.write("Fuel: "..reaktorp.."%")
- m.setCursorPos(15,11)
- m.write("RF/t: "..reaktore.."K")
- m.setCursorPos(15,12)
- m.write("Temp: "..reaktort.."C")
- m.setBackgroundColor(colors.black)
- m.setCursorPos(2,17)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment