Sayomie550

Untitled

Jul 15th, 2012
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. local standby = 0
  2. local tree = 0
  3.  
  4. while turtle.detectDown() do
  5.  
  6.     while redstone.getInput("back", true) do
  7.         standby = 0
  8.         tree = tree + 1
  9.        
  10.         print( "Chopping Tree Number "..tree )
  11.  
  12.         while turtle.detect() do
  13.             turtle.dig()
  14.             turtle.forward()
  15.         end
  16.  
  17.         while turtle.detectUp() do
  18.             turtle.digUp()
  19.             turtle.up()
  20.         end
  21.  
  22.         while not turtle.detectUp() and not turtle.detectDown() do
  23.             turtle.down()
  24.         end
  25.  
  26.         redstone.setOutput("left", false)
  27.        
  28.         turtle.back()
  29.         turtle.place(1)
  30.        
  31.         redstone.setOutput("left", true)
  32.        
  33.         while turtle.getitemCount(2) > 63 do
  34.             print( "Depositing Items to Obby Pipe" )
  35.        
  36.             turtle.turnRight()
  37.             turtle.drop(2)
  38.             turtle.drop(3)
  39.             turtle.turnLeft()
  40.         end
  41.        
  42.     end
  43.    
  44.     while not redstone.getInput("back", true) do
  45.    
  46.         if standby == 0 then
  47.             print( "Standby Mode" )
  48.             standby = standby + 1
  49.             tree = 0
  50.         end
  51.        
  52.     end
  53.    
  54. end
Advertisement
Add Comment
Please, Sign In to add comment