cecell

Clear Fence Line

Mar 26th, 2014
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. local tArgs = { ... }
  2. local nCount = tArgs[1]
  3.  
  4. if not nCount then
  5.         print("Usage: clear <count>")
  6. return
  7. end
  8.  
  9. if nCount==0 then
  10.         print("Arg 1, <count> must be greater than zero!")
  11. return
  12. end
  13.  
  14. for n=1,nCount do
  15.   if turtle.detect() then
  16.     turtle.dig()
  17.     turtle.forward()
  18.   else
  19.     turtle.forward()
  20.   end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment