Advertisement
Wihad

Dome

Jun 9th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. print("input radius:")
  2. local dom_rad=read()+0
  3. print("input height:")
  4. local height=read()+0
  5.  
  6. local X=0
  7. local Y=0
  8. local Z=0
  9. local X2
  10. local Y2
  11. local Z2
  12. local XY2
  13. local XYZ2
  14.  
  15.  
  16. for a=1,radius do
  17.     while turtle.detect()
  18.         turtle.dig()
  19.     end
  20.     turtle.forward()
  21.     X=X+1
  22. end
  23. turtle.turnLeft()
  24.  
  25. for DimZ=1,height do
  26.     for DimY=1,4 do
  27.         for y=1,radius do
  28.             turtle.placeDown()
  29.             for A=X,1,-1 do
  30.                 X2=a*a
  31.                 Y2=cur_Y*cur_Y
  32.                 X2Y2=X2+Y2
  33.                 if X2Y2>=rad2 then
  34.                     mov=cur_X-a
  35.                 end
  36.             end
  37.             if mov>0 then
  38.                 turtle.turnLeft()
  39.                 for b=1,mov
  40.  
  41.  
  42.         end
  43.     end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement