Advertisement
Guest User

ComputerCraft crap

a guest
Sep 2nd, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. mon = peripheral.wrap("top")
  2.  
  3. function touch()
  4.     event, a, b, c = os.pullEvent("monitor_touch")
  5.  
  6.     if a == front   redstone.setOutput("top", true)
  7.         os.sleep(3)
  8.         mon.clear()
  9.         mon.setBackgroundColor(colors.red)
  10.         mon.clear()
  11.         mon.setCursorPos(1, 3)
  12.         mon.write("Working")
  13.     end
  14.     event, a, b, c = os.pullEvent("monitor_touch")
  15.  
  16.     if a == front then
  17.         redstone.setOutput("top", false)
  18.         os.sleep(3)
  19.         load()
  20.     end
  21. end
  22.  
  23. function active()
  24.     rednet.send(202, "I'm Online!")
  25.     load()
  26. end
  27.  
  28. function load()
  29.     sleep(5)
  30.     mon.clear()
  31.     mon.setBackgroundColor(colors.green)
  32.     mon.clear()
  33.     mon.setTextScale(1)
  34.     mon.setCursorPos(2, 3)
  35.     mon.write("Ready")
  36.     touch()
  37. end
  38. if rednet.isOpen() == false then
  39.         rednet.open("left")
  40.         active()
  41.     else
  42.         active()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement