Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. print("V nadrzi zbyva " .. turtle.getFuelLevel() .. ".")
  2. print("Jestli chces naplnit nadrz, dej palivo do slotu 1 a napis 'a'")
  3. local nadrz = io.read()
  4. if nadrz == "a" then
  5. turtle.select(1)
  6. turtle.refuel()
  7. end
  8. print("Ted je v nadrzi " .. turtle.getFuelLevel() .. ".")
  9.  
  10.  
  11. print("Do slotu 2 dej saplinky do slotu 3 bonemeal")
  12. write"Kolik cyklu ? (1 cyklus = 2 stromy) "
  13. local kolik = io.read()
  14.  
  15. write"Pauza mezi cykly v sekundach ? "
  16. local spat = io.read()
  17.  
  18.  
  19.  
  20. for x=1,kolik do
  21. turtle.forward()
  22. turtle.select (2)
  23. turtle.place()
  24. turtle.select (3)
  25. turtle.place()
  26. turtle.back()
  27. turtle.select (2)
  28. turtle.place()
  29. turtle.select (3)
  30. turtle.place()
  31. turtle.dig()
  32. turtle.forward()
  33. turtle.dig()
  34.  
  35. for a=1,6 do
  36. turtle.digUp()
  37. turtle.up()
  38. turtle.dig()
  39. end
  40.  
  41. for a=1,6 do
  42. turtle.dig()
  43. turtle.down()
  44. end
  45.  
  46. turtle.back()
  47. print("Ted je v nadrzi " .. turtle.getFuelLevel() .. ".")
  48. print("Hotovo " .. x .. " cyklu z " .. kolik .. ".")
  49. sleep(spat)
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement