Advertisement
guamie

WallBuilder.lua

Feb 21st, 2015
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. -- WallBuilder.lua
  2.  
  3. local tArgs = { ...}
  4.  
  5. y = tonumber(tArgs[1])
  6. x = tonumber(tArgs[2])
  7.  
  8. Slot = 1
  9.  
  10. function checkCurSlot()
  11. InvCount = turtle.getItemCount(Slot)
  12. if InvCount == 0 then
  13. Slot = Slot + 1
  14. turtle.select(Slot)
  15. end
  16. end
  17.  
  18. -----------
  19. turtle.select(Slot)
  20. for r=1, y do
  21.  
  22. for i=1, x do
  23.     turtle.place()
  24.     checkCurSlot()
  25.     turtle.up()
  26. end
  27. for i=1, x do
  28.     turtle.down()
  29. end
  30.  
  31. turtle.turnRight()
  32. turtle.forward()
  33. turtle.turnLeft()
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement