Advertisement
Guest User

Untitled

a guest
May 29th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. local names = peripheral.getNames()
  2. local mon -- Monitor (50 X 19) 5 X 3
  3. local ticket -- Ticketmachiene
  4. local label -- Zielbahnhof
  5. local i
  6. local j
  7. local p
  8.  
  9. ---------------------------------------------
  10. -- peripheral wrap
  11. ---------------------------------------------
  12. for i,j in pairs(names) do
  13. p = peripheral.getType(j)
  14. if p == "monitor" then
  15. mon = peripheral.wrap(j)
  16. end
  17.  
  18. if p == "openperipheral_ticketmachine" then
  19. ticket = peripheral.wrap(j)
  20. end
  21. end
  22. ----------------------------------------------
  23. ----------------------------------------------
  24. local function drucken()
  25. ticket.createTicket(label)
  26. sleep(1)
  27. redstone.setOutput("top", true)
  28. sleep(1)
  29. redstone.setOutput("top", false)
  30. end
  31. ----------------------------------------------
  32. local function startbild()
  33. mon.clear()
  34. mon.setCursorPos(1,6)
  35. mon.write(" _____ _ _ _")
  36. mon.setCursorPos(1,7)
  37. mon.write(" | ___|_ _| |__ _ __| | ____ _ _ __| |_ ___ _ __")
  38. mon.setCursorPos(1,8)
  39. mon.write(" | |_ / _` | '_ \| '__| |/ / _` | '__| __/ _ \ '_ \")
  40. mon.setCursorPos(1,9)
  41. mon.write(" | _| (_| | | | | | | < (_| | | | || __/ | | |")
  42. mon.setCursorPos(1,10)
  43. mon.write(" |_| \__,_|_| |_|_| |_|\_\__,_|_| \__\___|_| |_|")
  44. mon.setCursorPos(1,13)
  45. mon.write(" _ _ _")
  46. mon.setCursorPos(1,14)
  47. mon.write(" / \ _ _| |_ ___ _ __ ___ __ _| |_")
  48. mon.setCursorPos(1,15)
  49. mon.write(" / _ \| | | | __/ _ \| '_ ` _ \ / _` | __|")
  50. mon.setCursorPos(1,16)
  51. mon.write(" / ___ \ |_| | || (_) | | | | | | (_| | |_")
  52. mon.setCursorPos(1,17)
  53. mon.write(" /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|")
  54. mon.setCursorPos(26,23)
  55. mon.write("klick to continue")
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement