Advertisement
Craft4Cube

1123

Aug 7th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. mon1=peripheral.wrap("top")
  2. printer=peripheral.wrap("bottom")
  3. mon1.clear()
  4. mon1.setCursorPos(1,1)
  5. mon1.write("TICKET")
  6. mon1.setCursorPos(1,3)
  7. mon1.write("DRUCKEN")
  8. while true do
  9. mon1.setCursorPos(1,5)
  10. mon1.write(textutils.formatTime(os.time()))
  11. event, side, x, y = os.pullEvent("monitor_touch")
  12. if x > 1 and x < 7 and y == 3 then
  13. printer.newPage()
  14. printer.write("***Ticket***")
  15. printer.setCursorPos(1, 2)
  16. printer.write("TAG-Parkplatz")
  17. printer.setCursorPos(1, 3)
  18. printer.write("VON:")
  19. printer.setCursorPos(1, 4)
  20. printer.write(textutils.formatTime(os.time()))
  21. printer.setCursorPos(1, 5)
  22. printer.write("BIS:")
  23. printer.setCursorPos(1, 6)
  24. printer.write(textutils.formatTime(os.time()+0.60))
  25. printer.endPage()
  26. end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement