SHOW:
|
|
- or go back to the newest paste.
| 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 | - | if peripheral.getType(perList[x]) == "drive_"..tostring(x) then |
| 8 | + | |
| 9 | - | if disk.hasAudio("drive_"..tostring(x)) == 1 then
|
| 9 | + | |
| 10 | - | driveNum = "drive_"..tostring(x) |
| 10 | + | if peripheral.getType(perList[x]) == "drive" then |
| 11 | - | title = disk.getAudioTitle(driveNum) |
| 11 | + | if disk.hasAudio(perList[x]) ~= "false" then |
| 12 | - | disk.playAudio(driveNum) |
| 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 |