Advertisement
electronic_steve

test

Mar 30th, 2015
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. arg={...}
  2. R=5
  3. mapX=R
  4. mapY=R
  5. mapZ=R
  6. map={}
  7. quality=0.1
  8. turtle.refuel(10)
  9. tur={}
  10.  
  11. for x=-mapZ,mapX,1 do
  12. map[x]={}
  13. for y=-mapY,mapY,1 do
  14. map[x][y]={}
  15. for z=-mapZ,mapZ,1 do
  16. map[x][y][z]=false
  17.  
  18. end
  19. end
  20. end
  21. i=0
  22. for RX=0,math.pi,quality do
  23. for RY=0,2*math.pi,quality do
  24. local x= R*math.sin(RX)*math.cos(RY)
  25. local y= R*math.sin(RX)*math.sin(RY)
  26. local z= R*math.cos(RX)
  27. i=i+1
  28.  
  29. map[math.floor(x)][math.floor(y)][math.floor(z)]=true
  30. end
  31. end
  32. print("blocks:"..i)
  33. turtle.digDown()
  34. for i=1,2 do
  35. turtle.up()
  36. end
  37. for y=-mapY,mapY do
  38. if turtle.getFuelLevel() ==0 then
  39. turtle.select(1)
  40. turtle.refuel(1)
  41. end
  42. turtle.select(2)
  43.  
  44. print(arg[1].."|"..y.."|"..arg[2])
  45. print(map[arg[1]])
  46. if map[arg[1]][y][arg[2]] then
  47. turtle.placeDown()
  48.  end
  49. turtle.up()
  50. end
  51.  
  52.  
  53.  
  54.  
  55. turtle.refuel()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement