Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- width = 10
- length = 10
- function place2(side)
- if turtle.getItemCount(turtle.getSelectedSlot()) == 0 then
- turtle.select(turtle.getSelectedSlot()+1)
- end
- if side == "f" then
- turtle.place()
- elseif side == "u" then
- turtle.placeUp()
- else
- turtle.placeDown()
- end
- end
- function forward()
- if turtle.getFuelLevel() == 0 then
- curslot = turtle.getSelectedSlot()
- turtle.select(15)
- turtle.refuel()
- turtle.select(curslot)
- end
- while not turtle.forward() do
- turtle.dig()
- end
- end
- i = 0
- ii = 0
- while ii < length do
- turtle.turnRight()
- i = 0
- while i < width do
- print("At gen no "..ii.." building part "..i.." with "..turtle.getFuelLevel().."/"..turtle.getFuelLimit().." fuel left")
- place2()
- forward()
- i = i + 1
- end
- place2()
- i = 0
- turtle.turnRight()
- turtle.turnRight()
- while i < width do
- turtle.forward()
- i = i + 1
- end
- turtle.turnRight()
- forward()
- ii = ii + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment