DeBrates

Ticketer | Railcraft/Rednet Ticket Machine Printing

Sep 4th, 2017
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Ticketer v1.1 by DeBrates
  2. --Intended for use with: Mainline(Railcraft Station Control)by DeBrates in ComputerCraft
  3. --Change senderID to the ID of the sender computer
  4. --Rednet Message should be exact intended Destination/Ticket Name.
  5.  
  6.  
  7. rednet.open("top")
  8. ticket = peripheral.wrap("back")
  9.  
  10. --ID of Main Line computer
  11. senderID = 3
  12.  
  13. while true do
  14. local event, p1, p2 = os.pullEvent()
  15.   if event == "rednet_message" and p1 == senderID then
  16.     ticket.createTicket(p2, 1)
  17.     print("Ticket created: "..p2)
  18.   end
  19. end
Add Comment
Please, Sign In to add comment