Advertisement
Guest User

floorbuild

a guest
Feb 1st, 2015
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.18 KB | None | 0 0
  1. local args = {...}
  2. if #args ~= 1 then
  3.   print( "Correct use: floorbuild <x> <y>")
  4.   error()
  5. end
  6.  
  7. x = args[1]
  8. y = args[2]
  9. blockscount = 0
  10. for countY = 1,x,1 do
  11. -- X --
  12.   for count = 1,x,1 do
  13.     blockcount = 0
  14.     while not (blockcount > 0) do
  15.     sleep(1)
  16.       currslot = turtle.getSelectedSlot()
  17.       blockcount = turtle.getItemCount(currslot)
  18.       if currslot == 16  then
  19.         print("Last Slot")
  20.         if blockcount == 0 then
  21.           turtle.select(1)
  22.         else
  23.           print(blockcount)
  24.         end
  25.       else
  26.         print("Slot:")
  27.         print(currslot)
  28.         print("Blockcount:")
  29.         print(blockcount)
  30.         if blockcount == 0 then
  31.           print("In slot change IF.")
  32.           newslot = currslot + 1
  33.           turtle.select(newslot)
  34.         end
  35.       end
  36.     end
  37.     turtle.digDown()        
  38.     turtle.placeDown()
  39.     if count ~= x then
  40.       turtle.dig()
  41.       turtle.forward()
  42.     else
  43.       print("X Line Done")
  44.     end
  45.   end
  46.   turtle.turnRight()
  47.   turtle.dig()
  48.   turtle.forward()
  49.   turtle.turnRight()
  50.   for countFor = 1,x,1 do
  51.     turtle.dig()
  52.     turtle.forward()
  53.   end
  54.   turtle.turnRight()
  55.   turtle.turnRight()
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement