Advertisement
Guest User

Tinkers

a guest
Jun 10th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. local mon = peripheral.wrap("monitor_2") --Find monitor
  2. local xPos = 0 --Set up X-Pos
  3. local yPos = 0 -- Set up Y-Pos
  4.  
  5. --Set up Monitor for program
  6. mon.setBackgroundColor(colors.black)
  7. mon.clear()
  8. mon.setTextScale(.5)
  9. mon.setTextColor(colors.white)
  10. mon.setCursorPos(1, 1)
  11.  
  12. --Empty Smeltery code
  13. mon.write("Empty Smeltery")
  14. while true do
  15.     event, side, xPos, yPos = os.pullEvent(monitor_touch)
  16.     if xPos >= 1 and xPos <= 14 and yPos == 1 then --Test for touch
  17.        redstone.setBundledOutput("top", colors.white) --Send Redstone
  18.        -- Set up monitor for next screen
  19.        mon.clear()
  20.        mon.setTextColor(colors.red)
  21.        mon.setCursorPos(10,20)
  22.        mon.write("Touch anywhere to continue.")
  23.        os.sleep(2) --Pause to avoid double-tap
  24.        if event == monitor_touch then --Test for touch anywhere
  25.            redstone.setBundledOutput("top", 0) --Stop Redstone
  26.        end
  27.     end  
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement