Advertisement
Guest User

startup

a guest
Aug 26th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.53 KB | None | 0 0
  1. --# Made By HDR - @MartinRefseth #--
  2. --# Version 0.4 Remote #--
  3.  
  4. --# Functions
  5. function play()
  6.  peripheral.find("drive", disk.stopAudio)
  7.  peripheral.find( "drive", function( name )
  8.   if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
  9.     print("Now Playing"," ",( title) )
  10.     disk.playAudio( name )
  11.   end
  12.  end )
  13. end  
  14.  
  15. function Thir()
  16.    title = "C418 - 13"
  17.    play()
  18. end
  19.  
  20. function Cat()
  21.    title = "C418 - cat"
  22.    play()
  23. end
  24.  
  25. function Blocks()
  26.    title = "C418 - blocks"
  27.    play()
  28. end  
  29.  
  30. function Chirp()
  31.    title = "C418 - chirp"
  32.    play()
  33. end  
  34.  
  35. function Far()
  36.    title = "C418 - far"
  37.    play()
  38. end
  39.  
  40. function Mall()
  41.    title = "C418 - mall"
  42.    play()
  43. end
  44.  
  45. function Mellohi()
  46.    title = "C418 - mellohi"
  47.    play()
  48. end
  49.  
  50. function Stal()
  51.    title = "C418 - stal"
  52.    play()
  53. end
  54.  
  55. function Strad()
  56.    title = "C418 - strad"
  57.    play()
  58. end
  59.    
  60. function Ward()
  61.    title = "C418 - ward"
  62.    play()
  63. end
  64.  
  65. function Elev()
  66.    title = "C418 - 11"
  67.    play()
  68. end
  69.  
  70. function Wait()
  71.    title = "C418 - wait"
  72.    play()
  73. end
  74.  
  75. function Question()
  76.    title = "corruption"
  77.    play()
  78. end
  79.  
  80. function GaiaOne()
  81.    title = "botania:gaia1"
  82.    play()
  83. end
  84.  
  85. function GaiaTwo()
  86.    title = "botania:gaia2"
  87.    play()
  88. end
  89.  
  90. function Roop()
  91.    title = "portalgun:records.radioloop"
  92.    play()
  93. end
  94.  
  95. function Slive()
  96.    title = "portalgun:records.stillalive"
  97.    play()
  98. end
  99.  
  100. function WYG()
  101.    title = "portalgun:records.wantyougone"
  102.    play()
  103. end
  104.  
  105. function WDR()
  106.    title = "wanderer"
  107.    play()
  108. end
  109.  
  110. --#Stops All Music
  111. function Stop()
  112.    print("Stopping Disk")
  113.    peripheral.find("drive", disk.stopAudio)
  114. end
  115. function Reboot()
  116.    print("Rebooting")
  117.    peripheral.find("drive", disk.stopAudio)
  118.    mon.clear()
  119.    os.reboot()
  120. end
  121.  
  122. -- A list of all possible songs
  123. local Songs = {
  124.     Thir, Cat, Blocks, Chirp, Far, Mall, Mellohi, Stal, Strad, Ward,
  125.     Elev, Wait, Question, GaiaOne, GaiaTwo, Roop, Slive, WYG, Wander
  126. }
  127.  
  128. function Random()
  129.     peripheral.find("drive", disk.stopAudio)
  130.     local maxSongs = #Songs -- the "#" gets the length of the list
  131.     local randomNumber = math.random( maxSongs )
  132.     Songs[randomNumber]() -- call the choosen song directly out of the list
  133. end
  134.  
  135. term.setCursorPos(1,1)
  136. print("Music System Server Online")
  137. term.setCursorPos(1,2)
  138. print("Enter"," ","#"..os.getComputerID()," ","Into The Remote.")
  139. rednet.open("top")
  140. local evt, id, msg = os.pullEvent("rednet_message")
  141. G = getfenv()
  142. if G[msg] then
  143.  G[msg]()
  144. end
  145. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement