Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- if #tArgs ~= 1 then
- print("Please")
- return
- end
- local x = tonumber(tArgs[1])
- if x < 0 then
- print("Invalid (negative) dimensions")
- return
- end
- local fuel = turtle.getFuelLevel()
- local bridgeLenght = x+x+x
- while fuel < bridgeLenght do
- turtle.select(16)
- if not turtle.refuel(1) then
- print("not enough Fuel")
- return
- turtle.select(1)
- end
- end
- while bridgeLenght < fuel do
- for i = x,1,-1 do
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.placeDown()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- if turtle.getItemCount() == 0 then
- turtle.select(2)
- if turtle.getItemCount() == 0 then
- turtle.select(3)
- if turtle.getItemCount() == 0 then
- turtle.select(4)
- if turtle.getItemCount() == 0 then
- turtle.select(5)
- if turtle.getItemCount() == 0 then
- turtle.select(6)
- if turtle.getItemCount() == 0 then
- turtle.select(7)
- if turtle.getItemCount() == 0 then
- turtle.select(8)
- if turtle.getItemCount() == 0 then
- turtle.select(9)
- if turtle.getItemCount() == 0 then
- turtle.select(10)
- if turtle.getItemCount() == 0 then
- turtle.select(11)
- if turtle.getItemCount() == 0 then
- turtle.select(12)
- if turtle.getItemCount() == 0 then
- turtle.select(13)
- if turtle.getItemCount() == 0 then
- turtle.select(14)
- if turtle.getItemCount() == 0 then
- turtle.select(15)
- if turtle.getItemCount() == 0 then
- print("Building Materials Missing")
- return
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement