Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

ComputerCraft Tutorial: auto_download0_2

hevohevo May 31st, 2014 1,300 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. -- ############################
  2. -- Auto Download program
  3. -- http://hevohevo.hatenablog.com/
  4. -- version 0.2
  5.  
  6. -- Config
  7. -- api_name="pastebin code"
  8. API_INFO = {
  9.   test_api="TeWK9FBw",
  10.   test_api2="NCYAEPRA"
  11. }
  12.  
  13. -- function
  14. function installAPI(name,code)
  15.   if fs.exists(name) then
  16.     print("API_FILE exists.")
  17.   else
  18.     print("API_FILE doesn't exist.")
  19.     shell.run("pastebin","get",code,name)
  20.   end
  21.   os.loadAPI(name)
  22. end
  23.  
  24. -- main
  25. for k,v in pairs(API_INFO) do
  26.   installAPI(k, v)
  27. end
  28.  
  29. test_api.testPrint()
  30. test_api2.testPrint()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top