Fooman

Untitled

Apr 16th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local arg = {...}
  2. if #arg<2 then
  3.     print("Please input Length and Width")
  4.     print("rectangle L W")
  5.     quit = true
  6. end
  7.  
  8. if quit == true then
  9.     return
  10. else
  11.     for j=1,arg[2] do
  12.         for i=1,arg[1]-1 do
  13.             turtle.digDown()
  14.             turtle.forward()
  15.         end
  16.             turtle.digDown()
  17.         if (j % 2 == 0) then
  18.             turtle.turnLeft()
  19.             turtle.forward()
  20.             turtle.turnLeft()
  21.         else
  22.             turtle.turnRight()
  23.             turtle.forward()
  24.             turtle.turnRight()
  25.         end
  26.     end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment