Advertisement
Mackan90096

GemMiner installer

Apr 12th, 2013
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1.  
  2. function install()
  3. file1 = http.get("http://mackan90096.dustinschreiber.com/gemminer/files/1.1/gemminer") --This line downloads the file
  4. file1txt = file1.readAll() --Reads the contents
  5. file1opn = fs.open("GemMiner","w") --Opens file
  6. file1opn.write(file1txt) --writing the file
  7. file1opn.close()
  8.  
  9. file2 = http.get("http://mackan90096.dustinschreiber.com/gemminer/files/1.1/game1") --This line downloads the file
  10. file2txt = file2.readAll() --Reads the contents
  11. file2opn = fs.open(".game1","w") --Opens file
  12. file2opn.write(file2txt) --writing the file
  13. file2opn.close()
  14.  
  15. end
  16.  
  17. function main()
  18.         term.clear()
  19.         term.setBackgroundColor(2048)
  20.         term.setTextColor(1)
  21.         term.clear()
  22.         term.setCursorPos(1,1)
  23.         print("Installing GemMiner")
  24.         install()
  25.         sleep(1)
  26.         term.clear()
  27.         term.setBackgroundColor(2048)
  28.         term.setTextColor(1)
  29.         term.setCursorPos(1,1)
  30.         print("Installed!")
  31.         term.setCursorPos(1,2)
  32.         print("Your computer will now reboot.")
  33.         sleep(1)
  34.         os.reboot()
  35. end
  36.  
  37. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement