Advertisement
k_goos

QuarryTest

Jan 11th, 2013
44
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local side = "back"
  2.  
  3. function HeadDown()
  4. redstone.setBundledOutput(side, colors.white)
  5. sleep(1)
  6. redstone.setBundledOutput(side, 0)
  7. end
  8. function HeadUp()
  9. redstone.setBundledOutput(side, colors.orange)
  10. sleep(1)
  11. redstone.setBundledOutput(side, 0)
  12. end
  13. function QuarryLeft()
  14. redstone.setBundledOutput(side, colors.yellow)
  15. sleep(1)
  16. redstone.setBundledOutput(side, 0)
  17. redstone.setBundledOutput(side, colors.lime)
  18. sleep(1)
  19. redstone.setBundledOutput(side, 0)
  20. end
  21. function QuarryRight()
  22. redstone.setBundledOutput(side, colors.maganta)
  23. sleep(1)
  24. redstone.setBundledOutput(side, 0)
  25. redstone.setBundledOutput(side, colors.lightBlue)
  26. sleep(1)
  27. redstone.setBundledOutput(side, 0)
  28. end
  29. function QuarryForward()
  30. redstone.setBundledOutput(side, colors.pink)
  31. sleep(1)
  32. redstone.setBundledOutput(side, 0)
  33. redstone.setBundledOutput(side, colors.gray)
  34. sleep(1)
  35. redstone.setBundledOutput(side, 0)
  36. end
  37. function QuarryBackward()
  38. redstone.setBundledOutput(side, colors.lightGray)
  39. sleep(1)
  40. redstone.setBundledOutput(side, 0)
  41. redstone.setBundledOutput(side, colors.cyan)
  42. sleep(1)
  43. redstone.setBundledOutput(side, 0)
  44. end
  45. function QuarryUp()
  46. redstone.setBundledOutput(side, colors.brown)
  47. sleep(1)
  48. redstone.setBundledOutput(side, 0)
  49. redstone.setBundledOutput(side, colors.green)
  50. sleep(1)
  51. redstone.setBundledOutput(side, 0)
  52. end
  53. function QuarryDown()
  54. redstone.setBundledOutput(side, colors.purple)
  55. sleep(1)
  56. redstone.setBundledOutput(side, 0)
  57. redstone.setBundledOutput(side, colors.blue)
  58. sleep(1)
  59. redstone.setBundledOutput(side, 0)
  60. end
  61. function main()
  62. print("Starting program")
  63. while true do
  64. local sEvent, param = os.pullEvent("key")
  65. if sEvent == "key" then
  66. print("Key push")
  67. if param == 200 then
  68. QuarryForward()
  69. end
  70. if param == 208 then
  71. QuarryBackward()
  72. end
  73. if param == 205 then
  74. QuarryRight()
  75. end
  76. if param == 203 then
  77. QuarryLeft()
  78. end
  79. if param == 42 then
  80. QuarryUp()
  81. end
  82. if param == 29 then
  83. QuarryDown()
  84. end
  85. if param == 57 then
  86. HeadDown()
  87. end
  88. if param == 54 then
  89. HeadUp()
  90. end
  91. end
  92. end
  93. end
  94. main()
Advertisement
RAW Paste Data Copied
Advertisement