Advertisement
SkyWeapons

JukeBox Computer 3

Oct 31st, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. ---- JukeBox Computer 3 made by SkyWeapons
  2. ---- To complete this pastebin: take my other pastebin : JukeBox Computer 1 ; JukeBox Computer 2 ; JukeBox Central Computer.
  3. ---- My YT Channel : https://www.youtube.com/user/TheSkyWeapons
  4. ---- Require: 4 Disk Drive , (Advanced) Computer , Modem
  5.  
  6. modemside = "back" -- Side of the Modem
  7.  
  8. DD1 = "left"   -- Side of the first Disk Drive
  9. DD2 = "top"    -- Side of the second Disk Drive
  10. DD3 = "right"  -- Side of the third Disk Drive
  11. DD4 = "bottom" -- Side of the forth Disk Drive
  12.  
  13.  -- Program - Do not edit below
  14.  
  15.  rednet.open(modemside)
  16.  
  17.  disk = peripheral.wrap(DD1)
  18.  disk2 = peripheral.wrap (DD2)
  19.  disk3 = peripheral.wrap (DD3)
  20.  disk4 = peripheral.wrap (DD4)
  21.  
  22.     while true do
  23.  
  24.     id, text = rednet.receive()
  25.  
  26.             if text == "9" then
  27.                 disk.playAudio()
  28.                
  29.             elseif text == "10" then
  30.                 disk2.playAudio()
  31.                
  32.             elseif text == "11" then
  33.                 disk3.playAudio()
  34.                
  35.             elseif text == "12" then
  36.                 disk4.playAudio()
  37.  
  38.             elseif text == "0" then
  39.                 disk.stopAudio()
  40.                 disk2.stopAudio()
  41.                 disk3.stopAudio()
  42.                 disk4.stopAudio()
  43.  
  44.             else
  45.                 sleep(0.1)
  46.     end
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement