Advertisement
TyanColte

plot 2.0

Nov 30th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local z = 1
  2. turtle.select(z)
  3.  
  4. print("Length?")
  5. local l = tonumber(read())
  6. print("Width?")
  7. local w = tonumber(read())
  8.  
  9. function itemcheck()
  10. s = turtle.getItemCount(z)
  11.   if s < 1 then
  12.     print("Slot Empty, Switching...")
  13.     z = z + 1
  14.     turtle.select(z)
  15.   end
  16. end
  17.  
  18. function placefront()
  19.   for p = 0, l do
  20.     turtle.placeDown()
  21.     turtle.forward()
  22.     itemcheck()
  23.     turtle.placeDown()
  24.   end
  25. end
  26.  
  27. for i = 0, w / 2 do
  28.   placefront()
  29.     turtle.turnLeft()
  30.     turtle.forward()
  31.     turtle.turnLeft()
  32.   placefront()
  33.     turtle.turnRight()
  34.     turtle.forward()
  35.     turtle.turnRight()
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement