Advertisement
yzrhnd

Untitled

Oct 24th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. local num=4
  2. local lim=100
  3. local count=0
  4. local selectnum=0
  5. local mode=0
  6. local maxnum=12
  7.  
  8. num = num-1
  9.  
  10. turtle.select(1)
  11.  
  12.  
  13. while 1==1 do
  14.  
  15. turtle.up()
  16.  
  17. for j=1,4 do
  18. for i=1,num do
  19.  
  20.  
  21. if turtle.getItemCount() == 0 then
  22. selectNum = turtle.getSelectedSlot()
  23. if selectNum == 16 then
  24. selectNum = 0
  25. end
  26. turtle.select(selectNum+1)
  27. end
  28. turtle.placeDown()
  29. turtle.forward()
  30.  
  31.  
  32. if i == num then
  33. turtle.turnRight()
  34. end
  35. end
  36. end
  37.  
  38. if num >= maxnum then
  39. mode = 1
  40. elseif num <= 4 then
  41. mode = 0
  42. end
  43.  
  44. if mode == 0 then
  45. num = num + 2
  46. turtle.back()
  47. turtle.turnLeft()
  48. turtle.forward()
  49. turtle.turnRight()
  50. else
  51. num = num - 2
  52. turtle.turnRight()
  53. turtle.forward()
  54. turtle.turnLeft()
  55. turtle.forward()
  56. end
  57.  
  58.  
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement