Advertisement
M0n5t3r

StripMiner

Jul 22nd, 2013
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local steps = 0
  2. local left = 0
  3. local back = 0
  4. local right = 0
  5. local z = true
  6. local long = 0
  7. local torchslot = 2
  8. local fuelslot = 1
  9.  
  10. print"Fuel in slot 1"
  11. print"64 Torches in slot 2"
  12. print"Important! 64 torches!"
  13. print"It will go for 190 meters!"
  14. print"Because than the torches"
  15. print"will run out"
  16. print"Press enter to start!"
  17. read(input)
  18.  
  19.  
  20. while z == true do
  21.         repeat
  22.                         turtle.dig()
  23.                         turtle.forward()
  24.                         turtle.digUp()
  25.                         turtle.digDown()
  26.                         steps = steps + 1
  27.         until steps == 3
  28.         steps = 0
  29.         turtle.turnLeft()
  30.          
  31.         repeat
  32.                         turtle.dig()
  33.                         turtle.forward()
  34.                         turtle.digUp()
  35.                         turtle.digDown()
  36.                         left = left + 1
  37.         until left == 6
  38.         left = 0
  39.         turtle.turnRight()
  40.         turtle.turnRight()
  41.  
  42.         repeat
  43.                         turtle.dig()
  44.                         turtle.forward()
  45.                         turtle.digUp()
  46.                         turtle.digDown()
  47.                         back = back + 1
  48.         until back == 6
  49.         back = 0
  50.          
  51.         repeat
  52.                         turtle.dig()
  53.                         turtle.forward()
  54.                         turtle.digUp()
  55.                         turtle.digDown()
  56.                         right = right + 1
  57.         until right == 6
  58.         right = 0
  59.         turtle.turnLeft()
  60.     turtle.turnLeft()
  61.          
  62.         repeat
  63.                         turtle.dig()
  64.                         turtle.forward()
  65.                         turtle.digUp()
  66.                         turtle.digDown()
  67.                         back = back + 1
  68.         until back == 6
  69.         back = 0
  70.     turtle.turnRight()
  71.          
  72.         long = long + 1
  73.        
  74.         if turtle.getFuelLevel() < 80 then
  75.                         turtle.select(fuelslot)
  76.                         turtle.refeul()
  77.         end
  78.  
  79.     turtle.select(torchslot)
  80.     turtle.placeDown()
  81. end
  82.  
  83. if(long == 64) then
  84.         z = false
  85. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement