Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Ticket Manager")
- t=peripheral.wrap("left")
- m=peripheral.wrap("monitor_0")
- local width, height = m.getSize()
- local dest={"Elfies","Luke"}
- m.setBackgroundColor(colors.black)
- m.clear()
- for it=1,#dest do
- m.setCursorPos((width - string.len(dest[it]))/2,it*2)
- m.setBackgroundColor(colors.cyan)
- m.write(dest[it])
- end
- m.setBackgroundColor(colors.black)
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- if yPos%2 == 0 then
- t.createTicket(dest[(yPos/2)])
- t.pushItem("up",3,1)
- sleep(.1)
- redstone.setOutput("top",true)
- sleep(.1)
- redstone.setOutput("top",false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement