Advertisement
Guest User

mine

a guest
Aug 28th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. function main()
  2.   upmode=0
  3.   downmode=1
  4.   turtle.select(2)
  5.   turtle.placeUp()
  6.   turtle.select(1)
  7.   print(turtle.getFuelLevel())
  8.   while true do
  9.     if turtle.getFuelLevel()==0 then
  10.       turtle.refuel()
  11.     end
  12.     if downmode==1 then
  13.       turtle.digDown()
  14.       if turtle.detectDown()==true then
  15.         upmode=1
  16.         downmode=0
  17.       end
  18.       turtle.down()
  19.     end
  20.     if upmode==1 then
  21.       turtle.up()
  22.       if turtle.detectUp()==true then
  23.         turtle.digUp()
  24.         upmode=0
  25.       end
  26.     end
  27.   end
  28. end
  29. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement