Advertisement
ecco7777

reaktor control

Feb 20th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. local m = peripheral.wrap("back")
  2.  m.clear()
  3.  m.setTextScale(2)
  4.  m.setTextColor(colors.lime)
  5.  m.setCursorPos(4, 1)
  6.  m.write("Fusions")
  7.  m.setCursorPos(4, 2)
  8.  m.write("Reaktor")
  9.  m.setCursorPos(2, 4)
  10.  m.setBackgroundColor(colors.lime)
  11.  m.setTextColor(colors.black)
  12.  m.write("An")
  13.  m.setCursorPos(6, 4)
  14.  m.setBackgroundColor(colors.red)
  15.  m.setTextColor(colors.black)
  16.  m.write("Aus")
  17.  m.setBackgroundColor(colors.black)
  18.  rs.setOutput("bottom", false)
  19.  
  20.  while true do
  21.  event,side,x,y = os.pullEvent()
  22.   if rs.getInput("right", true) then
  23.    m.setCursorPos(1, 6)
  24.    m.setTextScale(2)
  25.    m.setBackgroundColor(colors.red)
  26.    m.setTextColor(colors.black)
  27.    m.write("Status : Aus")
  28. end
  29. if rs.getInput("right", true) end
  30.  event,side,x,y = os.pullEvent()
  31.   if event == "monitor_touch" then
  32.    if x == 2 and y == 4 or
  33.    x == 3 and y == 4 then
  34.    m.setTextScale(2)
  35.    m.setBackgroundColor(colors.lime)
  36.    m.setTextColor(colors.black)
  37.    m.setCursorPos(1, 6)
  38.    m.write("Status : an ")
  39.    rs.setOutput("bottom", false)
  40.    end
  41.  
  42.    if x == 6 and y == 4 or
  43.    x == 7 and y == 4 or
  44.    x == 8 and y == 4 then
  45.    m.setTextScale(2)
  46.    m.setBackgroundColor(colors.red)
  47.    m.setTextColor(colors.black)
  48.    m.setCursorPos(1, 6)
  49.    m.write("Status : aus")
  50.    rs.setOutput("bottom", true)
  51.    end
  52. end
  53. sleep(0.2)
  54.  
  55.   end
  56.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement