superanonymous

djturtle

May 13th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.84 KB | None | 0 0
  1. -----------Config-----------
  2.  
  3. --Slot numbers for music disks
  4. Stal=1
  5. Far=2
  6. Mall=3
  7. Strad=4
  8. Blocks=5
  9. Mellohi=6
  10. Cat=7
  11. Thirteen=8
  12. Eleven=9
  13. Chirp=10
  14. Ward=11
  15. Wait=12
  16.  
  17. ----------------------------
  18. rednet.open("right")
  19.  
  20. term.clear()
  21. term.setCursorPos(1,1)
  22. print("DJMix OS 3.0")
  23.  
  24. print("ComputerID for djclient: "..tostring(os.getComputerID()))
  25.  
  26. function play()
  27. disk.playAudio("front")
  28. end
  29. function stal()
  30. turtle.suck()
  31. turtle.select(Stal)
  32. turtle.drop()
  33. play()
  34. end
  35. function far()
  36. turtle.suck()
  37. turtle.select(Far)
  38. turtle.drop()
  39. play()
  40. end
  41. function mall()
  42. turtle.suck()
  43. turtle.select(Mall)
  44. turtle.drop()
  45. play()
  46. end
  47. function strad()
  48. turtle.suck()
  49. turtle.select(Strad)
  50. turtle.drop()
  51. play()
  52. end
  53. function blocks()
  54. turtle.suck()
  55. turtle.select(Blocks)
  56. turtle.drop()
  57. play()
  58. end
  59. function mellohi()
  60. turtle.suck()
  61. turtle.select(Mellohi)
  62. turtle.drop()
  63. play()
  64. end
  65. function cat()
  66. turtle.suck()
  67. turtle.select(Cat)
  68. turtle.drop()
  69. play()
  70. end
  71. function onethree()
  72. turtle.suck()
  73. turtle.select(Thirteen)
  74. turtle.drop()
  75. play()
  76. end
  77. function oneone()
  78. turtle.suck()
  79. turtle.select(Eleven)
  80. turtle.drop()
  81. play()
  82. end
  83. function chirp()
  84. turtle.suck()
  85. turtle.select(Chirp)
  86. turtle.drop()
  87. play()
  88. end
  89. function ward()
  90. turtle.suck()
  91. turtle.select(Ward)
  92. turtle.drop()
  93. play()
  94. end
  95. function wait()
  96. turtle.suck()
  97. turtle.select(Wait)
  98. turtle.drop()
  99. play()
  100. end
  101.  
  102. while true do
  103. id,msg = rednet.receive()
  104. if msg=="stal" then stal() end
  105. if msg=="far" then far() end
  106. if msg=="mall" then mall() end
  107. if msg=="strad" then strad() end
  108. if msg=="blocks" then blocks() end
  109. if msg=="mellohi" then mellohi() end
  110. if msg=="cat" then cat() end
  111. if msg=="13" then onethree() end
  112. if msg=="11" then oneone() end
  113. if msg=="chirp" then chirp() end
  114. if msg=="ward" then ward() end
  115. if msg=="wait" then wait() end
  116. if msg=="stop" then turtle.suck() end
  117. end
Advertisement
Add Comment
Please, Sign In to add comment