slay_mithos

wall

May 15th, 2013
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. local args = {...}
  2. local height = 1
  3. local length = 1
  4. local selected = 1
  5.  
  6. if (args[1]~=nil) then
  7.     length = args[1]
  8.     if (args[2] ~= nil) then
  9.         height = args[2]
  10.     end
  11. end
  12.  
  13. turtle.select(selected)
  14.  
  15. for i=1, length do
  16.     for j=1, height do
  17.         while (not turtle.up()) do
  18.             turtle.digUp()
  19.         end
  20.         while (not turtle.placeDown() and selected <16) do
  21.             selected = selected+1
  22.             turtle.select(selected)
  23.         end
  24.     end
  25.     turtle.forward()
  26.     for j=1, height do
  27.         while (not turtle.down()) do
  28.             turtle.digDown()
  29.         end
  30.     end
  31. end
Advertisement
Add Comment
Please, Sign In to add comment