derkoch

Untitled

Mar 3rd, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local torchDistance = 10 -- alle 10 blöcke eine facke setzen
  2. local torchSlot = 16 --slot unten rechts
  3. local depthCounter = 0 -- zähler für die tiefe
  4.  
  5. function canDown()
  6.     if not turtle.dig() and turtle.down()) then
  7.         return false
  8.     else
  9.         return true
  10.     end
  11. end
  12.  
  13. function goDown()
  14.     turtle.digDown()
  15.     turtle.down()  
  16.     turtle.dig()
  17.     depthCounter = depthCounter + 1
  18. end
  19.  
  20. function placeTorch()
  21.     turtle.select(torchslot)
  22.     turtle.placeUp()
  23. end
  24.  
  25. while canDown() do
  26.     goDown()   
  27.     if (depthCounter % torchDistance == 0) then
  28.         placeTorch()
  29.     end
  30. end
  31.  
  32. placeTorch()
Add Comment
Please, Sign In to add comment