Advertisement
Jim999AGC

Ticketautomat Version: 3.1.2

Nov 13th, 2019
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. --Ticketautomat Version: 3.1.2
  2. --Menu! yea. now. here.
  3.  
  4. --here we are loading some api things
  5.  
  6. os.loadAPI("menu")
  7.  
  8. --now we are stetting stuff up
  9. local ticket = peripheral.wrap("back")
  10.  
  11. --functions here
  12. function pT(dest)
  13.     ticket.setSelectedTicket(dest)
  14.     ticket.printTicket()
  15.    
  16.     os.sleep(3)
  17.     redstone.setOutput("bottom", true)
  18.     os.sleep(0.5)
  19.     redstone.setOutput("bottom", false)
  20. end
  21.  
  22. local m = menu.new()
  23.  
  24. --draw a menu
  25. m:addScreen("MainMenu",
  26. [[
  27.  
  28. Flitzer Bahn Service
  29.  
  30. Welcome to the Flitzer Bahn Service!
  31. Select u r ticket:
  32.  
  33. Alpha   @Alpha
  34. Bravo   @Bravo
  35. Charlie @Charlie
  36. Delta   @Delta
  37.  
  38. ]])
  39.  
  40.  
  41.  
  42. m:addFunc("Alpha", pT, 1)
  43. m:addFunc("Bravo", pT, 2)
  44. m:addFunc("Charlie", pT, 3)
  45. m:addFunc("Delta", pT, 4)
  46.  
  47.  
  48. --m:displayScreen("MainMenu")()
  49.  
  50. while true do
  51.   local f
  52.   f = m:displayScreen("MainMenu")
  53.   f()
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement