Advertisement
karelvysinka

Turtle tunel

Jan 18th, 2017
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. function Kopej(sirka)
  2.   for a=1,sirka,1 do
  3.     turtle.dig()
  4.     turtle.forward()
  5.   end
  6. end
  7.  
  8. function PopojedVpred(posun)
  9.   for a=1,posun,1 do
  10.     turtle.dig()
  11.     turtle.forward()
  12.   end
  13. end
  14.  
  15. function PopojedDolu(posundolu)
  16.   for a=1,posundolu,1 do
  17.     turtle.down()
  18.   end
  19. end
  20.  
  21. function Rada()
  22.  
  23. -- 1 rada
  24. Kopej(20)
  25. turtle.turnRight()
  26. turtle.turnRight()
  27. turtle.digUp()
  28. turtle.up()
  29.  
  30. -- 2 rada
  31. Kopej(20)
  32. turtle.turnLeft()
  33. turtle.turnLeft()
  34. turtle.digUp()
  35. turtle.up()
  36.  
  37. -- 3 rada
  38. Kopej(20)
  39. turtle.turnRight()
  40. turtle.turnRight()
  41. turtle.digUp()
  42. turtle.up()
  43.  
  44. -- 4 rada
  45. Kopej(20)
  46. turtle.turnLeft()
  47. turtle.turnLeft()
  48. turtle.digUp()
  49. turtle.up()
  50.  
  51. -- 5 rada
  52. Kopej(20)
  53. turtle.turnRight()
  54. turtle.turnRight()
  55. PopojedVpred(20)
  56. PopojedDolu(5)
  57. turtle.turnLeft()
  58. end
  59.  
  60. --start programu
  61. --pred spustenim programu nezapomente doplnit FUEL (Coal) pomoci prikazu refuel
  62. turtle.dig()
  63. turtle.forward()
  64. turtle.turnLeft()
  65. Rada()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement