Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function reboot()
- if turtle.getItemCount() <1 then
- shell.run("reboot")
- end
- end
- function fuel()
- while turtle.getFuelLevel() <100 do
- for i=1,16 do
- turtle.select(i)
- turtle.refuel(2)
- end
- break
- end
- end
- function forward()
- turtle.forward()
- end
- function placeDown()
- while not turtle.detectDown() do
- turtle.select(1)
- turtle.placeDown()
- end
- end
- function shutdown()
- if turtle.getItemCount(1) <1 then
- shell.run("reboot")
- end
- end
- function bridge(s)
- fuel(1)
- for i=1,s,1 do
- -- forward(1)
- placeDown(1)
- forward(1)
- reboot(1)
- end
- end
- local tArgs = {...}
- function down()
- turtle.down()
- end
- function moveForwardDown(s)
- for i=1,s,1 do
- forward(1)
- down(1)
- end
- end
- function moveForwardDownPlaceDown(s)
- for i=1,s,1 do
- moveForwardDown(1)
- placeDown(1)
- end
- end
- function moveForwardDownPlaceDownMoveForward(s)
- for i=1,s,1 do
- moveForwardDownPlaceDown(1)
- forward(1)
- end
- end
- function back()
- turtle.back()
- end
- function bridgeDown(s)
- for i=1,s,1 do
- bridge(tArgs[1])
- back(1)
- moveForwardDownPlaceDown(tArgs[2])
- end
- end
- bridgeDown(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement