Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. monitor = peripheral.wrap("top")
  2. monitor.clear()
  3. monitor.setTextColor(colors.red)
  4. monitor.setCursorPos(1, 1)
  5. monitor.setTextScale(1)
  6. monitor.write("Hello")
  7.  
  8. function rubber()
  9. monitor.setCursorPos(1, 2)
  10. monitor.clearLine()
  11.  
  12. if rs.getOutput("right", true) then
  13. monitor.write("Rubber farm is on")
  14. elseif rs.getOutput("right", false) then
  15. monitor.write("Rubber farm is off")
  16. end
  17.  
  18. local event = { os.pullEvent() }
  19.  
  20. if event == "monitor_touch" then
  21. if rs.getOutput("right") == true then
  22. rs.setOutput("right", false)
  23. else
  24. rs.setOutput("right", true)
  25. end
  26. else
  27. write("test")
  28. end
  29.  
  30. rubber()
  31. end
  32.  
  33. local event = { os.pullEvent() }
  34. if event == "monitor_touch" then
  35.  
  36. local event = os.pullEvent()
  37. if event == "monitor_touch" then
  38.  
  39. local event = { os.pullEvent() }
  40. if event[1] == "monitor_touch" then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement