Advertisement
Microstar301

MICROS/FUNCS

Dec 10th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(14,8)
  3. print("+-------------------+")
  4. term.setCursorPos(14,9)
  5. print("     MICROTECH       ")
  6. term.setCursorPos(14,10)
  7. print("    BASIC INPUTS     ")
  8. term.setCursorPos(14,11)
  9. print("+-------------------+")
  10. sleep(1)
  11.  
  12. function player()
  13.     if fs.exists("/confg") == true then
  14.         READCONF = fs.open("confg","r")
  15.         AUSIDE = READCONF.readAll()
  16.         READCONF.close()
  17.         while true do
  18.             if disk.isPresent( AUSIDE ) == true then
  19.                 if not disk.hasAudio( AUSIDE ) == false then
  20.                     disk.playAudio( AUSIDE )
  21.                     os.pullEvent("disk_eject")
  22.                 else if disk.hasData( AUSIDE ) == true then
  23.                     sleep(1)
  24.                     else
  25.                         disk.eject( AUSIDE )
  26.                     end
  27.                 end
  28.             end
  29.             sleep(1)
  30.         end
  31.     else
  32.         while true do
  33.             os.reboot()
  34.             sleep(1)
  35.         end
  36.     end
  37. end
  38.  
  39. function cs()
  40.  term.clear()
  41.  term.setCursorPos(1,1)
  42. end
  43.  
  44. function ts(XXX,XXY)
  45.  term.setCursorPos(XXX,XXY)
  46. end
  47.  
  48. function cc(KINDOC)
  49.  term.setBackgroundColor(colors.black)
  50.  term.setTextColor(colors.white)
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement