Advertisement
ecco7777

bundled wire controller

Jun 28th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.42 KB | None | 0 0
  1.  
  2. m=peripheral.wrap("left")
  3. colors={"white","orange","magenta","pink","lightblue","yellow","lime","pink","gray","lightGray","cyan","purple","blue","brown","green","red","black"}
  4. my=1
  5. while my<=17 do
  6. m.setCursorPos(1,my)
  7. m.write(colors[my])
  8. my=my+1
  9. end
  10. while true do
  11. event, "right", x, y = os.pullEvent("monitor_touch")
  12. if y==1 then
  13. redstone.setBundledOutput("right", colors.white)
  14. end
  15. if y==2 then
  16. redstone.setBundledOutput("right", colors.orange)
  17. end
  18. if y==3 then
  19. redstone.setBundledOutput("right", colors.magenta)
  20. end
  21. if y==4 then
  22. redstone.setBundledOutput("right", colors.lightblue)
  23. end
  24. if y==5 then
  25. redstone.setBundledOutput("right", colors.yellow)
  26. end
  27. if y==6 then
  28. redstone.setBundledOutput("right", colors.lime)
  29. end
  30. if y==7 then
  31. redstone.setBundledOutput("right", colors.pink)
  32. end
  33. if y==8 then
  34. redstone.setBundledOutput("right", colors.gray)
  35. end
  36. if y==9 then
  37. redstone.setBundledOutput("right", colors.lightGray)
  38. end
  39. if y==10 then
  40. redstone.setBundledOutput("right", colors.cyan)
  41. end
  42. if y==11 then
  43. redstone.setBundledOutput("right", colors.purple)
  44. end
  45. if y==12 then
  46. redstone.setBundledOutput("right", colors.blue)
  47. end
  48. if y==13 then
  49. redstone.setBundledOutput("right", colors.brown)
  50. end
  51. if y==14 then
  52. redstone.setBundledOutput("right", colors.green)
  53. end
  54. if y==15 then
  55. redstone.setBundledOutput("right", colors.red)
  56. end
  57. if y==16 then
  58. redstone.setBundledOutput("right", colors.black)
  59. end
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement