Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.find("modem")
- mon = peripheral.find("monitor")
- mon.clear()
- ---Next Page---
- mon.setCursorPos(29,12)
- mon.setTextColor(colors.white)
- mon.write(">")
- ---General Title--
- mon.setCursorPos(8,1)
- mon.setTextColor(colors.purple)
- mon.write("Reactor Gases")
- --Fissile Fuel Title--
- mon.setCursorPos(1,3)
- mon.setTextColor(colors.lightBlue)
- mon.write("Fissile Fuel Tank")
- --Uranium Hexafluoride Title--
- mon.setCursorPos(1,7)
- mon.setTextColor(colors.lime)
- mon.write("Uranium Hexafluoride")
- modem.open(1)
- modem.open(2)
- function handleModemMessages()
- while true do
- local event, _, channel, _, message = os.pullEventRaw("modem_message")
- if event == "modem_message" then
- if channel == 1 then
- mon.setCursorPos(3,5)
- mon.clearLine()
- mon.setTextColor(colors.white)
- mon.write(message .."%")
- elseif channel == 2 then
- mon.setCursorPos(3,9)
- mon.clearLine()
- mon.setTextColor(colors.white)
- mon.write(message .."%")
- end
- end
- end
- end
- function handleMonitorTouch()
- while true do
- local touchEvent, touchSide, x, y = os.pullEvent("monitor_touch")
- if touchEvent == "monitor_touch" and x == 29 and y == 12 then
- mon.clear()
- modem.close(1)
- modem.close(2)
- shell.run("teste2")
- return
- end
- end
- end
- parallel.waitForAll(handleModemMessages, handleMonitorTouch)
Advertisement
Add Comment
Please, Sign In to add comment