Advertisement
maxtorcd55

minecart

Jan 31st, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. names = {" maarten"," thomas"," alexander"," shana"," the end"}
  2.  
  3.  
  4. while true do
  5.  
  6. local moni = peripheral.wrap("top")
  7.  
  8. itemslot = 1
  9. moni.clear()
  10. moni.setCursorPos(1,1)
  11.  
  12.  
  13. for i = 1,table.getn(names) do
  14. moni.setCursorPos(1,i)
  15. moni.write(names[i])
  16.  
  17. end
  18. event, side, xPos, yPos = os.pullEvent("monitor_touch")
  19. print("y"..yPos)
  20. print("x"..xPos)
  21. if yPos <= table.getn(names)+1 then
  22. rs.setAnalogOutput("bottom",8-yPos)
  23. moni.setCursorPos(1,yPos)
  24. moni.write("*")
  25. end
  26.  
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement