Posted 15 August 2013 - 12:56 AM
I currently have 4 quarries running in the middle of the ocean. It has become a hassle to layout a 60x60 area of cobble stone each time I'm ready to fire up a new quarry, this is especially true since all of the quarries are in sync so I must build 4 60x60 cobblestone outlines so that I can place the landmarks and make sure the area is indeed 60x60. I decided to write a turtle script to automate this process. My goal is to have to turtle start where the first landmark will be, then build out in a straight line 60 blocks, turn right and build out another 60 blocks, turn right, another 60 blocks and finally turn right and the last 60 to reach it's initial starting area. The script I have written uses a nested loop, one to count to 4 since there are 4 sides and the nested loop to count to 60, once for each block length. The problem I'm having is that the turtle is not laying out the frame correctly. He does not go the full 60 block distance before turning right, he also does not select the next stack of items when he is low. Could someone please look at this script and see what I am doing wrong.
Thanks in advance!
-Rev
Thanks in advance!
-Rev
turtle.refuel()
local slotSelect = 2
turtle.select(slotSelect)
for i=1, 4 do
for j=1, 60 do
if turtle.detectDown() then
turtle.forward()
else
if turtle.getItemCount(slotSelect)==0 then
slotSelect = slotSelect + 1
end
turtle.placeDown()
end
end
turtle.turnRight()
end