Advertisement
karelvysinka

turtle macerator suck condenser 1

Jul 19th, 2017
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.96 KB | None | 0 0
  1. local version =
  2. 6.0
  3. -- Program pro prijem zprav pres modem
  4. -- Pri zmene programu je treba na radku 2 zmenit verzi, aby se program automaticky aktualizoval
  5. -- local code je treba zmenit dle potreby
  6.  
  7. local code = "7DBmeDsa"
  8.  
  9. --check version
  10. term.clear()
  11. term.setCursorPos(1,1)
  12. print("Program loading...")
  13. print("Current version: "..version)
  14. local updateSite= http.get("http://pastebin.com/raw.php?i="..code)
  15. updateSite.readLine()
  16. local newVersion = updateSite.readLine()
  17. if tonumber(newVersion) > version then
  18.         print("Update required. Updating now...")
  19.         local updateSite = http.get("http://pastebin.com/raw.php?i="..code)
  20.         local siteFile = updateSite.readAll()
  21.         local writeFile = fs.open(shell.getRunningProgram(),"w")
  22.         writeFile.write(siteFile)
  23.         writeFile.close()
  24.         print("The program will now restart your computer.")
  25.         sleep(1)
  26.         os.reboot()
  27. end
  28.  
  29. function start()
  30.  
  31. a=1
  32. while true do
  33.     turtle.select(1)
  34.     turtle.suck()
  35.     turtle.dropUp() -- do condenzeru
  36.     turtle.select(2)
  37.     turtle.suckUp()
  38.     turtle.dropDown() -- do macaratoru
  39.     turtle.select(3)
  40.     turtle.dropUp() -- do condenzeru
  41.     turtle.select(4)
  42.     turtle.dropUp() -- do condenzeru
  43.     turtle.select(5)
  44.     turtle.dropUp() -- do condenzeru
  45.     turtle.select(6)
  46.     turtle.dropUp() -- do condenzeru
  47.     turtle.select(7)
  48.     turtle.dropUp() -- do condenzeru
  49.     turtle.select(8)
  50.     turtle.dropUp() -- do condenzeru
  51.     turtle.select(9)
  52.     turtle.dropUp() -- do condenzeru
  53.     turtle.select(10)
  54.     turtle.dropUp() -- do condenzeru
  55.     turtle.select(11)
  56.     turtle.dropUp() -- do condenzeru
  57.     turtle.select(12)
  58.     turtle.dropUp() -- do condenzeru
  59.     turtle.select(13)
  60.     turtle.dropUp() -- do condenzeru
  61.     turtle.select(14)
  62.     turtle.dropUp() -- do condenzeru
  63.     turtle.select(15)
  64.     turtle.dropUp() -- do condenzeru
  65.     turtle.select(16)
  66.     turtle.dropUp() -- do condenzeru
  67.  
  68.   a=a+1
  69.   print(a)
  70. end
  71.  
  72. end
  73.  
  74. --start programu
  75. local a=0
  76. while true do
  77.     start()
  78.     a=a+1
  79.     print(a)
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement