SHARE
TWEET

dig

a guest Apr 21st, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tArgs = {...}
  2.  
  3. length = tArgs[1]
  4. width = tArgs[2]
  5. lastMove = "left"
  6.  
  7. function digAll()
  8.   turtle.dig()
  9.   turtle.digUp()
  10.   turtle.digDown()
  11.   turtle.forward()
  12. end
  13. for i = 1, width do
  14.   for i = 1, length-1 do
  15.     digAll()
  16.   end
  17.   if lastMove == "right" then
  18.     turtle.turnLeft()
  19.     digAll()
  20.     turtle.turnLeft()
  21.     lastMove = "left"
  22.   else
  23.     turtle.turnRight()
  24.     digAll()
  25.     turtle.turnRight()
  26.     lastMove = "right"
  27.   end
  28. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top