Niseg

platform builder for skyfactory

Nov 18th, 2014
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1. local turnLeft=true;
  2. local failCount=0;
  3. local breakFloor=true;
  4. local sel=0;
  5. local slot=1
  6. local width=1;
  7. local length=1;
  8. print("ceiling builder by Niseg")
  9. print("refuel the turtle put tell it to go down 2 and start")
  10. turtle.select(slot)
  11. repeat
  12. print("width ")
  13.  
  14. width=tonumber(read())
  15. until width>0
  16.  
  17. repeat
  18. print("length ")
  19.  
  20. length=tonumber(read())
  21. until length>0
  22.  
  23.  
  24. repeat
  25. print("build to  (1) right ")
  26. print("built to  (2) left")
  27.  
  28. sel=tonumber(read())
  29. until sel==1 or sel==2
  30.  
  31. if(sel==1) then turnLeft=false end
  32.  
  33. for i= 1,width,1 do
  34.     for j= 1,length,1 do
  35.     if turtle.getItemCount(slot)==0 then
  36.         slot=slot+1
  37.         if slot <17 then
  38.             turtle.select(slot)
  39.         end
  40.     end
  41.     turtle.placeUp()
  42.     if j <length then turtle.forward() end
  43.  
  44. end
  45.         if(turnLeft) then turtle.turnLeft()  else turtle.turnRight() end
  46.         turtle.forward()
  47.         if(turnLeft) then turtle.turnLeft()  else turtle.turnRight() end
  48.         turnLeft = not turnLeft;
  49.        
  50.     end
  51. print("done")
Advertisement
Add Comment
Please, Sign In to add comment