Advertisement
markman4897

DJ V4.3

May 12th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # DJ program V4.3
  2.  
  3. len = {["C418 - 13"]=360, ["C418 - cat"]=372, ["C418 - blocks"]=692, ["C418 - chirp"]=372, ["C418 - far"]=380, ["C418 - mall"]=394, ["C418 - mellohi"]=200, ["C418 - stal"]=302, ["C418 - strad"]=382, ["C418 - ward"]=500, ["C418 - 11"]=140, ["portalgun:wantyougone"]=284, ["portalgun:stillalive"]=350}
  4.  
  5. perList = peripheral.getNames()
  6.  
  7. while true do
  8.   x = math.random(1, #perList)
  9.  
  10.   if peripheral.getType(perList[x]) == "drive" then
  11.     if disk.hasAudio(perList[x]) ~= "false" then
  12.       driveName = perList[x]
  13.       title = disk.getAudioTitle(driveName)
  14.       disk.playAudio(driveName)
  15.  
  16.       term.clear()
  17.       term.setCursorPos(1, 1)
  18.       print("Now Playing: "..title)
  19.  
  20.       sleep(len[title])
  21.     end
  22.   end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement