Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local version =
- 39.0
- -- Pri zmene programu je treba na radku 2 zmenit verzi, aby se program automaticky aktualizoval
- -- local code je treba zmenit dle potreby
- local code = "sKQUDMWA"
- --check version
- term.clear()
- term.setCursorPos(1,1)
- print("Program loading...")
- print("Current version: "..version)
- local updateSite= http.get("http://pastebin.com/raw.php?i="..code)
- updateSite.readLine()
- local newVersion = updateSite.readLine()
- if tonumber(newVersion) > version then
- print("Update required. Updating now...")
- local updateSite = http.get("http://pastebin.com/raw.php?i="..code)
- local siteFile = updateSite.readAll()
- local writeFile = fs.open(shell.getRunningProgram(),"w")
- writeFile.write(siteFile)
- writeFile.close()
- print("The program will now restart your computer.")
- sleep(1)
- os.reboot()
- end
- function start()
- print("Turtle crafting DRUM STARTUJI")
- --kompletni vyprazdneni bocnich slotu
- turtle.select(4)
- turtle.dropDown()
- turtle.select(8)
- turtle.dropDown()
- turtle.select(12)
- turtle.dropDown()
- turtle.select(13)
- turtle.dropDown()
- turtle.select(14)
- turtle.dropDown()
- turtle.select(15)
- turtle.dropDown()
- turtle.select(16)
- turtle.dropDown()
- print("Vyprazdneny vsechny bocni sloty 2")
- --nasati novych cabblestone
- print("Nasavam nove Cabblestone")
- while true do
- turtle.select(1)
- local t1 = turtle.getItemCount(1)
- print(t1)
- local t1v = 64-t1
- print(t1v)
- turtle.suck(t1v)
- turtle.select(2)
- local t2 = turtle.getItemCount(2)
- local t2v = 64-t2
- turtle.suck(t2v)
- turtle.select(3)
- local t3 = turtle.getItemCount(3)
- local t3v = 64-t3
- turtle.suck(t3v)
- turtle.select(5)
- local t4 = turtle.getItemCount(5)
- local t4v = 64-t4
- turtle.suck(t4v)
- turtle.select(6)
- local t5 = turtle.getItemCount(6)
- local t5v = 64-t5
- turtle.suck(t5v)
- turtle.select(7)
- local t6 = turtle.getItemCount(7)
- local t6v = 64-t6
- turtle.suck(t6v)
- turtle.select(9)
- local t7 = turtle.getItemCount(9)
- local t7v = 64-t7
- turtle.suck(t7v)
- turtle.select(10)
- local t8 = turtle.getItemCount(10)
- t8v = 64-t8
- turtle.suck(t8v)
- turtle.select(11)
- local t9 = turtle.getItemCount(11)
- local t9v = 64-t9
- turtle.suck(t9v)
- --presun cabblestone do craft slotu
- --turtle.select(4)
- --turtle.transferTo(10)
- --turtle.select(8)
- --turtle.transferTo(11)
- -- vyprazdneni pro jistotu bocnich slotu pro crafting
- turtle.select(12)
- turtle.dropDown()
- turtle.select(13)
- turtle.dropDown()
- turtle.select(14)
- turtle.dropDown()
- turtle.select(15)
- turtle.dropDown()
- turtle.select(16)
- turtle.dropDown()
- print("Vyprazdneny bocni sloty")
- --zahajeni caftovani kdyz jsou plne sloty
- print(t1)
- print(t2)
- print(t3)
- print(t4)
- print(t5)
- print(t6)
- print(t7)
- print(t8)
- if (t1>0) and (t2>0) and (t3>0) and (t4>0) and (t5>0) and (t6>0) and (t7>0) and (t8>0) then
- print("Craftuji...")
- turtle.craft()
- print("Docraftovano OK...")
- end
- --sklizeni vycraftovaneho compresed cabblestone
- turtle.select(4)
- turtle.dropUp()
- turtle.select(8)
- turtle.dropUp()
- turtle.select(12)
- turtle.dropUp()
- turtle.select(13)
- turtle.dropUp()
- turtle.select(14)
- turtle.dropUp()
- turtle.select(15)
- turtle.dropUp()
- turtle.select(16)
- turtle.dropUp()
- print("Sklizeni vycraftovaneho compresed cabblestone")
- end
- -- konec hlavního programu
- end
- start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement