ravneravn

disk startup

Nov 12th, 2013
60
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function writeFile()
  2. handle = fs.open("disk/label", "w")
  3. handle.write(label)
  4. handle.close()
  5. end
  6.  
  7. local function loadFile()
  8. handle = fs.open("disk/label", "r")
  9. label = handle.readLine()
  10. handle.close()
  11. end
  12.  
  13. loadFile()
  14. os.setComputerLabel("Miner "..label)
  15. label = label+1
  16. writeFile()
  17.  
  18. shell.run("pastebin", "get", "SeSiYcLz", "download")
RAW Paste Data