Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("back")
- rednet.open("top")
- counter = os.startTimer(1)
- timeTillSong = 600
- playing = "Nothing"
- mute = false
- secTimeTillSong = 0
- minTimeTillSong = 0
- timeLeftOnSong = 0
- currentlyColour = colours.lime
- mcTimeColour = colours.cyan
- listeningToColour = colours.grey
- songNameColour = colours.magenta
- timeTillColour = colours.purple
- counterBigColour = colours.red
- counterMiddleColour = colours.orange
- counterSmallColour = colours.green
- welcomeColour = colours.blue
- while true do
- time = os.time()
- mon.clear()
- mon.setCursorPos(1,5)
- mon.setTextColour(welcomeColour)
- mon.write("Welcome to our base")
- mon.setCursorPos(1,1)
- mon.setTextColour(currentlyColour)
- mon.write("It is currently ")
- mon.setTextColour(mcTimeColour)
- mon.write(textutils.formatTime(time))
- mon.setCursorPos(1,2)
- mon.setTextColour(listeningToColour)
- mon.write("Currently listening to")
- mon.setCursorPos(1,3)
- mon.setTextColour(songNameColour)
- if mute == true then
- mon.write("Music is muted")
- else
- mon.write(playing)
- end
- mon.setCursorPos(1,4)
- mon.setTextColour(timeTillColour)
- mon.write("New song in ")
- if minTimeTillSong > 7 then
- mon.setTextColour(counterBigColour)
- elseif minTimeTillSong > 5 then
- mon.setTextColour(counterMiddleColour)
- else
- mon.setTextColour(counterSmallColour)
- end
- mon.write(math.floor(minTimeTillSong)..":")
- secLeft = tostring(secTimeTillSong)
- if secTimeTillSong < 10 then
- mon.write("0"..secTimeTillSong)
- else
- mon.write(secLeft)
- end
- event, p1,p2,p3 = os.pullEvent()
- if event == "timer" then
- timeLeftOnSong = timeLeftOnSong-1
- secTimeTillSong = secTimeTillSong-1
- if secTimeTillSong < 0 then
- secTimeTillSong = 59
- minTimeTillSong = minTimeTillSong-1
- end
- if timeLeftOnSong == 0 then
- playing = "Nothing"
- end
- if secTimeTillSong < 0 and minTimeTillSong < 0 then
- secTimeTillSong = 59
- minTimeTillSong = 9
- end
- if counter ~= nil then
- os.cancelTimer(counter)
- end
- counter = os.startTimer(1)
- elseif event == "rednet_message" and p1 == 746 then
- if p2 == "muted" then
- mute = true
- elseif p2 == "unmute" then
- mute = false
- else
- minTimeTillSong = 9
- secTimeTillSong = 59
- end
- id = p2["id"]
- side = p2["side"]
- if id == 712 then
- if side == "top" then
- playing = "c418 - blocks"
- timeLeftOnSong = 345
- elseif side == "left" then
- playing = "c418 - cat"
- timeLeftOnSong = 183
- elseif side == "right" then
- playing = "c418 - far"
- timeLeftOnSong = 174
- elseif side == "bottom" then
- playing = "c418 - 13"
- timeLeftOnSong = 178
- end
- elseif id == 715 then
- if side == "top" then
- playing = "c418 - stal"
- timeLeftOnSong = 150
- elseif side == "left" then
- playing = "c418 - mellohi"
- timeLeftOnSong = 96
- elseif side == "right" then
- playing = "c418 - strad"
- timeLeftOnSong = 188
- elseif side == "bottom" then
- playing = "c418 - mall"
- timeLeftOnSong = 197
- end
- elseif id == 717 then
- if side == "top" then
- playing = "Valve - Still Alive"
- timeLeftOnSong = 181
- elseif side == "left" then
- playing = "Valve - Want You Gone"
- timeLeftOnSong = 143
- elseif side == "right" then
- playing = "Valve - Radio Loop"
- timeLeftOnSong = 24
- elseif side == "bottom" then
- playing = "Tim Rurkowsi - Wanderer"
- timeLeftOnSong = 302
- end
- elseif id == 747 then
- if side == "top" then
- playing = "???"
- timeLeftOnSong = 190
- elseif side == "left" then
- playing = "Kain Vinosec - Endure Emptiness"
- timeLeftOnSong = 210
- elseif side == "right" then
- playing = "c418 - chirp"
- timeLeftOnSong = 185
- elseif side == "bottom" then
- playing = "c418 - ward"
- timeLeftOnSong = 251
- end
- elseif id == 748 then
- if side == "top" then
- playing = "c418 - wait"
- timeLeftOnSong = 238
- elseif side == "left" then
- playing = "c418 - 11"
- timeLeftOnSong = 71
- elseif side == "right" then
- playing = "Kain Vinosec - Fight For Quiescence"
- timeLeftOnSong = 232
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement