JaMaNi133

dev

Dec 25th, 2020 (edited)
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.02 KB | None | 0 0
  1. local PORT = 112233
  2.  
  3. function checkFuel()
  4.     if turtle.getFuelLevel() < 100 then
  5.         turtle.select(2)
  6.         turtle.suckDown()
  7.         turtle.refuel()
  8.     end
  9. end
  10.  
  11.  
  12. barrelNum = input()
  13. turtle.select(1)
  14. turtle.suckUp()
  15. turtle.down()
  16. turtle.down()
  17. turtle.forward()
  18. turtle.forward()
  19. turtle.forward()
  20. turtle.forward()
  21. turtle.turnLeft()
  22. turtle.forward()
  23. turtle.forward()
  24. turtle.forward()
  25. turtle.forward()
  26. if barrelNum % 2 == 0 then
  27.     turtle.forward()
  28.     turtle.forward()
  29.     turtle.forward()
  30.     turtle.forward()
  31. end
  32. turtle.turnRight()
  33. if barrelNum == 1 or barrelNum == 2 then
  34.     turtle.forward()
  35.     turtle.forward()
  36.     turtle.up()
  37.     turtle.dropUp()
  38.     turtle.turnLeft()
  39.     turtle.turnLeft()
  40.     turtle.down()
  41.     turtle.forward()
  42.     turtle.forward()
  43. end
  44. if barrelNum == 3 or barrelNum == 4 then
  45.     turtle.forward()
  46.     turtle.forward()
  47.     turtle.forward()
  48.     turtle.forward()
  49.     turtle.forward()
  50.     turtle.up()
  51.     turtle.dropUp()
  52.     turtle.turnLeft()
  53.     turtle.turnLeft()
  54.     turtle.down()
  55.     turtle.forward()
  56.     turtle.forward()
  57.     turtle.forward()
  58.     turtle.forward()
  59.     turtle.forward()
  60. end
  61. if barrelNum == 5 or barrelNum == 6 then
  62.     turtle.forward()
  63.     turtle.forward()
  64.     turtle.forward()
  65.     turtle.forward()
  66.     turtle.forward()
  67.     turtle.forward()
  68.     turtle.forward()
  69.     turtle.forward()
  70.     turtle.up()
  71.     turtle.dropUp()
  72.     turtle.turnLeft()
  73.     turtle.turnLeft()
  74.     turtle.down()
  75.     turtle.forward()
  76.     turtle.forward()
  77.     turtle.forward()
  78.     turtle.forward()
  79.     turtle.forward()
  80.     turtle.forward()
  81.     turtle.forward()
  82.     turtle.forward()
  83. end
  84. turtle.turnLeft()
  85. if barrelNum % 2 == 0 then
  86.     turtle.forward()
  87.     turtle.forward()
  88.     turtle.forward()
  89.     turtle.forward()
  90. end
  91. turtle.forward()
  92. turtle.forward()
  93. turtle.forward()
  94. turtle.forward()
  95. turtle.turnRight()
  96. turtle.forward()
  97. turtle.forward()
  98. turtle.forward()
  99. turtle.forward()
  100. turtle.turnRight()
  101. turtle.turnRight()
  102. checkFuel()
  103. turtle.up()
  104. turtle.up()
  105.  
Add Comment
Please, Sign In to add comment